Skip to content

Apply transforms cleanup changes#891

Open
ZackAttack614 wants to merge 2 commits intomasterfrom
transforms-cleanup-redux
Open

Apply transforms cleanup changes#891
ZackAttack614 wants to merge 2 commits intomasterfrom
transforms-cleanup-redux

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.

@codecov
Copy link

codecov bot commented Feb 13, 2026

Codecov Report

❌ Patch coverage is 82.11921% with 27 lines in your changes missing coverage. Please review.
✅ Project coverage is 70.69%. Comparing base (f6268a2) to head (2d1a285).
⚠️ Report is 2 commits behind head on master.

Files with missing lines Patch % Lines
hexrd/core/transforms/xfcapi.py 81.87% 27 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #891      +/-   ##
==========================================
+ Coverage   69.41%   70.69%   +1.27%     
==========================================
  Files         148      142       -6     
  Lines       22590    22058     -532     
==========================================
- Hits        15680    15593      -87     
+ Misses       6910     6465     -445     

☔ 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.

q2 = np.ascontiguousarray(q2.flatten())
# C module expects quaternions in row major, numpy code in column major.
qsym = np.ascontiguousarray(qsym.T)
return transforms_c_api.quat_distance(q1, q2, qsym) No newline at end of file
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'm assuming most of this file was just copied over from old files like xf_new_capi.py. I did a brief skim over it but I'm assuming it's fine.

Copy link
Collaborator

@psavery psavery left a comment

Choose a reason for hiding this comment

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

LGTM

The corresponding branch in the GUI (HEXRD/hexrdgui#1964) seems to be working well also.

We may have a discussion with users before merging, since this will break code.

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