Skip to content

Commit

Permalink
Merge branch 'main' into stable
Browse files Browse the repository at this point in the history
  • Loading branch information
guillaume-gricourt committed Mar 4, 2024
2 parents 4c38f7c + 09a00fd commit 044a8ee
Show file tree
Hide file tree
Showing 9 changed files with 45 additions and 45 deletions.
26 changes: 13 additions & 13 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
tag: ${{ steps.tag_label.outputs.tag }}
changelog: ${{ steps.tag_raw.outputs.changelog }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
persist-credentials: false
fetch-depth: 0
Expand All @@ -36,7 +36,7 @@ jobs:
Changelog:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
persist-credentials: false
fetch-depth: 0
Expand All @@ -57,7 +57,7 @@ jobs:
echo "$USER $PROJECT"
github_changelog_generator --user "$USER" --project "$PROJECT" --no-unreleased
- name: 'Upload Artifact Changelog'
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: changelog-artifact
path: CHANGELOG.md
Expand All @@ -70,7 +70,7 @@ jobs:
version_path: ${{ steps.update_version.outputs.version_path }}
version_dir: ${{ steps.update_version.outputs.version_dir }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: 'Update _version.py'
id: update_version
env:
Expand All @@ -82,7 +82,7 @@ jobs:
echo "version_path=$VERSION_PATH" >> "$GITHUB_OUTPUT"
echo "version_dir=$VERSION_DIR" >> "$GITHUB_OUTPUT"
- name: 'Upload Artifact Version'
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: version-artifact
path: ${{ steps.update_version.outputs.version_path }}
Expand All @@ -93,17 +93,17 @@ jobs:
steps:
# Get Data
- name: 'Checkout'
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
persist-credentials: false
fetch-depth: 0
- name: 'Download Artifact Version'
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: version-artifact
path: ${{ needs.Version.outputs.version_dir }}
- name: 'Download Artifact Changelog'
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: changelog-artifact
# Commit
Expand Down Expand Up @@ -133,7 +133,7 @@ jobs:
needs: [Commit, TagRaw]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
persist-credentials: false
fetch-depth: 0
Expand All @@ -158,9 +158,9 @@ jobs:
shell: bash -l {0} # activate env conda
steps:
- name: 'Checkout'
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: 'Deploying miniconda'
uses: conda-incubator/setup-miniconda@v2
uses: conda-incubator/setup-miniconda@v3
with:
miniconda-version: "latest"
environment-file: recipes/workflow.yaml
Expand All @@ -178,7 +178,7 @@ jobs:
filename=$(find ${{ env.dirbuild }} | head -n 1)
echo "asset=$filename" >> "$GITHUB_OUTPUT"
- name: 'Upload Artifact Package'
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: package-conda-artifact
path: ${{ steps.identify_asset.outputs.asset }}
Expand All @@ -190,7 +190,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: 'Download Artifact Package - Pip'
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: package-conda-artifact
- name: 'Create Release'
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: 'Checkout'
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
ref: ${{ github.ref }}
fetch-depth: 0
- name: Lint Code Base
uses: github/super-linter@v4
uses: github/super-linter@v5
env:
VALIDATE_ALL_CODEBASE: false
VALIDATE_YAML: false
Expand Down
14 changes: 8 additions & 6 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ on:
pull_request:
branches:
- main
schedule:
- cron: '0 0 * * 1'

jobs:

Expand All @@ -17,11 +19,11 @@ jobs:
shell: bash -l {0}
steps:
- name: 'Checkout'
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
ref: ${{ github.ref }}
- name: 'Deploying miniconda'
uses: conda-incubator/setup-miniconda@v2
uses: conda-incubator/setup-miniconda@v3
with:
miniconda-version: "latest"
environment-file: recipes/workflow.yaml
Expand All @@ -44,11 +46,11 @@ jobs:
shell: bash -l {0}
steps:
- name: 'Checkout'
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
ref: ${{ github.ref }}
- name: 'Deploying miniconda'
uses: conda-incubator/setup-miniconda@v2
uses: conda-incubator/setup-miniconda@v3
with:
miniconda-version: "latest"
environment-file: recipes/workflow.yaml
Expand All @@ -70,11 +72,11 @@ jobs:
shell: bash -l {0}
steps:
- name: 'Checkout'
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
ref: ${{ github.ref }}
- name: 'Deploying miniconda'
uses: conda-incubator/setup-miniconda@v2
uses: conda-incubator/setup-miniconda@v3
with:
miniconda-version: "latest"
environment-file: recipes/workflow.yaml
Expand Down
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# Changelog

## [3.2.1](https://github.com/brsynth/straindesign/tree/3.2.1) (2023-01-23)

[Full Changelog](https://github.com/brsynth/straindesign/compare/3.2.0...3.2.1)

**Merged pull requests:**

- chore\(deps\): bump mathieudutour/github-tag-action from 6.0 to 6.1 [\#6](https://github.com/brsynth/straindesign/pull/6) ([dependabot[bot]](https://github.com/apps/dependabot))
- chore\(deps\): bump actions/upload-artifact from 2 to 3 [\#5](https://github.com/brsynth/straindesign/pull/5) ([dependabot[bot]](https://github.com/apps/dependabot))

## [3.2.0](https://github.com/brsynth/straindesign/tree/3.2.0) (2023-01-05)

[Full Changelog](https://github.com/brsynth/straindesign/compare/3.1.0...3.2.0)
Expand Down
12 changes: 4 additions & 8 deletions recipes/meta.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{% set name = "straindesign" %}
{% set version = "3.1.0" %}
{% set version = "3.2.3" %}

package:
name: {{ name }}
Expand All @@ -16,29 +16,25 @@ build:
requirements:
build:
- pip
- python
- python>=3.8
- pyyaml
- setuptools
run:
- biopython
- blessings
- click
- cobra>=0.24
- cobra>=0.29
- escher
- future
- gnomic
- inspyred
- IProgress
- lazy-object-proxy
- plotly
- python
- markupsafe
- python>=3.8
- networkx
- numexpr
- numpy<1.24 # Related to https://github.com/numpy/numpy/pull/22607
- openbabel
- openpyxl
- optlang
- ordered-set
- palettable
- pandas
Expand Down
7 changes: 3 additions & 4 deletions recipes/workflow.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: test
name: straindesign-local
channels:
- conda-forge
- plotly
Expand All @@ -8,7 +8,7 @@ dependencies:
- biopython
- blessings
- click
- cobra>=0.24
- cobra
- conda-build
- escher
- future
Expand All @@ -20,10 +20,9 @@ dependencies:
- markupsafe
- networkx
- numexpr
- numpy<1.24 # Related to https://github.com/numpy/numpy/pull/22607
- numpy
- openbabel
- openpyxl
- optlang
- ordered-set
- palettable
- pandas
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -360,11 +360,7 @@ def run(
].values

if self.normalize_ranges_by is not None:
logger.debug(
self.reference_flux_ranges.loc[
self.normalize_ranges_by,
]
)
logger.debug(self.reference_flux_ranges.loc[self.normalize_ranges_by,])
# The most obvious flux to normalize by is the biomass reaction
# flux. This is probably always greater than zero. Just in case
# the model is defined differently or some other normalizing
Expand Down Expand Up @@ -435,7 +431,7 @@ def run(
results = list(view.map(func_obj, self.grid.iterrows()))

solutions = dict(
(tuple(point.iteritems()), fva_result) for (point, fva_result) in results
(tuple(point.items()), fva_result) for (point, fva_result) in results
)

for sol in solutions.values():
Expand Down Expand Up @@ -880,7 +876,7 @@ def _display_on_map_static(self, index, map_name, palette="RdYlBu", **kwargs):
reaction_data[numpy.isposinf(reaction_data)] = reaction_data.max()
reaction_data[numpy.isneginf(reaction_data)] = reaction_data.min()

reaction_data = dict(reaction_data.iteritems())
reaction_data = dict(reaction_data.items())
reaction_data["max"] = numpy.abs(values).max()
reaction_data["min"] = -reaction_data["max"]

Expand Down Expand Up @@ -1114,7 +1110,6 @@ def run(
exclude_ids.append(reaction)

with TimeMachine() as tm:

tm(do=int, undo=partial(setattr, model, "objective", model.objective))
tm(do=int, undo=partial(setattr, target, "lower_bound", target.lower_bound))
tm(do=int, undo=partial(setattr, target, "upper_bound", target.upper_bound))
Expand Down Expand Up @@ -1228,7 +1223,6 @@ def __init__(
*args,
**kwargs,
):

super(FSEOFResult, self).__init__(
self._generate_designs(reference, enforced_levels, reaction_results),
*args,
Expand Down
2 changes: 1 addition & 1 deletion src/straindesign/_version.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
__app_name__ = "straindesign"
__version__ = "3.2.1"
__version__ = "3.2.2"
4 changes: 2 additions & 2 deletions tests/cameobrs/unit/test_strain_design_deterministic.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,11 +207,11 @@ def test_result_is_correct(self, glpk_growth_coupling_potential):
fva = cameobrs.flux_variability_analysis(
model, fraction_of_optimum=1, remove_cycles=False, reactions=["PFL"]
)
assert fva["lower_bound"][0] <= 0 <= fva["upper_bound"][0]
assert fva["lower_bound"].iloc[0] <= 0 <= fva["upper_bound"].iloc[0]
with model:
for knockout in knockouts:
model.reactions.get_by_id(knockout).knock_out()
fva = cameobrs.flux_variability_analysis(
model, fraction_of_optimum=1, remove_cycles=False, reactions=["PFL"]
)
assert abs(fva["lower_bound"][0]) > 4
assert abs(fva["lower_bound"].iloc[0]) > 4

0 comments on commit 044a8ee

Please sign in to comment.