Skip to content

Commit 044a8ee

Browse files
Merge branch 'main' into stable
2 parents 4c38f7c + 09a00fd commit 044a8ee

9 files changed

Lines changed: 45 additions & 45 deletions

File tree

.github/workflows/build.yml

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
tag: ${{ steps.tag_label.outputs.tag }}
1414
changelog: ${{ steps.tag_raw.outputs.changelog }}
1515
steps:
16-
- uses: actions/checkout@v3
16+
- uses: actions/checkout@v4
1717
with:
1818
persist-credentials: false
1919
fetch-depth: 0
@@ -36,7 +36,7 @@ jobs:
3636
Changelog:
3737
runs-on: ubuntu-latest
3838
steps:
39-
- uses: actions/checkout@v3
39+
- uses: actions/checkout@v4
4040
with:
4141
persist-credentials: false
4242
fetch-depth: 0
@@ -57,7 +57,7 @@ jobs:
5757
echo "$USER $PROJECT"
5858
github_changelog_generator --user "$USER" --project "$PROJECT" --no-unreleased
5959
- name: 'Upload Artifact Changelog'
60-
uses: actions/upload-artifact@v3
60+
uses: actions/upload-artifact@v4
6161
with:
6262
name: changelog-artifact
6363
path: CHANGELOG.md
@@ -70,7 +70,7 @@ jobs:
7070
version_path: ${{ steps.update_version.outputs.version_path }}
7171
version_dir: ${{ steps.update_version.outputs.version_dir }}
7272
steps:
73-
- uses: actions/checkout@v3
73+
- uses: actions/checkout@v4
7474
- name: 'Update _version.py'
7575
id: update_version
7676
env:
@@ -82,7 +82,7 @@ jobs:
8282
echo "version_path=$VERSION_PATH" >> "$GITHUB_OUTPUT"
8383
echo "version_dir=$VERSION_DIR" >> "$GITHUB_OUTPUT"
8484
- name: 'Upload Artifact Version'
85-
uses: actions/upload-artifact@v3
85+
uses: actions/upload-artifact@v4
8686
with:
8787
name: version-artifact
8888
path: ${{ steps.update_version.outputs.version_path }}
@@ -93,17 +93,17 @@ jobs:
9393
steps:
9494
# Get Data
9595
- name: 'Checkout'
96-
uses: actions/checkout@v3
96+
uses: actions/checkout@v4
9797
with:
9898
persist-credentials: false
9999
fetch-depth: 0
100100
- name: 'Download Artifact Version'
101-
uses: actions/download-artifact@v3
101+
uses: actions/download-artifact@v4
102102
with:
103103
name: version-artifact
104104
path: ${{ needs.Version.outputs.version_dir }}
105105
- name: 'Download Artifact Changelog'
106-
uses: actions/download-artifact@v3
106+
uses: actions/download-artifact@v4
107107
with:
108108
name: changelog-artifact
109109
# Commit
@@ -133,7 +133,7 @@ jobs:
133133
needs: [Commit, TagRaw]
134134
runs-on: ubuntu-latest
135135
steps:
136-
- uses: actions/checkout@v3
136+
- uses: actions/checkout@v4
137137
with:
138138
persist-credentials: false
139139
fetch-depth: 0
@@ -158,9 +158,9 @@ jobs:
158158
shell: bash -l {0} # activate env conda
159159
steps:
160160
- name: 'Checkout'
161-
uses: actions/checkout@v3
161+
uses: actions/checkout@v4
162162
- name: 'Deploying miniconda'
163-
uses: conda-incubator/setup-miniconda@v2
163+
uses: conda-incubator/setup-miniconda@v3
164164
with:
165165
miniconda-version: "latest"
166166
environment-file: recipes/workflow.yaml
@@ -178,7 +178,7 @@ jobs:
178178
filename=$(find ${{ env.dirbuild }} | head -n 1)
179179
echo "asset=$filename" >> "$GITHUB_OUTPUT"
180180
- name: 'Upload Artifact Package'
181-
uses: actions/upload-artifact@v3
181+
uses: actions/upload-artifact@v4
182182
with:
183183
name: package-conda-artifact
184184
path: ${{ steps.identify_asset.outputs.asset }}
@@ -190,7 +190,7 @@ jobs:
190190
runs-on: ubuntu-latest
191191
steps:
192192
- name: 'Download Artifact Package - Pip'
193-
uses: actions/download-artifact@v3
193+
uses: actions/download-artifact@v4
194194
with:
195195
name: package-conda-artifact
196196
- name: 'Create Release'

.github/workflows/lint.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@ jobs:
88
runs-on: ubuntu-latest
99
steps:
1010
- name: 'Checkout'
11-
uses: actions/checkout@v2
11+
uses: actions/checkout@v4
1212
with:
1313
ref: ${{ github.ref }}
1414
fetch-depth: 0
1515
- name: Lint Code Base
16-
uses: github/super-linter@v4
16+
uses: github/super-linter@v5
1717
env:
1818
VALIDATE_ALL_CODEBASE: false
1919
VALIDATE_YAML: false

.github/workflows/test.yml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ on:
77
pull_request:
88
branches:
99
- main
10+
schedule:
11+
- cron: '0 0 * * 1'
1012

1113
jobs:
1214

