-
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
Replace check_quantity
with `validate_quantities
#722
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…r all methods and class; update typing annotations; define property `checks`
…od instance)...this improves readability of documentation without hindering functionality
…t decorator `check_values`
…ues`, `test_cv_method__check_value`, and `test_cv_preserves_signature`; define a `foo` function to be wrapped (bound to `TestCheckValues`
…fine more parameters that defined by function; move this PlasmaPyWarning from CheckValues.__call__ to CheckValues._get_checks
…d **kwargs of the wrapped function
…() parameter is not in BoundArguments.arguments since BoundArguments.apply_defaults() is called ahead of time and covers this case
… class `CheckValues` called as a decorator
… attribute `_check_defaults` (being more pythonic!); updated tests accordingly
…g`; define __all__
… and to the __all__
…orators; include in __all__
…`equivalencies`, add comments to `_default_checks`, fix improper indent when defining/conditioning 'equivalencies'
… and 'pass_equivalent_units'
…ntation readability
https://mail.python.org/pipermail/scipy-dev/2019-December/023881.html this thread probably isn't relevant, but the Python implementation of |
StanczakDominik
approved these changes
Dec 2, 2019
The |
rocco8773
added a commit
that referenced
this pull request
Dec 3, 2019
implementation of `validate_quantities` is in PR #722
# Conflicts: # plasmapy/formulary/tests/test_transport.py # plasmapy/utils/decorators/__init__.py # plasmapy/utils/decorators/checks.py # plasmapy/utils/decorators/tests/test_checks.py # plasmapy/utils/decorators/tests/test_validators.py # plasmapy/utils/decorators/validators.py
… referencing bug outlined in issue PlasmaPy#726...add raising of NotImplementedError
…ntial_interp` with `pytest.mark.xfail`
…`_chemical_potential_interp`
…alidate_quantities
…Error is made redundant by decorator `validate_quantities()`
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
effort: medium
Requiring perhaps ∼1–3 days
plasmapy.formulary
Related to the plasmapy.formulary subpackage
priority: medium
Issues & PRs of moderate urgency and importance
refactoring ♻️
Improving an implementation without adding new functionality
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Replace the used of the decorate
check_quantity
withvalidate_quantities
and, then, permanently removecheck_quantity
from the code base.Notes
validate_quantities
is introduced with PR Create validate decorators ("validators") #648