-
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
Deprecation warnings #885
Deprecation warnings #885
Conversation
Had to leave work before the checks finished. I'll tidy up the Flake8 problems on Monday. |
@phyy-nx, I notice your 👍. Since I naturally have CCTBX as part of the DIALS build, my conversions caught lots of instances of the same sort of stuff in |
@benjaminhwilliams humbly suggest you leave those ones to the XFEL folks, since they will have a lot of other ongoing work there so high risk of conflicts 🙂 |
a2817a9
to
1f88da3
Compare
Isn't Git fun? |
The final Flake8 warning |
1f88da3
to
5eb79c8
Compare
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.
Mostly looks good - replacing halraiser
is something I've wanted to do for a long time, so very pleased to see it.
If you disagree with the #noqa
thing then feel free to merge it in anyway.
doc/examples/read_experiment_and_data/example_experiment_data.py
Outdated
Show resolved
Hide resolved
doc/examples/read_experiment_and_data/example_experiment_data.py
Outdated
Show resolved
Hide resolved
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.
Possibly outside the remit of this pull request, but since you touched this file... does the file example_experiment_data.py
really need the example_
prefix, since it already is underneath the path doc/examples
(the first rule of tautology club is...)?
I agree with @ndevenish's comments regarding # noqa: F841
- it would be a useful addition to the example to demonstrate printing out the objects (as it demonstrates that printing them gives some useful human-readable output).
doc/examples/read_experiment_and_data/example_experiment_data.py
Outdated
Show resolved
Hide resolved
Replace `dials.util.halraiser` with `dials.util.show_mail_on_error` context manager.
• Replace `dxtbx.model.experiment_list.ExperimentListDumper` and `dxtbx.serialize.dump` with `as_file` method of experiment list; • Replace `dials.algorithms.indexing.index_reflections` with `dials.algorithms.indexing.assign_indices.AssignIndicesGlobal`; • Remove `xia2.Applications.xia2setup.save_experiments`, which doesn't seem to be used anywhere; • Remove some unused imports and variables to satisfy flake8.
• Fix and add test for verbose behaviour of `dials.sort_reflections`; • Remove broken and unused method `debug_write_ccp4_map` of ; • Other more trivial fixes.
Print out some of the derived quantities as examples of use.
5511bcf
to
060711d
Compare
These days, `Crystal` has a sensible `__str__`.
Not sure why this was in here in the first place, seems to only have taken effect after #885
Follows dials/dials#885 & dials/dials#860. • Replace dials.util.halraiser with dials.util.show_mail_on_error context manager; • Replace dxtbx.model.experiment_list.ExperimentListDumper and dxtbx.serialize.dump with as_file method of experiment list; • Fix "DeprecationWarning: Setting verbosity for a Refiner is deprecated."
Not sure why this was in here in the first place, seems to only have taken effect after #885
Follows dials/dials#885 & dials/dials#860. • Replace dials.util.halraiser with dials.util.show_mail_on_error context manager; • Replace dxtbx.model.experiment_list.ExperimentListDumper and dxtbx.serialize.dump with as_file method of experiment list; • Fix "DeprecationWarning: Setting verbosity for a Refiner is deprecated."
Follows dials/dials#885 & dials/dials#860. • Replace dials.util.halraiser with dials.util.show_mail_on_error context manager; • Replace dxtbx.model.experiment_list.ExperimentListDumper and dxtbx.serialize.dump with as_file method of experiment list; • Fix "DeprecationWarning: Setting verbosity for a Refiner is deprecated."
While working in xia2, I noticed a deprecation warning, so I did a little semi-automatic tidy-up. This PR does the following, based on the advice in the deprecation warnings:
dials.util.halraiser
withdials.util.show_mail_on_error
context manager;dxtbx.model.experiment_list.ExperimentListDumper
anddxtbx.serialize.dump
withas_file
method of experiment list;dials.algorithms.indexing.index_reflections
withdials.algorithms.indexing.assign_indices.AssignIndicesGlobal
;Any objections?
There is a corresponding PR in xia2 (xia2/xia2#325), and others to follow in dials_scratch & dxtbx.