From 84283fe7522cca9bcec586f50538a1bf99359d17 Mon Sep 17 00:00:00 2001
From: Calvin Pieters
Date: Fri, 27 Oct 2023 16:51:18 +0100
Subject: [PATCH 01/17] CI Fix and Clean Up
Improved the CI for T3 to now ensure that the base OS used on GitHub has ample space for the installation and testing of T3. Additionally, we activate the clean command in RMG-Py to ensure that all files are not cythonised prior to cythonising. Finally, installation of Julia and the connection to Python and vice versa has been adjusted.
---
.github/workflows/cont_int.yml | 26 +++++++++++++++++---------
1 file changed, 17 insertions(+), 9 deletions(-)
diff --git a/.github/workflows/cont_int.yml b/.github/workflows/cont_int.yml
index 58f28073..e646e96d 100644
--- a/.github/workflows/cont_int.yml
+++ b/.github/workflows/cont_int.yml
@@ -17,6 +17,17 @@ jobs:
- name: Checkout T3
uses: actions/checkout@v3
+ - name: Clean Ubuntu Image
+ uses: kfir4444/free-disk-space@main
+ with:
+ # This may remove tools actually needed - currently does not
+ tool-cache: true
+ android: true
+ dotnet: true
+ haskell: true
+ large-packages: true
+ swap-storage: true
+
- name: Cache RMG
id: cache-rmg
uses: actions/cache@v2
@@ -97,7 +108,7 @@ jobs:
conda-${{ runner.os }}--${{ runner.arch }}-rmgpyenv-${{ env.CACHE_NUMBER}}
env:
# Increase this value to reset cache if etc/example-environment.yml has not changed
- CACHE_NUMBER: 0
+ CACHE_NUMBER: 1
id: cache-rmgpy-env
- name: Update environment
run: mamba env update -n rmg_env -f RMG-Py/environment.yml
@@ -107,6 +118,7 @@ jobs:
run: |
cd RMG-Py
conda activate rmg_env
+ make clean
make
echo "PYTHONPATH=$(pwd):$PYTHONPATH" >> $GITHUB_ENV
echo "PATH=$(pwd):$PATH" >> $GITHUB_ENV
@@ -115,9 +127,7 @@ jobs:
echo "PATH=$(pwd):$PATH" >> ~/.bashrc
echo "export rmgpy_path=$(pwd)" >> ~/.bashrc
- - name: Install PyCall RMG_ENV
- run: python -c "import julia; julia.install(); import diffeqpy; diffeqpy.install()"
-
+
- name: Cache RMS
id: cache-rms
uses: actions/cache@v2
@@ -133,12 +143,10 @@ jobs:
${{ runner.os }}-julia-${{ env.CACHE_NUMBER }}-rms
- name: Install RMS Julia
- run: julia -e 'using Pkg; Pkg.add(PackageSpec(name="ReactionMechanismSimulator",rev="main"));using ReactionMechanismSimulator'
+ run: julia -e 'using Pkg; Pkg.add(PackageSpec(name="PyCall",rev="master"));Pkg.build("PyCall");Pkg.add(PackageSpec(name="ReactionMechanismSimulator",rev="main")); using ReactionMechanismSimulator;'
- - name: Link Python-JL
- run: |
- ln -sfn $(which python-jl) $(which python)
- cd ..
+ - name: Install PyCall RMG_ENV
+ run: python -c "import julia; julia.install(); import diffeqpy; diffeqpy.install()"
- name: Install ARC ENV
run: |
From 9429b6029f5fdf29e308454c4ae08e1d2c8e5cc9 Mon Sep 17 00:00:00 2001
From: Calvin Pieters
Date: Fri, 27 Oct 2023 16:52:57 +0100
Subject: [PATCH 02/17] T3 Main Test Fix
T3 Main tests were failing due to changes in RMG-Py. This has been rectified. The first change is now we look for the numeric identifier of the species instead of the species name as the numeric identifier should never change and is unique. The second function change is that the chemical reaction string uses '<=>' instead of '='.
---
tests/test_main.py | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)
diff --git a/tests/test_main.py b/tests/test_main.py
index 76053036..776c1f9e 100644
--- a/tests/test_main.py
+++ b/tests/test_main.py
@@ -8,6 +8,7 @@
import datetime
import os
import shutil
+import re
from rmgpy.data.thermo import ThermoLibrary
from rmgpy.reaction import Reaction
@@ -734,7 +735,12 @@ def test_determine_species_based_on_collision_violators():
'S(26357)',
'S(25149)'
]
- assert [t3.species[index]['Chemkin label'] for index in species_to_calc] == expected_species_to_calc
+ expected_numeric_identifiers = [int(re.findall(r'\((\d+)\)', species)[0]) for species in expected_species_to_calc]
+ numeric_identifiers = [int(re.findall(r'\((\d+)\)', t3.species[index]['Chemkin label'])[0]) for index in species_to_calc]
+
+ # Assert that the numeric identifiers are the same
+ # We do this because 'S' is a generic label for a species, and the numeric identifier is what distinguishes them
+ assert expected_numeric_identifiers == numeric_identifiers
def test_trsh_rmg_tol():
@@ -865,7 +871,7 @@ def test_add_reaction():
assert t3.get_reaction_key(reaction=rmg_reactions[342]) == 0
assert t3.reactions[0]['RMG label'] == 's0_H + s1_CC=CCCC <=> s2_S2XC6H13'
- assert 'H(2)+S(1229)=C6H13(794)' in t3.reactions[0]['Chemkin label']
+ assert 'H(2)+C6H12(1229)<=>S2XC6H13(794)' in t3.reactions[0]['Chemkin label']
assert t3.reactions[0]['QM label'] == 's0_H + s1_CC=CCCC <=> s2_S2XC6H13'
assert t3.reactions[0]['SMILES label'] == '[H] + CC=CCCC <=> CC[CH]CCC'
assert isinstance(t3.reactions[0]['object'], Reaction)
@@ -875,7 +881,7 @@ def test_add_reaction():
assert t3.get_reaction_key(reaction=rmg_reactions[100]) == 1
assert t3.reactions[1]['RMG label'] == 's3_S2XC12H25 + s4_fuel <=> s5_S3XC12H25 + s4_fuel'
- assert 'S(839)+fuel(1)=S(840)+fuel(1)' in t3.reactions[1]['Chemkin label']
+ assert 'S2XC12H25(839)+fuel(1)<=>S3XC12H25(840)+fuel(1)' in t3.reactions[1]['Chemkin label']
assert t3.reactions[1]['QM label'] == 's3_S2XC12H25 + s4_fuel <=> s5_S3XC12H25 + s4_fuel'
assert t3.reactions[1]['SMILES label'] == 'CC[CH]CCCCCCCCC + CCCCCCCCCCCC <=> CCC[CH]CCCCCCCC + CCCCCCCCCCCC'
assert isinstance(t3.reactions[1]['object'], Reaction)
@@ -885,7 +891,7 @@ def test_add_reaction():
assert t3.get_reaction_key(reaction=rmg_reactions[14]) == 2
assert t3.reactions[2]['RMG label'] == 's6_PC4H9 <=> s7_C2H4 + s8_C2H5'
- assert 'PC4H9(191)=C2H4(22)+C2H5(52)' in t3.reactions[2]['Chemkin label']
+ assert 'PC4H9(191)<=>C2H4(22)+C2H5(52)' in t3.reactions[2]['Chemkin label']
assert t3.reactions[2]['QM label'] == 's6_PC4H9 <=> s7_C2H4 + s8_C2H5'
assert t3.reactions[2]['SMILES label'] == '[CH2]CCC <=> C=C + C[CH2]'
assert isinstance(t3.reactions[2]['object'], Reaction)
From 6aa89294778f8b2275447135305bdef01e6d07fc Mon Sep 17 00:00:00 2001
From: Alon Grinberg Dana
Date: Sat, 30 Sep 2023 06:44:38 +0300
Subject: [PATCH 03/17] Update README.md
Slightly modified the long name of T3 from `The Tandem Tool (T3) for automated kinetic model generation and refinement` into `The Tandem Tool (T3) for automated chemical kinetic model development`
---
README.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/README.md b/README.md
index 7fb734cd..e147eebe 100644
--- a/README.md
+++ b/README.md
@@ -2,7 +2,7 @@
-# The Tandem Tool (T3) for automated kinetic model generation and refinement
+# The Tandem Tool (T3) for automated chemical kinetic model development
![Release](https://img.shields.io/badge/version-0.1.0-blue.svg)
![Build Status](https://github.com/ReactionMechanismGenerator/T3/actions/workflows/cont_int.yml/badge.svg)
From 1838309d43557c0ca451924e575ce9fd762545ac Mon Sep 17 00:00:00 2001
From: Alon Grinberg Dana
Date: Thu, 5 Oct 2023 02:13:49 +0300
Subject: [PATCH 04/17] Updated the logger
---
t3/logger.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/t3/logger.py b/t3/logger.py
index 97e8c294..c8c5df07 100644
--- a/t3/logger.py
+++ b/t3/logger.py
@@ -123,7 +123,7 @@ def log_header(self):
f'################################################################\n'
f'# #\n'
f'# The Tandem Tool (T3) #\n'
- f'# Automated kinetic model generation and refinement #\n'
+ f'# for automated chemical kinetic model development #\n'
f'# #\n'
f'# Version: {VERSION}{" " * (10 - len(VERSION))} #\n'
f'# #\n'
From f30f5465fe751b98b6206d5498a4c46dda8576fe Mon Sep 17 00:00:00 2001
From: Alon Grinberg Dana
Date: Thu, 5 Oct 2023 02:14:19 +0300
Subject: [PATCH 05/17] Updated the Docs, and also updated authorship for
citation
---
docs/cite.md | 10 +++++-----
docs/index.md | 2 +-
mkdocs.yml | 2 +-
3 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/docs/cite.md b/docs/cite.md
index 997bc153..53fff743 100644
--- a/docs/cite.md
+++ b/docs/cite.md
@@ -2,15 +2,15 @@
Text form:
- A. Grinberg Dana, K.A. Spiekermann, W.H. Green,
- The Tandem Tool (T3) for automated kinetic model generation and refinement,
+ C. Pieters, K. Kaplan, K.A. Spiekermann, W.H. Green, A. Grinberg Dana,
+ The Tandem Tool (T3) for automated chemical kinetic model development,
version 0.1.0, source code: https://github.com/ReactionMechanismGenerator/T3
LaTeX form:
@misc{T3,
- author = {A. Grinberg Dana, K.A. Spiekermann, W.H. Green},
- title = {The Tandem Tool (T3) for automated kinetic model generation and refinement. https://github.com/ReactionMechanismGenerator/T3, Version 0.1.0},
- year = {2020},
+ author = {C. Pieters, K. Kaplan, K.A. Spiekermann, W.H. Green, A. Grinberg Dana,},
+ title = {The Tandem Tool (T3) for automated chemical kinetic model development. https://github.com/ReactionMechanismGenerator/T3, Version 0.1.0},
+ year = {2023},
howpublished = {\url{https://github.com/ReactionMechanismGenerator/T3}},
}
diff --git a/docs/index.md b/docs/index.md
index 67378066..d57ec09f 100644
--- a/docs/index.md
+++ b/docs/index.md
@@ -3,7 +3,7 @@
- The Tandem Tool for automated kinetic model generation and refinement
+ The Tandem Tool for automated chemical kinetic model development