@@ -17,11 +19,11 @@ jobs:
1719
shell: bash -l {0}
1820
steps:
1921
- name: 'Checkout'
20-
uses: actions/checkout@v2
22+
uses: actions/checkout@v4
2123
with:
2224
ref: ${{ github.ref }}
2325
- name: 'Deploying miniconda'
24-
uses: conda-incubator/setup-miniconda@v2
26+
uses: conda-incubator/setup-miniconda@v3
2527
with:
2628
miniconda-version: "latest"
2729
environment-file: recipes/workflow.yaml
@@ -44,11 +46,11 @@ jobs:
4446
shell: bash -l {0}
4547
steps:
4648
- name: 'Checkout'
47-
uses: actions/checkout@v2
49+
uses: actions/checkout@v4
4850
with:
4951
ref: ${{ github.ref }}
5052
- name: 'Deploying miniconda'
51-
uses: conda-incubator/setup-miniconda@v2
53+
uses: conda-incubator/setup-miniconda@v3
5254
with:
5355
miniconda-version: "latest"
5456
environment-file: recipes/workflow.yaml
@@ -70,11 +72,11 @@ jobs:
7072
shell: bash -l {0}
7173
steps:
7274
- name: 'Checkout'
73-
uses: actions/checkout@v2
75+
uses: actions/checkout@v4
7476
with:
7577
ref: ${{ github.ref }}
7678
- name: 'Deploying miniconda'
77-
uses: conda-incubator/setup-miniconda@v2
79+
uses: conda-incubator/setup-miniconda@v3
7880
with:
7981
miniconda-version: "latest"
8082
environment-file: recipes/workflow.yaml

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
# Changelog
22

3+
## [3.2.1](https://github.com/brsynth/straindesign/tree/3.2.1) (2023-01-23)
4+
5+
[Full Changelog](https://github.com/brsynth/straindesign/compare/3.2.0...3.2.1)
6+
7+
**Merged pull requests:**
8+
9+
- 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))
10+
- 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))
11+
312
## [3.2.0](https://github.com/brsynth/straindesign/tree/3.2.0) (2023-01-05)
413

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

recipes/meta.yaml

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{% set name = "straindesign" %}
2-
{% set version = "3.1.0" %}
2+
{% set version = "3.2.3" %}
33

44
package:
55
name: {{ name }}
@@ -16,29 +16,25 @@ build:
1616
requirements:
1717
build:
1818
- pip
19-
- python
19+
- python>=3.8
2020
- pyyaml
2121
- setuptools
2222
run:
2323
- biopython
2424
- blessings
25-
- click
26-
- cobra>=0.24
25+
- cobra>=0.29
2726
- escher
2827
- future
2928
- gnomic
3029
- inspyred
3130
- IProgress
3231
- lazy-object-proxy
3332
- plotly
34-
- python
35-
- markupsafe
33+
- python>=3.8
3634
- networkx
3735
- numexpr
38-
- numpy<1.24 # Related to https://github.com/numpy/numpy/pull/22607
3936
- openbabel
4037
- openpyxl
41-
- optlang
4238
- ordered-set
4339
- palettable
4440
- pandas

recipes/workflow.yaml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: test
1+
name: straindesign-local
22
channels:
33
- conda-forge
44
- plotly
@@ -8,7 +8,7 @@ dependencies:
88
- biopython
99
- blessings
1010
- click
11-
- cobra>=0.24
11+
- cobra
1212
- conda-build
1313
- escher
1414
- future
@@ -20,10 +20,9 @@ dependencies:
2020
- markupsafe
2121
- networkx
2222
- numexpr
23-
- numpy<1.24 # Related to https://github.com/numpy/numpy/pull/22607
23+
- numpy
2424
- openbabel
2525
- openpyxl
26-
- optlang
2726
- ordered-set
2827
- palettable
2928
- pandas

src/cameobrs/strain_design/deterministic/flux_variability_based.py

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -360,11 +360,7 @@ def run(
360360
].values
361361

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

437433
solutions = dict(
438-
(tuple(point.iteritems()), fva_result) for (point, fva_result) in results
434+
(tuple(point.items()), fva_result) for (point, fva_result) in results
439435
)
440436

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

883-
reaction_data = dict(reaction_data.iteritems())
879+
reaction_data = dict(reaction_data.items())
884880
reaction_data["max"] = numpy.abs(values).max()
885881
reaction_data["min"] = -reaction_data["max"]
886882

@@ -1114,7 +1110,6 @@ def run(
11141110
exclude_ids.append(reaction)
11151111

11161112
with TimeMachine() as tm:
1117-
11181113
tm(do=int, undo=partial(setattr, model, "objective", model.objective))
11191114
tm(do=int, undo=partial(setattr, target, "lower_bound", target.lower_bound))
11201115
tm(do=int, undo=partial(setattr, target, "upper_bound", target.upper_bound))
@@ -1228,7 +1223,6 @@ def __init__(
12281223
*args,
12291224
**kwargs,
12301225
):
1231-
12321226
super(FSEOFResult, self).__init__(
12331227
self._generate_designs(reference, enforced_levels, reaction_results),
12341228
*args,

src/straindesign/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
__app_name__ = "straindesign"
2-
__version__ = "3.2.1"
2+
__version__ = "3.2.2"

tests/cameobrs/unit/test_strain_design_deterministic.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -207,11 +207,11 @@ def test_result_is_correct(self, glpk_growth_coupling_potential):
207207
fva = cameobrs.flux_variability_analysis(
208208
model, fraction_of_optimum=1, remove_cycles=False, reactions=["PFL"]
209209
)
210-
assert fva["lower_bound"][0] <= 0 <= fva["upper_bound"][0]
210+
assert fva["lower_bound"].iloc[0] <= 0 <= fva["upper_bound"].iloc[0]
211211
with model:
212212
for knockout in knockouts:
213213
model.reactions.get_by_id(knockout).knock_out()
214214
fva = cameobrs.flux_variability_analysis(
215215
model, fraction_of_optimum=1, remove_cycles=False, reactions=["PFL"]
216216
)
217-
assert abs(fva["lower_bound"][0]) > 4
217+
assert abs(fva["lower_bound"].iloc[0]) > 4

0 commit comments

Comments
 (0)