domainiac 9.0.4__tar.gz → 9.1.0__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 (23) hide show
  1. {domainiac-9.0.4 → domainiac-9.1.0}/PKG-INFO +6 -2
  2. {domainiac-9.0.4 → domainiac-9.1.0}/domainiac/functions/interpolation.py +1 -0
  3. {domainiac-9.0.4 → domainiac-9.1.0}/domainiac/functions/temperature.py +5 -1
  4. {domainiac-9.0.4 → domainiac-9.1.0}/domainiac/functions/wind.py +5 -1
  5. {domainiac-9.0.4 → domainiac-9.1.0}/domainiac/managers/nwp_manager.py +5 -1
  6. {domainiac-9.0.4 → domainiac-9.1.0}/pyproject.toml +2 -2
  7. {domainiac-9.0.4 → domainiac-9.1.0}/domainiac/__init__.py +0 -0
  8. {domainiac-9.0.4 → domainiac-9.1.0}/domainiac/functions/__init__.py +0 -0
  9. {domainiac-9.0.4 → domainiac-9.1.0}/domainiac/functions/conversions.py +0 -0
  10. {domainiac-9.0.4 → domainiac-9.1.0}/domainiac/functions/solar.py +0 -0
  11. {domainiac-9.0.4 → domainiac-9.1.0}/domainiac/functions/typing.py +0 -0
  12. {domainiac-9.0.4 → domainiac-9.1.0}/domainiac/managers/__init__.py +0 -0
  13. {domainiac-9.0.4 → domainiac-9.1.0}/domainiac/managers/masterdata_manager.py +0 -0
  14. {domainiac-9.0.4 → domainiac-9.1.0}/domainiac/managers/metering_manager.py +0 -0
  15. {domainiac-9.0.4 → domainiac-9.1.0}/domainiac/managers/outage_manager.py +0 -0
  16. {domainiac-9.0.4 → domainiac-9.1.0}/domainiac/managers/plant_manager.py +0 -0
  17. {domainiac-9.0.4 → domainiac-9.1.0}/domainiac/managers/resource_manager.py +0 -0
  18. {domainiac-9.0.4 → domainiac-9.1.0}/domainiac/managers/unit_manager.py +0 -0
  19. {domainiac-9.0.4 → domainiac-9.1.0}/domainiac/modeling/__init__.py +0 -0
  20. {domainiac-9.0.4 → domainiac-9.1.0}/domainiac/modeling/nwp.py +0 -0
  21. {domainiac-9.0.4 → domainiac-9.1.0}/domainiac/modeling/plant.py +0 -0
  22. {domainiac-9.0.4 → domainiac-9.1.0}/domainiac/wrappers/__init__.py +0 -0
  23. {domainiac-9.0.4 → domainiac-9.1.0}/domainiac/wrappers/cache_wrapper.py +0 -0
@@ -1,12 +1,16 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: domainiac
3
- Version: 9.0.4
3
+ Version: 9.1.0
4
4
  Summary: Package for working with Energinet data, but with specialized functions used for Enigma.
5
5
  Author: Team Enigma
6
6
  Author-email: gridop-enigma@energinet.dk
7
- Requires-Python: >=3.10,<3.11
7
+ Requires-Python: >=3.10,<4.0
8
8
  Classifier: Programming Language :: Python :: 3
9
9
  Classifier: Programming Language :: Python :: 3.10
10
+ Classifier: Programming Language :: Python :: 3.11
11
+ Classifier: Programming Language :: Python :: 3.12
12
+ Classifier: Programming Language :: Python :: 3.13
13
+ Classifier: Programming Language :: Python :: 3.14
10
14
  Requires-Dist: datamazing (>=5.0.2,<6.0.0)
11
15
  Requires-Dist: pandas (>=2.2.0,<3.0.0)
12
16
  Requires-Dist: pvlib (>=0.13.1,<0.14.0)
@@ -112,6 +112,7 @@ def binned_index_interpolation(
112
112
  index = interpolate.PchipInterpolator(
113
113
  x=bin_midpoints,
114
114
  y=bin_index,
115
+ extrapolate=False,
115
116
  )
116
117
 
117
118
  def estimate(x: NDArray[np.float64]) -> NDArray[np.float64]:
@@ -23,8 +23,12 @@ def interpolate_temperature(times: pd.Series, temperature: pd.Series) -> RealFun
23
23
 
24
24
  f = interpolate.make_interp_spline(x, y, k=1)
25
25
 
26
+ bounds = (x.min(), x.max())
27
+
26
28
  def estimate(times: pd.Series) -> NDArray[np.float64]:
27
29
  x = conversions.datetime_to_float(times)
28
- return f(x)
30
+ y = f(x)
31
+ y[(x < bounds[0]) | (x > bounds[1])] = np.nan
32
+ return y
29
33
 
30
34
  return estimate
@@ -25,8 +25,12 @@ def interpolate_wind_components(
25
25
 
26
26
  f = interpolate.make_interp_spline(x, y, k=1)
27
27
 
28
+ bounds = (x.min(), x.max())
29
+
28
30
  def estimate(times: pd.Series) -> NDArray[np.float64]:
29
31
  x = conversions.datetime_to_float(times)
30
- return f(x)
32
+ y = f(x)
33
+ y[(x < bounds[0]) | (x > bounds[1]), :] = np.nan
34
+ return y
31
35
 
32
36
  return estimate
@@ -195,7 +195,11 @@ class NWPManager:
195
195
  df_interpolated["time_utc"]
196
196
  )
197
197
 
198
- # disallow extrapolation
198
+ # remove nan values from the interpolated data
199
+ # (for example when data has been extrapolated)
200
+ df = df_interpolated.dropna(subset=column_names)
201
+
202
+ # remove values outside the original time interval
199
203
  df_interpolated = df_interpolated[
200
204
  df_interpolated["time_utc"].between(
201
205
  df["time_utc"].min(), df["time_utc"].max()
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "domainiac"
3
- version = "9.0.4"
3
+ version = "9.1.0"
4
4
  description = "Package for working with Energinet data, but with specialized functions used for Enigma."
5
5
  authors = ["Team Enigma <gridop-enigma@energinet.dk>"]
6
6
  packages = [
@@ -8,7 +8,7 @@ packages = [
8
8
  ]
9
9
 
10
10
  [tool.poetry.dependencies]
11
- python = "^3.10,<3.11"
11
+ python = "^3.10"
12
12
  pandas = "^2.2.0"
13
13
  datamazing = "^5.0.2"
14
14
  typeguard = "^4.2.1"