pyconvexity 0.5.1__py3-none-any.whl → 0.5.1.post1__py3-none-any.whl
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.
Potentially problematic release.
This version of pyconvexity might be problematic. Click here for more details.
- pyconvexity/_version.py +1 -1
- pyconvexity/transformations/time_axis.py +17 -2
- {pyconvexity-0.5.1.dist-info → pyconvexity-0.5.1.post1.dist-info}/METADATA +1 -1
- {pyconvexity-0.5.1.dist-info → pyconvexity-0.5.1.post1.dist-info}/RECORD +6 -6
- {pyconvexity-0.5.1.dist-info → pyconvexity-0.5.1.post1.dist-info}/WHEEL +1 -1
- {pyconvexity-0.5.1.dist-info → pyconvexity-0.5.1.post1.dist-info}/top_level.txt +0 -0
pyconvexity/_version.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
__version__ = "0.5.1"
|
|
1
|
+
__version__ = "0.5.1.post1"
|
|
@@ -589,6 +589,16 @@ class TimeAxisModifier:
|
|
|
589
589
|
# Get time bounds for the new time axis
|
|
590
590
|
new_start_timestamp = new_periods[0].timestamp
|
|
591
591
|
new_end_timestamp = new_periods[-1].timestamp
|
|
592
|
+
|
|
593
|
+
# Calculate the duration of one new period in seconds
|
|
594
|
+
# This is needed to properly include all original data within the last new period
|
|
595
|
+
new_period_duration_seconds = new_resolution_minutes * 60
|
|
596
|
+
|
|
597
|
+
# The end timestamp represents the START of the last period, not its end.
|
|
598
|
+
# To include all original data that falls within the last period,
|
|
599
|
+
# we need to extend the end boundary by the period duration (minus 1 second
|
|
600
|
+
# to avoid including the start of the next period).
|
|
601
|
+
effective_end_timestamp = new_end_timestamp + new_period_duration_seconds - 1
|
|
592
602
|
|
|
593
603
|
logger.debug(
|
|
594
604
|
f"Original data: {len(original_values)} points, "
|
|
@@ -598,6 +608,10 @@ class TimeAxisModifier:
|
|
|
598
608
|
f"New time range: {new_periods[0].formatted_time} to "
|
|
599
609
|
f"{new_periods[-1].formatted_time}"
|
|
600
610
|
)
|
|
611
|
+
logger.debug(
|
|
612
|
+
f"Effective end timestamp for slicing: {effective_end_timestamp} "
|
|
613
|
+
f"(added {new_period_duration_seconds}s period duration)"
|
|
614
|
+
)
|
|
601
615
|
|
|
602
616
|
# Find the slice of original data that falls within the new time range
|
|
603
617
|
start_idx = 0
|
|
@@ -609,9 +623,10 @@ class TimeAxisModifier:
|
|
|
609
623
|
start_idx = i
|
|
610
624
|
break
|
|
611
625
|
|
|
612
|
-
# Find end index - last period <=
|
|
626
|
+
# Find end index - last period <= effective_end_timestamp
|
|
627
|
+
# Use effective_end_timestamp to include all data within the last new period
|
|
613
628
|
for i in range(len(original_periods) - 1, -1, -1):
|
|
614
|
-
if original_periods[i].timestamp <=
|
|
629
|
+
if original_periods[i].timestamp <= effective_end_timestamp:
|
|
615
630
|
end_idx = i + 1 # +1 because slice end is exclusive
|
|
616
631
|
break
|
|
617
632
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
pyconvexity/__init__.py,sha256=Prol-EntlU_jWLR3D55ZRYqkLnenLnt5cXVc_NT1cI4,5934
|
|
2
|
-
pyconvexity/_version.py,sha256=
|
|
2
|
+
pyconvexity/_version.py,sha256=cOaLNeTwkPXJFU_tSZi-530rXF3qjxypENpk5W_HqGE,28
|
|
3
3
|
pyconvexity/dashboard.py,sha256=7x04Hr-EwzTAf-YJdHzfV83Gf2etltwtzwh_bCYJ5lk,8579
|
|
4
4
|
pyconvexity/timeseries.py,sha256=QdKbiqjAlxkJATyKm2Kelx1Ea2PsAnnCYfVLU5VER1Y,11085
|
|
5
5
|
pyconvexity/core/__init__.py,sha256=gdyyHNqOc4h9Nfe9u6NA936GNzH6coGNCMgBvvvOnGE,1196
|
|
@@ -38,10 +38,10 @@ pyconvexity/solvers/pypsa/solver.py,sha256=pNI9ch0vO5q-8mWc3RHTscWB_ymj4s2lVJQ_e
|
|
|
38
38
|
pyconvexity/solvers/pypsa/storage.py,sha256=nbONOBnunq3tyexa5yDUsT9xdxieUfrqhoM76_2HIGg,94956
|
|
39
39
|
pyconvexity/transformations/__init__.py,sha256=JfTk0b2O3KM22Dcem2ZnNvDDBmlmqS2X3Q_cO0H3r44,406
|
|
40
40
|
pyconvexity/transformations/api.py,sha256=t_kAAk9QSF1YTlrTM7BECd_v08jUgXVV6e9iX2M0aAg,3694
|
|
41
|
-
pyconvexity/transformations/time_axis.py,sha256=
|
|
41
|
+
pyconvexity/transformations/time_axis.py,sha256=Cr_H-FozXLQno4n6jMSZCTj3M4h7tGpsuqGcMW2qghY,29322
|
|
42
42
|
pyconvexity/validation/__init__.py,sha256=VJNZlFoWABsWwUKktNk2jbtXIepH5omvC0WtsTS7o3o,583
|
|
43
43
|
pyconvexity/validation/rules.py,sha256=GiNadc8hvbWBr09vUkGiLLTmSdvtNSeGLFwvCjlikYY,9241
|
|
44
|
-
pyconvexity-0.5.1.dist-info/METADATA,sha256=
|
|
45
|
-
pyconvexity-0.5.1.dist-info/WHEEL,sha256=
|
|
46
|
-
pyconvexity-0.5.1.dist-info/top_level.txt,sha256=wFPEDXVaebR3JO5Tt3HNse-ws5aROCcxEco15d6j64s,12
|
|
47
|
-
pyconvexity-0.5.1.dist-info/RECORD,,
|
|
44
|
+
pyconvexity-0.5.1.post1.dist-info/METADATA,sha256=uSFWS8R_sFfT9O4BbiRYo3ZcdodG2dIP5natNEIkJGs,4973
|
|
45
|
+
pyconvexity-0.5.1.post1.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
|
|
46
|
+
pyconvexity-0.5.1.post1.dist-info/top_level.txt,sha256=wFPEDXVaebR3JO5Tt3HNse-ws5aROCcxEco15d6j64s,12
|
|
47
|
+
pyconvexity-0.5.1.post1.dist-info/RECORD,,
|
|
File without changes
|