ncfunc 0.2.0__tar.gz → 0.2.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {ncfunc-0.2.0 → ncfunc-0.2.1}/PKG-INFO +2 -2
- {ncfunc-0.2.0 → ncfunc-0.2.1}/pyproject.toml +2 -2
- {ncfunc-0.2.0 → ncfunc-0.2.1}/pyproject.toml.orig +2 -2
- {ncfunc-0.2.0 → ncfunc-0.2.1}/src/ncfunc/core.py +7 -4
- {ncfunc-0.2.0 → ncfunc-0.2.1}/README.md +0 -0
- {ncfunc-0.2.0 → ncfunc-0.2.1}/src/ncfunc/__init__.py +0 -0
- {ncfunc-0.2.0 → ncfunc-0.2.1}/src/ncfunc/read_mf.py +0 -0
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: ncfunc
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.1
|
|
4
4
|
Summary: Add your description here
|
|
5
5
|
Author: warmpool
|
|
6
6
|
Author-email: warmpool <mail@mail.com>
|
|
7
7
|
Requires-Dist: datenum>=0.1.0
|
|
8
|
-
Requires-Dist: netcdf4>=1.
|
|
8
|
+
Requires-Dist: netcdf4>=1.6
|
|
9
9
|
Requires-Dist: numpy>=1.24
|
|
10
10
|
Requires-Python: >=3.10
|
|
11
11
|
Project-URL: Homepage, https://github.com/warmpool/py-ncfunc
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "ncfunc"
|
|
3
|
-
version = "0.2.
|
|
3
|
+
version = "0.2.1"
|
|
4
4
|
description = "Add your description here"
|
|
5
5
|
readme = "README.md"
|
|
6
6
|
requires-python = ">=3.10"
|
|
7
7
|
dependencies = [
|
|
8
8
|
"datenum>=0.1.0",
|
|
9
|
-
"netcdf4>=1.
|
|
9
|
+
"netcdf4>=1.6",
|
|
10
10
|
"numpy>=1.24",
|
|
11
11
|
]
|
|
12
12
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "ncfunc"
|
|
3
|
-
version = "0.2.
|
|
3
|
+
version = "0.2.1"
|
|
4
4
|
description = "Add your description here"
|
|
5
5
|
readme = "README.md"
|
|
6
6
|
authors = [
|
|
@@ -9,7 +9,7 @@ authors = [
|
|
|
9
9
|
requires-python = ">=3.10"
|
|
10
10
|
dependencies = [
|
|
11
11
|
"datenum>=0.1.0",
|
|
12
|
-
"netcdf4>=1.
|
|
12
|
+
"netcdf4>=1.6",
|
|
13
13
|
"numpy>=1.24",
|
|
14
14
|
]
|
|
15
15
|
|
|
@@ -723,11 +723,14 @@ def write_attr(path: PathLike, var_name: str, attr_name: str, value: Any) -> Non
|
|
|
723
723
|
the file if var_name == '/'
|
|
724
724
|
the variable else
|
|
725
725
|
|
|
726
|
-
|
|
727
|
-
|
|
726
|
+
only a root write creates the file when the path does not exist; a variable
|
|
727
|
+
write raises FileNotFoundError instead, leaving no file behind.
|
|
728
|
+
|
|
729
|
+
raises KeyError if the variable does not exist
|
|
728
730
|
"""
|
|
729
|
-
# check var_name here; KeyError and FileNotFoundError surface
|
|
730
|
-
|
|
731
|
+
if var_name != "/": # check var_name here; KeyError and FileNotFoundError surface
|
|
732
|
+
_get_variable_meta(path, var_name)
|
|
733
|
+
|
|
731
734
|
with nc.Dataset(path, "a") as h_file:
|
|
732
735
|
if var_name == "/":
|
|
733
736
|
h_file.setncattr(attr_name, value)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|