From f0426479ba5cefb6e23fefc588717f4a00ba4781 Mon Sep 17 00:00:00 2001 From: Alon Grinberg Dana Date: Thu, 6 May 2021 10:53:38 +0300 Subject: [PATCH 1/8] Modified cont_int.yml Only run on Py3.7 --- .github/workflows/cont_int.yml | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/.github/workflows/cont_int.yml b/.github/workflows/cont_int.yml index 383c6386..998a3140 100644 --- a/.github/workflows/cont_int.yml +++ b/.github/workflows/cont_int.yml @@ -1,25 +1,30 @@ name: continuous integration -on: [push] +on: + push: + pull_request: + branches: + - master + types: [opened, synchronize, reopened, ready_for_review, review_requested] jobs: build: runs-on: ubuntu-latest - strategy: - matrix: - python-version: [3.7, 3.8] steps: - uses: actions/checkout@v2 - - name: Set up miniconda Python ${{ matrix.python-version }} + - name: Set up miniconda Python 3.7 uses: conda-incubator/setup-miniconda@v2 with: activate-environment: t3_env environment-file: environment.yml - python-version: ${{ matrix.python-version }} + python-version: 3.7 auto-activate-base: false + - name: Install codecov + run: conda install -y -c conda-forge codecov + - name: Install dependencies shell: bash -l {0} run: | @@ -29,7 +34,7 @@ jobs: echo $(pwd) conda list - - name: Test with nosetests + - name: Test with PyTest shell: bash -l {0} run: | cd .. From cd2b56b8761080d4abbc35c7ccdf4899bea4a19b Mon Sep 17 00:00:00 2001 From: Alon Grinberg Dana Date: Thu, 6 May 2021 16:30:46 +0300 Subject: [PATCH 2/8] Specify openbabel >= 3 in environment.yml --- environment.yml | 40 +++++++++++++++++++--------------------- 1 file changed, 19 insertions(+), 21 deletions(-) diff --git a/environment.yml b/environment.yml index 3fc55247..5971a41d 100644 --- a/environment.yml +++ b/environment.yml @@ -2,18 +2,13 @@ name: t3_env channels: - defaults - rmg - - anaconda - - omnia - conda-forge - - mjohnson541 dependencies: - - ase >=3.15.0 - cairo - cairocffi - rmg::cantera >=2.3.0 - - cclib >=1.6 + - conda-forge::cclib >=1.6.3 - rmg::chemprop - - codecov - coolprop - coverage - cython >=0.25.2 @@ -21,42 +16,45 @@ dependencies: - rmg::gprof2dot - graphviz - h5py - - ipython - jinja2 - jupyter - rmg::lpsolve55 - - mako - markupsafe - - matplotlib >=2.2.2 - - mkdocs-material >=5.1.7 - - mkdocs-material-extensions - - mock + - matplotlib >=1.5 - rmg::mopac - mpmath + - rmg::muq2 - networkx - - nose - rmg::numdifftools - - numpy >=1.15.4 - - openbabel - - paramiko >=2.6.0 + - numpy >=1.10.0 + - conda-forge::openbabel >= 3 - pandas - psutil - - py3dmol >= 0.8.0 - rmg::pydas >=1.0.2 - pydot - rmg::pydqed >=1.0.1 - pymongo - pyparsing - rmg::pyrdl - - pyrms - python >=3.7 - - pytest - pyyaml - - qcelemental - rmg::quantities - rmg::rdkit >=2020.03.3.0 - scikit-learn - scipy - - sphinx - rmg::symmetry + - xlrd - xlwt + - anaconda::sphinx_rtd_theme + - anaconda::paramiko >=2.6.0 + - conda-forge::py3dmol >= 0.8.0 + - conda-forge::ase >=3.15.0 + - anaconda::ipython + - anaconda::sphinx + - conda-forge::qcelemental + - mako + - conda-forge::mkdocs-material >=5.1.7 + - conda-forge::mkdocs-material-extensions + - conda-forge::mock + - mjohnson541::pyrms + - anaconda::pytest From f9e4ac9fe73665697fa49d0a5850dc9591258fc3 Mon Sep 17 00:00:00 2001 From: Alon Grinberg Dana Date: Sat, 8 May 2021 14:50:16 +0300 Subject: [PATCH 3/8] f install and test --- .github/workflows/cont_int.yml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/.github/workflows/cont_int.yml b/.github/workflows/cont_int.yml index 998a3140..9fb5bfc3 100644 --- a/.github/workflows/cont_int.yml +++ b/.github/workflows/cont_int.yml @@ -25,7 +25,7 @@ jobs: - name: Install codecov run: conda install -y -c conda-forge codecov - - name: Install dependencies + - name: Install dependencies and test with PyTest shell: bash -l {0} run: | export PYTHONPATH=$PYTHONPATH:$(pwd) @@ -33,10 +33,6 @@ jobs: make install echo $(pwd) conda list - - - name: Test with PyTest - shell: bash -l {0} - run: | cd .. cd RMG-Py export PYTHONPATH=$PYTHONPATH:$(pwd) From 6bcd5e08a0a6cf342606ccd823cf2e5e6f1dff9a Mon Sep 17 00:00:00 2001 From: Kevin Spiekermann Date: Sun, 23 May 2021 10:06:45 -0400 Subject: [PATCH 4/8] Minor: allow RMS adapters to log import errors sooner --- t3/simulate/rms_constantHP.py | 7 +------ t3/simulate/rms_constantTP.py | 7 +------ t3/simulate/rms_constantUV.py | 7 +------ 3 files changed, 3 insertions(+), 18 deletions(-) diff --git a/t3/simulate/rms_constantHP.py b/t3/simulate/rms_constantHP.py index 21a94098..0b766f4d 100644 --- a/t3/simulate/rms_constantHP.py +++ b/t3/simulate/rms_constantHP.py @@ -12,13 +12,12 @@ from t3.simulate.adapter import SimulateAdapter from t3.simulate.factory import register_simulate_adapter -HAS_RMS = True try: from diffeqpy import de from pyrms import rms except (ImportError, ModuleNotFoundError): # diffeqpy and/or pyrms are missing - HAS_RMS = False + Logger.error('Missing diffeqpy and/or pyrms. Please ensure these dependencies were correctly installed.') class RMSConstantHP(SimulateAdapter): @@ -147,10 +146,6 @@ def simulate(self): """ Simulate the mechanism with RMS """ - if not HAS_RMS: - self.logger.error('Missing diffeqpy and/or pyrms. Please ensure these dependencies were' - 'correctly installed.') - if len(self.observable_list): self.logger.info('Running a simulation with SA using RMSConstantHP...') else: diff --git a/t3/simulate/rms_constantTP.py b/t3/simulate/rms_constantTP.py index da5db7ac..06283253 100644 --- a/t3/simulate/rms_constantTP.py +++ b/t3/simulate/rms_constantTP.py @@ -11,13 +11,12 @@ from t3.simulate.adapter import SimulateAdapter from t3.simulate.factory import register_simulate_adapter -HAS_RMS = True try: from diffeqpy import de from pyrms import rms except (ImportError, ModuleNotFoundError): # diffeqpy and/or pyrms are missing - HAS_RMS = False + Logger.error('Missing diffeqpy and/or pyrms. Please ensure these dependencies were correctly installed.') class RMSConstantTP(SimulateAdapter): @@ -146,10 +145,6 @@ def simulate(self): """ Simulate the mechanism with RMS """ - if not HAS_RMS: - self.logger.error('Missing diffeqpy and/or pyrms. Please ensure these dependencies were' - 'correctly installed.') - if len(self.observable_list): self.logger.info('Running a simulation with SA using RMSConstantTP...') else: diff --git a/t3/simulate/rms_constantUV.py b/t3/simulate/rms_constantUV.py index 73cf3624..fd1bf23c 100644 --- a/t3/simulate/rms_constantUV.py +++ b/t3/simulate/rms_constantUV.py @@ -12,13 +12,12 @@ from t3.simulate.adapter import SimulateAdapter from t3.simulate.factory import register_simulate_adapter -HAS_RMS = True try: from diffeqpy import de from pyrms import rms except (ImportError, ModuleNotFoundError): # diffeqpy and/or pyrms are missing - HAS_RMS = False + Logger.error('Missing diffeqpy and/or pyrms. Please ensure these dependencies were correctly installed.') class RMSConstantUV(SimulateAdapter): @@ -147,10 +146,6 @@ def simulate(self): """ Simulate the mechanism with RMS """ - if not HAS_RMS: - self.logger.error('Missing diffeqpy and/or pyrms. Please ensure these dependencies were' - 'correctly installed.') - if len(self.observable_list): self.logger.info('Running a simulation with SA using RMSConstantUV...') else: From 6b4cabd0e35fbdd0a0f612693927aa3480adf01e Mon Sep 17 00:00:00 2001 From: Kevin Spiekermann Date: Tue, 1 Jun 2021 12:37:55 -0400 Subject: [PATCH 5/8] f! require Julia version 1.6 --- environment.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/environment.yml b/environment.yml index 5971a41d..92c8f032 100644 --- a/environment.yml +++ b/environment.yml @@ -57,4 +57,5 @@ dependencies: - conda-forge::mkdocs-material-extensions - conda-forge::mock - mjohnson541::pyrms + - mjohnson541::julia >= 1.6 - anaconda::pytest From 178a43eb20553cb2fb44c0d6184a081d7f6f7e87 Mon Sep 17 00:00:00 2001 From: Kevin Spiekermann Date: Tue, 1 Jun 2021 12:38:27 -0400 Subject: [PATCH 6/8] f! use the latest RMS rather than force v0.3.2 --- devtools/install_pyrms.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/devtools/install_pyrms.sh b/devtools/install_pyrms.sh index 6b12b08d..817a23f7 100644 --- a/devtools/install_pyrms.sh +++ b/devtools/install_pyrms.sh @@ -17,5 +17,5 @@ python -c "import pyrms; pyrms.install()" # v0.3.2 is needed to use the latest SA features # once there is a functional package for v0.3.2, # the line below can be deleted since pyrms.install() will pull the latest version -echo installing RMS v0.3.2... -julia devtools/install_RMS_v032.jl +# echo installing RMS v0.3.2... +# julia devtools/install_RMS_v032.jl From 695c452fed1a88e08300f67c96f549c7c3ea2395 Mon Sep 17 00:00:00 2001 From: Kevin Spiekermann Date: Tue, 1 Jun 2021 16:18:04 -0400 Subject: [PATCH 7/8] f! --- devtools/install_RMS_v032.jl | 3 --- devtools/install_pyrms.sh | 7 ------- 2 files changed, 10 deletions(-) delete mode 100644 devtools/install_RMS_v032.jl diff --git a/devtools/install_RMS_v032.jl b/devtools/install_RMS_v032.jl deleted file mode 100644 index 75102481..00000000 --- a/devtools/install_RMS_v032.jl +++ /dev/null @@ -1,3 +0,0 @@ -# Install RMS v0.3.2 -import Pkg -Pkg.add(Pkg.PackageSpec(url="https://github.com/ReactionMechanismGenerator/ReactionMechanismSimulator.jl", rev="v0.3.2")) diff --git a/devtools/install_pyrms.sh b/devtools/install_pyrms.sh index 817a23f7..94f1acde 100644 --- a/devtools/install_pyrms.sh +++ b/devtools/install_pyrms.sh @@ -12,10 +12,3 @@ julia devtools/install_pycall.jl echo installing pyrms, RMS, and all required Julia packages... python -c "import pyrms; pyrms.install()" - -# the above line installs RMS v0.2.1 -# v0.3.2 is needed to use the latest SA features -# once there is a functional package for v0.3.2, -# the line below can be deleted since pyrms.install() will pull the latest version -# echo installing RMS v0.3.2... -# julia devtools/install_RMS_v032.jl From 89729f64c1f77df22d5d97f1bc513897a6d11fb7 Mon Sep 17 00:00:00 2001 From: Kevin Spiekermann Date: Tue, 1 Jun 2021 16:19:39 -0400 Subject: [PATCH 8/8] f! change pytest channel to allow version 6.2.3 --- environment.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/environment.yml b/environment.yml index 92c8f032..66f4c4c0 100644 --- a/environment.yml +++ b/environment.yml @@ -36,6 +36,7 @@ dependencies: - pymongo - pyparsing - rmg::pyrdl + - pytest - python >=3.7 - pyyaml - rmg::quantities @@ -58,4 +59,3 @@ dependencies: - conda-forge::mock - mjohnson541::pyrms - mjohnson541::julia >= 1.6 - - anaconda::pytest