Skip to content

Commit

Permalink
Merge pull request #162 from SysBioChalmers/feat/memote
Browse files Browse the repository at this point in the history
Feat/memote
  • Loading branch information
edkerk authored Jul 1, 2021
2 parents 6b3235f + 1d9c9eb commit c2d79fe
Show file tree
Hide file tree
Showing 5 changed files with 107 additions and 3 deletions.
60 changes: 60 additions & 0 deletions .github/workflows/memote-history.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: memote history

on: push

jobs:
memote-history:
runs-on: ubuntu-latest
steps:

- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Set up Python 3
uses: actions/setup-python@v2
with:
python-version: '3.x'

- name: Install memote
run: pip install -r requirements/ci-requirements.txt

- name: Setup variables
id: setup
run: |
echo "::set-output name=history::history_report.html"
echo "::set-output name=deployment::$(awk -F '=' '{if (! ($0 ~ /^;/) && $0 ~ /deployment/) print $2}' memote.ini | tr -d ' ')"
echo "::set-output name=other-repo::gh-pages-repo"
- name: Checkout repo for gh-pages branch
uses: actions/checkout@v2
with:
repository: ${{ github.repository }}
ref: ${{ steps.setup.outputs.deployment }}
path: ${{ steps.setup.outputs.other-repo }}

# - name: Convert model
# run: |
# touch .env
# python -c 'import code.io as io; model = io.read_yeast_model(make_bigg_compliant=True); io.write_yeast_model(model)'

- name: Memote short run
run: |
memote run --skip-unchanged --solver-timeout 30
- name: Compute Memote history on push
run: |
# Generate the history report on the deployment branch
memote report history --filename="${{ steps.setup.outputs.other-repo }}/${{ steps.setup.outputs.history }}"
- name: Auto-commit results
uses: stefanzweifel/[email protected]
with:
commit_user_name: memote-bot
commit_message: "chore: update memote history report"
file_pattern: ${{ steps.setup.outputs.history }}
branch: ${{ steps.setup.outputs.deployment }}
repository: ${{ steps.setup.outputs.other-repo }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
29 changes: 29 additions & 0 deletions .github/workflows/memote-run.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: memote run

on: pull_request

jobs:
memote-run:
runs-on: ubuntu-latest
steps:

- name: Checkout
uses: actions/checkout@v2

- name: Set up Python 3
uses: actions/setup-python@v2
with:
python-version: '3.x'

- name: Install memote
run: pip install -r requirements/ci-requirements.txt

- name: Convert model
run: |
touch .env
python -c 'import code.io as io; model = io.read_yeast_model(make_bigg_compliant=True); io.write_yeast_model(model)'
- name: Memote on PR
run: |
# Untracked build, skip saving to gh-pages
memote run --ignore-git --solver-timeout 30
11 changes: 9 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
@@ -0,0 +1,94 @@
# yeast-GEM: The consensus genome-scale metabolic model of _Saccharomyces cerevisiae_

[![DOI](https://zenodo.org/badge/52777598.svg)](https://zenodo.org/badge/latestdoi/52777598) [![GitHub version](https://badge.fury.io/gh/sysbiochalmers%2Fyeast-gem.svg)](https://badge.fury.io/gh/sysbiochalmers%2Fyeast-gem) [![Join the chat at https://gitter.im/SysBioChalmers/yeast-GEM](https://badges.gitter.im/SysBioChalmers/yeast-GEM.svg)](https://gitter.im/SysBioChalmers/yeast-GEM?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
[![DOI](https://zenodo.org/badge/52777598.svg)](https://zenodo.org/badge/latestdoi/52777598) [![GitHub version](https://badge.fury.io/gh/sysbiochalmers%2Fyeast-gem.svg)](https://badge.fury.io/gh/sysbiochalmers%2Fyeast-gem) [![Join the chat at https://gitter.im/SysBioChalmers/yeast-GEM](https://badges.gitter.im/SysBioChalmers/yeast-GEM.svg)](https://gitter.im/SysBioChalmers/yeast-GEM?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)[![Memote history](https://github.com/SysBioChalmers/yeast-GEM/workflows/Memote%20history/badge.svg)](https://sysbiochalmers.github.io/yeast-GEM/history_report.html)

## Description

Expand Down Expand Up @@ -53,7 +53,14 @@ This repository contains the current consensus genome-scale metabolic model of _
* The [RAVEN toolbox for MATLAB](https://github.com/SysBioChalmers/RAVEN).
* A [git wrapper](https://github.com/manur/MATLAB-git) added to the search path.

### Dependencies - Recommended software:
**NOTE:** You also require [git lfs](https://git-lfs.github.com/) if you wish to run locally any of the following two [memote](https://github.com/opencobra/memote) commands:
* `memote run`
* `memote report history`

This is because `results.db` (the database that stores all memote results) is tracked with git lfs.

### Dependencies - Recommended Software:

* For Matlab, the [libSBML MATLAB API](https://sourceforge.net/projects/sbml/files/libsbml/MATLAB%20Interface/) (version 5.17.0 is recommended).
* [Gurobi Optimizer](http://www.gurobi.com/registration/download-reg) for any simulations.

Expand Down
6 changes: 6 additions & 0 deletions memote.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[memote]
model = model/yeast-GEM.xml
location = sqlite:///results.db
github_username = SysBioChalmers
github_repository = yeast-GEM
deployment = gh-pages
4 changes: 3 additions & 1 deletion requirements/ci-requirements.in
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# Requirements for GitHub Actions:
cobra
memote
memote
python-dotenv
symengine

0 comments on commit c2d79fe

Please sign in to comment.