Skip to content

Commit f59df2b

Browse files
fixed encoding in binary
1 parent 19cb3a0 commit f59df2b

File tree

5 files changed

+6
-6
lines changed

5 files changed

+6
-6
lines changed

_docs/development.qmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ Testing is performed with pytest and tox:
2121

2222
Run single tox target:
2323
```bash
24-
tox r -e py314
24+
tox -e py314
2525
```
2626
Run all tests in parallel:
2727
```bash

src/sbmlsim/sensitivity/analysis.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,7 @@ def read_cache(self, cache_filename: str, cache: bool) -> Optional[Any]:
365365

366366
# retrieve from cache
367367
if cache and cache_path.exists():
368-
with open(cache_path, "rb", encoding="utf-8") as f:
368+
with open(cache_path, "rb") as f:
369369
data = dill.load(f)
370370
console.print(f"Simulated samples loaded from cache: '{cache_path}'")
371371
return data
@@ -377,7 +377,7 @@ def write_cache(self, data: Any, cache_filename: str, cache: bool) -> Optional[A
377377
self.results_path / cache_filename if cache_filename else None
378378
)
379379
if cache_path:
380-
with open(cache_path, "wb", encoding="utf-8") as f:
380+
with open(cache_path, "wb") as f:
381381
console.print(f"Simulated samples written to cache: '{cache_path}'")
382382
dill.dump(data, f)
383383

src/sbmlsim/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ def md5_for_path(path):
1616
"""Calculate MD5 of file content."""
1717

1818
# Open,close, read file and calculate MD5 on its contents
19-
with open(path, "rb", encoding="utf-8") as f_check:
19+
with open(path, "rb") as f_check:
2020
# read contents of the file
2121
data = f_check.read()
2222
# pipe contents of the file through

tests/data/combine/omex/jws/download_omex.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ def download_omex(url, omex_path):
5858
"""
5959
r = requests.get(url, stream=True)
6060
if r.status_code == 200:
61-
with open(omex_path, "wb") as f:
61+
with open(omex_path, "wb", encoding="utf-8") as f:
6262
r.raw.decode_content = True
6363
shutil.copyfileobj(r.raw, f)
6464

tests/data/diff/simulate_examples.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ def run_comparisons(create_files=True):
6464
plt.show()
6565

6666
report_path = diff_path / f"{simulation_key}_diff.tsv"
67-
with open(report_path, "w") as f_report:
67+
with open(report_path, "w", encoding="utf-8") as f_report:
6868
f_report.write(dsc.report_str())
6969

7070

0 commit comments

Comments
 (0)