-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #77 from uclchem/develop
We release UCLCHEM 3.4.0 with some additions to both user experience, technical improvements and new features: The biggest addition is a new mode where you can run UCLCHEM solely in memory, not requiring you to save and load the csv files that we relied on for long. A tutorial on how to do this, can be found in notebooks/2a_modelling_objects_on_disk.py We implement a new postprocessing mode, similar to what the NEATH paper does (https://fpriestley.github.io/neath/). This also allows for running much more flexible models. We now check whether the user specified branching ratios correctly, this means that if the total for reactions is larger than 1.0, we divide by the total. We also do it for three way split reactions, since often people write 0.33, resulting in 1% not being accounted for. We move to the RATE22 database as the default one, some species are renamed (https://umistdatabase.uk/) The tutorial notebooks have been moved to the notebooks directory and were revised a bit. radfield is now always a column in the output csv files, removing the need for two extra lines at the top of each uclchem csv file. A small chemistry network is added, this runs quickly and can be used for toy problems and code testing. Small changes: The standard uv yield is now 0.03 The magnetic field is now a parameter that can be passed for shock models The analysis scripts work once again in the gas phase, the grains still have some issues (see: Incorrect production and destruction in analysis.py #37) We improved test coverage We now have precommit configured to improve code quality
- Loading branch information
Showing
105 changed files
with
52,753 additions
and
9,593 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
name: Test notebooks | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: "3.11" # Specify the Python version you need | ||
|
||
- name: Install gfortran | ||
run: | | ||
sudo apt-get -y update | ||
sudo apt-get -y install gfortran | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install pytest nbmake pytest-xdist jupyter | ||
- name: Install package in editable mode | ||
run: | | ||
pip install -e . | ||
- name: Test notebooks | ||
run: | | ||
pytest -n auto --nbmake --nbmake-timeout=2400 --nbmake-kernel=python3 notebooks | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,3 +18,6 @@ test | |
build | ||
dist | ||
*/__pycache__ | ||
.venv | ||
conda* | ||
.conda |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
repos: | ||
- repo: https://github.com/astral-sh/ruff-pre-commit | ||
# Ruff version. | ||
rev: v0.6.9 | ||
hooks: | ||
# Run the linter. | ||
- id: ruff | ||
args: [ --fix ] | ||
# Run the formatter. | ||
- id: ruff-format | ||
- repo: https://github.com/kynan/nbstripout | ||
rev: 0.7.1 | ||
hooks: | ||
- id: nbstripout | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# This file contains all the reactions we dropped from UMIST2, and the reasons why we dropped them! | ||
# Dropped because it conflicts with the default H2 Photodiss mechanism in UCLCHEM. | ||
8268:PH:H2:PHOTON:H:H:::1:5.70e-11:0.00:4.18:10:41000:C:C:"10.1051/0004-6361/201628742":"Heays, et al. A&A, 602, A105 (2017)": |
File renamed without changes.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.