Skip to content

Commit 7f74807

Browse files
smitharapacesm
andauthored
Hotfix eval_model_for_cdf_file (#139)
* Fixing wrong temporary file handling in SwarmRequest.eval_model_for_cdf_file() (#138) * Version bump and changelog * Format fix --------- Co-authored-by: Martin Paces <martin.paces@eox.at>
1 parent f2ae317 commit 7f74807

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
lines changed

docs/release_notes.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@ Release notes
44
Change log
55
----------
66

7+
Changes from 0.15.1 to 0.15.2
8+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
9+
10+
- Fixed bug in file handling in :py:meth:`viresclient.SwarmRequest.eval_model_for_cdf_file`
11+
712
Changes from 0.15.0 to 0.15.1
813
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
914

src/viresclient/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,4 @@
3535
from ._config import ClientConfig, set_token
3636
from ._data_handling import ReturnedData, ReturnedDataFile
3737

38-
__version__ = "0.15.1"
38+
__version__ = "0.15.2"

src/viresclient/_client_swarm.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2867,7 +2867,10 @@ def _handler(file_obj):
28672867
output_mime_type="application/x-cdf",
28682868
).encode("UTF-8")
28692869

2870-
temp_cdf_filename = ".{output_cdf_filename}.tmp.cdf"
2870+
temp_cdf_filename = os.path.join(
2871+
os.path.dirname(output_cdf_filename),
2872+
f".{os.path.basename(output_cdf_filename)}.tmp.cdf",
2873+
)
28712874

28722875
if os.path.exists(temp_cdf_filename):
28732876
os.remove(temp_cdf_filename)

0 commit comments

Comments
 (0)