Skip to content

Commit

Permalink
Merge pull request #206 from NCAR/main
Browse files Browse the repository at this point in the history
Version 2.3.0
  • Loading branch information
K20shores committed Aug 27, 2024
2 parents 100525d + 7b88c19 commit dd98565
Show file tree
Hide file tree
Showing 61 changed files with 302 additions and 918 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/CI_Tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,8 @@ jobs:

- name: Run the smoke tests
run: |
music_box configFile=tests/configs/analytical_config/my_config.json outputDir=tests/configs/analytical_config
music_box -c src/acom_music_box/examples/configs/analytical/my_config.json -o output.csv
music_box -e Analytical -o output.csv
music_box -e Analytical -o output.csv -vv --color-output
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.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

2 changes: 0 additions & 2 deletions examples/camp_examples/bright_chamber/use_case_7/initial.csv

This file was deleted.

Binary file not shown.

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit dd98565

Please sign in to comment.