wavespectra 4.4.2__tar.gz → 4.4.3__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.
Files changed (71) hide show
  1. {wavespectra-4.4.2/wavespectra.egg-info → wavespectra-4.4.3}/PKG-INFO +2 -1
  2. {wavespectra-4.4.2 → wavespectra-4.4.3}/pyproject.toml +19 -0
  3. {wavespectra-4.4.2 → wavespectra-4.4.3}/wavespectra/__init__.py +1 -1
  4. {wavespectra-4.4.2 → wavespectra-4.4.3}/wavespectra/core/swan.py +6 -3
  5. {wavespectra-4.4.2 → wavespectra-4.4.3}/wavespectra/input/ndbc_ascii.py +6 -1
  6. {wavespectra-4.4.2 → wavespectra-4.4.3/wavespectra.egg-info}/PKG-INFO +2 -1
  7. {wavespectra-4.4.2 → wavespectra-4.4.3}/wavespectra.egg-info/requires.txt +1 -0
  8. {wavespectra-4.4.2 → wavespectra-4.4.3}/AUTHORS.rst +0 -0
  9. {wavespectra-4.4.2 → wavespectra-4.4.3}/LICENSE.txt +0 -0
  10. {wavespectra-4.4.2 → wavespectra-4.4.3}/README.rst +0 -0
  11. {wavespectra-4.4.2 → wavespectra-4.4.3}/setup.cfg +0 -0
  12. {wavespectra-4.4.2 → wavespectra-4.4.3}/setup.py +0 -0
  13. {wavespectra-4.4.2 → wavespectra-4.4.3}/tests/test_cli.py +0 -0
  14. {wavespectra-4.4.2 → wavespectra-4.4.3}/tests/test_cookiecutter_template.py +0 -0
  15. {wavespectra-4.4.2 → wavespectra-4.4.3}/tests/test_partition.py +0 -0
  16. {wavespectra-4.4.2 → wavespectra-4.4.3}/tests/test_specarray.py +0 -0
  17. {wavespectra-4.4.2 → wavespectra-4.4.3}/wavespectra/cli.py +0 -0
  18. {wavespectra-4.4.2 → wavespectra-4.4.3}/wavespectra/construct/__init__.py +0 -0
  19. {wavespectra-4.4.2 → wavespectra-4.4.3}/wavespectra/construct/direction.py +0 -0
  20. {wavespectra-4.4.2 → wavespectra-4.4.3}/wavespectra/construct/frequency.py +0 -0
  21. {wavespectra-4.4.2 → wavespectra-4.4.3}/wavespectra/core/__init__.py +0 -0
  22. {wavespectra-4.4.2 → wavespectra-4.4.3}/wavespectra/core/attributes.py +0 -0
  23. {wavespectra-4.4.2 → wavespectra-4.4.3}/wavespectra/core/attributes.yml +0 -0
  24. {wavespectra-4.4.2 → wavespectra-4.4.3}/wavespectra/core/fitting.py +0 -0
  25. {wavespectra-4.4.2 → wavespectra-4.4.3}/wavespectra/core/npstats.py +0 -0
  26. {wavespectra-4.4.2 → wavespectra-4.4.3}/wavespectra/core/select.py +0 -0
  27. {wavespectra-4.4.2 → wavespectra-4.4.3}/wavespectra/core/utils.py +0 -0
  28. {wavespectra-4.4.2 → wavespectra-4.4.3}/wavespectra/core/xrstats.py +0 -0
  29. {wavespectra-4.4.2 → wavespectra-4.4.3}/wavespectra/input/__init__.py +0 -0
  30. {wavespectra-4.4.2 → wavespectra-4.4.3}/wavespectra/input/awac.py +0 -0
  31. {wavespectra-4.4.2 → wavespectra-4.4.3}/wavespectra/input/dataset.py +0 -0
  32. {wavespectra-4.4.2 → wavespectra-4.4.3}/wavespectra/input/datawell.py +0 -0
  33. {wavespectra-4.4.2 → wavespectra-4.4.3}/wavespectra/input/era5.py +0 -0
  34. {wavespectra-4.4.2 → wavespectra-4.4.3}/wavespectra/input/funwave.py +0 -0
  35. {wavespectra-4.4.2 → wavespectra-4.4.3}/wavespectra/input/json.py +0 -0
  36. {wavespectra-4.4.2 → wavespectra-4.4.3}/wavespectra/input/ncswan.py +0 -0
  37. {wavespectra-4.4.2 → wavespectra-4.4.3}/wavespectra/input/ndbc.py +0 -0
  38. {wavespectra-4.4.2 → wavespectra-4.4.3}/wavespectra/input/netcdf.py +0 -0
  39. {wavespectra-4.4.2 → wavespectra-4.4.3}/wavespectra/input/obscape.py +0 -0
  40. {wavespectra-4.4.2 → wavespectra-4.4.3}/wavespectra/input/octopus.py +0 -0
  41. {wavespectra-4.4.2 → wavespectra-4.4.3}/wavespectra/input/spotter.py +0 -0
  42. {wavespectra-4.4.2 → wavespectra-4.4.3}/wavespectra/input/swan.py +0 -0
  43. {wavespectra-4.4.2 → wavespectra-4.4.3}/wavespectra/input/triaxys.py +0 -0
  44. {wavespectra-4.4.2 → wavespectra-4.4.3}/wavespectra/input/wavespectra.py +0 -0
  45. {wavespectra-4.4.2 → wavespectra-4.4.3}/wavespectra/input/ww3.py +0 -0
  46. {wavespectra-4.4.2 → wavespectra-4.4.3}/wavespectra/input/ww3_station.py +0 -0
  47. {wavespectra-4.4.2 → wavespectra-4.4.3}/wavespectra/input/wwm.py +0 -0
  48. {wavespectra-4.4.2 → wavespectra-4.4.3}/wavespectra/input/xwaves.py +0 -0
  49. {wavespectra-4.4.2 → wavespectra-4.4.3}/wavespectra/output/__init__.py +0 -0
  50. {wavespectra-4.4.2 → wavespectra-4.4.3}/wavespectra/output/funwave.py +0 -0
  51. {wavespectra-4.4.2 → wavespectra-4.4.3}/wavespectra/output/json.py +0 -0
  52. {wavespectra-4.4.2 → wavespectra-4.4.3}/wavespectra/output/netcdf.py +0 -0
  53. {wavespectra-4.4.2 → wavespectra-4.4.3}/wavespectra/output/octopus.py +0 -0
  54. {wavespectra-4.4.2 → wavespectra-4.4.3}/wavespectra/output/orcaflex.py +0 -0
  55. {wavespectra-4.4.2 → wavespectra-4.4.3}/wavespectra/output/swan.py +0 -0
  56. {wavespectra-4.4.2 → wavespectra-4.4.3}/wavespectra/output/ww3.py +0 -0
  57. {wavespectra-4.4.2 → wavespectra-4.4.3}/wavespectra/output/ww3.yml +0 -0
  58. {wavespectra-4.4.2 → wavespectra-4.4.3}/wavespectra/partition/__init__.py +0 -0
  59. {wavespectra-4.4.2 → wavespectra-4.4.3}/wavespectra/partition/hanson_and_phillips_2001.py +0 -0
  60. {wavespectra-4.4.2 → wavespectra-4.4.3}/wavespectra/partition/partition.py +0 -0
  61. {wavespectra-4.4.2 → wavespectra-4.4.3}/wavespectra/partition/specpart/specpart.c +0 -0
  62. {wavespectra-4.4.2 → wavespectra-4.4.3}/wavespectra/partition/specpart/specpart.h +0 -0
  63. {wavespectra-4.4.2 → wavespectra-4.4.3}/wavespectra/partition/specpart/specpart_wrap.c +0 -0
  64. {wavespectra-4.4.2 → wavespectra-4.4.3}/wavespectra/partition/tracking.py +0 -0
  65. {wavespectra-4.4.2 → wavespectra-4.4.3}/wavespectra/plot.py +0 -0
  66. {wavespectra-4.4.2 → wavespectra-4.4.3}/wavespectra/specarray.py +0 -0
  67. {wavespectra-4.4.2 → wavespectra-4.4.3}/wavespectra/specdataset.py +0 -0
  68. {wavespectra-4.4.2 → wavespectra-4.4.3}/wavespectra.egg-info/SOURCES.txt +0 -0
  69. {wavespectra-4.4.2 → wavespectra-4.4.3}/wavespectra.egg-info/dependency_links.txt +0 -0
  70. {wavespectra-4.4.2 → wavespectra-4.4.3}/wavespectra.egg-info/entry_points.txt +0 -0
  71. {wavespectra-4.4.2 → wavespectra-4.4.3}/wavespectra.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: wavespectra
