Validate sector weather year - #816
Merged
Merged
Conversation
Signed-off-by: Giovanni Cozzolongo <79092266+giovannicozzolongo@users.noreply.github.com>
for more information, see https://pre-commit.ci
ktehranchi
added a commit
that referenced
this pull request
Sep 28, 2026
…shas (#817) * ci: trim pre-commit to ruff + snakefmt, run ruff in CI, quote ledger shas pre-commit.ci has failed on every PR since #805 because the hook set could never converge: add-trailing-comma and ruff-format rewrote each other's output, blackdoc crashed on a YAML snippet inside a docstring, pyupgrade was pinned to py39 against a py311 target, and pretty-format-yaml rewrote the unquoted sha `51e1719` in tests/equivalence/hotfixes.yaml as the YAML float `.inf` (PR #816, HF-7 and HF-20), which is what broke test_waiver_ledger there. - .pre-commit-config.yaml: keep pre-commit-hooks basics, ruff-check, ruff-format and snakefmt; drop the four hooks above and the notebook cleaner; `ci.autofix_prs: false` so the bot reports instead of pushing commits into contributors' branches. - main.yml: fast-tests now runs `ruff check` and `ruff format --check` with the same ruff pin as the hook (0.15.0), so lint is enforced without the external service. - hotfixes.yaml: every `commit:`/`ported_sha:` value quoted (40 rows), so no YAML loader can read a sha as a number. - Fix the three ruff findings on develop (RUF001, RUF059, RUF046) and drop the removed PD901 rule from extend-ignore. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * style: apply ruff 0.15 --fix and ruff format so the new lint step starts green Mechanical output of `ruff check --fix` (9 findings: RUF046 int(len()), RUF100 stale noqa) and `ruff format` (14 files), plus two hand fixes in tests/equivalence/diagnostics/p_max_pu_quantiles.py: the E702 semicolon line split in two and a noqa for the typographic minus sign in a figure label. end-of-file-fixer adds the missing newline to .gitignore. Verified on Sherlock (job 45731301): ruff check and format --check clean, pre-commit run --all-files clean, 424 fast tests pass. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> --------- Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
Collaborator
|
Thanks for the contribution, @giovannicozzolongo! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #607.
Changes proposed in this Pull Request
Sector-coupled runs with
GorE-Gnow fail during configuration validation unlessrenewable_weather_yearsis[2018]. The schema error explains that residential and commercial demand profiles use 2018 weather data and shows the configured value. Electricity-only configurations keep their existing validation rules.Tests cover the supported year, unsupported and empty year lists, electricity-only configurations and the error from Snakemake when loading a user configuration. The sector documentation states the requirement.
Testing
pytest -m fast --tb=short -ra: 792 passed, 11 skipped, 81 deselected. Ten skips require the absentmaster-benchmarkworktree; one is an existing solver-test skip.mypy --check-untyped-defs --ignore-missing-imports tests/static/test_config_schema.py tests/static/test_dag_dryrun.py: passed.cd docs && make html: passed without warnings.GandE-Gwith 2018, plusEwith 2019: passed.git diff --check: passed.Tested with Python 3.11.15 and GLPK 5.0. Tier B and the data-dependent equivalence runs were not run.
Checklist
pre-commitandpytest -m fastpass locally.