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

New IDAaaS data cache index file loading #37187

Merged
merged 40 commits into from May 10, 2024

Commits on Apr 19, 2024

  1. Simple barebones for searching new index files

    - Created a very simplified implementation and a unit test
    GuiMacielPereira committed Apr 19, 2024
    Configuration menu
    Copy the full SHA
    6525f4e View commit details
    Browse the repository at this point in the history
  2. Added setUp and tearDown to tests.

    Co-authored-by: thomashampson <thomas.hampson@stfc.ac.uk>
    Co-authored-by: Jonathan Haigh <jonathan.haigh@stfc.ac.uk>
    3 people committed Apr 19, 2024
    Configuration menu
    Copy the full SHA
    7ea885b View commit details
    Browse the repository at this point in the history
  3. Changed implementation from DataHandling to API

    - I made the change because header files from DataHandling could not be imported into files in the API, due to DataHandling being missing from target_link_libraries in the CMakeLists.txt API file. Trying to fix this causes a circular dependency.
    
    Co-authored-by: thomashampson <thomas.hampson@stfc.ac.uk>
    Co-authored-by: Jonathan Haigh <jonathan.haigh@stfc.ac.uk>
    3 people committed Apr 19, 2024
    Configuration menu
    Copy the full SHA
    15b0e4c View commit details
    Browse the repository at this point in the history
  4. Rough sketch of implementation after looking for data archive

    Co-authored-by: thomashampson <thomas.hampson@stfc.ac.uk>
    Co-authored-by: Jonathan Haigh <jonathan.haigh@stfc.ac.uk>
    3 people committed Apr 19, 2024
    Configuration menu
    Copy the full SHA
    d957d59 View commit details
    Browse the repository at this point in the history
  5. Add cache search to the file finder.

    - Added section to look for files in hard coded Linux path
    - Changed search function to use relative paths
    - Corrected unit test
    
    Co-authored-by: thomashampson <thomas.hampson@stfc.ac.uk>
    Co-authored-by: Jonathan Haigh <jonathan.haigh@stfc.ac.uk>
    3 people committed Apr 19, 2024
    Configuration menu
    Copy the full SHA
    51709aa View commit details
    Browse the repository at this point in the history
  6. Changing function to handle expanded instr dirs

    - The name of the directories in the cache uses the extended version i.e. 'MARI' instead of 'MAR', changed the function to account for this
    - Changed split into instr and run to handle edge case of 'SANS2D' (digit in instrument name)
    
    Co-authored-by: thomashampson <thomas.hampson@stfc.ac.uk>
    Co-authored-by: Jonathan Haigh <jonathan.haigh@stfc.ac.uk>
    3 people committed Apr 19, 2024
    Configuration menu
    Copy the full SHA
    3eb656a View commit details
    Browse the repository at this point in the history
  7. Add functunality to getInstrument() function

    - Function getInstrument() in the ConfigService is used to retrieve the instrument info from a string argument.
    - The argument of the function is either the name or short name of the instrument
    - Added option to pass the name or short name + delimiter and retrieve the correct instrument
    
    Co-authored-by: Jonathan Haigh <jonathan.haigh@stfc.ac.uk>
    GuiMacielPereira and jhaigh0 committed Apr 19, 2024
    Configuration menu
    Copy the full SHA
    f6fbef1 View commit details
    Browse the repository at this point in the history
  8. Added test for delimiter in filename

    - Added unit test for case when there is a delimiter between instrument name and run number
    - Also checks that short name `PG3` gets properly expanded to `POWGEN`
    
    Co-authored-by: Jonathan Haigh <jonathan.haigh@stfc.ac.uk>
    GuiMacielPereira and jhaigh0 committed Apr 19, 2024
    Configuration menu
    Copy the full SHA
    d314e24 View commit details
    Browse the repository at this point in the history
  9. Added handling of bad inputs

    - Added some fail proof checks
    - Added unit tests for these cases
    
    Co-authored-by: Jonathan Haigh <jonathan.haigh@stfc.ac.uk>
    GuiMacielPereira and jhaigh0 committed Apr 19, 2024
    Configuration menu
    Copy the full SHA
    1bfc329 View commit details
    Browse the repository at this point in the history
  10. Added unit tests to FileFinder

    - Added a test class that creates a dummy directory with the same structure as the data cache and performs unit tests on the path outputs
    - Introduced safety checks in ISISInstrDataCache to cover for edge cases
    - Added the data cache path to Mantid properties file
    
    Co-authored-by: Jonathan Haigh <jonathan.haigh@stfc.ac.uk>
    GuiMacielPereira and jhaigh0 committed Apr 19, 2024
    Configuration menu
    Copy the full SHA
    363af4c View commit details
    Browse the repository at this point in the history
  11. Added exception for missing read permissions

    - When user does not have access permissions to a folder, it will print an error informing the user
    
    Co-authored-by: Jonathan Haigh <jonathan.haigh@stfc.ac.uk>
    GuiMacielPereira and jhaigh0 committed Apr 19, 2024
    Configuration menu
    Copy the full SHA
    2a52597 View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    d14df70 View commit details
    Browse the repository at this point in the history
  13. Removed unecessary changes

    - Deleted unecessary changes that I had made
    - Replaced instrument finder by one that already accounts for delimiters and other edge cases
    - Removed unecessary notice()
    
    Co-authored-by: Jonathan Haigh <jonathan.haigh@stfc.ac.uk>
    GuiMacielPereira and jhaigh0 committed Apr 19, 2024
    Configuration menu
    Copy the full SHA
    1a189a0 View commit details
    Browse the repository at this point in the history
  14. Added documentation for new mantid property

    - Added datacachesearch.directory to properties file documentation
    
    Co-authored-by: Jonathan Haigh <jonathan.haigh@stfc.ac.uk>
    GuiMacielPereira and jhaigh0 committed Apr 19, 2024
    Configuration menu
    Copy the full SHA
    9bbac0c View commit details
    Browse the repository at this point in the history

