Skip to content

(PR3) Claude and Agent md files#68

Open
nikolaredstork wants to merge 16 commits into
mainfrom
feature/claude-ai
Open

(PR3) Claude and Agent md files#68
nikolaredstork wants to merge 16 commits into
mainfrom
feature/claude-ai

Conversation

@nikolaredstork
Copy link
Copy Markdown
Collaborator

No description provided.

Comment thread AGENTS.md Outdated
Comment thread AGENTS.md Outdated
Comment thread AGENTS.md Outdated
Comment thread AGENTS.md Outdated
Comment thread AGENTS.md Outdated
Comment thread AGENTS.md Outdated
Comment thread AGENTS.md Outdated
Comment thread CLAUDE.md Outdated
Comment thread CLAUDE.md Outdated
Comment thread AGENTS.md

**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.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just reminder for me and other part of team:
Issue

Comment thread AGENTS.md Outdated
Comment thread AGENTS.md Outdated
Comment thread AGENTS.md Outdated
Comment thread AGENTS.md Outdated
Comment thread AGENTS.md

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.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we should change this behavior to capture the error ? what do you think @dusanparipovic @aoustry ?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree.
I could open issue.

Comment thread CLAUDE.md Outdated
Comment on lines +7 to +33
## 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`
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Again I think this is redundant with AGENTS

@aoustry
Copy link
Copy Markdown
Contributor

aoustry commented Apr 30, 2026

Hi! Were @tbittar 's comments taken into account?

nikolaredstork and others added 14 commits May 1, 2026 08:33
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>
@aoustry
Copy link
Copy Markdown
Contributor

aoustry commented May 12, 2026

@nikolaredstork shall we merge ?

@nikolaredstork
Copy link
Copy Markdown
Collaborator Author

@dusanparipovic @tbittar Please review it again since we have had new release !

@nikolaredstork nikolaredstork changed the title Claude and Agent md file (PR3) Claude and Agent md file May 26, 2026
@nikolaredstork nikolaredstork changed the title (PR3) Claude and Agent md file (PR3) Claude and Agent md files May 26, 2026
Comment thread AGENTS.md
### Commands

```bash
pip install -r requirements-dev.txt
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Outdated, use uv (also in subsequent commands where necessary)

@tbittar
Copy link
Copy Markdown
Collaborator

tbittar commented May 29, 2026

Are there any functional changes in the new release that have not yet been reflected in the .md file ?

@nikolaredstork
Copy link
Copy Markdown
Collaborator Author

@dusanparipovic Please check Thomas comment and merge this PR.

@nikolaredstork
Copy link
Copy Markdown
Collaborator Author

@tbittar I am not sure, since I've not done any development. @aoustry @dusanparipovic Please check out Thomas comment and merge this PR.

@dusanparipovic
Copy link
Copy Markdown
Collaborator

dusanparipovic commented Jun 1, 2026

@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 main branch, so AGENTS.md needs to be updated.

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 AGENTS.md file to ensure it remains aligned with the latest implementation and development guidelines.
We could put this inside dev guide also.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants