diff --git a/.github/workflows/cont_int.yml b/.github/workflows/cont_int.yml index 383c6386..9fb5bfc3 100644 --- a/.github/workflows/cont_int.yml +++ b/.github/workflows/cont_int.yml @@ -1,26 +1,31 @@ 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 dependencies + - name: Install codecov + run: conda install -y -c conda-forge codecov + + - name: Install dependencies and test with PyTest shell: bash -l {0} run: | export PYTHONPATH=$PYTHONPATH:$(pwd) @@ -28,10 +33,6 @@ jobs: make install echo $(pwd) conda list - - - name: Test with nosetests - shell: bash -l {0} - run: | cd .. cd RMG-Py export PYTHONPATH=$PYTHONPATH:$(pwd) 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 6b12b08d..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 diff --git a/environment.yml b/environment.yml index 3fc55247..66f4c4c0 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,46 @@ 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 + - python >=3.7 - 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 + - mjohnson541::julia >= 1.6 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: