PlasmaPy / PlasmaPy/PlasmaPy

Reorganize distribution.py

Open
#387 16 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

effort: high effort: medium good first issue help wanted refactoring ♻️
Dominant language
Python
Stars
711
Forks
375
Avg merge
3h 2m
Merged PRs (30d)
8

Description

The code in distribution.py has multiple functions for the same physical distribution. This could probably use an object oriented interface!

In fact, it could be a good idea to look at how scipy.stats does their probability distribution functions and basically subclass that interface. That, however, is worth a lot more of bonus points, so it's more of an optional thing for later. Or it could be that this saves a lot of planning the user interface, so it might be the easy way to do this. I'm not sure myself.

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 reading distribution.py to inventory the functions that represent the same physical distribution. Then compare the relevant scipy.stats probability-distribution interface and discuss which object-oriented scope is intended, since the issue presents that interface as optional. Done should mean an agreed reorganization plan is implemented without leaving the intended scope ambiguous.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend
Issue type
Refactor
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.