Skip to content

Bring the "for RMG" developments into main. #270

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 60 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
61ca710
include electronchange in reaction reconstruction in phase
mjohnson541 Feb 4, 2024
f1c175b
add Marcus kinetics type and allow dGrxn dependence of kinetics
mjohnson541 Feb 4, 2024
61fa7f6
handle dGrxn and d dependence of reactions in interfaces and phase ca…
mjohnson541 Feb 4, 2024
9709465
adapt Domains to dGrxn and d dependence of forward rate coefficient c…
mjohnson541 Feb 4, 2024
8c308fd
add a Marcus reaction to the ORR.rms mechanism for testing
mjohnson541 Feb 4, 2024
f230853
fix variable naminng
mjohnson541 Mar 30, 2024
ae59b8c
Added reference potential to Arrheniusq
ssun30 May 28, 2024
ff0ef51
Fixed interfaces not setting phi correctly
ssun30 Aug 6, 2024
b2ba84f
Parser uses RMG if RDKit fails to get structure
ssun30 Aug 6, 2024
db6d862
Now runs CI upon pushing marcus_development
ssun30 Oct 1, 2024
5885823
fix getKc call in ReactiveInternalInterface
mjohnson541 Sep 23, 2024
2e0e612
add phi and d to newer domains
mjohnson541 Sep 23, 2024
2586194
phase electron change fixes
mjohnson541 Sep 25, 2024
f81e093
missing domain tweaks for phi/d
mjohnson541 Sep 25, 2024
bd94192
fix FragmentBasedReactiveFilmGrowthInterfaceConstantT interface
mjohnson541 Sep 25, 2024
c22423a
Added default values for wr/wp for Marcus Kinetics
ssun30 Oct 9, 2024
3f0396f
Fixed array input format in ORR.rms
ssun30 Oct 15, 2024
2cea301
Changed variable naming in TestReactors
ssun30 Nov 7, 2024
6dd0fe6
Fixed typos
mjohnson541 Sep 25, 2024
c15ad5a
loosen solver tolerances for some tests
ssun30 Nov 8, 2024
59823ca
ignore automatically generated files
hwpang Jun 23, 2024
3ece71b
Add channels
hwpang Jun 23, 2024
625498d
Remove yml file as it's not used anymore, using CondaPkg to manage env
hwpang Jun 23, 2024
1673e59
Switch to CondaPkg, PythonCall, PythonPlot
hwpang Jun 23, 2024
a53dca0
Remove unused dependency
hwpang Jun 23, 2024
060a85f
Update version
hwpang Jun 23, 2024
8fdf345
bump to 1.10
hwpang Jun 23, 2024
3e76a06
No need to install env beforehand
hwpang Jun 23, 2024
a161fe1
Install with CondaPkg
hwpang Jun 23, 2024
8104f65
Switch to 1.10 and no need to create env
hwpang Jun 23, 2024
0f90162
export env path for CondaPkg
hwpang Jun 23, 2024
4d8f6a4
Update build to use CondaPkg
hwpang Jun 23, 2024
7c4a7de
Update installation instruction
hwpang Jun 23, 2024
e696b75
Use PythonPlot instead of PyPlot
hwpang Jun 23, 2024
d687d23
Switch to PythonPlot
hwpang Jun 23, 2024
e6ba67d
Switch parsing to PythonCall and PythonPlot
hwpang Jun 23, 2024
c59c6e4
Switch plotting to pythonplot
hwpang Jun 23, 2024
b1264fc
Use PythonCall syntax in module
hwpang Jun 23, 2024
e53ade9
Don't set jacobian prototype if jacobian is not sparse
hwpang Jun 23, 2024
8b70c2b
Switch to pythoncall syntax in test
hwpang Jun 23, 2024
3842a93
Import necessary packages
hwpang Jun 23, 2024
8e007a0
Use SciMLSensitivity
hwpang Jun 23, 2024
cc98ddb
Change rtol
hwpang Jun 23, 2024
7686bad
Add propane mech test file
hwpang Jun 23, 2024
1aa21d2
Use >= 3.9
hwpang Jul 2, 2024
2fb2129
keys(CondaPkg.current_packages()) doesn't actually show the packages …
hwpang Jul 3, 2024
e25fa1d
Should be molecule
hwpang Jul 3, 2024
65959be
skip unused line
JacksonBurns Jan 22, 2025
93845bf
avoid reducing over empty edge species rates, which is an error
JacksonBurns Apr 14, 2025
56fbe5e
port sucessful CI changes from rmg to rms
JacksonBurns Apr 14, 2025
5e0c059
update cache version
JacksonBurns Apr 14, 2025
04cd72b
port ci updates to docs action
JacksonBurns Apr 14, 2025
55f9766
Update CI.yml
JacksonBurns May 23, 2025
b98949a
Update documentation.yml
JacksonBurns May 23, 2025
5f4ee4a
let rms figure out conda on its own
JacksonBurns May 24, 2025
dc4ef01
let rms figure out conda on its own
JacksonBurns May 24, 2025
e839c05
remove defaults channel
JacksonBurns May 24, 2025
7d3904b
add instantiate
JacksonBurns May 24, 2025
cf83540
consolidate steps to avoid repeat installs
JacksonBurns May 24, 2025
43018b1
Merge pull request #268 from hwpang/fix_installation
JacksonBurns May 29, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 11 additions & 27 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,40 +6,24 @@ on:
push:
branches:
- main
- marcus_development
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: julia-actions/setup-julia@v1
- uses: actions/checkout@v4

- name: Setup Juliaup
uses: julia-actions/install-juliaup@v2
with:
version: 1.8
- uses: actions/cache@v1
env:
cache-name: cache-artifacts
with:
path: ~/.julia/artifacts
key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }}
restore-keys: |
${{ runner.os }}-test-${{ env.cache-name }}-
${{ runner.os }}-test-
${{ runner.os }}-
- uses: conda-incubator/setup-miniconda@v2
with:
environment-file: environment.yml
python-version: 3.7
activate-environment: rms_env
- name: Fix PyCall linking
run: |
julia -e 'ENV["PYTHON"]=ENV["CONDA"] * "/envs/rms_env/bin/python"; using Pkg; Pkg.add("PyCall"); Pkg.build("PyCall")'
- uses: julia-actions/julia-buildpkg@v1
- name: Build
run: |
julia -e 'using Pkg; Pkg.develop(PackageSpec(path="../ReactionMechanismSimulator.jl")); Pkg.build("ReactionMechanismSimulator");'
- name: Run tests
channel: '1.10'

- name: Build and Test
run: |
julia -e 'using Pkg; Pkg.test("ReactionMechanismSimulator";coverage=true)'
julia -e 'using Pkg; Pkg.develop(Pkg.PackageSpec(path="../ReactionMechanismSimulator.jl/")); Pkg.build("ReactionMechanismSimulator"); Pkg.test("ReactionMechanismSimulator"; coverage=true)'

- uses: julia-actions/julia-processcoverage@v1

- uses: codecov/codecov-action@v1
with:
file: lcov.info
29 changes: 16 additions & 13 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +13,24 @@ jobs:
contents: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: julia-actions/setup-julia@latest
with:
version: 1.8
- uses: conda-incubator/setup-miniconda@v2
- uses: actions/checkout@v4

- name: Setup Juliaup
uses: julia-actions/install-juliaup@v2
with:
environment-file: environment.yml
python-version: 3.7
activate-environment: rms_env
- name: Install dependencies
channel: '1.10'

- uses: julia-actions/cache@v2

- uses: julia-actions/julia-buildpkg@v1

- name: Build
run: |
julia -e 'ENV["PYTHON"]=ENV["CONDA"] * "/envs/rms_env/bin/python"; using Pkg; Pkg.add("PyCall"); Pkg.build("PyCall")'
julia --project=docs/ -e 'using Pkg; Pkg.develop(PackageSpec(path=pwd())); Pkg.instantiate();'
- name: Build and deploy
julia -e 'using Pkg; Pkg.develop(Pkg.PackageSpec(path="../ReactionMechanismSimulator.jl/")); Pkg.build("ReactionMechanismSimulator"); Pkg.instantiate();'

