Use `pypsa`'s built in annunity function

Open Beginner friendly
#888 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 2 days

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
68/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
python
Domain
backend

Research direction

Start in workflow/scripts/_helpers.py at the legacy annuity function linked in the issue, then check how it is called and how the project supports PyPSA versions 1.0 and later. Compare its behavior with pypsa.costs.annuity introduced in PyPSA 1.1.0; done means using the built-in helper while preserving compatibility with supported versions.

Written by the indexing model from the issue text.

Description

enhancement
Feature Request

Right now we have our own annuity function. This is a legacy function.

https://github.com/PyPSA/pypsa-usa/blob/3d67e2061e02a5b983ed9807a1b2668e7fdf6fd4/workflow/scripts/_helpers.py#L205-L219

Since pypsa v1.1.0 they have provided a helper for this (see here). We should probably switch to that.

Suggested Solution

To retain backwards compatibility, as we allow for version 1.0 and up right now, we may want to just do a version check in code.

Additional Info

No response

Dominant language
Python
Stars
150
Forks
58
Avg merge
1d 20h
Merged PRs (30d)
25

Getting set up

  • No Dockerfile or Docker Compose file
  • Has a pull request template
  • No 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.

More from PyPSA/pypsa-usa

All issues in PyPSA/pypsa-usa

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.