Skip to content

Commit

Permalink
Merge pull request #205 from NCAR/K20shores-patch-1
Browse files Browse the repository at this point in the history
Update README.md
  • Loading branch information
K20shores authored Aug 27, 2024
2 parents 5ca3f40 + ecaa5ac commit 7b88c19
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 19 deletions.
44 changes: 26 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,34 +28,42 @@ pip install acom_music_box

# Tests

The tests directory contains 4 different tests that can be ran with [PyTest](https://docs.pytest.org/en/8.2.x/). PyTest can be installed by running:

```
pip install pytest
```

After PyTest is intalled, the tests can be ran through the following commands from the root directory:
After installing music box for local development `pip install -e .`

```
cd tests
pytest
```

# Documentation

MusicBox documentation can be built using [Sphinx](https://www.sphinx-doc.org/en/master/). Sphinx can be installed by running:
# Command line tool
MusicBox provides a command line tool that can run configurations as well as some pre-configured examples. Basic plotting can be done if gnuplot is installed.

```
pip install sphinx
music_box -h
usage: music_box [-h] [-c CONFIG] [-e {CB5,Chapman,FlowTube,Analytical}] [-o OUTPUT] [-v] [--color-output] [--plot PLOT]
MusicBox simulation runner.
optional arguments:
-h, --help show this help message and exit
-c CONFIG, --config CONFIG
Path to the configuration file. If --example is provided, this argument is ignored.
-e {CB5,Chapman,FlowTube,Analytical}, --example {CB5,Chapman,FlowTube,Analytical}
Name of the example to use. Overrides --config.
Available examples:
CB5: Carbon bond 5
Chapman: The Chapman cycle with conditions over Boulder, Colorado
FlowTube: A fictitious flow tube experiment
Analytical: An example of an analytical solution to a simple chemical system
-o OUTPUT, --output OUTPUT
Path to save the output file, including the file name. If not provided, result will be printed to the console.
-v, --verbose Increase logging verbosity. Use -v for info, -vv for debug.
--color-output Enable color output for logs.
--plot PLOT Plot a comma-separated list of species if gnuplot is available (e.g., CONC.A,CONC.B).
```

After installing Sphinx, the documentation can be generated by running the following commands in the root directory:
To run one of the examples and plot something you would run

```
cd doc/sphinx_files
make html
music_box -e Chapman -o output.csv -vv --color-output --plot CONC.O1D
```

Then, open `music-box/doc/sphinx_files/build/html/index.html` in a browser.

The documentation includes more detailed instructions for configuring the model, along with developer resources.
2 changes: 1 addition & 1 deletion src/acom_music_box/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
This package contains modules for handling various aspects of a music box,
including species, products, reactants, reactions, and more.
"""
__version__ = "2.2.3"
__version__ = "2.3.0"

from .utils import convert_time, convert_pressure, convert_temperature, convert_concentration
from .species import Species
Expand Down

0 comments on commit 7b88c19

Please sign in to comment.