Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update main.py #2

Open
wants to merge 92 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
92 commits
Select commit Hold shift + click to select a range
13519d3
Create LICENSE
ym2877 Feb 7, 2023
11a3002
Merge branch 'main' of https://github.com/korem-lab/pymgpipe
ym2877 Feb 7, 2023
24f43db
Added versioning
ym2877 Feb 7, 2023
ce674f1
Fixed bug
ym2877 Feb 7, 2023
863e42d
Minor
ym2877 Feb 7, 2023
31610e2
Versioning test
ym2877 Feb 7, 2023
cd3e2da
Changed diet to work with optlang model
ym2877 Feb 15, 2023
b241650
Added warning
ym2877 Feb 15, 2023
949b92f
Added test
ym2877 Feb 15, 2023
a5fd3f6
Revert "Added test"
ym2877 Feb 15, 2023
e586aa3
Fixed bug in test
ym2877 Feb 15, 2023
a669a85
Force uptake
ym2877 Feb 15, 2023
ff31a9a
Added test
ym2877 Feb 15, 2023
23ce489
Added metrics
ym2877 Feb 21, 2023
bb96402
Added requirements
ym2877 Feb 21, 2023
a6092f4
Added docstring
ym2877 Feb 27, 2023
43b1cca
Update build.py
ym2877 Feb 27, 2023
7af25ef
Got rid of sbml stuff
ym2877 Feb 27, 2023
80f0667
test something
ym2877 Feb 27, 2023
ac31090
Update python-package.yml
ym2877 Feb 27, 2023
f52399e
removed cobra from requirements.txt
ym2877 Feb 27, 2023
da293cf
Merge branch 'main' of https://github.com/korem-lab/pymgpipe
ym2877 Feb 27, 2023
eb0eed7
Update python-package.yml
ym2877 Feb 27, 2023
8d501fb
Test
ym2877 Feb 27, 2023
51bf415
Merge branch 'main' of https://github.com/korem-lab/pymgpipe
ym2877 Feb 27, 2023
926e312
Woopsy
ym2877 Feb 27, 2023
d953449
force uninstall
ym2877 Feb 27, 2023
5f6622b
Added pytest-cov
ym2877 Feb 27, 2023
45153ac
Fix bad yml
ym2877 Feb 27, 2023
3dab309
Update coverage on Readme
github-actions[bot] Feb 27, 2023
d96cea9
Changed test path
ym2877 Feb 27, 2023
596b0e3
Merge branch 'main' of https://github.com/korem-lab/pymgpipe
ym2877 Feb 27, 2023
9eac7fc
Small change
ym2877 Feb 27, 2023
a25bce2
Small change
ym2877 Feb 27, 2023
bb9ffc1
Update coverage on Readme
github-actions[bot] Feb 27, 2023
28955ac
Update python-package.yml
ym2877 Feb 27, 2023
c96e4cf
Merge branch 'main' of https://github.com/korem-lab/pymgpipe
ym2877 Feb 27, 2023
c3b617c
Update coverage on Readme
github-actions[bot] Feb 27, 2023
8e8b07d
Changed pytest cov
ym2877 Feb 27, 2023
4681c9d
Merge branch 'main' of https://github.com/korem-lab/pymgpipe
ym2877 Feb 27, 2023
06e1d13
Update coverage on Readme
github-actions[bot] Feb 27, 2023
977a29f
Fixed coverage
ym2877 Feb 28, 2023
398ecf5
Merge branch 'main' of https://github.com/korem-lab/pymgpipe
ym2877 Feb 28, 2023
cb2175b
Removed bad files
ym2877 Feb 28, 2023
bdb33bc
Update README.md
ym2877 Feb 28, 2023
109ac27
Removed unnecessary rm
ym2877 Feb 28, 2023
011c3b7
Merge branch 'main' of https://github.com/korem-lab/pymgpipe
ym2877 Feb 28, 2023
f56b702
Update coverage on Readme
github-actions[bot] Feb 28, 2023
183ad5e
Update README.md
ym2877 Feb 28, 2023
49b7f5c
Renamed test
ym2877 Mar 1, 2023
130225b
Merge branch 'main' of https://github.com/korem-lab/pymgpipe
ym2877 Mar 1, 2023
8e3f71f
Update README.md
ym2877 Mar 1, 2023
5bcc43a
Update coverage on Readme
github-actions[bot] Mar 1, 2023
22df212
Fixed readme
ym2877 Mar 1, 2023
0e450e2
Update coverage on Readme
github-actions[bot] Mar 1, 2023
125dda4
Added full e2e
ym2877 Mar 1, 2023
f20f74c
Update coverage on Readme
github-actions[bot] Mar 1, 2023
b5fcb24
Update README.md
ym2877 Mar 1, 2023
71f5ef6
Update README.md
ym2877 Mar 1, 2023
d3a0ec3
Update coverage on Readme
github-actions[bot] Mar 1, 2023
d1cd23d
Update README.md
ym2877 Mar 1, 2023
35ba7c8
Update coverage on Readme
github-actions[bot] Mar 1, 2023
8c6bf63
Removing reverse variables
ym2877 Mar 7, 2023
34c9ca5
Added test
ym2877 Mar 7, 2023
f1b20b6
Merge branch 'main' of https://github.com/korem-lab/pymgpipe
ym2877 Mar 7, 2023
ddea0ea
Update coverage on Readme
github-actions[bot] Mar 7, 2023
61a6085
Small changes to coupling
ym2877 Mar 8, 2023
29f5623
Merge branch 'main' of https://github.com/korem-lab/pymgpipe
ym2877 Mar 8, 2023
1f05e3b
Cluster
Mar 9, 2023
13d7925
Small addition
Mar 9, 2023
da1ae79
Cluster
Mar 9, 2023
3ce4310
Small fix
ym2877 Mar 9, 2023
1dfd213
Added vaginal diet
ym2877 Mar 13, 2023
8fce868
Cluster
Mar 14, 2023
0538e34
Current
ym2877 Mar 14, 2023
7e18f19
Merge branch 'main' of https://github.com/korem-lab/pymgpipe
ym2877 Mar 14, 2023
4d629eb
Added missing exchanges
ym2877 Mar 14, 2023
bd81863
Fixed small issue
ym2877 Mar 14, 2023
ec5f260
Fixed failing tests
ym2877 Mar 15, 2023
044fc1d
Small change
ym2877 Mar 15, 2023
4839f31
cluster
Mar 15, 2023
33630bd
Merge branch 'main' of https://github.com/korem-lab/pymgpipe
ym2877 Mar 15, 2023
537139e
Updated workflow
ym2877 Mar 15, 2023
e5d8c76
Changed diet
ym2877 Mar 15, 2023
2622354
Added force to github action
ym2877 Mar 15, 2023
06a905c
force push
ym2877 Mar 15, 2023
7a099fb
Update LICENSE
ym2877 Mar 15, 2023
53d81cf
Rename LICENSE to LICENSE.md
ym2877 Mar 15, 2023
8a721f2
Added test workflow
ym2877 Mar 15, 2023
656fe27
Name change
ym2877 Mar 15, 2023
72616f1
Merge branch 'main' of https://github.com/korem-lab/pymgpipe
ym2877 Mar 15, 2023
b4daba5
Update main.py
ym2877 Mar 15, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 54 additions & 7 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,17 +27,64 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install . -U
python -m pip install flake8 pytest
python -m pip install -e .
python -m pip install flake8 pytest pytest-cov
python -m pip uninstall -y cobra
python -m pip install 'cobra @ git+https://github.com/opencobra/cobrapy@devel'
pip install -r requirements.txt
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
- name: Set up gurobi license
- name: Update semantic version
uses: paulhatch/[email protected]
with:
# The prefix to use to identify tags
tag_prefix: "v"
# A string which, if present in a git commit, indicates that a change represents a
# major (breaking) change, supports regular expressions wrapped with '/'
major_pattern: "(MAJOR)"
# A string which indicates the flags used by the `major_pattern` regular expression. Supported flags: idgs
major_regexp_flags: ""
# Same as above except indicating a minor change, supports regular expressions wrapped with '/'
minor_pattern: "(MINOR)"
# A string which indicates the flags used by the `minor_pattern` regular expression. Supported flags: idgs
minor_regexp_flags: ""
# A string to determine the format of the version output
version_format: "${major}.${minor}.${patch}-prerelease${increment}"
# Optional path to check for changes. If any changes are detected in the path the
# 'changed' output will true. Enter multiple paths separated by spaces.
change_path: "pymgpipe/"
# Named version, will be used as suffix for name version tag
namespace: pymgpipe
# If this is set to true, *every* commit will be treated as a new version.
bump_each_commit: true
# If true, the body of commits will also be searched for major/minor patterns to determine the version type.
search_commit_body: false
# The output method used to generate list of users, 'csv' or 'json'.
user_format_type: "csv"
# Prevents pre-v1.0.0 version from automatically incrementing the major version.
# If enabled, when the major version is 0, major releases will be treated as minor and minor as patch. Note that the version_type output is unchanged.
enable_prerelease_mode: true
- name: Build coverage file
run: |
conda install -c gurobi gurobi
export GRB_LICENSE_FILE=tests/gurobi.lic
- name: Test with pytest
echo '[run]\nomit =\n\tpymgpipe/tests/*\n\tpymgpipe/__init__.py' > .coveragerc
pytest --junitxml=pytest.xml --cov-report=term-missing:skip-covered --cov=pymgpipe pymgpipe/tests/ | tee pytest-coverage.txt
- name: Pytest coverage comment
if: ${{ github.ref == 'refs/heads/main' }}
id: coverageComment
uses: MishaKav/pytest-coverage-comment@main
with:
pytest-coverage-path: ./pytest-coverage.txt
junitxml-path: ./pytest.xml
- name: Update Readme with Coverage Html
if: ${{ github.ref == 'refs/heads/main' }}
run: |
pytest
sed -i '/<!-- Pytest Coverage Comment:Begin -->/,/<!-- Pytest Coverage Comment:End -->/c\<!-- Pytest Coverage Comment:Begin -->\n\${{ steps.coverageComment.outputs.coverageHtml }}\n<!-- Pytest Coverage Comment:End -->' ./README.md
- name: Commit & Push changes to Readme
if: ${{ github.ref == 'refs/heads/main' }}
uses: actions-js/push@master
with:
message: Update coverage on Readme
github_token: ${{ secrets.GITHUB_TOKEN }}
force: true
41 changes: 41 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python

name: Tests

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

jobs:
tests:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.10"]

steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -e .
python -m pip install flake8 pytest pytest-cov
python -m pip uninstall -y cobra
python -m pip install 'cobra @ git+https://github.com/opencobra/cobrapy@devel'
pip install -r requirements.txt
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
- name: Test with pytest
run: |
pytest

29 changes: 0 additions & 29 deletions .github/workflows/versioning.yml

This file was deleted.

3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,9 @@ dmypy.json

#tests
test/
pytest-coverage.txt
pytest.xml
*.coverage*

# examples
examples/out/*
Expand Down
Loading