-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #162 from SysBioChalmers/feat/memote
Feat/memote
- Loading branch information
Showing
5 changed files
with
107 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
# Requirements for GitHub Actions: | ||
cobra | ||
memote | ||
memote | ||
python-dotenv | ||
symengine |