Repository navigation
Switch to src layout with separate tests directory - #2598
Conversation
This one is to ignore trailing whitespace, but this is handled by ruff-format and so is unnecessary. My motivation for removing this rule was because enabling the ruff extension for PyCharm made it so that trailing whitespace was highlighted, even while code was still being written.
| include *.yml | ||
| include changelog/README.rst | ||
| include CITATION.cff | ||
| include plasmapy/py.typed |
There was a problem hiding this comment.
📝 This line is probably not necessary because everything within src is now included.
There was a problem hiding this comment.
❔ I'm not sure if we want to include tests/ in MANIFEST.in. I'd like the tests to be included in source distributions for completeness, but not included in wheels.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2598 +/- ##
=======================================
Coverage 95.17% 95.18%
=======================================
Files 104 103 -1
Lines 9417 9412 -5
Branches 2154 2153 -1
=======================================
- Hits 8963 8959 -4
Misses 276 276
+ Partials 178 177 -1 ☔ View full report in Codecov by Sentry. |
|
Preview of admonition from GitHub Action to post on PRs: Note PlasmaPy recently switched to an |
|
@namurphy FYI I had to re-do the editable installation in order to get internal imports working again after this merge, e.g. Also, the |
|
@pheuer — thank you for the follow-up! I'll add something to (Also I'm at UCLA working next to @rocco8773 today, and just saw two of your posters in the hallway here!) |
Description
This PR changes the layout to be aligned with what is now recommended in the PyPA Python Packaging Guide. The following changes are made:
plasmapy/directory has been changed tosrc/plasmapy/tests/directory.Below I included my suggestions for other projects on switching to an src layout.
Motivation and context
See #2581 for the motivation. Essentially, the
srclayout can prevent a variety of easy-to-overlook problems. My hope is to get this merged well ahead of the summer school, since we're hoping to welcome new & potential contributors.Code review checklist
While this PR says it modifies ∼239 files 😱, nearly all of the files were moved without being changed and don't require review. 😮💨 The files that warrant the most attention are:
docs/contributing/testing_guide.rstchangelog/2598.internal.rstpyproject.tomltests/__init__.pyThank you! 🙏🏻
Task checklist
git mv plasmapy src/plasmapytests/.gitignorepathsMANIFEST.in.pre-commit-config.yamlmypy.inipyproject.toml: updatesetuptools&setuptools_scmpathspyproject.toml: updatetestpathsinpytestpyproject.toml: updatecoveragesettings (definesourceand update paths inomit)pyproject.toml: inisortsettings, addplasmapyasknown-first-partypyproject.toml: updateruffper-file ignorestox.ini: updatepytestcommandtox.ini: UpdatemypycommandRelated issues
Closes #2581.