- name: Build and deploy Documentation
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # For authentication with GitHub Actions token
DOCUMENTER_DEBUG: true
run: julia --color=yes --project=docs docs/make.jl
run: |
julia --color=yes --project=docs docs/make.jl
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,8 @@
*.dot
docs/build/
.DS_Store
deps/build.log
deps/build.log
.CondaPkg/
rms_env/
*.cov
Manifest.toml
1 change: 1 addition & 0 deletions CondaPkg.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
channels = ["mjohnson541", "rmg", "conda-forge", "cantera"]
14 changes: 6 additions & 8 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ version = "1.0.0"
[deps]
Calculus = "49dc2e85-a5d0-5ad3-a950-438e2897f1b9"
Colors = "5ae59095-9a9b-59fe-a467-6f913c188581"
Conda = "8f4d0f93-b110-5947-807f-2305c1781a2d"
CondaPkg = "992eb4ea-22a4-4c89-a5bb-47a3300528ab"
CSV = "336ed68f-0bac-5ca0-87d4-7b16caf5d00b"
DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0"
FastGaussQuadrature = "442a2c76-b920-505d-bb47-c5924d526838"
Expand All @@ -21,8 +21,8 @@ ModelingToolkit = "961ee093-0014-501f-94e3-6117800e7a78"
OrdinaryDiffEq = "1dea7af3-3e70-54e6-95c3-0bf5283fa5ed"
Parameters = "d96e819e-fc66-5662-9728-84c9c7592b0a"
PreallocationTools = "d236fae5-4411-538c-8e31-a6e3d9e00b46"
PyCall = "438e738f-606a-5dbb-bf0a-cddfbfd45ab0"
PyPlot = "d330b81b-6aea-500a-939a-2ce795aea3ee"
PythonCall = "6099a3de-0909-46bc-b1f4-468b9a2dfc0d"
PythonPlot = "274fc56d-3b97-40fa-a1cd-1b4a50311bf9"
QuartzImageIO = "dca85d43-d64c-5e67-8c65-017450d5d020"
RecursiveArrayTools = "731186ca-8d62-57ce-b412-fbd966d074cd"
ReverseDiff = "37e2e3b7-166d-5795-8a7a-e32c996b4267"
Expand All @@ -39,12 +39,11 @@ Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
Tracker = "9f7883ad-71c0-57eb-9f7f-b5c9e6d3789c"
Unitful = "1986cc42-f94f-5a68-af5c-568840ba703d"
YAML = "ddb6d928-2868-570f-bddf-ab3f9cf99eb6"
Zygote = "e88e6eb3-aa80-5325-afca-941959d7151f"

[compat]
Calculus = "0.4,0.5"
Colors = "0.11,0.12"
Conda = "1"
CondaPkg = "0"
CSV = "0.10"
DataFrames = "1"
SciMLSensitivity = "^7"
Expand All @@ -58,8 +57,8 @@ ModelingToolkit = "8"
OrdinaryDiffEq = "^6"
Parameters = "0.12"
PreallocationTools = "0.4"
PyCall = "1"
PyPlot = "2"
PythonCall = "0"
PythonPlot = "1"
QuartzImageIO = "0.7"
RecursiveArrayTools = "2.17"
ReverseDiff = "1.9"
Expand All @@ -72,5 +71,4 @@ Symbolics = "4"
Tracker = "0.2"
Unitful = "^1.3"
YAML = "0.4"
Zygote = "0.5,0.6"
julia = "^1.6"
48 changes: 28 additions & 20 deletions deps/build.jl
Original file line number Diff line number Diff line change
@@ -1,21 +1,29 @@
using PyCall
using Conda
packages = Conda._installed_packages()
if !("rmg" in packages) && !("rmgmolecule" in packages) && (PyCall.pyversion.major != 3 || PyCall.pyversion.minor != 7)
const Pkg = Base.require(Base.PkgId(Base.UUID("44cfe95a-1eb2-52ea-b672-e2afdf69b78f"), "Pkg"))
Conda.rm("mamba")
Conda.add("conda=4")
Conda.add("mamba")
Conda.update()
Conda.add("python=3.7")
try
Conda.rm("numpy") #get around MKL problem
catch e
using CondaPkg
using PythonCall

has_rmgpy = true
has_rmgmolecule = true
try
PythonCall.pyimport("rmgpy")
catch
has_rmgpy = false
end
try
PythonCall.pyimport("molecule")
catch
has_rmgmolecule = false
end

if !has_rmgpy && !has_rmgmolecule

if !(v"3.7" <= PythonCall.C.python_version() && PythonCall.C.python_version() <= v"3.9")
CondaPkg.add("python"; version=">=3.9")
end
Conda.add("nomkl")
Conda.add("numpy")
Conda.add_channel("mjohnson541")
Conda.add_channel("hwpang")
Conda.add("rmgmolecule")
Pkg.build("PyCall")
end
CondaPkg.add("rmgmolecule"; version=">=0.3.0", channel="mjohnson541")
CondaPkg.add("matplotlib", channel="conda-forge")
CondaPkg.add("rdkit", channel="conda-forge")
CondaPkg.add("pydot", channel="conda-forge")
end

