Skip to content

Commit

Permalink
Merge branch 'cshenry-main'
Browse files Browse the repository at this point in the history
  • Loading branch information
freiburgermsu committed Aug 29, 2024
2 parents 937829d + cca64e5 commit 2dfeb68
Show file tree
Hide file tree
Showing 46 changed files with 20,260 additions and 12,897 deletions.
52 changes: 27 additions & 25 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,27 @@
name: Run Pre-Commit

on:
pull_request: {}
push:
branches:
- dev
- main

jobs:
pre-commit:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
python-version: ['3.8', '3.9', '3.10']
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Set file mode to false
run: |
git config core.filemode false
- uses: pre-commit/action@v2.0.3
name: Run Pre-Commit

on:
pull_request: {}
push:
paths-ignore:
- 'examples/**'
branches:
- dev
- main

jobs:
pre-commit:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
python-version: ['3.8', '3.9', '3.10']
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Set file mode to false
run: |
git config core.filemode false
- uses: pre-commit/action@v2.0.3
86 changes: 44 additions & 42 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,42 +1,44 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.3.0
hooks:
- id: fix-encoding-pragma
- id: check-merge-conflict
- id: end-of-file-fixer
- id: debug-statements
- id: check-added-large-files
- id: check-ast
- id: check-byte-order-marker
- id: check-case-conflict
- id: check-docstring-first
- id: check-executables-have-shebangs
types: [python]
- id: check-vcs-permalinks
- id: check-symlinks
- id: mixed-line-ending
- id: name-tests-test
exclude: tests/test_data
args:
- --pytest-test-first
- id: check-json
- id: pretty-format-json
args:
- --autofix
- --top-keys=_id
- id: check-yaml
- id: sort-simple-yaml
files: '.yaml$'
- id: detect-private-key
- id: trailing-whitespace
- repo: https://github.com/psf/black
rev: 22.8.0
hooks:
- id: black
- repo: https://github.com/Lucas-C/pre-commit-hooks
rev: v1.3.1
hooks:
- id: remove-tabs
exclude: '(\.tsv|Makefile)$'
- id: remove-crlf
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.3.0
hooks:
- id: fix-encoding-pragma
- id: check-merge-conflict
- id: end-of-file-fixer
- id: debug-statements
- id: check-added-large-files
- id: check-ast
- id: check-byte-order-marker
- id: check-case-conflict
- id: check-docstring-first
- id: check-executables-have-shebangs
types: [python]
- id: check-vcs-permalinks
- id: check-symlinks
- id: mixed-line-ending
- id: name-tests-test
exclude: tests/test_data
args:
- --pytest-test-first
- id: check-json
exclude: examples/
- id: pretty-format-json
exclude: examples/
args:
- --autofix
- --top-keys=_id
- id: check-yaml
- id: sort-simple-yaml
files: '.yaml$'
- id: detect-private-key
- id: trailing-whitespace
- repo: https://github.com/psf/black
rev: 22.8.0
hooks:
- id: black
- repo: https://github.com/Lucas-C/pre-commit-hooks
rev: v1.3.1
hooks:
- id: remove-tabs
exclude: '(\.tsv|Makefile)$'
- id: remove-crlf
2,940 changes: 1,620 additions & 1,320 deletions examples/Model Reconstruction/ATPGapfilling.ipynb

Large diffs are not rendered by default.

120 changes: 66 additions & 54 deletions modelseedpy/__init__.py
Original file line number Diff line number Diff line change
@@ -1,54 +1,66 @@
# -*- coding: utf-8 -*-

from __future__ import absolute_import

# set the warning format to be on a single line
import sys
import logging
import cobra
import warnings as _warnings
from os import name as _name
from os.path import abspath as _abspath
from os.path import dirname as _dirname
from modelseedpy.helpers import config

__author__ = "Christopher Henry"
__email__ = "chenry@anl.gov"
__version__ = "0.2.2"