3
- Version: 4.4.2
3
+ Version: 4.4.3
4
4
  Summary: Library for ocean wave spectra
5
5
  Author-email: Wavespectra Developers <r.guedes@oceanum.science>
6
6
  Maintainer-email: Rafael Guedes <r.guedes@oceanum.science>, Tom Durrant <t.durrant@oceanum.science>
@@ -63,6 +63,7 @@ Requires-Dist: fsspec; extra == "extra"
63
63
  Requires-Dist: gcsfs; extra == "extra"
64
64
  Requires-Dist: h5netcdf; extra == "extra"
65
65
  Requires-Dist: netCDF4; extra == "extra"
66
+ Requires-Dist: tbump; extra == "extra"
66
67
  Requires-Dist: zarr; extra == "extra"
67
68
  Provides-Extra: docs
68
69
  Requires-Dist: cmocean; extra == "docs"
@@ -78,6 +78,7 @@ extra = [
78
78
  "gcsfs",
79
79
  "h5netcdf",
80
80
  "netCDF4",
81
+ "tbump",
81
82
  "zarr",
82
83
  ]
83
84
  docs = [
@@ -131,6 +132,24 @@ line-ending = "auto"
131
132
  "wavespectra/input/wavespectra.py" = ["F401"]
132
133
  "wavespectra/input/xwaves.py" = ["F401"]
133
134
 
135
+ [tool.tbump]
136
+ github_url = "https://github.com/wavespectra/wavespectra/"
137
+
138
+ [tool.tbump.version]
139
+ current = "4.4.3"
140
+ regex = '''
141
+ (?P<major>\d+)
142
+ \.(?P<minor>\d+)
143
+ \.(?P<patch>\d+)
144
+ '''
145
+
146
+ [tool.tbump.git]
147
+ message_template = "Bump to {new_version}"
148
+ tag_template = "v{new_version}"
149
+
150
+ [[tool.tbump.file]]
151
+ src = "wavespectra/__init__.py"
152
+
134
153
  [tool.tox]
135
154
  legacy_tox_ini = """
136
155
  [tox]
@@ -14,7 +14,7 @@ except ImportError:
14
14
  warnings.warn("Cannot import accessors at the main module level")
15
15
 
16
16
 
17
- __version__ = "4.4.2"
17
+ __version__ = "4.4.3"
18
18
 
19
19
 
20
20
  def _import_functions(pkgname="input", prefix="read"):
@@ -69,9 +69,12 @@ class SwanSpecFile(object):
69
69
  "LOCATIONS", True
70
70
  )
71
71
  for ip in locs:
72
- xy = [float(val) for val in ip.split()]
73
- self.x.append(xy[0])
74
- self.y.append(xy[1])
72
+ # Only the first two tokens are the x/y coordinates. SWAN allows
73
+ # an optional location name to follow them in the header, which
74
+ # is ignored by SWAN when reading the file (see #84).
75
+ xy = ip.split()
76
+ self.x.append(float(xy[0]))
77
+ self.y.append(float(xy[1]))
75
78
  self.x = np.array(self.x)
76
79
  self.y = np.array(self.y)
77
80
  self.afreq = self._read_header("AFREQ", True)
@@ -35,7 +35,12 @@ def read_file(filename):
35
35
  df = pd.read_csv(f, delimiter=r"\s+", compression=compressed, header=None)
36
36
  df.index = pd.to_datetime(df[date_columns.keys()].rename(columns=date_columns))
37
37
  df = df.iloc[:, list(date_columns.keys())[-1] + 1 :]
38
- freqcols = df.select_dtypes(object) # Get all columns with the frequency
38
+ try:
39
+ # pandas 3+: "str" selects StringDtype columns; "object" selects legacy string columns
40
+ freqcols = df.select_dtypes(include=["object", "str"])
41
+ except TypeError:
42
+ # pandas 2: "str" is not a recognised dtype — object covers string columns
43
+ freqcols = df.select_dtypes(include=["object"])
39
44
  if not (freqcols.nunique() == 1).all():
40
45
  raise IOError("NDBC file has varying frequencies in same file")
41
46
  freqs = freqcols.iloc[0].apply(
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: wavespectra
3
- Version: 4.4.2
3
+ Version: 4.4.3
4
4
  Summary: Library for ocean wave spectra
5
5
  Author-email: Wavespectra Developers <r.guedes@oceanum.science>
6
6
  Maintainer-email: Rafael Guedes <r.guedes@oceanum.science>, Tom Durrant <t.durrant@oceanum.science>
@@ -63,6 +63,7 @@ Requires-Dist: fsspec; extra == "extra"
63
63
  Requires-Dist: gcsfs; extra == "extra"
64
64
  Requires-Dist: h5netcdf; extra == "extra"
65
65
  Requires-Dist: netCDF4; extra == "extra"
66
+ Requires-Dist: tbump; extra == "extra"
66
67
  Requires-Dist: zarr; extra == "extra"
67
68
  Provides-Extra: docs
68
69
  Requires-Dist: cmocean; extra == "docs"
@@ -24,6 +24,7 @@ fsspec
24
24
  gcsfs
25
25
  h5netcdf
26
26
  netCDF4
27
+ tbump
27
28
  zarr
28
29
 
29
30
  [test]
File without changes
File without changes
File without changes
File without changes
File without changes