Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
78 commits
Select commit Hold shift + click to select a range
4f3d359
dev: Use cases, design and context
euronion Jul 1, 2025
b099964
code: initial new package structure (#13)
finozzifa Jul 21, 2025
617dce4
Extend Technology and TechnologyCollection (#14)
finozzifa Jul 28, 2025
506f17f
config: add pytest-xdist and pytest-cov (#16)
finozzifa Jul 28, 2025
3f69fb1
Unit-ful parameter (#15)
euronion Jul 31, 2025
105578b
code: add OOP to test suites (#21)
finozzifa Jul 31, 2025
fe3cfcc
code: Switch to src layout
euronion Aug 18, 2025
0f0b43a
code: update unit test in test_source.py
finozzifa Aug 19, 2025
69c8f96
Make development dependencies optional (#34)
euronion Aug 21, 2025
6dcd24a
code: Harmonise type hints (#36)
euronion Aug 21, 2025
1a1ae6b
code: Allow parameter mul and div with scalars (#37)
euronion Aug 28, 2025
a67d379
Solve issues in test_sources.py (#40)
finozzifa Sep 9, 2025
c1e4936
Issue 24: LHV and HHV (#39)
finozzifa Sep 15, 2025
0d15d3e
skip tests that usually fail (#41)
finozzifa Sep 16, 2025
9c6aadc
Prototype documentation - v1 (#38)
finozzifa Sep 16, 2025
0527655
Add history 'master' of https://github.com/PyPSA/technology-data into…
euronion Sep 22, 2025
b8b5e3f
Merge pull request #47 from open-energy-transition/pre-prototype-2
euronion Sep 23, 2025
938bf33
doc: Remove copy-pasta mistake from pypsa-docs
euronion Sep 23, 2025
1c0d014
doc: Use uv for RTD building
euronion Sep 23, 2025
899d8fa
code: modify target branch for ci triggering (#52)
finozzifa Sep 24, 2025
6fc7dd4
Issue 42 harmonize units (#51)
finozzifa Sep 25, 2025
6816997
Turn Source.store_in_wayback into a private method (#63)
finozzifa Oct 8, 2025
3f1027a
update from_json and to_json methods for TechnologyCollection and Sou…
finozzifa Oct 10, 2025
9e21b52
code: Reorder Technology attributes (#66)
euronion Oct 20, 2025
c9b39ba
31 change currency technology collection (#69)
euronion Oct 28, 2025
b8ad714
Custom error message for CCC_YYYY (#72)
finozzifa Nov 3, 2025
9a656ef
Technology collection models (#18)
euronion Nov 5, 2025
7f9bdea
Docs readme (#75)
euronion Nov 6, 2025
06d3f5f
code: skip three more unit tests (#76)
finozzifa Nov 6, 2025
6234d83
Make output schema of `SourceCollection` and `TechnologyCollection` o…
finozzifa Nov 18, 2025
471b617
Prototest DEA (#57)
finozzifa Nov 19, 2025
5d9c3de
Update pydeflate dependency (#79)
finozzifa Dec 8, 2025
625eb2a
Documentation (#74)
finozzifa Jan 16, 2026
78bd9cb
add first version of release.yml (#84)
finozzifa Jan 19, 2026
daa20c7
Prepare Release v0.1.0
finozzifa Jan 19, 2026
2700fd6
Prepare Release v0.1.0
finozzifa Jan 19, 2026
7ca5abc
Prepare Release v0.1.0
finozzifa Jan 19, 2026
dd2e4b8
Prototest manual input USA (#68)
finozzifa Jan 30, 2026
2f4a96a
doc: add pypi link
finozzifa Feb 2, 2026
622eb16
doc: add pre-commit checks
finozzifa Feb 2, 2026
ee4fbeb
update version
finozzifa Feb 2, 2026
ff94d75
Issue 82 repeated calls change_heating_value (#87)
finozzifa Feb 4, 2026
e65f0a2
code: update CITATIONS.cff with new patch release
finozzifa Feb 6, 2026
0465cb0
Data accessor (#90)
finozzifa Feb 17, 2026
899eb52
Multi version parser (#91)
finozzifa Feb 20, 2026
bae79b9
Issue 92: configure default folder (#96)
finozzifa Jun 25, 2026
bca5acf
Update pre commit (#100)
finozzifa Jun 25, 2026
176ddb3
docs: use one consistent import style in the user guide
cdgaete Aug 24, 2026
65a6aa6
Merge pull request #110 from open-energy-transition/issue_105_docs_im…
cdgaete Aug 25, 2026
44a1992
code: update dependencies (#116)
finozzifa Aug 31, 2026
60976cf
Add AI agent instructions (#112)
euronion Aug 31, 2026
bfd0e7a
doc: update documentation on usage of sources.json (#120)
finozzifa Aug 31, 2026
5895303
Equation system to automatically calculate linked parameters (#102)
euronion Sep 1, 2026
d269834
Issue 117 data accessor load (#118)
finozzifa Sep 1, 2026
012f4ae
Issue 99 from url (#101)
finozzifa Sep 1, 2026
fb7a0a4
Issue 106: enrich the landing page and merge the small Home pages (#111)
cdgaete Sep 2, 2026
d31890c
code: move data_accessor (#128)
finozzifa Sep 4, 2026
6f0c045
[Small] import issues in the docs (#129)
finozzifa Sep 4, 2026
e9dce50
Issue 108: add a step-by-step tutorial (#122)
cdgaete Sep 8, 2026
7ddd1ab
code: remove logger.info (#131)
finozzifa Sep 8, 2026
14d262d
doc: fix DataAccessor.load documentation (#130)
finozzifa Sep 8, 2026
cde1440
Ci/doc link checker (#136)
euronion Sep 9, 2026
4a8f431
docs: Disable multiprocessing in mkdocs config (#135)
euronion Sep 9, 2026
1215110
doc: Add automatic testing of code in documentation using pytest (#134)
euronion Sep 9, 2026
65ddb16
code: Add security features (#133)
finozzifa Sep 15, 2026
85a38d7
code: add dedicated test (#137)
finozzifa Sep 15, 2026
a3bfdc3
Further security changes (#139)
finozzifa Sep 15, 2026
b353668
build(deps): bump the github-actions group with 8 updates (#140)
dependabot[bot] Sep 16, 2026
3f9617e
code: add cache (#142)
finozzifa Sep 16, 2026
4f5872e
Set token permissions (#141)
finozzifa Sep 16, 2026
fdf1059
Enhance the `TechnologyCollection` and `Technology` classes (#145)
finozzifa Sep 21, 2026
1ea3584
fix(data_accessor): default data_path to the installed package (#149)
euronion Sep 23, 2026
495e314
docs(tutorial): update Technology print output after #145 (#147)
euronion Sep 23, 2026
74afbf4
fix(parameter): do not modify the original in to() (#150)
euronion Sep 23, 2026
6663da2
fix(parameter): multiply parameters without carrier or heating value …
euronion Sep 23, 2026
d922f4a
feat: add integer schema version to JSON data files (#152)
euronion Sep 24, 2026
8c98220
docs: Add dataset factsheets (#146)
euronion Sep 24, 2026
9c32118
build(deps): bump the github-actions group with 3 updates (#153)
dependabot[bot] Sep 24, 2026
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
13 changes: 13 additions & 0 deletions .claude/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"permissions": {
"allow": [
"Bash(uv sync:*)",
"Bash(uv run pytest:*)",
"Bash(uv run ruff:*)",
"Bash(uv run mypy:*)",
"Bash(uv run pre-commit:*)",
"Bash(uv run reuse:*)",
"Bash(uv run mkdocs build:*)"
]
}
}
3 changes: 3 additions & 0 deletions .claude/settings.json.license
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
SPDX-FileCopyrightText: technologydata contributors

SPDX-License-Identifier: MIT
97 changes: 97 additions & 0 deletions .claude/skills/dataset-factsheet/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
---
name: dataset-factsheet
description: Create or update the fact sheet in docs/datasets/<key>.md for a dataset shipped with technologydata, once its parser and parsed JSON exist. Use when a data source or a new version of one is added, or when a fact sheet's doctests fail after the data changed.
---

# Dataset fact sheet

<!--
SPDX-FileCopyrightText: technologydata contributors

SPDX-License-Identifier: MIT

-->

The template, section order and writing guidelines are in `docs/contributing/adding_a_dataset.md`; read it first and follow it exactly.
`docs/datasets/dea_energy_storage.md` and `docs/datasets/manual_input_usa.md` are finished examples.
This skill covers how to find each fact and how to check it.

Readers are experienced modellers and AI agents: tables and short bullets, no description of the parser code.
Only state what you verified in the code or the data; if something cannot be verified (e.g. the upstream license), write what is known and tell the user.

## Inputs

Determine, or ask the user if unclear:

- `<key>`: the `DataSourceName` value in `src/technologydata/data_accessor.py`.
- `<version>`: the directory in `src/technologydata/parsers/<key>/`.
- The parser module `src/technologydata/parsers/<key>/`, the raw file in `src/technologydata/parsers/raw/`, and `sources.json` of the version.

For a new version of an existing dataset, update the existing page instead (see the end of the checklist in `adding_a_dataset.md`).

## Where each fact comes from

| Section | Source |
|---|---|
| Front matter, At a glance | `sources.json` (title, authors, `url`, `url_archive`, `url_date`), the license in `REUSE.toml` and upstream, the parser (region, currency) |
| Years, cases, currency | the loaded data, see the snippet below |
| Available versions | `get_supported_versions()` of the parser, the parse options that reproduce the shipped JSON |
| Field mapping | the raw file's columns and the parser; trace one real row from raw value to parsed value |
| Naming conventions | the parser's cleaning functions (regexes, renames, case maps, unit replacements); one real example each |
| Assumptions and deviations | hard-coded values in the parser: fixed region, parameter filters, filled-in units, dropped rows, merged cases, row-level sources not kept |
| Known limitations | checks below |

```python
from technologydata import DataAccessor

df = DataAccessor(data_source="<key>", version="<version>").load().technologies.to_dataframe()
print(df[["region", "case"]].value_counts(), df["year"].min(), df["year"].max())
```

Run all Python from the repository root: `DataAccessor.load()` resolves the data relative to the working directory.

## Generate the code block outputs

Copy the `Accessing the data` and `Contents` blocks from the template, change only `data_source` and `version`, and pick a representative technology and parameter for `Accessing the data`.
Put a placeholder line as the expected output, then run:

```bash
uv run pytest test/test_docs.py --test-docs -k <key>
```

The failure report shows `Got:` for each block; paste that output into the page and run the test again until it passes.
Do not edit the output by hand; the tests compare it with whitespace normalised only.

## Checks for known limitations

Look for these and quantify them where cheap ("7 of about 76 parameters"):

- **Overwritten values**: parameters are stored in a dict per technology, so raw rows mapping to the same technology, case, year and parameter key overwrite each other.
Count duplicates in the raw data after applying the parser's name cleaning.
- **Dropped data**: raw columns not mapped, rows removed by filters or failed parsing (compare raw row count with parsed parameter count).
- **Heterogeneous units**: visible in the `Parameters` table when one parameter has several reference units.
- **Order of operations** that loses precision, such as rounding before unit scaling.
- **Provenance**: whether row-level sources are kept, whether an archived copy of the source exists.

## Verify Reproduce

The documented `parse()` call must reproduce the shipped files.
It overwrites them, so check the working tree is clean for that directory first:

```bash
git status --short src/technologydata/parsers/<key>/
uv run python -c 'from technologydata import DataAccessor; DataAccessor(data_source="<key>", version="<version>").parse(input_file_name="<file>", num_digits=3)'
git diff --stat src/technologydata/parsers/<key>/
git checkout -- src/technologydata/parsers/<key>/
```

Only a trailing-newline difference is acceptable; otherwise adjust the documented options until the output matches.
Never use `archive_source=True` here: it calls the Wayback Machine and rewrites `sources.json`.

## Wire up and check

1. Add the page to the `Datasets` nav in `mkdocs.yaml` and a row to the table in `docs/datasets/index.md`.
2. If a user guide page `docs/user_guide/<key>_parser.md` exists, keep it to structure and usage and link to the fact sheet's `#reproduce`.
3. Run `uv run pytest test/test_docs.py --test-docs` and `uv run pre-commit run --all-files`.
Codespell may flag domain abbreviations; add real terms to `.codespell.ignore`.
4. Report to the user: anything not verified, and parser problems found (such as overwritten values) as candidates for issues.
5 changes: 5 additions & 0 deletions .codespell.ignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# SPDX-FileCopyrightText: technologydata contributors
#
# SPDX-License-Identifier: MIT
CAF
FOM
23 changes: 23 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# CODEOWNERS file for technology-data
# These owners will be the default owners for everything in the repo
# and will be requested for review when someone opens a pull request.

# Default owners for the entire repository
* @euronion @finozzifa

# Documentation
/docs/ @euronion @finozzifa

# Source code
/src/ @euronion @finozzifa

# Tests
/tests/ @euronion @finozzifa

# CI/CD and workflows
/.github/ @euronion @finozzifa

# Configuration files
*.toml @euronion @finozzifa
*.yaml @euronion @finozzifa
*.yml @euronion @finozzifa
26 changes: 0 additions & 26 deletions .github/ISSUE_TEMPLATE/bug_report.md

This file was deleted.

5 changes: 0 additions & 5 deletions .github/ISSUE_TEMPLATE/config.yml

This file was deleted.

15 changes: 0 additions & 15 deletions .github/ISSUE_TEMPLATE/feature_request.md

This file was deleted.

18 changes: 18 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<!--
SPDX-FileCopyrightText: technologydata contributors
SPDX-License-Identifier: MIT
-->

# Summary

<!-- What does this PR change, and why? Link related issues with "Closes #ISSUE_NUMBER". -->

## Checklist

- [ ] Tests added/updated for the change and `uv run pytest` passes
- [ ] New files carry SPDX license info (checked by REUSE)
- [ ] `uv run pre-commit run --all-files` passes (lint, format, mypy, REUSE)
- [ ] Documentation/docstrings has been updated
- [ ] (If AI-assisted) Changes were reviewed by a human before opening this PR
6 changes: 5 additions & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# SPDX-FileCopyrightText: technologydata contributors
#
# SPDX-License-Identifier: MIT

# dependabot
# Ref: https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
# ------------------------------------------------------------------------------
Expand All @@ -6,7 +10,7 @@ updates:
- package-ecosystem: github-actions
directory: /
schedule:
interval: monthly
interval: weekly
groups:
# open a single pull-request for all GitHub actions updates
github-actions:
Expand Down
12 changes: 0 additions & 12 deletions .github/pull_request_template.md

This file was deleted.

20 changes: 20 additions & 0 deletions .github/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
changelog:
categories:
- title: Breaking Changes
labels:
- breaking change
- title: Features
labels:
- feature
- title: Bug Fixes
labels:
- bug
- title: Data
labels:
- data
- title: Documentation
labels:
- documentation
- title: Other Changes
labels:
- "*"
77 changes: 28 additions & 49 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -1,64 +1,43 @@
name: CI
# SPDX-FileCopyrightText: technologydata contributors
#
# SPDX-License-Identifier: MIT
name: Technologydata prototype CI

permissions: read-all

on:
push:
branches: [master]
branches: [prototype-2]
pull_request:
branches: [master]
schedule:
- cron: "0 5 * * 0"


# Cancel any in-progress runs when a new run is triggered
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
branches: [prototype-2]

jobs:
build:
name: CI
test:
runs-on: ubuntu-latest

defaults:
run:
shell: bash -l {0}

steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Checkout repository
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1


- name: Setup micromamba
uses: mamba-org/setup-micromamba@v2
- name: Set up Python
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
with:
micromamba-version: latest
environment-file: environment.yaml
log-level: debug
init-shell: bash
cache-environment: true
cache-downloads: true
python-version: "3.13"

- name: Run unit tests
- name: Cache Python dependencies
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v 6.1.0
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/uv.lock') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install package and dependencies
run: |
make unit-test
python -m pip install uv
uv lock
uv sync

- name: Test snakemake workflows
- name: Run unit tests
run: |
make test

- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: technology-data
path: outputs/

- name: Check for differences in generated outputs
run: |-
git config --global --add safe.directory $GITHUB_WORKSPACE
git add outputs/
if ! git diff --cached --quiet; then
echo "Generated outputs differ from the branch. Please commit rerun `snakemake` and commit the changes to the `outputs/*.csv` files."
git diff --cached
exit 1
else
echo "No differences found in generated outputs."
fi
uv run pytest
Loading