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

Fix for import error in ISIS SX reduction classes #38014

Merged

Conversation

RichardWaiteSTFC
Copy link
Contributor

Description of work

Replace simpleapi imports with child algorithm calls in FindGoniometerFromUB and use new from plugins.algorithms prefix when importing function from algorithm file

Purpose of work

This import fails on nightly on IDAaaS

from Diffraction.single_crystal.sxd import SXD

but not on my local build or in mantid 6.10 IDAaaS

@jclarkeSTFC said maybe related to #37802?

There is no associated issue.

To test:

(1) CI passes
(2) Test import (on linux if possible)

from Diffraction.single_crystal.sxd import SXD

Reviewer

Please comment on the points listed below (full description).
Your comments will be used as part of the gatekeeper process, so please comment clearly on what you have checked during your review. If changes are made to the PR during the review process then your final comment will be the most important for gatekeepers. In this comment you should make it clear why any earlier review is still valid, or confirm that all requested changes have been addressed.

Code Review

  • Is the code of an acceptable quality?
  • Does the code conform to the coding standards?
  • Are the unit tests small and test the class in isolation?
  • If there is GUI work does it follow the GUI standards?
  • If there are changes in the release notes then do they describe the changes appropriately?
  • Do the release notes conform to the release notes guide?

Functional Tests

  • Do changes function as described? Add comments below that describe the tests performed?
  • Do the changes handle unexpected situations, e.g. bad input?
  • Has the relevant (user and developer) documentation been added/updated?

Does everything look good? Mark the review as Approve. A member of @mantidproject/gatekeepers will take care of it.

Gatekeeper

If you need to request changes to a PR then please add a comment and set the review status to "Request changes". This will stop the PR from showing up in the list for other gatekeepers.

@RichardWaiteSTFC RichardWaiteSTFC added Diffraction Issues and pull requests related to diffraction Single Crystal Issues and pull requests related to single crystal ISIS Team: Diffraction Issue and pull requests managed by the Diffraction subteam at ISIS labels Sep 18, 2024
@RichardWaiteSTFC RichardWaiteSTFC added this to the Release 6.11 milestone Sep 18, 2024
Copy link
Contributor

@jclarkeSTFC jclarkeSTFC left a comment

Choose a reason for hiding this comment

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

Looks good, I just spotted a couple of typos.

if dataPath[-4:] == ".raw":
# assume log is kept separately in a .log file with same path
LoadLog(Workspace=tmpWS, Filename="".join(dataPath[:-4] + ".log"))
self.exec_child_alg("CreateSampleWorkspace", Workspace=tmpWS, Filename="".join(dataPath[:-4] + ".log"))
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
self.exec_child_alg("CreateSampleWorkspace", Workspace=tmpWS, Filename="".join(dataPath[:-4] + ".log"))
self.exec_child_alg("LoadLog", Workspace=tmpWS, Filename="".join(dataPath[:-4] + ".log"))


def createGoniometerTable(self):
"""
:return: Empty table workspace with columns Run, Chi, Phi and GonioAxis (unit vector)
"""
gonioTable = CreateEmptyTableWorkspace(StoreInADS=False)
gonioTable = self.exec_child_alg(" CreateEmptyTableWorkspace")
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
gonioTable = self.exec_child_alg(" CreateEmptyTableWorkspace")
gonioTable = self.exec_child_alg("CreateEmptyTableWorkspace")

@RichardWaiteSTFC
Copy link
Contributor Author

Thanks sorry done in a rush - will fix!

@RichardWaiteSTFC RichardWaiteSTFC changed the base branch from main to release-next September 18, 2024 09:02
@SilkeSchomann SilkeSchomann self-assigned this Sep 18, 2024
@SilkeSchomann SilkeSchomann merged commit 20bfc15 into release-next Sep 18, 2024
10 checks passed
@SilkeSchomann SilkeSchomann deleted the temporary_fix_for_import_error_isis_sx_class branch September 18, 2024 12:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Diffraction Issues and pull requests related to diffraction ISIS Team: Diffraction Issue and pull requests managed by the Diffraction subteam at ISIS Single Crystal Issues and pull requests related to single crystal
Projects
Status: Done
Status: Merged
Development

Successfully merging this pull request may close these issues.

3 participants