Skip to content

Commit

Permalink
reformat and bump version
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinBelthle committed Aug 5, 2024
1 parent e66099f commit 44832d0
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 8 deletions.
7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
Changelog
=========

v0.1.3 (2023-08-05)
-------------------

* Remove unused imports
* Use 8760 values for `cluster.modulation` instead of 24.

v0.1.2 (2023-08-02)
-------------------

* Add `py.typed` file to avoid mypy issue in projects importing the code
* Fix little typo inside `README.md` file.


v0.1.1 (2023-08-02)
-------------------

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "antares-timeseries-generation"
version = "0.1.2"
version = "0.1.3"
license = {text="MPL-2.0"}
description = 'Timeseries generation library aiming at creating input data for Antares simulator studies.'
readme = "README.md"
Expand Down
2 changes: 1 addition & 1 deletion sonar-project.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
sonar.projectVersion=0.1.2
sonar.projectVersion=0.1.3
sonar.organization=antaressimulatorteam
sonar.projectKey=AntaresSimulatorTeam_antares-timeseries-generation
sonar.sources=src
Expand Down
3 changes: 2 additions & 1 deletion src/antares/tsgen/random_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ class RNG(ABC):
"""

@abstractmethod
def next(self) -> float: ...
def next(self) -> float:
...


class PythonRNG(ABC):
Expand Down
10 changes: 6 additions & 4 deletions src/antares/tsgen/ts_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -307,9 +307,9 @@ def generate_time_series(
for day in range(self.days):
# = return of units wich were in outage =
current_planned_outages -= logp[now]
logp[now] = (
0 # set to 0 because this cell will be use again later (in self.log_size days)
)
logp[
now
] = 0 # set to 0 because this cell will be use again later (in self.log_size days)
current_available_units += log[now]
log[now] = 0

Expand Down Expand Up @@ -419,6 +419,8 @@ def generate_time_series(
now = (now + 1) % log_size

hourly_available_units = _daily_to_hourly(output.available_units)
output.available_power = hourly_available_units * cluster.nominal_power * cluster.modulation
output.available_power = (
hourly_available_units * cluster.nominal_power * cluster.modulation
)

return output

0 comments on commit 44832d0

Please sign in to comment.