Skip to content

Commit bd8edf9

Browse files
committed
fix conda recipe; see extended description
- remove disused lines in `.conda/build.sh` - remove disused lines in `.conda/conda_build_config.yaml` - updates the conda recipe itself by updating the dependencies to match the latest environment file and updates the test commands to remove the windows tests - overhaul the `conda build` action to test the build continuously and to build on all supported platforms - update the binary installation instructions - set `python` as the default runner for rmg instead of `python-jl` - fix an incorrect filepath in the `setup.py`
1 parent d8607f9 commit bd8edf9

File tree

7 files changed

+210
-135
lines changed

7 files changed

+210
-135
lines changed

.conda/build.sh

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1 @@
1-
# Install RMG
21
make install
3-
4-
# lazy "install" of everything in our 'external' folder.
5-
# most of which should probably be elsewhere
6-
cp -R ${SRC_DIR}/external ${SP_DIR}

.conda/conda_build_config.yaml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,3 @@ python:
22
- 3.7
33
numpy:
44
- 1.15
5-
6-
# Specifically for Travis build. Should change if building locally.
7-
CONDA_BUILD_SYSROOT:
8-
- /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk # [osx]

.conda/meta.yaml

Lines changed: 144 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -11,76 +11,160 @@ build:
1111

1212
requirements:
1313
build:
14-
- {{ compiler('c') }} # [unix]
14+
- {{ compiler('c') }}
1515
host:
16-
- cython >=0.25.2
17-
- lpsolve55
18-
- numpy
19-
- openbabel >=3
20-
- pydas >=1.0.2
21-
- pydqed >=1.0.1
22-
- pyrdl
23-
- python
24-
- quantities
25-
- rdkit >=2018
26-
- scipy
27-
- setuptools
16+
- conda-forge::libxcrypt # remove after upgrading Python versions
17+
- conda-forge::cairo
18+
- conda-forge::cairocffi
19+
- conda-forge::ffmpeg
20+
- conda-forge::xlrd
21+
- conda-forge::xlwt
22+
- conda-forge::h5py
23+
- conda-forge::graphviz
24+
- conda-forge::markupsafe
25+
- conda-forge::psutil
26+
- conda-forge::ncurses
27+
- conda-forge::suitesparse
28+
- conda-forge::coolprop
29+
- cantera::cantera =2.6
30+
- conda-forge::mopac
31+
- conda-forge::cclib >=1.6.3,!=1.8.0
32+
- conda-forge::openbabel >=3
33+
- conda-forge::rdkit >=2022.09.1
34+
- conda-forge::python >=3.7
35+
- conda-forge::coverage
36+
- conda-forge::cython >=0.25.2
37+
- conda-forge::scikit-learn
38+
- conda-forge::scipy <1.11
39+
- conda-forge::numpy >=1.10.0
40+
- conda-forge::pydot
41+
- conda-forge::jinja2
42+
- conda-forge::jupyter
43+
- conda-forge::pymongo
44+
- conda-forge::pyparsing
45+
- conda-forge::pyyaml
46+
- conda-forge::networkx
47+
- conda-forge::pytest
48+
- conda-forge::pytest-cov
49+
- conda-forge::matplotlib >=1.5
50+
- conda-forge::mpmath
51+
- conda-forge::pandas
52+
- conda-forge::gprof2dot
53+
- conda-forge::numdifftools
54+
- conda-forge::quantities
55+
- rmg::lpsolve55
56+
- rmg::muq2
57+
- rmg::pydas >=1.0.3
58+
- rmg::pydqed >=1.0.3
59+
- rmg::pyrdl
60+
- rmg::symmetry
61+
- conda-forge::nomkl
2862
run:
29-
- cairo
30-
- cairocffi
31-
- cantera >=2.3.0
32-
- cclib >=1.6.3
33-
- coolprop
34-
- coverage
35-
- cython >=0.25.2
36-
- ffmpeg
37-
- gprof2dot
38-
- graphviz
39-
- h5py
40-
- jinja2
41-
- jupyter
42-
- lpsolve55
43-
- markupsafe
44-
- matplotlib >=1.5
45-
- mopac
46-
- mpmath
47-
- muq2
48-
- networkx
49-
- nose
50-
- numdifftools
51-
- {{ pin_compatible('numpy') }}
52-
- openbabel >=3
53-
- pandas
54-
- psutil
55-
- pydas >=1.0.2
56-
- pydot
57-
- pydqed >=1.0.1
58-
- pymongo
59-
- pyparsing
60-
- pyrdl
61-
- python
62-
- pyyaml
63-
- pyzmq
64-
- quantities
65-
- rdkit >=2018
66-
- rmgdatabase >=3.2.0
67-
- scikit-learn
68-
- scipy
69-
- symmetry
70-
- xlrd
71-
- xlwt
63+
- conda-forge::libxcrypt # remove after upgrading Python versions
64+
- rmg::rmgdatabase
65+
- conda-forge::cairo
66+
- conda-forge::cairocffi
67+
- conda-forge::ffmpeg
68+
- conda-forge::xlrd
69+
- conda-forge::xlwt
70+
- conda-forge::h5py
71+
- conda-forge::graphviz
72+
- conda-forge::markupsafe
73+
- conda-forge::psutil
74+
- conda-forge::ncurses
75+
- conda-forge::suitesparse
76+
- conda-forge::coolprop
77+
- cantera::cantera =2.6
78+
- conda-forge::mopac
79+
- conda-forge::cclib >=1.6.3,!=1.8.0
80+
- conda-forge::openbabel >=3
81+
- conda-forge::rdkit >=2022.09.1
82+
- conda-forge::python >=3.7
83+
- conda-forge::coverage
84+
- conda-forge::cython >=0.25.2
85+
- conda-forge::scikit-learn
86+
- conda-forge::scipy <1.11
87+
- conda-forge::numpy >=1.10.0
88+
- conda-forge::pydot
89+
- conda-forge::jinja2
90+
- conda-forge::jupyter
91+
- conda-forge::pymongo
92+
- conda-forge::pyparsing
93+
- conda-forge::pyyaml
94+
- conda-forge::networkx
95+
- conda-forge::pytest
96+
- conda-forge::pytest-cov
97+
- conda-forge::matplotlib >=1.5
98+
- conda-forge::mpmath
99+
- conda-forge::pandas
100+
- conda-forge::gprof2dot
101+
- conda-forge::numdifftools
102+
- conda-forge::quantities
103+
- rmg::lpsolve55
104+
- rmg::muq2
105+
- rmg::pydas >=1.0.3
106+
- rmg::pydqed >=1.0.3
107+
- rmg::pyrdl
108+
- rmg::symmetry
109+
- conda-forge::nomkl
72110
test:
111+
requires:
112+
- conda-forge::libxcrypt # remove after upgrading Python versions
113+
- rmg::rmgdatabase
114+
- conda-forge::cairo
115+
- conda-forge::cairocffi
116+
- conda-forge::ffmpeg
117+
- conda-forge::xlrd
118+
- conda-forge::xlwt
119+
- conda-forge::h5py
120+
- conda-forge::graphviz
121+
- conda-forge::markupsafe
122+
- conda-forge::psutil
123+
- conda-forge::ncurses
124+
- conda-forge::suitesparse
125+
- conda-forge::coolprop
126+
- cantera::cantera =2.6
127+
- conda-forge::mopac
128+
- conda-forge::cclib >=1.6.3,!=1.8.0
129+
- conda-forge::openbabel >=3
130+
- conda-forge::rdkit >=2022.09.1
131+
- conda-forge::python >=3.7
132+
- conda-forge::coverage
133+
- conda-forge::cython >=0.25.2
134+
- conda-forge::scikit-learn
135+
- conda-forge::scipy <1.11
136+
- conda-forge::numpy >=1.10.0
137+
- conda-forge::pydot
138+
- conda-forge::jinja2
139+
- conda-forge::jupyter
140+
- conda-forge::pymongo
141+
- conda-forge::pyparsing
142+
- conda-forge::pyyaml
143+
- conda-forge::networkx
144+
- conda-forge::pytest
145+
- conda-forge::pytest-cov
146+
- conda-forge::matplotlib >=1.5
147+
- conda-forge::mpmath
148+
- conda-forge::pandas
149+
- conda-forge::gprof2dot
150+
- conda-forge::numdifftools
151+
- conda-forge::quantities
152+
- rmg::lpsolve55
153+
- rmg::muq2
154+
- rmg::pydas >=1.0.3
155+
- rmg::pydqed >=1.0.3
156+
- rmg::pyrdl
157+
- rmg::symmetry
158+
- conda-forge::nomkl
73159
source_files:
74160
- 'examples/rmg/superminimal'
75161
- 'examples/arkane/networks/n-butanol'
76162
imports:
77163
- rmgpy
78164
- arkane
79165
commands:
80-
- rmg.py examples/rmg/superminimal/input.py # [unix]
81-
- Arkane.py examples/arkane/networks/n-butanol/input.py # [unix]
82-
- python %SCRIPTS%\rmg.py examples\rmg\superminimal\input.py # [win]
83-
- python %SCRIPTS\Arkane.py examples\arkane\networks\n-butanol\input.py # [win]
166+
- rmg.py examples/rmg/superminimal/input.py
167+
- Arkane.py examples/arkane/networks/n-butanol/input.py
84168

