Skip to content
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

Warn about unused indexing.refinement_protocol params #2586

Merged
merged 8 commits into from
Feb 9, 2024

Conversation

Baharis
Copy link
Contributor

@Baharis Baharis commented Jan 23, 2024

Some phil parameters remain unused when provided to StillsIndexer. Since there are no imminent plans to expand the capabilities of this indexer, this PR suggests increasing the verbosity of indexing phil string and logging subtle warnings when unused phil parameters are being set. Resolves #2584.

@Baharis Baharis marked this pull request as draft January 24, 2024 00:07
@Baharis
Copy link
Contributor Author

Baharis commented Jan 24, 2024

This rabbit hole goes deeper than expected... Only now have I realized that dials.stills_process might not even use StillsIndexer. Investigating.

@Baharis
Copy link
Contributor Author

Baharis commented Jan 24, 2024

I have determined that dials.stills_process with indexing.stills.indexer=stills uses StillsIndexer as expected, but – surprise – logger in stills_indexer.py does not log anything, hence I was confused with a lack of messages.

Copy link

codecov bot commented Jan 24, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (7b19b5f) 78.54% compared to head (125485d) 78.59%.
Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2586      +/-   ##
==========================================
+ Coverage   78.54%   78.59%   +0.05%     
==========================================
  Files         609      609              
  Lines       75054    75319     +265     
  Branches    10712    10809      +97     
==========================================
+ Hits        58949    59195     +246     
- Misses      13940    13950      +10     
- Partials     2165     2174       +9     

@Baharis
Copy link
Contributor Author

Baharis commented Feb 1, 2024

First things first, I discovered the inconsistency with logging is not an error, but rather comes from changes to phil parameters discussed in #2587. After enabling logging in stills_indexer.py, I confirmed that the log messages display correctly whenever requested.

Personally, I would like to merge this PR because I believe it introduces much-needed verbosity to distinguish between the refinement protocol of both indexers. The warning messages add a layer of safety, but they can be probably seen as clutter, so I would appreciate everyone's opinion on how/if this should be included.

@Baharis Baharis marked this pull request as ready for review February 1, 2024 19:40
@Baharis
Copy link
Contributor Author

Baharis commented Feb 9, 2024

It's been 2 weeks and I don't want to leave this PR hanging while I move to work on something else right now, so I'll take the liberty to squash-merge this change into main. It only increases verbosity and should not affect other functionality.

@Baharis Baharis merged commit fc4c37a into main Feb 9, 2024
17 of 18 checks passed
@Baharis Baharis deleted the unexpected_protocol_stills_process branch February 9, 2024 04:09
benjaminhwilliams pushed a commit that referenced this pull request Feb 27, 2024
* Update phil, warn if setting unused params for stills indexer

* Introduce style changes suggested by black

* Add news fragment

* Phil scope does not accept ';' in help string

* Phil scope was missing '"'

* Correctly access the indexing scope of the phil

* `disable_unit_cell_volume_sanity_check` is used in both indexers

* Don't hardcode default parameter values
benjaminhwilliams pushed a commit that referenced this pull request Feb 27, 2024
* Update phil, warn if setting unused params for stills indexer

* Introduce style changes suggested by black

* Add news fragment

* Phil scope does not accept ';' in help string

* Phil scope was missing '"'

* Correctly access the indexing scope of the phil

* `disable_unit_cell_volume_sanity_check` is used in both indexers

* Don't hardcode default parameter values
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unexpected behavior of d_min_start in dials.stills_process
2 participants