diff --git a/.github/ISSUE_TEMPLATE/bug_report.yaml b/.github/ISSUE_TEMPLATE/bug_report.yaml index e36ebc81..98844067 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yaml +++ b/.github/ISSUE_TEMPLATE/bug_report.yaml @@ -76,5 +76,6 @@ body: id: charge-code attributes: label: Charge code - placeholder: > - If you are at NREL and fixing this bug is urgent, please provide a charge code + options: + - label: > + I am at NLR and am willing to provide a charge code to have this bug fixed urgently. diff --git a/.github/ISSUE_TEMPLATE/feature_request.yaml b/.github/ISSUE_TEMPLATE/feature_request.yaml index 5f305b31..2e38c0de 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.yaml +++ b/.github/ISSUE_TEMPLATE/feature_request.yaml @@ -58,5 +58,6 @@ body: id: charge-code attributes: label: Charge code - placeholder: > - If you are at NREL and implementing this feature is urgent, please provide a charge code + options: + - label: > + I am at NLR and am willing to provide a charge code to have this feature added urgently. diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md index 3f261ad0..a8552807 100644 --- a/.github/copilot-instructions.md +++ b/.github/copilot-instructions.md @@ -51,6 +51,10 @@ Always use Pixi to ensure aligned dependencies: # Enter dev shell (Python + Rust toolchain) pixi shell -e dev +# Linting and formatting +pixi run -e dev lint +pixi run -e dev format + # Python tests (95% coverage gate) pixi run -e dev tests-u # unit pixi run -e dev tests-i # integration @@ -69,8 +73,12 @@ pixi run -e build build-wheel # CLI smoke test pixi run -e dev reVRt --help ``` -Use `pixi add ` (optionally with `--feature `) to manage new -dependencies; this updates both `pyproject.toml` and `pixi.lock` atomically. +To add a new dependency, use `pixi add --pipy `; +this updates `pyproject.toml` and the lockfile atomically. +You will also have to run a subsequent command `pixi add ` +to add the dependency to the conda environment. +Use `pixi add --feature dev ` to add a dependency +that is only used for development (tests, linting, docs, etc.). ## 5. Coding Guidelines (Python) - Follow `docs/source/dev/README.rst` for style: maintain numpy-style @@ -81,6 +89,8 @@ dependencies; this updates both `pyproject.toml` and `pixi.lock` atomically. opening a PR. - Favor descriptive names instead of extra comments; only add comments for non-obvious behavior (e.g., tricky array ops or concurrency concerns). + If some functionality needs further explanation, add this to the + class/function/method docstring under the "Notes" section. - Use absolute imports under `revrt.`. - Surface warnings/errors through `revrt.warn` and `revrt.exceptions` (e.g., raise `revrtValueError` and emit `revrtWarning`) to ensure logging hooks fire. @@ -112,7 +122,11 @@ dependencies; this updates both `pyproject.toml` and `pixi.lock` atomically. - Rust tests/benches live within each crate (`cargo test`, `cargo bench` via Pixi). Keep tests deterministic and avoid long-running benchmarks in CI. - Include regression data under `tests/data/` when necessary; prefer fixtures in - `tests/conftest.py` for shared setup. + `tests/conftest.py` for shared setup. Keep all test data small (individual files <1MB). + The data doesn't need to fully reproduce realistic analysis cases - it just + needs to include characteristics of a realistic case. +- Pytest options for parallel execution (`-n auto`) are supported; prefer + `pixi run -e dev pytest -n auto` for heavier suites. ## 9. Logging, Errors, and Warnings - Do not log-and-raise manually; custom exceptions/warnings already emit log diff --git a/CITATION.cff b/CITATION.cff index 60d5909e..bc356659 100644 --- a/CITATION.cff +++ b/CITATION.cff @@ -7,18 +7,18 @@ type: software authors: - family-names: Castelão given-names: Guilherme - affiliation: National Renewable Energy Laboratory + affiliation: National Laboratory of the Rockies orcid: 'https://orcid.org/0000-0002-6765-0708' - family-names: Pinchuk given-names: Pavlo - affiliation: National Renewable Energy Laboratory + affiliation: National Laboratory of the Rockies orcid: 'https://orcid.org/0000-0003-4736-4728' - family-names: Gu given-names: Jianyu - affiliation: National Renewable Energy Laboratory + affiliation: National Laboratory of the Rockies - family-names: Rivers given-names: Marie - affiliation: National Renewable Energy Laboratory + affiliation: National Laboratory of the Rockies orcid: 'https://orcid.org/0000-0002-0804-9365' identifiers: - type: doi diff --git a/Cargo.toml b/Cargo.toml index f8cded20..7ad40a58 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -14,7 +14,7 @@ license = "BSD-3-Clause" rust-version = "1.87.0" repository = "https://github.com/NREL/reVRt" categories = ["simulation"] -keywords = ["NREL", "routing", "transmission", "reV", "reVX"] +keywords = ["NRL", "routing", "transmission", "reV", "reVX"] [workspace.dependencies] revrt = { version = "0.0.8", path = "crates/revrt" } diff --git a/README.rst b/README.rst index 4ca70619..5d83adca 100644 --- a/README.rst +++ b/README.rst @@ -20,7 +20,7 @@ Welcome to reV Routing (reVRt)! .. |Pixi| image:: https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/prefix-dev/pixi/main/assets/badge/v0.json :target: https://pixi.sh -.. |SWR| image:: https://img.shields.io/badge/SWR--25--112_-blue?label=NREL +.. |SWR| image:: https://img.shields.io/badge/SWR--25--112_-blue?label=NLR :alt: Static Badge .. |Zenodo| image:: https://zenodo.org/badge/944738283.svg diff --git a/docs/source/conf.py b/docs/source/conf.py index bd7d82d8..7b29bce0 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -21,7 +21,7 @@ project = "reVRt" copyright = "2025, Alliance for Sustainable Energy, LLC" -author = "NREL: Guilherme Pimenta Castelao, Paul Pinchuk" +author = "NLR: Guilherme Pimenta Castelao, Paul Pinchuk" pkg = os.path.dirname(os.path.abspath(os.path.dirname(__file__))) pkg = os.path.dirname(pkg) @@ -135,7 +135,7 @@ html_context = { "display_github": True, - "github_user": "nrel", + "github_user": "nlr", "github_repo": "reVRt", "github_version": "main", "conf_py_path": "/docs/source/", diff --git a/docs/source/dev/README.rst b/docs/source/dev/README.rst index f6d7537b..09483b2b 100644 --- a/docs/source/dev/README.rst +++ b/docs/source/dev/README.rst @@ -136,7 +136,7 @@ You can run python reVRt tests locally using ``pixi``: .. code-block:: shell - pixi r tests + pixi run tests Tests for a module should ideally cover all code in that module, i.e., statement coverage should be at 100%, though this alone does not ensure that @@ -226,7 +226,7 @@ To check your docstring additions/updates, you can build a local version of the .. code-block:: shell - pixi r make-html + pixi run make-html After running this command, simply open ``docs/_build/html/index.html`` using your favorite browser, e.g.: diff --git a/docs/source/glossary.rst b/docs/source/glossary.rst index ecb48faf..52946043 100644 --- a/docs/source/glossary.rst +++ b/docs/source/glossary.rst @@ -119,8 +119,8 @@ supporting technologies referenced throughout the reVRt documentation. ``revrt._rust``. reV - NREL's Renewable Energy Potential platform that models generation - profiles for renewable resources. reVRt complements reV by adding + NLR's reV tool that models generation profiles and supply curves + for various generation types. reVRt complements reV by adding transmission routing capabilities that feed downstream analyses. reVRt @@ -128,11 +128,6 @@ supporting technologies referenced throughout the reVRt documentation. simulations, and exports supporting analytics for transmission planning studies. - reVX - NREL's valuation framework that builds on reV outputs to assess - market and financial metrics. reVRt outputs can flow into reVX to - inform siting and transmission decisions. - routing file HDF5 file produced by the cost preparation pipeline that stores coordinate grids, friction and barrier layers, metadata, and any diff --git a/pixi.lock b/pixi.lock index a28789d3..e625d4ca 100644 --- a/pixi.lock +++ b/pixi.lock @@ -16913,7 +16913,7 @@ packages: - pypi: ./ name: nrel-revrt version: 0.2.1 - sha256: 79412c89a1ba729055dccdc2e783549a76a794d1fcff2e573779c41301f83368 + sha256: 1241656134bb474ab2c921a8a6499adb478d37720e09d9cacbe46f06521553cc requires_dist: - affine>=2.4.0,<3 - dask>=2025.4.1,<2026 diff --git a/pyproject.toml b/pyproject.toml index bd818810..ea22ad84 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -5,7 +5,7 @@ build-backend = "maturin" [project] name = "NREL-reVRt" version = "0.2.1" -description = "National Renewable Energy Laboratory's (NREL's) Transmission for reVX tool" +description = "National Laboratory of the Rockies' (NLR's) Transmission for reV tool" readme = "README.rst" authors = [ {name = "Guilherme Castelão", email = "gpimenta@nrel.gov"}, @@ -16,7 +16,7 @@ maintainers = [ {name = "Paul Pinchuk", email = "ppinchuk@nrel.gov"}, ] license = {text = "BSD-3-Clause"} -keywords = ["NREL", "routing", "transmission", "reVRt", "reV", "reVX"] +keywords = ["NLR", "routing", "transmission", "reVRt", "reV", "reVX"] requires-python = ">= 3.11" classifiers=[ "Development Status :: 2 - Pre-Alpha", @@ -216,6 +216,8 @@ build = { features = ["build"], solve-group = "default" } build-wheel = { cmd = "maturin build" } [tool.pixi.feature.dev.tasks] +lint = "ruff check ./revrt" +format = "ruff format ./revrt" tests = "pytest --durations=20 -rapP -vv --cov=revrt --cov-report=html --cov-branch --cov-report=xml:coverage.xml --cov-fail-under=95 tests/python" tests-u = "pytest --durations=20 -rapP -vv --cov=revrt --cov-report=html --cov-branch --cov-report=xml:coverage.xml --cov-fail-under=95 tests/python/unit" tests-i = "pytest --durations=20 -rapP -vv --cov=revrt --cov-report=html --cov-branch --cov-report=xml:coverage.xml tests/python/integration"