logger = logging.getLogger(__name__)

print("modelseedpy", __version__)

if sys.version_info[0] == 2:
logger.warning(
"Python 2 is reaching end of life (see "
"https://www.python.org/dev/peps/pep-0373/) and many cobra "
"dependencies have already dropped support. At the moment it *should* "
"still work but we will no longer actively maintain Python 2 support."
)

if "e0" not in cobra.medium.annotations.compartment_shortlist["e"]:
cobra.medium.annotations.compartment_shortlist["e"].append("e0")

import modelseedpy
from modelseedpy.core import (
RastClient, MSGenome, MSBuilder, MSMedia, MSGrowthPhenotypes, MSModelUtil,
FBAHelper, MSEditorAPI, MSATPCorrection, MSGapfill, MSEquation, OptlangHelper,
commscores_report, steadycom_report
)
from modelseedpy.core.exceptions import *

from modelseedpy.community import (
MSCommunity, CommunityMember, MSKineticsFBA, CommPhitting,
MSSteadyCom, build_from_species_models, phenotypes)

from modelseedpy.biochem import ModelSEEDBiochem

from modelseedpy.fbapkg import (
BaseFBAPkg, RevBinPkg, ReactionUsePkg, SimpleThermoPkg, TotalFluxPkg, BilevelPkg, CommKineticPkg,
KBaseMediaPkg, FluxFittingPkg, ProteomeFittingPkg, GapfillingPkg, MetaboFBAPkg, FlexibleBiomassPkg,
ProblemReplicationPkg, FullThermoPkg, MSPackageManager, ObjConstPkg, ChangeOptPkg, ElementUptakePkg
)

from modelseedpy.multiomics import MSExpression
# -*- coding: utf-8 -*-

from __future__ import absolute_import

# set the warning format to be on a single line
import sys
import logging
import cobra
import warnings as _warnings
from os import name as _name
from os.path import abspath as _abspath
from os.path import dirname as _dirname
from modelseedpy.helpers import config

__author__ = "Christopher Henry"
__email__ = "chenry@anl.gov"
__version__ = "0.3.3"

logger = logging.getLogger(__name__)

print("modelseedpy", __version__)

if sys.version_info[0] == 2:
logger.warning(
"Python 2 is reaching end of life (see "
"https://www.python.org/dev/peps/pep-0373/) and many cobra "
"dependencies have already dropped support. At the moment it *should* "
"still work but we will no longer actively maintain Python 2 support."
)

if "e0" not in cobra.medium.annotations.compartment_shortlist["e"]:
cobra.medium.annotations.compartment_shortlist["e"].append("e0")

import modelseedpy
from modelseedpy.core import (
RastClient,
MSGenome,
MSBuilder,
MSMedia,
MSGrowthPhenotypes,
MSGrowthPhenotype,
MSModelUtil,
FBAHelper,
MSEditorAPI,
MSATPCorrection,
MSGapfill,
MSEquation,
MSModelReport,
AnnotationOntology,
OptlangHelper
)
from modelseedpy.core.exceptions import *

from modelseedpy.community import (
MSCommunity, CommunityMember, MSKineticsFBA, CommPhitting,
MSSteadyCom, build_from_species_models, phenotypes)

from modelseedpy.biochem import ModelSEEDBiochem

from modelseedpy.fbapkg import (
BaseFBAPkg, RevBinPkg, ReactionUsePkg, SimpleThermoPkg, TotalFluxPkg, BilevelPkg, CommKineticPkg,
KBaseMediaPkg, FluxFittingPkg, ProteomeFittingPkg, GapfillingPkg, MetaboFBAPkg, FlexibleBiomassPkg,
ProblemReplicationPkg, FullThermoPkg, MSPackageManager, ObjConstPkg, ChangeOptPkg, ElementUptakePkg
)

from modelseedpy.multiomics import MSExpression
Loading

0 comments on commit 2dfeb68

Please sign in to comment.