-
Notifications
You must be signed in to change notification settings - Fork 64
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Constituent updates #549
Merged
Merged
Constituent updates #549
Changes from 162 commits
Commits
Show all changes
188 commits
Select commit
Hold shift + click to select a range
cea2531
Refactor constituent mixing ratio properties
bce4d22
Avoid RE deprecation warning by moving case fold to state_machine.py
279c180
Fix doctest
057588e
Allow '1' to be a valid unit
678621e
Added molar_mass (molecular weight) value to constituent property type
27f6851
initial changes
ca65368
fixes
10416a9
address review comments
5e8e33a
hopefully final fixes
9bb155b
Merge pull request #41 from peverwhee/add_molecular_weight
gold2718 a2386d6
initial commit
7657f33
fix function name
5315500
fix fstring
84bade6
fix mistakes in routine names and comments
3494311
split up register and initialize
d9871c0
cleanup
a71e1b5
cleanup
6c7c82a
add temporary hash_table variable to avoid dangling pointer
d4ad4aa
deallocate hash_table
f549d64
cleaner way to deallocate hash table in iterator object
5813d19
change name of const array interfaces
8ff8d5a
add intialized_in_physics property
f074f1c
better error handling; fix for copy constituent
5e839bf
remove unnecessary use statment
feb8bcb
fix unit tests
15f52c6
revert changes for unit conversion test
3703645
handle constituent edge cases better and differently; revert module v…
1e83c4c
fix decimal
31919df
Merged changes from new_variables_input
dad0dbd
remove initialized-in-physics constituent from advection test require…
c477eaf
Initial commit of containerized GitHub actions to run unit tests.
43a47e4
Fixing typo from previous commit.
mwaxmonsky 5cc29b5
Fixing typo from previous commit.
mwaxmonsky aaa12aa
Addming missing python dependency.
mwaxmonsky 92680b7
Removing incorrect flag from pip install.
mwaxmonsky 3ff2d09
Replacing incorrect Dockerfile instruction.
mwaxmonsky 7cce8c5
Returning non-zero if test failures detected.
mwaxmonsky 8ac4c7e
Removing test failing due to not being fully implemented yet.
mwaxmonsky 00edf9a
Addming missing newlines.
mwaxmonsky f44f377
add default_value to constituent properties object
d3413c1
Adding testing CI action to pull requests and all branches.
mwaxmonsky f3fa550
Updating workflow name with more accurate description.
mwaxmonsky 7c5c3fb
Renaming capgen unit test workflow file.
mwaxmonsky 97cd70a
Fixing typo.
mwaxmonsky e5fdab9
Moving capgen Dockerfile into test directory.
mwaxmonsky d5cc5f5
Adding print statement to test output for reasong for skipping var_ac…
mwaxmonsky a10648a
Moving tests to running in github container directly.
mwaxmonsky 374a473
Replacing apt calls with apt-get.
mwaxmonsky 7030d43
Adding sudo to apt-get commands.
mwaxmonsky d0e2e22
Updating package names to ubuntu packages.
mwaxmonsky 5e70051
Updating path to cd into.
mwaxmonsky e76bb45
Removing test/Dockerfile as no longer needed.
mwaxmonsky 752f1f1
Removing un-needed python dependencies install step.
mwaxmonsky 62a0d03
Removing sourcing python venv.
mwaxmonsky 2552b69
Filtering CI action to only auto run if in a PR or pushing to the mai…
mwaxmonsky 731a0cb
Testing allowing run of actions manually.
mwaxmonsky b4ba84c
Adding proper filter to job to run unit test action manually.
mwaxmonsky af5119b
Fixing format of workflow_dispatch declaration.
mwaxmonsky 813e46a
Changing ordering of workflow triggers.
mwaxmonsky 08c5503
Adding initial pylint configuration.
mwaxmonsky e28d5d5
Removing pylint job to evaluate in a new PR.
mwaxmonsky 85ce0aa
Merge pull request #2 from mwaxmonsky/test_actions
mwaxmonsky b87a1f8
add has_default method
798638f
Merge branch 'add_const_interface' of https://github.com/peverwhee/cc…
06c9d5d
Add 'thermo_active' property to constituent properties DDT.
nusbaume dfe8cb1
Update CCPP constituent standard names.
nusbaume 9fb2b40
Fix thermo_active syntax errors caught by unit tests.
nusbaume 93eb6b3
Add 'thermo_active' property tests to 'advection_test' unit test coll…
nusbaume fab788a
Attempt to add more python versions to python tests.
mwaxmonsky fcd966c
Updating action versions to no longer use deprecated node12.
mwaxmonsky c9af06c
Updating python.yaml to run on demand.
mwaxmonsky 7417224
Temporarily adding push events back.
mwaxmonsky 861af3e
Updating metadata tests to check updated property name.
mwaxmonsky c4df7a2
Initial doctest action and associated fixes.
mwaxmonsky 1e760fa
Fixing actions file syntax error.
mwaxmonsky 20d2044
Fixing doctest call.
mwaxmonsky 7b42f73
Fixing shell script syntax error.
mwaxmonsky 6696865
Removing doctest from main unit test script as no longer needed with …
mwaxmonsky 57b2e0d
Fixing no newline in some files.
mwaxmonsky 8065f82
Removing push events.
mwaxmonsky 9f1573f
Initial attempt of removing python 2 code checks.
mwaxmonsky 50fc53c
Removing python code older than 2.7
mwaxmonsky 6803e90
Chaning python unit tests to run in pytest harness.
mwaxmonsky b48abe5
Removing un-needed pylint statements and fixing imports.
mwaxmonsky 8780abc
Fixing formatting.
mwaxmonsky 820acfc
Removing python2 style is string check.
mwaxmonsky 0b65ba5
Update minimum version to 3.7
mwaxmonsky 8c0045a
Merge pull request #4 from mwaxmonsky/remove_python_2
mwaxmonsky ffcd582
Update .github/workflows/python.yaml
mwaxmonsky 9f6c9a2
Update .github/workflows/python.yaml
mwaxmonsky b46f042
Update .github/workflows/python.yaml
mwaxmonsky 85d5e50
Removing un-needed main function that runs doc test.
mwaxmonsky 971bf1b
Removing un-needed main function that runs doctest.
mwaxmonsky b568453
Adding more python versions to test against.
mwaxmonsky b82c030
Testing version syntax fix.
mwaxmonsky ba8d351
Testing updated version syntax fix.
mwaxmonsky 8b08bfc
Fixing version syntax.
mwaxmonsky ae08563
Reverting version support syntax.
mwaxmonsky 419b4df
Removing pytest from testing of generated fortran script and removing…
mwaxmonsky 0693ebd
Updating pytest.ini to ignore non-unit test files.
mwaxmonsky 4d1ac61
Adding verbose pytest output.
mwaxmonsky 8a6a69b
Re-adding unit test main check to unit tests.
mwaxmonsky 1076f71
Renaming test script to more appropriate name.
mwaxmonsky 8f1c3ad
removing un-needed python requirements.txt install step.
mwaxmonsky 5c6f91e
Updating test script name missing from previous commit.
mwaxmonsky add2917
Removing requirements.txt as not needed currently.
mwaxmonsky 3c22415
Merge pull request #1 from gold2718/add_const_interface
peverwhee b8fae25
Fixing typo
mwaxmonsky 3207b59
fix advection test
475fb9b
Merge branch 'add_const_interface' into pytest_additions
mwaxmonsky 3c987d5
Typo fix.
mwaxmonsky fd4378f
Merge pull request #3 from mwaxmonsky/pytest_additions
mwaxmonsky 04a1d7e
add new host cap interface to check if a variable is already a scheme…
ffa3c19
Merge branch 'add_const_interface' of https://github.com/peverwhee/cc…
48041d8
add testing
11191fe
Make capgen unit tests less inter-dependent, and perform some cleanup.
nusbaume 85e9292
Merge remote-tracking branch 'peverwhee/add_const_interface' into con…
nusbaume a0d5d5a
Fix variable intent.
nusbaume 2e53d9e
Merge pull request #5 from nusbaume/const_updates
nusbaume dc0402a
resolve merge conflicts
6819f2e
fix check_errflg call
87f74cb
address reviewer comments
65824a5
fix function calls
90339ae
Merge pull request #6 from peverwhee/new-interface
peverwhee 45f0859
Set values for error flag and error message in new is_scheme_const su…
nusbaume 3a970eb
Merge pull request #7 from nusbaume/errflg_fix
peverwhee 0bf3117
Add new 'set_minimum' method which can change min constituent value
nusbaume cc7fe1a
Add unit tests for new set_minimum method.
nusbaume f635213
Fixed typos in test_host messages.
nusbaume 627e78f
Merge pull request #8 from nusbaume/qmin_setter
nusbaume f9d31a5
Add new 'water_species' property and associated methods.
nusbaume 4567410
Add 'water_species' property unit tests.
nusbaume 900b4fc
Fix comments in water species routines.
nusbaume 8b0d1f6
Add space between '.not.' and logical to improve readability.
nusbaume 99cae9f
Merge pull request #9 from nusbaume/water_species_prop
nusbaume a722da8
sort sets before writing to files to ease comparison between runs
935fb72
fix attempt to sort list
adb81b5
Merge pull request #10 from peverwhee/sorted_sets
nusbaume 0e55626
Add setter methods for molecular weight, and add some additional prop…
nusbaume 7f3e7da
Add new unit tests, and fix bugs found during testing.
nusbaume 76fb682
Replace 'molec_weight' with 'molar_mass', as it is likely a more accu…
nusbaume 1880a3c
Merge pull request #12 from nusbaume/mol_weight_set
nusbaume d89b65e
initial commit; metadata table and parsing working
443c37e
code works; may need cleanup
e7804b9
fix comment order - CRUCIAL
f5b7250
merge to head of feature/capgen
8aaa8ff
Merge branch 'dynamic_constituents' into peverwhee-fork-dynamic-const…
bd0ae2e
clean-up and switch constituents.py to fstrings
e48faa5
expand testing
2401436
update register_constituents error handling; misc review requests
744de3e
add doctests to ccpp_datafile.py
2c58eed
review comments; add in vertical transform bugfix
8d2bd61
Merge pull request #13 from peverwhee/peverwhee-fork-dynamic-constitu…
peverwhee f952b8b
merge to head of feature/capgen
d8b706a
fix merge
b1ffd3f
another merge fix
950d99a
merge to head of feature/capgen
89688b1
Merge remote-tracking branch 'NCAR/main' into add_const_interface
3988c44
merge in NCAR/main
a0a3ea2
fix merge
d4029f1
fix test; bring back python.yaml workflow
a4548a0
remove target attribute from dyn_const_prop variable declarations
930c3db
code cleanup; review requests; include python3.12 in ci testing
86ddbce
merge to head of main
7c3a0cd
back off 3.12 doctests for now
2906220
add script to check fortran vs metadata without a host model
adff339
add check that routine exists in fortran; use module-level dynamic co…
d29a035
fix typo
9ce41ee
code cleanup; code review
eee30cb
allow for skipping of ddt check; skip ddt check from offline script
807d35a
handle dimensions for promoted variables
da55869
check for compatibility before adding constituent; add more testing
2a23124
add unit comparison
4c4807b
code review
12b4eab
update logic to exclude nested subroutines from routine parsing
3a6a3e2
update vardictionary doctests and add 3.12 testing
8c90217
Merge remote-tracking branch 'NCAR/main' into group-fix
9e43b78
code cleanup; review requests
b668b2e
code clean-up; add test for promoted variable with no horiz dimension
1e139b5
code review; cleanup
522ad25
Merge remote-tracking branch 'NCAR/main' into add_const_interface
15a16ea
only run pytests on test/ directory in python.yaml workflow
c06600e
merge in optional fortran v metadata checker
0b8f23a
Merge remote-tracking branch 'origin/group-fix' into add_const_interface
c781edc
Merge remote-tracking branch 'NCAR/main' into add_const_interface
6e165e5
address review comments
8297a6b
fix incorrect subname
97c3cc5
fix indexing
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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,49 @@ | ||
name: Python package | ||
|
||
on: | ||
workflow_dispatch: | ||
pull_request: | ||
branches: [feature/capgen, main] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-version: ['3.8', '3.9', '3.10', '3.11'] | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install pytest | ||
- name: Test with pytest | ||
run: | | ||
export PYTHONPATH=$(pwd)/scripts:$(pwd)/scripts/parse_tools | ||
pytest -v | ||
|
||
doctest: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-version: ['3.8', '3.9', '3.10', '3.11'] | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install pytest | ||
- name: Doctest | ||
run: | | ||
export PYTHONPATH=$(pwd)/scripts:$(pwd)/scripts/parse_tools | ||
pytest -v scripts/ --doctest-modules |
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,2 @@ | ||
[pytest] | ||
addopts = -ra --ignore=scripts/metadata2html.py --ignore-glob=test/**/test_reports.py | ||
climbfuji marked this conversation as resolved.
Show resolved
Hide resolved
|
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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Other CI tests go up to Python 3.12, is there a reason we can't also do that here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good suggestion. I added 3.12 for the build tests, but ran into an annoying issue for the doctests and backed out of that - issue here: #557
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Per our discussion yesterday, I changed the tests to no longer rely on the string representation of OrderedDict so now 3.12 is back in business!