Skip to content

Commit

Permalink
Move PR CI tests to Github Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
thalassemia committed Jul 11, 2024
1 parent 926a20d commit 7f89d01
Show file tree
Hide file tree
Showing 15 changed files with 87 additions and 123 deletions.
73 changes: 73 additions & 0 deletions .github/workflows/pr_tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
# Modified from GitHub Actions template

name: Workflow

# Improves reproducibility and speed
env:
OPENBLAS_NUM_THREADS: 1
OMP_NUM_THREADS: 1

on:
push:
branches: [master]
pull_request:
branches: [master]

jobs:
Reproducibility:
runs-on: macos-latest
strategy:
matrix:
python-version: ["3.11"]
steps:
- uses: actions/checkout@v2
- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
pip install --upgrade pip wheel
pip install numpy==1.26.4
pip install -r requirements.txt
- name: Compile Cython components
run: |
make clean compile
- name: Test ParCa reproducibility
run: |
python runscript/parca.py -c 3 -o out/parca_1
python runscript/parca.py -c 3 -o out/parca_2
python runscript/debug/compare_pickles.py out/parca_1/kb out/parca_2/kb
- name: Test simulation reproducibility
run: |
python ecoli/experiments/ecoli_master_sim.py \
--generations 1 --no_suffix_time --emitter parquet --emitter_arg out_dir='out' \
--experiment_id "parca_1" --daughter_outdir "out/parca_1" \
--sim_data_path "out/parca_1/kb/simData.cPickle" --fail_at_total_time &
python ecoli/experiments/ecoli_master_sim.py \
--generations 1 --no_suffix_time --emitter parquet --emitter_arg out_dir='out' \
--experiment_id "parca_2" --daughter_outdir "out/parca_2" \
--sim_data_path "out/parca_2/kb/simData.cPickle" --fail_at_total_time && fg
python runscripts/debug/diff_simouts.py -o "out" "parca_1" "parca_2"
2 Gens:
runs-on: macos-latest
strategy:
matrix:
python-version: ["3.11"]
steps:
- uses: actions/checkout@v2
- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
pip install --upgrade pip wheel
pip install numpy==1.26.4 mypy
pip install -r requirements.txt
- name: Compile Cython components
run: |
make clean compile
- name: Two generations
run: |
python runscripts/workflow.py --config ecoli/composites/ecoli_configs/test_installation.json
2 changes: 1 addition & 1 deletion ecoli/composites/ecoli_configs/test_installation.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"parca_options": {
"cpus": 1
},
"generations": 1,
"generations": 2,
"n_init_sims": 1,
"single_daughters": true,
"emitter" : {
Expand Down
6 changes: 6 additions & 0 deletions ecoli/experiments/ecoli_master_sim.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,12 @@ def __init__(
"in the configuration file."
),
)
self.parser.add_argument(
"--no_suffix_time",
action="store",
help=r"Do not append current time as'%d-%m-%Y_%H-%M-%S'"
" to experiment ID.",
)
self.parser.add_argument(
"--emitter",
action="store",
Expand Down
46 changes: 0 additions & 46 deletions runscripts/jenkins/check-reproducibility.sh

This file was deleted.

4 changes: 1 addition & 3 deletions runscripts/jenkins/configs/ecoli-anaerobic.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@
"mass_distribution": false,
"emitter" : {
"type": "parquet",
"config": {
"out_dir": "/scratch/groups/mcovert/vecoli"
}
"out_dir": "/scratch/groups/mcovert/vecoli"
},
"analysis_options": {
"single": {"mass_fraction_summary": {}}
Expand Down
4 changes: 1 addition & 3 deletions runscripts/jenkins/configs/ecoli-glucose-minimal.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,7 @@
"fail_at_total_time": true,
"emitter" : {
"type": "parquet",
"config": {
"out_dir": "/scratch/groups/mcovert/vecoli"
}
"out_dir": "/scratch/groups/mcovert/vecoli"
},
"analysis_options": {
"single": {"mass_fraction_summary": {}}
Expand Down
4 changes: 1 addition & 3 deletions runscripts/jenkins/configs/ecoli-new-gene-gfp.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,7 @@
"fail_at_total_time": true,
"emitter" : {
"type": "parquet",
"config": {
"out_dir": "/scratch/groups/mcovert/vecoli"
}
"out_dir": "/scratch/groups/mcovert/vecoli"
},
"parca_options": {
"new_genes": "gfp"
Expand Down
4 changes: 1 addition & 3 deletions runscripts/jenkins/configs/ecoli-no-growth-rate-control.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@
"mechanistic_replisome": true,
"emitter" : {
"type": "parquet",
"config": {
"out_dir": "/scratch/groups/mcovert/vecoli"
}
"out_dir": "/scratch/groups/mcovert/vecoli"
},
"analysis_options": {
"single": {"mass_fraction_summary": {}}
Expand Down
4 changes: 1 addition & 3 deletions runscripts/jenkins/configs/ecoli-no-operons.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,7 @@
"fail_at_total_time": true,
"emitter" : {
"type": "parquet",
"config": {
"out_dir": "/scratch/groups/mcovert/vecoli"
}
"out_dir": "/scratch/groups/mcovert/vecoli"
},
"parca_options": {
"operons": false
Expand Down
4 changes: 1 addition & 3 deletions runscripts/jenkins/configs/ecoli-superhelical-density.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@
"superhelical_density": true,
"emitter" : {
"type": "parquet",
"config": {
"out_dir": "/scratch/groups/mcovert/vecoli"
}
"out_dir": "/scratch/groups/mcovert/vecoli"
},
"analysis_options": {
"single": {"mass_fraction_summary": {}}
Expand Down
4 changes: 1 addition & 3 deletions runscripts/jenkins/configs/ecoli-with-aa.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,7 @@
"fail_at_total_time": true,
"emitter" : {
"type": "parquet",
"config": {
"out_dir": "/scratch/groups/mcovert/vecoli"
}
"out_dir": "/scratch/groups/mcovert/vecoli"
},
"analysis_options": {
"single": {"mass_fraction_summary": {}}
Expand Down
10 changes: 0 additions & 10 deletions runscripts/jenkins/configs/reproducibility.json

This file was deleted.

19 changes: 0 additions & 19 deletions runscripts/jenkins/configs/two-generations.json

This file was deleted.

13 changes: 0 additions & 13 deletions runscripts/jenkins/reproducibility

This file was deleted.

13 changes: 0 additions & 13 deletions runscripts/jenkins/two-generations

This file was deleted.

0 comments on commit 7f89d01

Please sign in to comment.