Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

plasmapy.formulary - reshuffle #692

Merged
merged 18 commits into from
Oct 17, 2019

Conversation

StanczakDominik
Copy link
Member

@StanczakDominik StanczakDominik commented Oct 9, 2019

This is hopefully the final attempt!

  • Fix ImportErrors on plasmapy.physics happening in docs somewhere
  • Go through references to plasmapy.parameters/transport/mathematics and change them up

@pep8speaks
Copy link

pep8speaks commented Oct 9, 2019

Hello @StanczakDominik! Thanks for updating your pull request.

Line 162:18: W292 no newline at end of file

Line 18:1: E302 expected 2 blank lines, found 1

Line 8:100: E501 line too long (102 > 99 characters)

Line 16:43: E124 closing bracket does not match visual indentation

Comment last updated at 2019-10-17 08:31:28 UTC

@codecov
Copy link

codecov bot commented Oct 9, 2019

Codecov Report

Merging #692 into master will decrease coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #692      +/-   ##
==========================================
- Coverage   95.04%   95.04%   -0.01%     
==========================================
  Files          59       57       -2     
  Lines        4707     4704       -3     
==========================================
- Hits         4474     4471       -3     
  Misses        233      233
Impacted Files Coverage Δ
plasmapy/formulary/relativity.py 100% <ø> (ø)
plasmapy/utils/pytest_helpers/pytest_helpers.py 93.3% <ø> (ø) ⬆️
plasmapy/utils/exceptions.py 100% <ø> (ø) ⬆️
plasmapy/formulary/drifts.py 100% <ø> (ø)
plasmapy/formulary/dispersionfunction.py 100% <100%> (ø)
plasmapy/formulary/distribution.py 100% <100%> (ø)
plasmapy/formulary/quantum.py 100% <100%> (ø)
plasmapy/formulary/magnetostatics.py 99.2% <100%> (ø)
plasmapy/formulary/parameters.py 100% <100%> (ø)
plasmapy/classes/sources/plasma3d.py 100% <100%> (ø) ⬆️
... and 10 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8f7f2c5...53fb10b. Read the comment docs.

@namurphy namurphy added plasmapy.formulary Related to the plasmapy.formulary subpackage breaking change For breaking changes, excluding deprecations and planned removals labels Oct 9, 2019
@namurphy namurphy added this to the v0.3.0 milestone Oct 9, 2019
@namurphy
Copy link
Member

namurphy commented Oct 9, 2019

I just realized, we're going to have to update a lot of things in the docs, aren't we?

Another thought is that it would probably be more straightforward for plasmapy.formulary to be imported automatically when doing import plasmapy, rather than having to specifically do import plasmapy.formulary or from plasmapy import formulary. This will probably be our most commonly used subpackage, and the first one that many people would go to.

Thanks for doing this!

@StanczakDominik
Copy link
Member Author

Sure, can do!

I also wanted to discuss the API here. I rather dislike having to do from plasmapy.formulary.physics.parameters import a_thing; I'm thinking of getting rid of the pretty arbitrary separation between physics, mathematics and transport, and just putting all of that into the main formulary namespace. Flat is better than nested etc etc.

@namurphy
Copy link
Member

namurphy commented Oct 9, 2019

Yeah, allowing users to do something like from plasmapy.formulary import * and just have everything right there would be a real convenience for when they're interactively analyzing some data set. I like it!

@namurphy
Copy link
Member

namurphy commented Oct 9, 2019

Another thought...probably plasmapy.formulary is going to be one of the first packages to need a stable API (probably along with plasmapy.atomic). That is to say, it should soon become open for extension but not for modification. Probably version 0.3 will be too soon to promise that, but maybe 0.4 or 0.5.

@StanczakDominik
Copy link
Member Author

Stable-ish - I think once we move stuff to formulary and do a cross-check with The Formulary itself to see what's missing, it'll be fine.

I'll try to finish the docs (again...) tomorrow.

@StanczakDominik
Copy link
Member Author

Well, I may have gone a little overboard on the common namespace thing. See https://3007-46810954-gh.circle-artifacts.com/0/root/project/docs/_build/html/formulary/index.html. I think:

  • I gave the page an auto-generated summary, but it's trying to look for definitions in the formulary/__init__.py file (due to star imports) and failing, so links aren't generating. I guess we could keep the per-topic summaries and say it's all available via plasmapy.formulary.alfven_speed.
  • magnetostatics elements either need a separate place besides the formulary or shouldn't be *-imported into the
  • I guess the only reasonable approach here is nuking the central autosummary - I'll do that.

By the way, I'm doing the star imports because we're defining __all__ in the modules, so it should be fine.

@StanczakDominik
Copy link
Member Author

StanczakDominik commented Oct 10, 2019

If this goes as expected, it should be ready for a round of review! (probably don't go by files, though!)

plasmapy/classes/sources/plasma3d.py Outdated Show resolved Hide resolved
plasmapy/classes/sources/plasmablob.py Outdated Show resolved Hide resolved
plasmapy/formulary/tests/test_collisions.py Outdated Show resolved Hide resolved
I put it in a separate file instead of sticking it into mathematics, so as to make it more discoverable.
It doesn't exist in this timeline yet!
@StanczakDominik StanczakDominik merged commit 6515575 into PlasmaPy:master Oct 17, 2019
@StanczakDominik StanczakDominik deleted the reshuffle branch October 17, 2019 08:38
@rocco8773 rocco8773 modified the milestones: v0.3.0, PLEP-0007 Implementation Jan 31, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking change For breaking changes, excluding deprecations and planned removals plasmapy.formulary Related to the plasmapy.formulary subpackage
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants