PyPSA / PyPSA/atlite

Static typing

Open
#472 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

type: enhancement
Dominant language
Python
Stars
402
Forks
134
PR merge metrics
No merged PRs in 30d

Description

Static type checks a la https://github.com/PyPSA/PyPSA/pull/1010. See [https://github.com/PyPSA/PyPSA/blob/6f70f53f44bc27108219856e5a197b9ad1f46cae/pyproject.toml#L141-L149](mypy config) in PyPSA.

Probably that could already be implemented with https://github.com/astral-sh/ty, once they are stable and if we can also use it for PyPSA and linopy. Also linking https://github.com/facebook/pyrefly and https://github.com/microsoft/pyright, but we wanna stick with one type checker across all repos (currently it's mypy)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing PyPSA pull request 1010 and the linked mypy configuration in pyproject.toml. Compare mypy with ty, pyrefly, and pyright, considering the stated goal of using one checker across atlite, PyPSA, and linopy. Done means a checker is selected and static typing checks are implemented across the relevant repositories.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.