OpenFreeEnergy / OpenFreeEnergy/openfe

MultistateEquilFEAnalysis.get_forward_and_reverse_analysis should return a dataclass instead of a dict

Open
#1,381 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
331
Forks
56
Avg merge
3d 9h
Merged PRs (30d)
13

Description

currently, get_forward_and_reverse_analysis() returns a dict where some values must be np arrays, and others must be Quantitys. Making this a dataclass or similar would make type hints actually very useful, instead of having to ignore them like we do here:

https://github.com/OpenFreeEnergy/openfe/pull/1374/files

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 at MultistateEquilFEAnalysis.get_forward_and_reverse_analysis and review the linked pull request for current type-hint work. Trace its callers and tests, then verify that the result has a typed dataclass-like shape while preserving both NumPy arrays and Quantity values.

Written by the indexing model from the issue text.

Assessment

Tech stack
numpy, python
Domain
data
Issue type
Refactor
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.