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
Add default plotting description for Collections #634
Conversation
…/magpylib into current-line-and-arrow-styling
…ent-line-and-arrow-styling
@@ -37,6 +37,7 @@ | |||
from magpylib._src.display.traces_utility import draw_arrowed_circle | |||
from magpylib._src.display.traces_utility import draw_arrowed_line | |||
from magpylib._src.display.traces_utility import get_flatten_objects_properties | |||
from magpylib._src.display.traces_utility import get_label |
Check notice
Code scanning / CodeQL
Cyclic import Note
magpylib._src.display.traces_utility
…agpylib/magpylib into collection-description
…agpylib/magpylib into collection-description
Codecov Report
❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more. @@ Coverage Diff @@
## main #634 +/- ##
==========================================
- Coverage 99.22% 99.06% -0.17%
==========================================
Files 54 55 +1
Lines 6883 6928 +45
==========================================
+ Hits 6830 6863 +33
- Misses 53 65 +12
|
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.
CodeQL found more than 10 potential problems in the proposed changes. Check the Files changed tab for more details.
|
…ection-description
Will fix it. If we agree on below
Yes it is new. It came up because of a bug (see below). Then I implemented it import magpylib as magpy
src = magpy.magnet.Cuboid()
magpy.show(magpy.Collection(src)) raises but import magpylib as magpy
src = magpy.magnet.Cuboid()
magpy.show(magpy.Collection(src)) bypasses the |
I fixed the check_dimension bypass bug. I'll leave the feature of displaying unset dimension hidden in this PR and I opened an issue (#638) to discuss it. Ready for review now i think |
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.
seems to work
This adds a default description to the the Collection objects. This PR also makes the draw function
get_trace
public and therefore easily overridable when subclassing any magpylib core class. Some larger code base has been refactored, mainly in thetraces_generic.py
module.