Commits on Apr 22, 2024

  1. Fixed cppcheck warnings

    Co-authored-by: Jonathan Haigh <jonathan.haigh@stfc.ac.uk>
    GuiMacielPereira and jhaigh0 committed Apr 22, 2024
    Configuration menu
    Copy the full SHA
    914dbaa View commit details
    Browse the repository at this point in the history

Commits on Apr 23, 2024

  1. Cleaned exceptions catching

    - Organized catching of exceptions for bad inputs
    - Added check for when user does not have permission to open directory
    - Changed logging from notice level to debug level
    
    Co-authored-by: Jonathan Haigh <jonathan.haigh@stfc.ac.uk>
    GuiMacielPereira and jhaigh0 committed Apr 23, 2024
    Configuration menu
    Copy the full SHA
    39c4f3f View commit details
    Browse the repository at this point in the history
  2. Fixed failing unit test

    - Made a quick fix for the getInstrument function, to make it throw the exception instead of using a default value
    - Not proud of this fix, but when I tried to take out the exception handling out of getInstrument, a few other things were breaking
    
    Co-authored-by: Jonathan Haigh <jonathan.haigh@stfc.ac.uk>
    GuiMacielPereira and jhaigh0 committed Apr 23, 2024
    Configuration menu
    Copy the full SHA
    ba4a50d View commit details
    Browse the repository at this point in the history

Commits on Apr 24, 2024

  1. Update Framework/API/inc/MantidAPI/ISISInstrDataCache.h

    Co-authored-by: Jonathan Haigh <35813666+jhaigh0@users.noreply.github.com>
    GuiMacielPereira and jhaigh0 committed Apr 24, 2024
    Configuration menu
    Copy the full SHA
    209676e View commit details
    Browse the repository at this point in the history
  2. Change argument flag in getInstrument

    Co-authored-by: Jonathan Haigh <jonathan.haigh@stfc.ac.uk>
    GuiMacielPereira and jhaigh0 committed Apr 24, 2024
    Configuration menu
    Copy the full SHA
    78359ae View commit details
    Browse the repository at this point in the history
  3. Updated doc string

    Co-authored-by: Jonathan Haigh <jonathan.haigh@stfc.ac.uk>
    GuiMacielPereira and jhaigh0 committed Apr 24, 2024
    Configuration menu
    Copy the full SHA
    8ca5dbc View commit details
    Browse the repository at this point in the history
  4. Removed unused includes

    Co-authored-by: Jonathan Haigh <jonathan.haigh@stfc.ac.uk>
    GuiMacielPereira and jhaigh0 committed Apr 24, 2024
    Configuration menu
    Copy the full SHA
    f826c08 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    210e7f7 View commit details
    Browse the repository at this point in the history
  6. Made error message clearer

    Co-authored-by: Jonathan Haigh <jonathan.haigh@stfc.ac.uk>
    GuiMacielPereira and jhaigh0 committed Apr 24, 2024
    Configuration menu
    Copy the full SHA
    d5cb094 View commit details
    Browse the repository at this point in the history
  7. Changed to const auto types

    Co-authored-by: Jonathan Haigh <jonathan.haigh@stfc.ac.uk>
    GuiMacielPereira and jhaigh0 committed Apr 24, 2024
    Configuration menu
    Copy the full SHA
    d710d64 View commit details
    Browse the repository at this point in the history
  8. Split big function into smaller functions

    Co-authored-by: Jonathan Haigh <jonathan.haigh@stfc.ac.uk>
    Co-authored-by: Caila Finn  <caila.finn@stfc.ac.uk>
    3 people committed Apr 24, 2024
    Configuration menu
    Copy the full SHA
    024bff9 View commit details
    Browse the repository at this point in the history
  9. Removed usused old setUp()

    Co-authored-by: Jonathan Haigh <jonathan.haigh@stfc.ac.uk>
    GuiMacielPereira and jhaigh0 committed Apr 24, 2024
    Configuration menu
    Copy the full SHA
    542df97 View commit details
    Browse the repository at this point in the history
  10. Added comment

    Co-authored-by: Jonathan Haigh <jonathan.haigh@stfc.ac.uk>
    GuiMacielPereira and jhaigh0 committed Apr 24, 2024
    Configuration menu
    Copy the full SHA
    3c375a8 View commit details
    Browse the repository at this point in the history
  11. Reformatted strings and removed unecessary ;

    Co-authored-by: Jonathan Haigh <jonathan.haigh@stfc.ac.uk>
    GuiMacielPereira and jhaigh0 committed Apr 24, 2024
    Configuration menu
    Copy the full SHA
    d3ac714 View commit details
    Browse the repository at this point in the history
  12. Included comment for clarification

    Co-authored-by: Jonathan Haigh <jonathan.haigh@stfc.ac.uk>
    GuiMacielPereira and jhaigh0 committed Apr 24, 2024
    Configuration menu
    Copy the full SHA
    ca07ee3 View commit details
    Browse the repository at this point in the history
  13. Renamed classes and files to more explicit descriptions

    Co-authored-by: Jonathan Haigh <jonathan.haigh@stfc.ac.uk>
    GuiMacielPereira and jhaigh0 committed Apr 24, 2024
    Configuration menu
    Copy the full SHA
    346cd6c View commit details
    Browse the repository at this point in the history

Commits on Apr 25, 2024

  1. Fixed cppcheck and added unit tests

    Co-authored-by: Jonathan Haigh <jonathan.haigh@stfc.ac.uk>
    GuiMacielPereira and jhaigh0 committed Apr 25, 2024
    Configuration menu
    Copy the full SHA
    47319fc View commit details
    Browse the repository at this point in the history

Commits on Apr 29, 2024

  1. Added release note (+ section for Data Handling)

    Co-authored-by: Jonathan Haigh <jonathan.haigh@stfc.ac.uk>
    GuiMacielPereira and jhaigh0 committed Apr 29, 2024
    Configuration menu
    Copy the full SHA
    f09f326 View commit details
    Browse the repository at this point in the history

Commits on May 9, 2024

  1. Cleaned error handling for permission denied

    - Check for permission denied is now done inside the loop that directly tries to access files
    - Added check for non existing parent directory
    - Improved error message when file is not found whithin parent directory
    
    Co-authored-by: Jonathan Haigh <jonathan.haigh@stfc.ac.uk>
    GuiMacielPereira and jhaigh0 committed May 9, 2024
    Configuration menu
    Copy the full SHA
    c5d73a2 View commit details
    Browse the repository at this point in the history
  2. Added catch for error from parsing json

    - If for some reason the index file on IDAaaS is currupted (eg. being updated) then the error is caught
    - Allows for the search to continue on the archive
    
    Co-authored-by: Jonathan Haigh <jonathan.haigh@stfc.ac.uk>
    GuiMacielPereira and jhaigh0 committed May 9, 2024
    Configuration menu
    Copy the full SHA
    46101db View commit details
    Browse the repository at this point in the history
  3. Fixed include error + cppcheck supressions

    Co-authored-by: Jonathan Haigh <jonathan.haigh@stfc.ac.uk>
    GuiMacielPereira and jhaigh0 committed May 9, 2024
    Configuration menu
    Copy the full SHA
    1d03a2e View commit details
    Browse the repository at this point in the history
  4. Corrected unit test

    GuiMacielPereira committed May 9, 2024
    Configuration menu
    Copy the full SHA
    3ca6d6d View commit details
    Browse the repository at this point in the history

Commits on May 10, 2024

  1. Configuration menu
    Copy the full SHA
    5046005 View commit details
    Browse the repository at this point in the history
  2. Pass bool by value

    GuiMacielPereira committed May 10, 2024
    Configuration menu
    Copy the full SHA
    8a4ed15 View commit details
    Browse the repository at this point in the history
  3. Fix Cppcheck

    GuiMacielPereira committed May 10, 2024
    Configuration menu
    Copy the full SHA
    4869c7a View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    593879d View commit details
    Browse the repository at this point in the history