diff --git a/.github/workflows/automation.yml b/.github/workflows/automation.yml index 497dad1c..7995cb90 100644 --- a/.github/workflows/automation.yml +++ b/.github/workflows/automation.yml @@ -1,6 +1,9 @@ name: automation on: + push: + branches-ignore: + - "update/**" schedule: - cron: '3 2 1 * *' @@ -10,12 +13,12 @@ jobs: timeout-minutes: 1200 steps: - - name: Clone repository on current branch - run: | - rm -rf * - git clone https://github.com/$GITHUB_REPOSITORY --branch ${GITHUB_REF#refs/heads/} latest-ecModels + - name: Clone repository on current branch + run: | + rm -rf * + git clone https://github.com/$GITHUB_REPOSITORY --branch ${GITHUB_REF#refs/heads/} latest-ecModels - - name: Run the pipeline - run: | - cd latest-ecModels - python3 run.py ${GITHUB_REF#refs/heads/} \ No newline at end of file + - name: Run the pipeline + run: | + cd latest-ecModels + python3 run.py ${GITHUB_REF#refs/heads/} diff --git a/config.ini b/config.ini index bfe377b2..5dafb5f2 100644 --- a/config.ini +++ b/config.ini @@ -1,6 +1,6 @@ [BASE] url = https://github.com/SysBioChalmers/ecModels -pull_request_target = master +pull_request_target = main install_dir = /home/m/ecModels-dependencies/ [MATLAB] @@ -13,7 +13,7 @@ install_dir = cobratoolbox/ [RAVEN] url = https://github.com/SysBioChalmers/RAVEN -version = v2.4.1 +version = v2.6.2 install_dir = RAVEN/ [libSBML] @@ -23,8 +23,8 @@ install_dir = libSBML/ [Gurobi] url = https://www.gurobi.com/downloads/gurobi-software/ -version = v9.1.1 -install_dir = gurobi/ +version = v9.5.1 +install_dir = gurobi951/ [GECKO] url = https://github.com/SysBioChalmers/GECKO @@ -36,7 +36,7 @@ branch = master type = 'gem' url = https://github.com/SysBioChalmers/yeast-GEM download_url = -model_filename = /ModelFiles/mat/yeastGEM.mat +model_filename = /model/yeast-GEM.mat mat_model = .model install_dir = yeast-GEM version = v8.3.1 @@ -46,7 +46,7 @@ database_tag = sce type = 'gem' url = https://github.com/SysBioChalmers/Yarrowia_lipolytica_W29-GEM download_url = -model_filename = /ModelFiles/mat/iYali.mat +model_filename = /model/iYali.mat mat_model = .model install_dir = Yali-GEM version = v0 @@ -54,9 +54,9 @@ database_tag = yli [eciSM966] type = 'gem' -url = https://github.com/SysBioChalmers/Kluyveromyces_marxianus-GEM -download_url = -model_filename = /modelFiles/mat/Kluyveromyces_marxianus-GEM.mat +url = +download_url = https://raw.githubusercontent.com/SysBioChalmers/Kluyveromyces_marxianus-GEM/master/modelFiles/mat/Kluyveromyces_marxianus-GEM.mat +model_filename = /Kluyveromyces_marxianus-GEM.mat mat_model = .model install_dir = iSM966 version = v0 @@ -69,7 +69,7 @@ download_url = http://bigg.ucsd.edu/static/models/iML1515.xml model_filename = /iML1515.xml mat_model = install_dir = iML1515 -version = 2021-02-28-17-52 +version = 2022-07-03-23-05 database_tag = eco [ecHumanGEM] diff --git a/ecHumanGEM/scripts/changeMedia_batch.m b/ecHumanGEM/scripts/changeMedia_batch.m index 1c2fecf4..2c614d97 100644 --- a/ecHumanGEM/scripts/changeMedia_batch.m +++ b/ecHumanGEM/scripts/changeMedia_batch.m @@ -116,7 +116,7 @@ unusedMets = []; for i=1:length(mediaComps) %Get metabolite indx - metIndx = getIndexes(model,strcat(mediaComps{i},'[s]'),'metcomps'); + metIndx = getIndexes(model,strcat(mediaComps{i},'[e]'),'metcomps'); %Get rxns for metabolite metRxns = find(model.S(metIndx,:)); %Get the uptake reaction for the metabolite diff --git a/eciML1515/model/eciML1515.mat b/eciML1515/model/eciML1515.mat index 5c03d1d0..87b2309d 100644 Binary files a/eciML1515/model/eciML1515.mat and b/eciML1515/model/eciML1515.mat differ diff --git a/eciML1515/model/eciML1515.xml b/eciML1515/model/eciML1515.xml index 22852b26..7faaf9d0 100644 --- a/eciML1515/model/eciML1515.xml +++ b/eciML1515/model/eciML1515.xml @@ -1,6 +1,6 @@ - + @@ -38410,7 +38410,7 @@ -

RheaID:29805#2;29803#2;29806#2;29804#2

+

RheaID:29805#2; 29803#2; 29806#2; 29804#2

@@ -41402,7 +41402,7 @@ -

RheaID:32796#2;32797#2;29783#1;29786#1;32798#2;29784#1;29785#1;32795#2

+

RheaID:32796#2; 32797#2; 29783#1; 29786#1; 32798#2; 29784#1; 29785#1; 32795#2

@@ -45581,7 +45581,7 @@ -

RheaID:29810#1;29808#1;29809#1;29807#1

+

RheaID:29810#1; 29808#1; 29809#1; 29807#1

@@ -46637,7 +46637,7 @@ -

