Skip to content

Commit

Permalink
a
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinBelthle committed Feb 20, 2025
1 parent 7347202 commit 2f08123
Show file tree
Hide file tree
Showing 5 changed files with 59 additions and 6 deletions.
55 changes: 55 additions & 0 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,58 @@
v0.2.0 (2025-02-20)
-------------------

### Compatiblity with AntaresWeb
This version is only compatible with AntaresWeb v2.19.0 and higher

### Breaking changes
- It is no longer possible to create a study while giving settings. The user will have to update them afterward.
- All user classes are now dataclasses and not Pydantic model.
- All user class (except for update) have no optional fields meaning it will be clearer for the users to see what they are really sending.
It will also silent typing issues inside user scripts
- New classes have been introduced for update. They are all optional which makes it also clear to understand which fields are updated.
- STStorage methods for updating matrices have been renamed `update_xxx` instead of `upload_xxx`.

Example of an old code:
```python
import AreaProperties

area_properties = AreaProperties()
area_properties.energy_cost_unsupplied = 10
area_properties.energy_cost_spilled = 4
area_fr = study.create_area("fr", area_properties)

new_properties = AreaProperties()
new_properties.energy_cost_unsupplied = 6
area_fr.update_properties(new_properties)
```

Example of a new code:
```python
import AreaProperties, AreaPropertiesUpdate

area_properties = AreaProperties(energy_cost_unsupplied=10, energy_cost_spilled=4)
area_fr = study.create_area("fr", area_properties)

new_properties = AreaPropertiesUpdate(energy_cost_unsupplied=6)
area_fr.update_properties(new_properties)
```

### Features
- API: add `import_study_api` method
- API: add update_thermal_matrices methods
- API: specify number of years to generate for thermal TS-generation

### Fixes
- LOCAL: `get_thermal_matrix` method checked the wrong path
- API: `read_renewables` method doesn't fail when settings are aggregated instead of clusters
- API: `read_settings` doesn't fail when horizon is a year
- API: disable proxy when using the Desktop version to avoid any issue

### Miscellaneous
- enforce strict type checking with mypy
- enforce override with mypy
- Moves all local and api related classes and methods outside the `model` package

v0.1.8_RC2 (2025-01-22)
-------------------
- upload renewable thermal matrices method added
Expand Down
3 changes: 1 addition & 2 deletions docs/developer.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ To typecheck your code, use this command line: `mypy`

### integration testing

To launch integration tests you'll need an AntaresWebDesktop instance on your local env (at least the v.2.17.3,
**currently running in 2.17.5**).
To launch integration tests you'll need an AntaresWebDesktop instance on your local env (since v0.2.0, use at least the **v.2.19.0**)
To install it, download it from the last [Antares Web release](https://github.com/AntaresSimulatorTeam/AntaREST/releases)
(inside the assets list).
Then, unzip it at the root of this repository and rename the folder `AntaresWebDesktop`.
Expand Down
3 changes: 1 addition & 2 deletions docs/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,7 @@ Not handled yet
### How to create an area with given properties:

```
area_properties = AreaProperties()
area_properties.energy_cost_unsupplied = 10
area_properties = AreaProperties(energy_cost_unsupplied=10)
study.create_area("fr", area_properties)
```

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "antares_craft"
version = "0.1.8_RC2"
version = "0.2.0"
description = """Antares Craft python library under construction. It will allow to create, update and read antares studies."""
readme = "CONCATENATED_README.md"
license = {file = "LICENSE"}
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.4
sonar.projectVersion=0.2.0
sonar.organization=antaressimulatorteam
sonar.projectKey=AntaresSimulatorTeam_antares_craft
sonar.sources=src
Expand Down

0 comments on commit 2f08123

Please sign in to comment.