Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions .github/ISSUE_TEMPLATE/bug_report.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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.
5 changes: 3 additions & 2 deletions .github/ISSUE_TEMPLATE/feature_request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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.
20 changes: 17 additions & 3 deletions .github/copilot-instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -69,8 +73,12 @@ pixi run -e build build-wheel
# CLI smoke test
pixi run -e dev reVRt --help
```
Use `pixi add <package>` (optionally with `--feature <name>`) to manage new
dependencies; this updates both `pyproject.toml` and `pixi.lock` atomically.
To add a new dependency, use `pixi add --pipy <package>`;
this updates `pyproject.toml` and the lockfile atomically.
You will also have to run a subsequent command `pixi add <package>`
to add the dependency to the conda environment.
Use `pixi add --feature dev <package>` 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
Expand All @@ -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.
Expand Down Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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" }
Expand Down
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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/",
Expand Down
4 changes: 2 additions & 2 deletions docs/source/dev/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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.:

Expand Down
9 changes: 2 additions & 7 deletions docs/source/glossary.rst
Original file line number Diff line number Diff line change
Expand Up @@ -119,20 +119,15 @@ 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
The reV Routing toolkit that prepares cost surfaces, runs routing
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
Expand Down
2 changes: 1 addition & 1 deletion pixi.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 = "[email protected]"},
Expand All @@ -16,7 +16,7 @@ maintainers = [
{name = "Paul Pinchuk", email = "[email protected]"},
]
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",
Expand Down Expand Up @@ -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"
Expand Down
Loading