Skip to content

Commit

Permalink
fix(deps): update libs (#13)
Browse files Browse the repository at this point in the history
* fix(deps): update libs

* styles(cameobrs): super-linter

* chore(github): update deps
  • Loading branch information
guillaume-gricourt authored Mar 4, 2024
1 parent 3d02e9b commit 09a00fd
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 23 deletions.
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
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 09a00fd

Please sign in to comment.