-
Notifications
You must be signed in to change notification settings - Fork 340
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
define decorator @preserve_signature
#640
define decorator @preserve_signature
#640
Conversation
…e parameter hints of decorated functions
* Add ExB drift * Add force drift * Cleanup code, fixup documentation * Add examples * Pep8 fixes * @namurphy review fixes
* use pprint * Improve plot legends * pep8 fixes I also need to trigger travis
The roadmap has been out of date for a while, and we decided that it would be better to pull it out of the main repository so that it could be updated and versioned separately.
* Remove obsolete top-level INSTALL.md file We originally kept our installation directions in this file, but have since moved the information to our docs directory. We kept this file in case it was linked to from anywhere else on the World Wide Web, but it has been a long enough time that we can safely remove it. * Update setup.cfg * Update citation information A recommended practice for scientific reproducibility is to cite the specific version of software used for a project, and an established practice is to cite a paper or informational resource that describes it. This commit updates CITATION.rst and the near-identical docs/about/citation.rst to include both of these references. We previously decided to keep both of these files despite the duplication to make it extra apparent how to cite PlasmaPy. I changed plasmapy.__citation__ to be a list of DOI links, including the standard reference from 2018 and version 0.2.0. The metadata for our releases on Zenodo could potentially change (for example, adding the name of a contributor that wasn't known before), so a DOI is the most robust way to go about it. I reserved the DOI for version 0.2.0 on Zenodo, so the links to that will not work yet.
* README * Improved readme * add feedback form link * Add communication info to documentation
* post v0.2.0 cleanup * Update version in docs
…`preserve_signature`
…; import `preserve_signature`
update master from PlasmaPy master
Hello @rocco8773! Thanks for updating your pull request. Congratulations! There are no PEP8 issues in this pull request. 😸 Comment last updated at 2019-06-12 00:36:40 UTC |
Codecov Report
@@ Coverage Diff @@
## master #640 +/- ##
==========================================
+ Coverage 96.5% 96.51% +<.01%
==========================================
Files 52 54 +2
Lines 4551 4561 +10
==========================================
+ Hits 4392 4402 +10
Misses 159 159
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code looks neat! The commit history looks like a rebase gone wrong, though. I can deal with that if you'd like - though I think we might as well just squash this onto master.
Thanks for doing this! :)
@@ -1,8 +1,16 @@ | |||
""" | |||
Package of functions and classes used to develop clean, readable, and informative | |||
code. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❤️
@StanczakDominik It is a rebase gone wrong. It happened when I brought PlasmaPy/master into my fork. I'm not exactly sure what happened. If it's easy enough to just squash this onto master, then 👍. |
Create a decorator for decorators, which preserves the signature of the function being wrapped such that IDE function parameter hints still work for the wrapped function (see issue #619).
This PR does the following:
plasmapy.utils.decorators
to house various plasmapy decoratorsplasmapy.utils.checks.py
should be moved here (as a separate PR)plamsapy.utils.decorators.helpers.py
as a place where miscellaneous decorators can be definedpreserve_signature
(inhelpers.py
)preserve_signature
with testscheck_quantity
andcheck_relativistic
to utilizepreserve_signature
automodapi
ofplasmapy.utils.decorators
to documentation filedocs/utils/index.rst