Skip to content

Commit eee3a4e

Browse files
fixing tests
1 parent 42121a8 commit eee3a4e

File tree

8 files changed

+11
-9
lines changed

8 files changed

+11
-9
lines changed

release-notes/0.1.14.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,4 @@ of timecourse definitions in multiple simulations. E.g. repeated timecourse `[tc
2828
- adding mypy configuration and initial mypy fixes
2929
- many flake8 fixes and type annotations
3030
- Fix #91, support hex colors in plot
31+
- Fix #92, update `xarray>=0.17.0`

setup.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ install_requires =
5252
sympy>=1.7.1
5353
pandas>=1.2.1
5454
tables>=3.6.1
55-
xarray>=0.16.1
55+
xarray>=0.17.0
5656
bottleneck>=1.3.2
5757
pint>=0.16.1
5858
Jinja2>=2.11.2

src/sbmlsim/diff.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,9 +94,9 @@ def __init__(
9494
# apply factors
9595
fs = factors.get(key, [1.0] * len(sel_keys))
9696
for k, sel in enumerate(sel_keys):
97-
print(f"scaling: '{sel}' * {fs[k]}")
97+
print(f"scaling: '{sel}' * {fs[k]}") # type: ignore
9898
# df_new[sel] = fs[k] * df_new[sel]
99-
df_new.loc[:, sel] *= fs[k]
99+
df_new.loc[:, sel] *= fs[k] # type: ignore
100100

101101
# do renaming
102102
df_new = df_new.rename(columns=dict(zip(sel_keys, colnames)))

src/sbmlsim/experiment/runner.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
import logging
1212
from pathlib import Path
13-
from typing import Iterable, List, Optional
13+
from typing import Dict, Iterable, List, Optional
1414

1515
from sbmlsim.experiment import ExperimentResult, SimulationExperiment
1616
from sbmlsim.model import RoadrunnerSBMLModel

src/sbmlsim/model/model_resources.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ def from_source(cls, source: str, base_dir: Path = None) -> "Source":
5858
if is_urn(source):
5959
content = model_from_urn(source)
6060
elif is_http(source):
61-
content = model_from_url()
61+
content = model_from_url(url=source)
6262

6363
# is path
6464
if content is None:

src/sbmlsim/result/xresult.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,10 +103,11 @@ def from_dfs(
103103
if scan is None:
104104
dimensions = [Dimension("_dfs", index=np.arange(num_dfs))]
105105
else:
106-
dimensions = scan.dimensions
106+
dimensions = scan.dimensions # type: ignore
107107

108108
# add additional dimensions
109-
for dimension in dimensions: # type: Dimension
109+
dimension: Dimension
110+
for dimension in dimensions:
110111
shape.append(len(dimension))
111112
dim_id = dimension.dimension
112113
coords[dim_id] = dimension.index

src/sbmlsim/serialization.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ def from_json(json_info: Union[str, Path]) -> Dict:
1515
with open(json_info, "r") as f_json:
1616
d = json.load(f_json)
1717
else:
18-
d = json.loads(json_info)
18+
d: Dict = json.loads(json_info)
1919
return d
2020

2121

src/sbmlsim/simulator/simulation_serial.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ def __init__(self, model=None, **kwargs):
3535
}
3636
self.integrator_settings.update(kwargs)
3737
self.set_model(model)
38-
self.model: Optional[AbstractModel, RoadrunnerSBMLModel] = None
38+
# self.model: Optional[AbstractModel, RoadrunnerSBMLModel] = None
3939

4040
def set_model(self, model):
4141
"""Set model for simulator and updates the integrator settings.

0 commit comments

Comments
 (0)