Skip to content

Commit

Permalink
fix the RMG-Py conda build
Browse files Browse the repository at this point in the history
changes required to make the RMG-Py conda build work again. detailed description:
 - recipe now contains the appropriate requirements
 - removed macos travis-specific thing
 - added comments in build.sh for historical preservation of my failed efforts
 - other changes are the initial steps toward making the conda build work, future commits will make the build tests pass

the ci runs on a self-hosted runner in the green group offices. required a specific version of conda build and libmamba to be installed (see PR of this commit for more details), currently fails tests because rmg tries to import Julia during testing. will now need to 'bury' the Julia import and make it optional, including docs updates, etc.
  • Loading branch information
JacksonBurns committed Sep 27, 2023
1 parent 4e2a941 commit af201e0
Show file tree
Hide file tree
Showing 7 changed files with 156 additions and 56 deletions.
17 changes: 13 additions & 4 deletions .conda/build.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
# Install RMG
# conda build script
#
# conda executes this script during the build process to make the rmg
# binary
make install

# lazy "install" of everything in our 'external' folder.
# most of which should probably be elsewhere
cp -R ${SRC_DIR}/external ${SP_DIR}
# The below code does not work because the Julia programming langauge is a very interesting technical demo that is completely unfit for actual
# deployment in any real world projects.
#
# RMG will be shipped as a pure python package, and then RMS installed by the user.
#
# export PYTHON=$PREFIX/bin/python
# export PYTHONPATH=$SRC_DIR:$PYTHONPATH
# python -c "import julia; julia.install(); import diffeqpy; diffeqpy.install()"
# julia -e 'using Pkg; Pkg.add(PackageSpec(name="Functors",version="0.4.3")); Pkg.pin("Functors"); Pkg.add(PackageSpec(name="ReactionMechanismSimulator",rev="for_rmg")); using ReactionMechanismSimulator'
3 changes: 0 additions & 3 deletions .conda/conda_build_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,3 @@ python:
numpy:
- 1.15

# Specifically for Travis build. Should change if building locally.
CONDA_BUILD_SYSROOT:
- /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk # [osx]
175 changes: 138 additions & 37 deletions .conda/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,73 +13,174 @@ requirements:
build:
- {{ compiler('c') }}
host:
- cairo
- cairocffi
- ffmpeg
- xlrd
- xlwt
- h5py
- graphviz
- markupsafe
- psutil
- ncurses
- suitesparse

# external software tools for chemistry
- coolprop
- cantera=2.6
- mopac
- cclib >=1.6.3,!=1.8.0
- openbabel >=3

# Python tools
- python >=3.7
- coverage
- cython >=0.25.2
- scikit-learn
- scipy
- numpy >=1.10.0
- pydot
- jinja2
- jupyter
- pymongo
- pyparsing
- pyyaml
- networkx
- matplotlib >=1.5
- mpmath
- pandas

# packages we maintain
- rmgdatabase
- gprof2dot
- lpsolve55
- numpy
- openbabel >=3
- pydas >=1.0.2
- pydqed >=1.0.1
- muq2
- numdifftools
- pydas >=1.0.3
- pydqed >=1.0.3
- pyrdl
- python
- quantities
- rdkit >=2018
- scipy
- setuptools
- symmetry
- chemprop==0.0.1
- rdkit >=2020.03.3.0

- liblapack =*=*mkl
run:
- cairo
- cairocffi
- cantera >=2.3.0
- cclib >=1.6.3
- chemprop
- ffmpeg
- xlrd
- xlwt
- h5py
- graphviz
- markupsafe
- psutil
- ncurses
- suitesparse

# external software tools for chemistry
- coolprop
- cantera=2.6
- mopac
- cclib >=1.6.3,!=1.8.0
- openbabel >=3

# Python tools
- python >=3.7
- coverage
- cython >=0.25.2
- ffmpeg
- gprof2dot
- graphviz
- h5py
- scikit-learn
- scipy
- numpy >=1.10.0
- pydot
- jinja2
- jupyter
- lpsolve55
- markupsafe
- pymongo
- pyparsing
- pyyaml
- networkx
- matplotlib >=1.5
- mopac
- mpmath
- pandas

