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
Apex class update #76
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
Added standard magic class methods `__repr__`, `__str__`, and `__eq__` to improve class interactions. Also updated docstrings, updated inline comments, added some missing docstrings, improved variable names, and simplified the logic block in the convert method.
Updated the apex class by: - organizing methods by type (magic, hidden, user-facing), - adding missing docstrings, - adding block comments, - improving descriptive variable names, - reducing duplicate code lines, and - adding a latitude check for the `get_babs` hidden method.
Fixed type of `returnvals` to support in-place operations.
Fixed bug introduced when reducing duplicate code lines in general hidden mapping method.
Updated the invalid transformation unit test to look for the updated error type and message.
Updated the capitalization in the `Apex.__str__` method output.
Added unit tests for Apex class including: - `__str__` method, - `__repr__` method, - `__eq__` method, - bad latitude ValueError in `get_babs`, and - bad flag in `_map_EV_to_height`.
Fixed bugs in `Apex.__eq__` to make sure all attributes are evaluated and get the comparison attributes from the comparison object.
Updated changelog, adding a summary of this PR's changes.
Deepcopy isn't working in python 3.6, but you can do the same thing with eval.
Improved equality method by allowing equality if both objects are missing tested attributes. Also added more block comments.
Added more tests for apex class equality comparisons and fixed bug where two unit tests had the same name.
Removed a print statement used for debugging.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
Updated Apex class by:
__repr__
,__str__
, and__eq__
magic methodsget_babs
methodAdded unit tests for the new methods and input tests. This PR fixes #71 .
Type of change
Please delete options that are not relevant.
How Has This Been Tested?
Added unit tests and ran locally. Also:
Yields:
Then:
Yields True. Continuing:
Yields False.
Test Configuration:
Checklist:
develop
(notmain
) branchChangelog.rst
, summarising the changesAUTHORS.rst
and.zenodo.json