const Pkg = Base.require(Base.PkgId(Base.UUID("44cfe95a-1eb2-52ea-b672-e2afdf69b78f"), "Pkg"))
Pkg.build("PythonCall")
11 changes: 6 additions & 5 deletions docs/src/Installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,10 @@ The above instructions will automatically handle Julia-Python linking. However,

```
import Pkg
Pkg.add("PyCall")
ENV["CONDA_JL_HOME"] = PATH_TO_YOUR_ENV
Pkg.build("Conda")
ENV["PYTHON"] = PATH_TO_PYTHON
Pkg.build("PyCall")
ENV["JULIA_CONDAPKG_BACKEND"] = "Null"
ENV["JULIA_PYTHONCALL_EXE"] = "/path/to/python"
Pkg.add("CondaPkg")
Copy link
Preview

Copilot AI May 29, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The installation instructions have been updated to use CondaPkg and PythonCall. Please ensure that the documentation clearly reflects these changes so that users can correctly set up their environment.

Copilot uses AI. Check for mistakes.

Pkg.build("CondaPkg")
Pkg.add("PythonCall")
Pkg.build("PythonCall")
```
11 changes: 0 additions & 11 deletions environment.yml

This file was deleted.

2 changes: 1 addition & 1 deletion iJulia/Automatic Mechanism Analysis Example.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"outputs": [],
"source": [
"using Sundials\n",
"using PyPlot\n",
"using PythonPlot\n",
"using ReactionMechanismSimulator"
]
},
Expand Down
2 changes: 1 addition & 1 deletion iJulia/ConstantPH2Combustion.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"outputs": [],
"source": [
"using DifferentialEquations\n",
"using PyPlot\n",
"using PythonPlot\n",
"using ReactionMechanismSimulator"
]
},
Expand Down
2 changes: 1 addition & 1 deletion iJulia/ConstantTPH2Combustion.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"using DiffEqBase\n",
"using Sundials\n",
"using DiffEqSensitivity\n",
"using PyPlot\n",
"using PythonPlot\n",
"using ReactionMechanismSimulator"
]
},
Expand Down
2 changes: 1 addition & 1 deletion iJulia/ConstantTVOctaneOxidation.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"outputs": [],
"source": [
"using DifferentialEquations\n",
"using PyPlot\n",
"using PythonPlot\n",
"using ReactionMechanismSimulator"
]
},
Expand Down
2 changes: 1 addition & 1 deletion iJulia/ConstantVH2Combustion.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"outputs": [],
"source": [
"using DifferentialEquations\n",
"using PyPlot\n",
"using PythonPlot\n",
"using ReactionMechanismSimulator"
]
},
Expand Down
2 changes: 1 addition & 1 deletion iJulia/Gas-Catalyst Interface.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"outputs": [],
"source": [
"using ReactionMechanismSimulator\n",
"using PyPlot\n",
"using PythonPlot\n",
"using DifferentialEquations\n",
"using Sundials"
]
Expand Down
2 changes: 1 addition & 1 deletion iJulia/ParametrizedTConstantVOctaneOxidation.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"outputs": [],
"source": [
"using DifferentialEquations\n",
"using PyPlot\n",
"using PythonPlot\n",
"using ReactionMechanismSimulator"
]
},
Expand Down
2 changes: 1 addition & 1 deletion iJulia/ParametrizedTPH2Combustion.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"outputs": [],
"source": [
"using DifferentialEquations\n",
"using PyPlot\n",
"using PythonPlot\n",
"using ReactionMechanismSimulator"
]
},
Expand Down
2 changes: 1 addition & 1 deletion iJulia/ParametrizedVH2Combustion.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"outputs": [],
"source": [
"using DifferentialEquations\n",
"using PyPlot\n",
"using PythonPlot\n",
"using ReactionMechanismSimulator"
]
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"source": [
"using ReactionMechanismSimulator\n",
"using ReactionMechanismSimulator.Sundials\n",
"using ReactionMechanismSimulator.PyPlot"
"using ReactionMechanismSimulator.PythonPlot"
]
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1429,7 +1429,7 @@
"source": [
"using ReactionMechanismSimulator\n",
"using ReactionMechanismSimulator.Sundials\n",
"using ReactionMechanismSimulator.PyPlot"
"using ReactionMechanismSimulator.PythonPlot"
]
},
{
Expand Down
Loading
Loading