85169
about:
86170
home: https://github.com/ReactionMechanismGenerator/RMG-Py

.github/workflows/conda_build.yml

Lines changed: 35 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,58 +1,52 @@
11
name: Conda Build
22

33
on:
4+
pull_request:
45
push:
56
branches:
67
- stable
78
jobs:
8-
build-linux:
9-
runs-on: ubuntu-latest
9+
build:
10+
strategy:
11+
fail-fast: false
12+
matrix:
13+
os: [ubuntu-latest, macos-13]
14+
runs-on: ${{ matrix.os }}
1015
defaults:
1116
run:
1217
shell: bash -l {0}
1318
steps:
14-
- uses: actions/checkout@v2
15-
- uses: conda-incubator/setup-miniconda@v2
19+
- uses: actions/checkout@v4
20+
- name: Setup Conda
21+
uses: conda-incubator/setup-miniconda@v3
1622
with:
17-
environment-file: environment.yml
18-
python-version: 3.7
19-
activate-environment: rmg_env
20-
- name: Conda info
23+
auto-update-conda: false
24+
conda-solver: libmamba
25+
auto-activate-base: true
26+
activate-environment: ""
27+
- name: Install Build Tools
28+
run: conda install python anaconda-client conda-build
29+
- name: Configure Auto-Upload
30+
if: github.ref == 'refs/heads/stable'
2131
run: |
22-
conda info
23-
conda list
32+
conda config --set anaconda_upload yes
2433
- name: Build Binary
25-
env:
26-
CONDA_TOKEN: ${{ secrets.ANACONDA_TOKEN }}
2734
run: |
28-
conda install -y conda-build
29-
conda install -y anaconda-client
35+
# set a default value to the conda_token if needed (like from forks)
36+
: "${CONDA_TOKEN:=${{ secrets.ANACONDA_TOKEN }}}"
37+
: "${CONDA_TOKEN:=default_value}"
38+
echo "CONDA_TOKEN=$CONDA_TOKEN" >> $GITHUB_ENV
3039
conda config --add channels rmg
31-
conda config --set anaconda_upload yes
32-
conda build --token $CONDA_TOKEN --user rmg .conda
33-
build-osx:
34-
runs-on: macos-latest
35-
defaults:
36-
run:
37-
shell: bash -l {0}
38-
steps:
39-
- uses: actions/checkout@v2
40-
- uses: conda-incubator/setup-miniconda@v2
41-
with:
42-
environment-file: environment.yml
43-
python-version: 3.7
44-
activate-environment: rmg_env
45-
- name: Conda info
46-
run: |
47-
conda info
48-
conda list
49-
- name: Build Binary
50-
env:
51-
CONDA_TOKEN: ${{ secrets.ANACONDA_TOKEN }}
40+
conda config --add channels cantera
41+
conda config --add channels conda-forge
42+
conda-build --token $CONDA_TOKEN --user rmg .conda
43+
- name: Test Binary Install with RMS
5244
run: |
53-
conda install -y conda-build
54-
conda install -y anaconda-client
55-
conda config --add channels rmg
56-
conda config --set anaconda_upload yes
57-
xcrun --show-sdk-path
58-
conda build --token $CONDA_TOKEN --user rmg .conda
45+
conda create --name rmg_test python=3.7*
46+
conda activate rmg_test
47+
conda install -c local rmg
48+
conda install -c conda-forge julia=1.9.1 pyjulia>=0.6
49+
conda install -c rmg pyrms diffeqpy
50+
python -c "import julia; julia.install(); import diffeqpy; diffeqpy.install()"
51+
julia -e 'using Pkg; Pkg.add(PackageSpec(name="ReactionMechanismSimulator",rev="main")); using ReactionMechanismSimulator'
52+
python-jl rmg.py test/regression/RMS_constantVIdealGasReactor_superminimal/input.py

0 commit comments

Comments
 (0)