Skip to content

Commit

Permalink
Show a smaller tree for final result
Browse files Browse the repository at this point in the history
  • Loading branch information
mdpiper committed Apr 3, 2024
1 parent 8d5a121 commit f571e71
Showing 1 changed file with 29 additions and 83 deletions.
112 changes: 29 additions & 83 deletions docs/source/example-c.rst
Original file line number Diff line number Diff line change
Expand Up @@ -28,89 +28,16 @@ create a directory to hold our work:
This directory is a starting point;
we'll add files and directories to it as we proceed through the example.
At the end,
the directory structure under ``example-c`` should look similar to that below.
The final directory structure of ``example-c`` should look similar to that below.

.. code:: bash
example-c
example-c/
├── babel_heatc.toml
├── bmi-example-c
│   ├── CMakeLists.txt
│   ├── LICENSE
│   ├── README.md
│   ├── heat
│   │   ├── CMakeLists.txt
│   │   ├── bmi_heat.c
│   │   ├── bmi_heat.h
│   │   ├── bmi_main.c
│   │   ├── bmiheatc.pc.cmake
│   │   ├── heat.c
│   │   ├── heat.h
│   │   ├── heatc.pc.cmake
│   │   └── main.c
│   └── testing
│   ├── CMakeLists.txt
│   ├── config.txt
│   ├── test_conflicting_instances.c
│   ├── test_get_value.c
│   ├── test_grid_info.c
│   ├── test_initialize_from_file.c
│   ├── test_irf.c
│   ├── test_print_var_names.c
│   ├── test_reinitialize.c
│   └── test_set_value.c
├── bmi-example-c/
├── environment-c.yml
├── pymt_heatc
│   ├── CHANGES.rst
│   ├── CREDITS.rst
│   ├── LICENSE.rst
│   ├── MANIFEST.in
│   ├── README.rst
│   ├── babel.toml
│   ├── build
│   │   └── HeatC
│   │   └── api.yaml
│   ├── docs
│   │   ├── Makefile
│   │   ├── _static
│   │   │   ├── logo-dark.svg
│   │   │   └── logo-light.svg
│   │   ├── api
│   │   ├── authors.rst
│   │   ├── babel.rst
│   │   ├── changelog.rst
│   │   ├── conf.py
│   │   ├── developer_install.rst
│   │   ├── environments.rst
│   │   ├── index.rst
│   │   ├── license.rst
│   │   ├── quickstart.rst
│   │   ├── updating.rst
│   │   └── usage.rst
│   ├── meson.build
│   ├── meta
│   │   └── HeatC
│   │   └── api.yaml
│   ├── noxfile.py
│   ├── pymt_heatc
│   │   ├── __init__.py
│   │   ├── _bmi.py
│   │   ├── _version.py
│   │   ├── data -> ../meta
│   │   └── lib
│   │   ├── __init__.py
│   │   └── heatc.pyx
│   ├── pyproject.toml
│   ├── requirements-build.txt
│   ├── requirements-library.txt
│   ├── requirements-testing.txt
│   ├── requirements.txt
│   └── setup.cfg
└── test
└── config.txt
16 directories, 60 files
├── pymt_heatc/
└── test/
Set up a conda environment
Expand Down Expand Up @@ -327,8 +254,8 @@ ending with
if everything has been built correctly.


Add metadata to make a *pymt* component
---------------------------------------
Make a *pymt* component
-----------------------

The final step in wrapping the *heat* model
is to add metadata used by the `Python Modeling Tool`_, *pymt*.
Expand All @@ -349,8 +276,13 @@ and view the current metadata:

.. code:: bash
$ cd ../pymt_heatc
$ ls meta/HeatC/
cd ../pymt_heatc
ls meta/HeatC/
which gives:

.. code:: bash
api.yaml
The file ``api.yaml`` is automatically generated by the *babelizer*.
Expand All @@ -367,8 +299,22 @@ are given in the CSDMS Model Metadata repository.
Download each of the files using the links in the list above
and place them in the ``pymt_heatc/meta/HeatC`` directory
alongside ``api.yaml``.
The structure of the ``meta`` directory should look like:

.. code:: bash
meta/
└── HeatC/
├── api.yaml
├── heat.txt
├── info.yaml
├── parameters.yaml
└── run.yaml
Run the babelized model in *pymt*
...................................

Then start a Python session and show that the *heat* model
Start a Python session and show that the *heat* model
can be called through *pymt*:

.. code:: python
Expand Down

0 comments on commit f571e71

Please sign in to comment.