-
Notifications
You must be signed in to change notification settings - Fork 46
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
Clean up dials.array_family.flex #1158
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
instead of importing everything and the kitchen sink. Also avoids using 'locals()' in an unsupported manner.
discussed: tidy up. If we need to put it back then we know where to find it |
Rebuilt dials from scratch and tests still pass. |
Move all code from flex.py to flex_ext.py and turn flex.py into a pure importer. This way there is no mangling of builtins in flex_ext.py, and there is a full list of defined symbols in flex.py. Even though LGTM complains about new alerts in the pull request it will honour the suppression once merged. Co-authored-by: Nicholas Devenish <ndevenish@gmail.com>
since we no longer clobber our namespace
Anthchirp
changed the title
Clean up array_family_flex_ext
Clean up dials.array_family.flex
Feb 20, 2020
as they are set from outside the class. flex.strategy is removed, functools.partial can be used as a drop-in replacement.
.as_miller_array() raises KeyError instead of Sorry .extract_shoeboxes() lost its verbosity parameter, use log levels instead.
Think this is ready to go. |
Co-authored-by: Richard Gildea <richard.gildea@diamond.ac.uk>
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.
locals()
dials.array_family.flex.BinIndexer
²dials.array_family.flex.Reflection
²dials.array_family.flex.ShoeboxExtractor
dials.array_family.flex.centroid
²dials.array_family.flex.experiment_id_map
²dials.array_family.flex.get_real_type
dials.array_family.flex.intensity
²dials.array_family.flex.prediction
¹dials.array_family.flex.unit_cell
²The ones marked with ¹ appear to be unused in Python land, and could potentially be removed from C++ land altogether. Discuss.
Edit: The ones now marked with ² may appear to be unused, but are in fact used.