Closed sevyharris closed 6 months ago
WARNING:root:Initial mole fractions do not sum to one; normalizing. WARNING:root:Initial mole fractions do not sum to one; normalizing. WARNING:root:Initial mole fractions do not sum to one; normalizing. Traceback (most recent call last): File "/home/runner/work/RMG-Py/RMG-Py/rmgpy/tools/diffmodels.py", line 365, in execute surface_path1 = kwargs['surface_path1'] KeyError: 'surface_path1'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/share/miniconda3/envs/rmg_env/lib/python3.7/site-packages/julia/pseudo_python_cli.py", line 308, in main
python(vars(ns))
File "/usr/share/miniconda3/envs/rmg_env/lib/python3.7/site-packages/julia/pseudo_python_cli.py", line 59, in python
scope = runpy.run_path(script, run_name="main")
File "/usr/share/miniconda3/envs/rmg_env/lib/python3.7/runpy.py", line 263, in run_path
pkg_name=pkg_name, script_name=fname)
File "/usr/share/miniconda3/envs/rmg_env/lib/python3.7/runpy.py", line 96, in _run_module_code
mod_name, mod_spec, pkg_name, script_name)
File "/usr/share/miniconda3/envs/rmg_env/lib/python3.7/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "scripts/checkModels.py", line 308, in
beep boop this comment was written by a bot :robot:
WARNING:root:Initial mole fractions do not sum to one; normalizing. WARNING:root:Initial mole fractions do not sum to one; normalizing. WARNING:root:Initial mole fractions do not sum to one; normalizing. Traceback (most recent call last): File "/home/runner/work/RMG-Py/RMG-Py/rmgpy/tools/diffmodels.py", line 365, in execute surface_path1 = kwargs['surface_path1'] KeyError: 'surface_path1'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/share/miniconda3/envs/rmg_env/lib/python3.7/site-packages/julia/pseudo_python_cli.py", line 308, in main
python(vars(ns))
File "/usr/share/miniconda3/envs/rmg_env/lib/python3.7/site-packages/julia/pseudo_python_cli.py", line 59, in python
scope = runpy.run_path(script, run_name="main")
File "/usr/share/miniconda3/envs/rmg_env/lib/python3.7/runpy.py", line 263, in run_path
pkg_name=pkg_name, script_name=fname)
File "/usr/share/miniconda3/envs/rmg_env/lib/python3.7/runpy.py", line 96, in _run_module_code
mod_name, mod_spec, pkg_name, script_name)
File "/usr/share/miniconda3/envs/rmg_env/lib/python3.7/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "scripts/checkModels.py", line 308, in
beep boop this comment was written by a bot :robot:
WARNING:root:Initial mole fractions do not sum to one; normalizing. WARNING:root:Initial mole fractions do not sum to one; normalizing. WARNING:root:Initial mole fractions do not sum to one; normalizing. Traceback (most recent call last): File "/home/runner/work/RMG-Py/RMG-Py/rmgpy/tools/diffmodels.py", line 365, in execute surface_path1 = kwargs['surface_path1'] KeyError: 'surface_path1'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/share/miniconda3/envs/rmg_env/lib/python3.7/site-packages/julia/pseudo_python_cli.py", line 308, in main
python(vars(ns))
File "/usr/share/miniconda3/envs/rmg_env/lib/python3.7/site-packages/julia/pseudo_python_cli.py", line 59, in python
scope = runpy.run_path(script, run_name="main")
File "/usr/share/miniconda3/envs/rmg_env/lib/python3.7/runpy.py", line 263, in run_path
pkg_name=pkg_name, script_name=fname)
File "/usr/share/miniconda3/envs/rmg_env/lib/python3.7/runpy.py", line 96, in _run_module_code
mod_name, mod_spec, pkg_name, script_name)
File "/usr/share/miniconda3/envs/rmg_env/lib/python3.7/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "scripts/checkModels.py", line 308, in
beep boop this comment was written by a bot :robot:
Although this is still failing with:
FileNotFoundError: [Errno 2] No such file or directory: 'stable_regression_results/minimal_surface/chemkin/species_edge_dictionary.txt'
This failure is expected because the last run of the regression tests on main didn't produce the edge files. It's the same expected error as when we first pushed the minimal_surface regression test, so I think this is ready for review.
Also, the surface regression test is still failing because of this issue https://github.com/ReactionMechanismGenerator/RMG-Py/issues/2657, but I'll make a separate PR for that.
If we merge this PR would that enable #2657 to pass normally (assuming the bug can be fixed)?
If we merge this PR would that enable #2657 to pass normally (assuming the bug can be fixed)?
Yes. And then https://github.com/ReactionMechanismGenerator/RMG-Py/pull/2658 is my fix for that bug.
Great - will send this in now.
Patch for surface regression diffmodels
Motivation or Problem
The .github actions script calling scripts/checkModels.py does not use the correct arguments or filenames for checking a surface model. So this adds a check for whether the existence of surface files to rmgpy/tools/diffmodels.py
Description of Changes
Rather than changing this part of https://github.com/ReactionMechanismGenerator/RMG-Py/blob/main/.github/workflows/CI.yml ...
... I think it would be easier to add a check in Python to see if the surface files exist and chem_annotated.inp does not, and then make appropriate changes from there.
Testing
I ran the checkModels.py script locally and confirmed these changes fix the problem for the minimal_surface example without breaking the minimal example.
Even if this fix works, the minimal_surface regression test for this PR is not expected to pass because there are no stable regression edge files to compare against.
Reviewer Tips
Let me know if you have thoughts about the level at which this bug should be fixed. In theory, we could rewrite the CI.yml to call the surface tests separately from the others, but that sounds like a pain. Alternatively, we could move the check for surface files inside the checkModels.py script instead of adding it to rmgpy/tools/diffmodels.py