Skip to content

Add docstrings and type hinting to Data Retrieval, Config & Non-workflow Utilities - #1866

Draft
virio-andreyana wants to merge 4 commits into
pypsa-meets-earth:mainfrom
virio-andreyana:doc/docstring-retrieve-config-util
Draft

Add docstrings and type hinting to Data Retrieval, Config & Non-workflow Utilities#1866
virio-andreyana wants to merge 4 commits into
pypsa-meets-earth:mainfrom
virio-andreyana:doc/docstring-retrieve-config-util

Conversation

@virio-andreyana

Copy link
Copy Markdown
Member

Closes #1836 and #1837

Changes proposed in this Pull Request

This PR aims to add docstring and type hinting to these scripts:

  • scripts/retrieve_databundle_light.py
  • scripts/download_global_buildings.py
  • scripts/process_cost_data.py
  • scripts/build_test_configs.py
  • scripts/copy_config.py
  • scripts/non_workflow/databundle_cli.py (No changes made here)
  • scripts/non_workflow/zenodo_handler.py
    • This script is 3 years old and I'm not so sure how often it is used

Both zenodo_handler.py and zip_folder.py are both scripts with configuration within the script itself. We can choose based on how often people use this of either:

  1. Creating a dedicated CLI or at least a YAML file to execute this script
  2. Delete them

Checklist

  • I consent to the release of this PR's code under the AGPLv3 license and non-code contributions under CC0-1.0 and CC-BY-4.0.
  • I tested my contribution locally and it seems to work fine.
  • Code and workflow changes are sufficiently documented, including updates to docstrings for meaningful functions.
  • Newly introduced dependencies are added to envs/environment.yaml and doc/requirements.txt.
  • Changes in configuration options are added in all of config.default.yaml and config.tutorial.yaml.
  • Add a test config or line additions to test/ (note tests are changing the config.tutorial.yaml)
  • Changes in configuration options are also documented in doc/configtables/*.csv and line references are adjusted in doc/user-guide/configuration.md and doc/tutorials/electricity-model.md.
  • If config sections were added, renamed, or removed, update doc/assets/scripts/extract_config_snippets.py accordingly.
  • Archives of the uploaded data do not have an enclosing folder and archive names correspond to the conventions of configs/bundle_config.yaml.
  • A note for the release notes doc/release-notes.md is amended in the format of previous release notes, including reference to the requested PR.

@virio-andreyana virio-andreyana added the documentation Improvements or additions to documentation label Jun 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Data Retrieval & Config

1 participant