RheaID:29820#1;29819#1;29821#1;29822#1

+

RheaID:29820#1; 29819#1; 29821#1; 29822#1

@@ -50100,7 +50100,7 @@ -

RheaID:11351#1;11348#1;11350#1;11349#1

+

RheaID:11351#1; 11348#1; 11350#1; 11349#1

@@ -55626,7 +55626,7 @@ -

RheaID:29788#1;29791#2;29790#1;29789#1;29787#1;29792#2;29794#2;29793#2

+

RheaID:29788#1; 29791#2; 29790#1; 29789#1; 29787#1; 29792#2; 29794#2; 29793#2

@@ -57482,7 +57482,7 @@ -

RheaID:12335#1;12332#1;12334#1;12333#1

+

RheaID:12335#1; 12332#1; 12334#1; 12333#1

diff --git a/eciML1515/model/eciML1515_batch.mat b/eciML1515/model/eciML1515_batch.mat index 4a5a4621..759d2a2c 100644 Binary files a/eciML1515/model/eciML1515_batch.mat and b/eciML1515/model/eciML1515_batch.mat differ diff --git a/eciML1515/model/eciML1515_batch.xml b/eciML1515/model/eciML1515_batch.xml index 52db7384..828f51e1 100644 --- a/eciML1515/model/eciML1515_batch.xml +++ b/eciML1515/model/eciML1515_batch.xml @@ -1,6 +1,6 @@ - + @@ -38412,7 +38412,7 @@ -

RheaID:29805#2;29803#2;29806#2;29804#2

+

RheaID:29805#2; 29803#2; 29806#2; 29804#2

@@ -41404,7 +41404,7 @@ -

RheaID:32796#2;32797#2;29783#1;29786#1;32798#2;29784#1;29785#1;32795#2

+

RheaID:32796#2; 32797#2; 29783#1; 29786#1; 32798#2; 29784#1; 29785#1; 32795#2

@@ -45583,7 +45583,7 @@ -

RheaID:29810#1;29808#1;29809#1;29807#1

+

RheaID:29810#1; 29808#1; 29809#1; 29807#1

@@ -46639,7 +46639,7 @@ -

RheaID:29820#1;29819#1;29821#1;29822#1

+

RheaID:29820#1; 29819#1; 29821#1; 29822#1

@@ -50102,7 +50102,7 @@ -

RheaID:11351#1;11348#1;11350#1;11349#1

+

RheaID:11351#1; 11348#1; 11350#1; 11349#1

@@ -55628,7 +55628,7 @@ -

RheaID:29788#1;29791#2;29790#1;29789#1;29787#1;29792#2;29794#2;29793#2

+

RheaID:29788#1; 29791#2; 29790#1; 29789#1; 29787#1; 29792#2; 29794#2; 29793#2

@@ -57484,7 +57484,7 @@ -

RheaID:12335#1;12332#1;12334#1;12333#1

+

RheaID:12335#1; 12332#1; 12334#1; 12333#1

diff --git a/tools.py b/tools.py index 0aa0cf45..fd2b1bdb 100644 --- a/tools.py +++ b/tools.py @@ -14,7 +14,7 @@ DURL = 'download_url' IDIR = 'install_dir' SCRIPTSDIR = 'scripts' -PIPELINE_BASE_BRANCH = 'master' +PIPELINE_BASE_BRANCH = 'main' logging.basicConfig(level=logging.DEBUG) l = logging.getLogger(__name__) @@ -67,8 +67,8 @@ def mat_model(self, gem): def pr_target(self): return self.config['BASE']['pull_request_target'] - def git_clone(self, section, branch='master'): - cmd = sp.check_output(['git', 'clone', self.config[section][URL], '--depth', '1', '--branch', branch, self.install_dir(section)]) + def git_clone(self, section, branch=PIPELINE_BASE_BRANCH): + cmd = sp.check_output(['hub', 'clone', self.config[section][URL], '--depth', '1', '--branch', branch, self.install_dir(section)]) l.info(cmd.decode('utf-8')) def download(self, gem): @@ -99,6 +99,8 @@ def git_add_and_pr(self, gem, matlab_output): cmd = sp.check_output(['git', 'commit', '-m', 'chore: update {} based on {}'.format(gem, self.version(gem))]) l.info(cmd.decode('utf-8')) l.critical('Will push and create PR') + cmd = sp.check_output(['git', 'push']) + l.info(cmd.decode('utf-8')) # Create PR and also push pr_filename = "/tmp/githubpr" with open(pr_filename, "w") as f: @@ -106,8 +108,7 @@ def git_add_and_pr(self, gem, matlab_output): f.write("```matlab\n") f.write(matlab_output) f.write("\n```\n") - my_env = environ.copy() - cmd = sp.check_output(['hub', 'pull-request', '-F', pr_filename, '-b', self.pr_target(), '-p'], env=my_env) + cmd = sp.check_output(['gh', 'pr', 'create', '--body-file', pr_filename, '--base', self.pr_target(), '--fill']) l.info(cmd.decode('utf-8')) except sp.CalledProcessError: l.critical('While upgrading {} to {} no changes were detected'.format(gem, self.version(gem))) @@ -137,7 +138,7 @@ def check_dependencies(self): l.info('{} is still {}'.format(tool, tool_version)) # Check COBRA, RAVEN, GECKO versions self.cleanup('GECKO') - self.git_clone('GECKO') + self.git_clone('GECKO', self.config['GECKO']['branch']) for tool in ['COBRA', 'RAVEN', 'GECKO']: tool_version = self.git_tag(tool) if tool_version != self.version(tool):