Skip to content

Transforms cleanup#887

Closed
ZackAttack614 wants to merge 32 commits intomasterfrom
transforms-cleanup
Closed

Transforms cleanup#887
ZackAttack614 wants to merge 32 commits intomasterfrom
transforms-cleanup

Conversation

@ZackAttack614
Copy link
Collaborator

Overview

This PR removes a lot of unused and dead code from the transforms module of HEXRD. We aniticpate that this may affect users who have very old scripts (5 years or more) or others who have used the xf or old_xfcapi components of the library. As this code has not been supported in many years, it is time for this code to be removed from the library. We will support the transition to the newer code as needed, on a case-by-case basis.

Some documentation about transitioning from the old_xfcapi code can be found in the Wiki:

https://github.com/HEXRD/hexrd/wiki/old_xfcapi-Conversion-Guide

Affected Workflows

Users who have scripts which use the old_xfcapi or xf components of HEXRD's transforms module will need to move off of this and into the new API, using the conversion guide above.

Documentation Changes

Documentation regarding transition has been written, and uploaded into the Github Wiki. Documentation covering the removed code has been deleted.

@ZackAttack614 ZackAttack614 requested a review from psavery February 4, 2026 20:34
@codecov
Copy link

codecov bot commented Feb 4, 2026

Codecov Report

❌ Patch coverage is 90.54054% with 14 lines in your changes missing coverage. Please review.
✅ Project coverage is 70.71%. Comparing base (f6268a2) to head (7ac473c).

Files with missing lines Patch % Lines
hexrd/core/transforms/xfcapi.py 89.91% 12 Missing ⚠️
hexrd/core/instrument/hedm_instrument.py 0.00% 1 Missing ⚠️
hexrd/core/utils/panel_buffer.py 50.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #887      +/-   ##
==========================================
+ Coverage   69.41%   70.71%   +1.30%     
==========================================
  Files         148      141       -7     
  Lines       22590    21901     -689     
==========================================
- Hits        15680    15488     -192     
+ Misses       6910     6413     -497     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

psavery added a commit to HEXRD/hexrdgui that referenced this pull request Feb 12, 2026
This migrates all uses of the old transforms functions to the new ones.

The conversion guide located [here](https://github.com/HEXRD/hexrd/wiki/old_xfcapi-Conversion-Guide) was followed.

This will be necessary after HEXRD/hexrd#887 is merged.

Signed-off-by: Patrick Avery <patrick.avery@kitware.com>
frame_start=args.start_frame,
style=args.style,
eiger_stream_v2_threshold=args.eiger_stream_v2_threshold,
eiger_stream_v2_multiplier=args.eiger_stream_v2_multiplier,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Uhh hang on! It looks like the recently added preprocessor features are being deleted! Can you re-do this preprocessors.py file again? We need to keep those new features - Sven specifically needed them.

**Chess_Arguments.help_messages,
"absolute_path": "absolute path to image file",
"eiger_stream_v2_threshold": "Threshold to use for eiger-stream-v2 input file. Options are 'threshold_1', 'threshold_2', or 'man_diff', which is defined as `threshold_1 - multiplier * threshold_2`",
"eiger_stream_v2_multiplier": "Multiplier to use for threshold setting 'man_diff'. Unused otherwise.",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same for this file - new preprocessor features shouldn't be deleted.

args.validate_arguments()


def test_save_load_eiger_stream_v2(eiger_stream_v2_examples_path: Path):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here - new preprocessor features were deleted by accident.

if hkls == 'all':
return None

assert isinstance(hkls, list)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Were the changes in this file intentional? If so, that's fine! I'm just making sure they were intentional.



# TODO: Remove this class, it only adds complexity.
class UNames(object):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wasn't this class removed in the other PR?

@ZackAttack614
Copy link
Collaborator Author

This branch got quite messed up somehow. Moving this to PR #891

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants