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 instrument data cache for ENGINX #37420

Conversation

GuiMacielPereira
Copy link
Contributor

@GuiMacielPereira GuiMacielPereira commented May 24, 2024

Description of work

Fix to account for "ENGINX" (shortname) being used in the data cache instead of "ENGIN-X" (name)

Summary of work

Files were not being loaded from the data cache for the ENGIN-X instrument because the name is spelled in its shortname version "ENGINX" instead of the name version "ENGIN-X", with an hyphen.
I included a second try to look for the shortname if the default name fails.

Fixes 37398

Note

This commit can be reverted in the future if IDAaaS changes the name of the instrument to "ENGIN-X".

To test:

  1. Install the package through conda on IDAaaS
    mamba install -c thomashampson/label/enginx_data_cache mantidworkbench
  2. Use the Load algorithm and try to load an ENGINX file
  3. Should get a permissions denied error, rather than an index file not found error

If the path for the instrument index file was not found with instrument's name,
try again with instrument's shortname.
Solves case on IDAaaS where "ENGINX" (shortname) is the name of the folder
instead of "ENGIN-X" (name).
This commit can be reverted in the future if IDAaaS updates name to "ENGIN-X".
@GuiMacielPereira GuiMacielPereira added Bug Issues and pull requests that are regressions or would be considered a bug by users (e.g. crashing) ISIS Team: Core Issue and pull requests managed by the Core subteam at ISIS labels May 24, 2024
@GuiMacielPereira GuiMacielPereira added this to the Release 6.10 milestone May 24, 2024
@thomashampson thomashampson self-assigned this May 24, 2024
@GuiMacielPereira GuiMacielPereira marked this pull request as ready for review May 24, 2024 11:01
Copy link
Contributor

@thomashampson thomashampson left a comment

Choose a reason for hiding this comment

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

The code looks fine to me and I've tested the Linux package on github - it does find the ENGIN-X files (I get the appropriate file access error message because I don't have read access).

@robertapplin robertapplin merged commit 9616e96 into release-next May 24, 2024
10 checks passed
@robertapplin robertapplin deleted the 37398-fix-search-for-engin-x-files-in-the-instrument-data-cache branch May 24, 2024 17:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Issues and pull requests that are regressions or would be considered a bug by users (e.g. crashing) ISIS Team: Core Issue and pull requests managed by the Core subteam at ISIS
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants