(PR3) Claude and Agent md files#68
Conversation
|
|
||
| **CO₂ snapshotting:** Carrier CO₂ emission values are captured into `network._carrier_co2_snapshot` before `set_scenarios()` is called, because PyPSA overwrites them during scenario expansion. | ||
|
|
||
| **Data format:** Static data is converted from pandas to Polars via `static_pypsa_to_polars()`; time-series data via `dynamic_dict_pypsa_to_polars()`. PyPSA objects remain as pandas internally; only the Polars copies are used downstream. |
There was a problem hiding this comment.
Just reminder for me and other part of team:
Issue
|
|
||
| 4. **`check_converter_limitations()` raises before any output is written.** If a network violates a constraint (e.g., contains Lines, uses quadratic costs, has `active=0` components), the converter raises `ValueError` or `AssertionError` at startup. No partial output is produced. | ||
|
|
||
| 5. **The Antares modeler fails silently.** `subprocess.run` in E2E tests uses `check=False` with `capture_output=True`. If the modeler exits non-zero, no output directory is created and the test fails with `FileNotFoundError` on the objective value file. To debug, run the modeler binary directly and inspect stderr. |
There was a problem hiding this comment.
Maybe we should change this behavior to capture the error ? what do you think @dusanparipovic @aoustry ?
There was a problem hiding this comment.
Agree.
I could open issue.
| ## Quick Reference | ||
|
|
||
| ```bash | ||
| # Install | ||
| pip install -r requirements-dev.txt | ||
|
|
||
| # Unit tests (no Antares needed) | ||
| pytest -n auto tests/unit_tests/ -v -s --log-cli-level=INFO | ||
|
|
||
| # Single test | ||
| pytest tests/unit_tests/tests_converter.py::test_converter_deterministic_study -v | ||
|
|
||
| # E2E tests (require Antares binary on PATH — version in dependencies.json) | ||
| pytest -n auto tests/e2e/end_2_end_tests.py -v -s --log-cli-level=INFO | ||
|
|
||
| # Lint & type-check | ||
| ruff check src tests && ruff format src tests && mypy src && mypy tests | ||
| ``` | ||
|
|
||
| ## Key Reminders | ||
|
|
||
| - Antares binary version is tracked in `dependencies.json` (currently 9.3.7); CI downloads it automatically | ||
| - Never pass an optimized network (`network.optimize()`) to `PyPSAStudyConverter` — HiGHS solver state cannot be deep-copied | ||
| - Output component IDs differ from PyPSA input IDs (type prefix added, spaces replaced with `_`) | ||
| - `resources/pypsa_models/pypsa_models.yml` parameter counts must exactly match `PyPSARegister` mappings — mismatch causes silent Antares modeler failure | ||
| - All studies use the multi-scenario code path internally; deterministic = single `"default"` scenario | ||
| - Git workflow: feature branches from `main`, PRs back to `main` |
There was a problem hiding this comment.
Again I think this is redundant with AGENTS
|
Hi! Were @tbittar 's comments taken into account? |
Co-authored-by: Dušan <dusan.paripovic@rte-international.com>
Co-authored-by: Dušan <dusan.paripovic@rte-international.com>
Co-authored-by: Dušan <dusan.paripovic@rte-international.com>
Co-authored-by: Dušan <dusan.paripovic@rte-international.com>
Co-authored-by: Dušan <dusan.paripovic@rte-international.com>
Co-authored-by: Dušan <dusan.paripovic@rte-international.com>
Co-authored-by: Dušan <dusan.paripovic@rte-international.com>
Co-authored-by: Dušan <dusan.paripovic@rte-international.com>
Co-authored-by: Dušan <dusan.paripovic@rte-international.com>
Co-authored-by: Dušan <dusan.paripovic@rte-international.com>
Co-authored-by: tbittar <thomas.bittar@rte-france.com>
Co-authored-by: tbittar <thomas.bittar@rte-france.com>
Co-authored-by: tbittar <thomas.bittar@rte-france.com>
|
@nikolaredstork shall we merge ? |
|
@dusanparipovic @tbittar Please review it again since we have had new release ! |
| ### Commands | ||
|
|
||
| ```bash | ||
| pip install -r requirements-dev.txt |
There was a problem hiding this comment.
Outdated, use uv (also in subsequent commands where necessary)
|
Are there any functional changes in the new release that have not yet been reflected in the .md file ? |
|
@dusanparipovic Please check Thomas comment and merge this PR. |
|
@tbittar I am not sure, since I've not done any development. @aoustry @dusanparipovic Please check out Thomas comment and merge this PR. |
The current branch is out of date with the The file should include information about the transformer and line object, and any existing content should be reviewed and updated accordingly. One additional note: anyone making further changes in this repository before the merge must also update the |
No description provided.