# packages we maintain
- rmgdatabase
- gprof2dot
- lpsolve55
- muq2
- networkx
- nose
- numdifftools
- {{ pin_compatible('numpy') }}
- openbabel >=3
- pandas
- pydas >=1.0.3
- pydqed >=1.0.3
- pyrdl
- quantities
- symmetry
- chemprop==0.0.1
- rdkit >=2020.03.3.0

- liblapack =*=*mkl
test:
requires:
- cairo
- cairocffi
- ffmpeg
- xlrd
- xlwt
- h5py
- graphviz
- markupsafe
- psutil
- pydas >=1.0.2
- ncurses
- suitesparse

# external software tools for chemistry
- coolprop
- cantera=2.6
- mopac
- cclib >=1.6.3,!=1.8.0
- openbabel >=3

# Python tools
- python >=3.7
- coverage
- cython >=0.25.2
- scikit-learn
- scipy
- numpy >=1.10.0
- pydot
- pydqed >=1.0.1
- jinja2
- jupyter
- pymongo
- pyparsing
- pyrdl
- python
- pyyaml
- pyzmq
- networkx
- matplotlib >=1.5
- mpmath
- pandas

# packages we maintain
- rmgdatabase
- gprof2dot
- lpsolve55
- muq2
- numdifftools
- pydas >=1.0.3
- pydqed >=1.0.3
- pyrdl
- quantities
- rdkit >=2018
- rmgdatabase >=3.2.0
- scikit-learn
- scipy
- symmetry
- xlrd
- xlwt
test:
- chemprop==0.0.1
- rdkit >=2020.03.3.0

- liblapack =*=*mkl
source_files:
- 'examples/rmg/superminimal'
- 'examples/arkane/networks/n-butanol'
imports:
- rmgpy
- arkane
commands:
- python-jl rmg.py examples/rmg/superminimal/input.py
- python arkane.py examples/arkane/networks/n-butanol
- rmg.py examples/rmg/superminimal/input.py
- arkane.py examples/arkane/networks/n-butanol

about:
home: https://github.com/ReactionMechanismGenerator/RMG-Py
Expand Down
12 changes: 3 additions & 9 deletions environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,6 @@ dependencies:
- conda-forge::cclib >=1.6.3,!=1.8.0
- conda-forge::openbabel >= 3

# general-purpose external software tools
- conda-forge::julia>=1.8.5,!=1.9.0
- conda-forge::pyjulia >=0.6

# Python tools
- python >=3.7
- coverage
Expand All @@ -75,21 +71,20 @@ dependencies:
- matplotlib >=1.5
- mpmath
- pandas
- conda-forge::numdifftools

# packages we maintain
- rmg::gprof2dot
- rmg::lpsolve55
- rmg::muq2
- rmg::numdifftools
- rmg::pydas >=1.0.3
- rmg::pydqed >=1.0.3
- rmg::pyrdl
- rmg::pyrms
- rmg::quantities
- rmg::symmetry

# packages we would like to stop maintaining (and why)
- rmg::diffeqpy
#- rmg::diffeqpy
# we should use the official verison https://github.com/SciML/diffeqpy),
# rather than ours (which is only made so that we can get it from conda)
# It is only on pip, so we will need to do something like:
Expand All @@ -103,8 +98,7 @@ dependencies:
# We should use the official channel, not sure how difficult this
# change will be.

# conda mutex metapackage
- nomkl
- liblapack =*=*mkl

# additional packages that are required, but not specified here (and why)
# pydqed, pydas, mopac, and likely others require a fortran compiler (specifically gfortran)
Expand Down
2 changes: 1 addition & 1 deletion rmg.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python-jl
#!/usr/bin/env python

###############################################################################
# #
Expand Down
1 change: 0 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,6 @@
'scripts/standardizeModelSpeciesNames.py',
'scripts/thermoEstimator.py',
'scripts/isotopes.py',
'testing/databaseTest.py',
]

modules = []
Expand Down
2 changes: 1 addition & 1 deletion utilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ def update_headers():
start of each file, be sure to double-check the results to make sure
important lines aren't accidentally overwritten.
"""
shebang = """#!/usr/bin/env python-jl
shebang = """#!/usr/bin/env python
"""

Expand Down

0 comments on commit af201e0

Please sign in to comment.