Ticket #10489 (closed: fixed)

Opened 6 years ago

Last modified 5 years ago

Allow multiple instrument directories

Reported by: Nick Draper Owned by: Nick Draper
Priority: major Milestone: Release 3.3
Component: Framework Keywords:
Cc: Blocked By:
Blocking: #8924 Tester: Martyn Gigg

Description (last modified by Nick Draper) (diff)

Add a hierarchy of instrument directories:

for now just:

  1. user directory
  2. /etc/mantid/instrument (on linux and when the dir exists)
  3. install directory

For the design here:

https://github.com/mantidproject/documents/blob/master/Design/InstrumentFetching.md

Change History

comment:1 Changed 6 years ago by Nick Draper

  • Description modified (diff)

comment:2 Changed 6 years ago by Nick Draper

  • Status changed from new to assigned

comment:3 Changed 6 years ago by Nick Draper

  • Status changed from assigned to inprogress

re #10489 functionality in and works at least on windows, needs tests

Changeset: f74b812a01ed325b0657055b1157fcc9eff11cc5

comment:4 Changed 6 years ago by Nick Draper

re #10489_instrument_directories

Changeset: 7fb3d6ff0f22176c689778d283cc7d159a61ba6d

comment:5 Changed 6 years ago by Nick Draper

re #10489 added python support

Changeset: 3ecb54045dfaecb69a4e46f82b0e2c720b9d0080

comment:6 Changed 6 years ago by Nick Draper

  • Status changed from inprogress to verify
  • Resolution set to fixed
  • Description modified (diff)

To test

Particularly needs testing on linux as I've tested windows

  1. Startup mantid. An appdata instrument directory should be created (@/.mantid/instrument)
  2. Adjust an instrument file (shift a whole bank in a way that would be visible) and copy it to that directory.
  3. Load an instrument data file that would use that file.
  4. Do the same with /etc/mantid/instrument (different instrument file, or move the one from before as the user area will override /etc)
  5. do some general loading of files to check that nothing fails.
  6. Check the python access to config.getInstrumentDirectories()
  7. Also these changes have removed the ParameterDefinition.Directory key, and the box to enter them from the mantidplot settings dialog.
  8. Parameter definition files should now load from:
    1. The same directory as the instrument file
    2. The instrument directories, in order
Last edited 6 years ago by Nick Draper (previous) (diff)

comment:7 Changed 6 years ago by Nick Draper

  • Summary changed from Allow multiple instrument repositories to Allow multiple instrument directories

comment:8 Changed 6 years ago by Nick Draper

re #10489 Move of one line of code to satifsy cppcheck

Changeset: da59d5b871a0ed7745eaa5d794b3ba16680bccc9

comment:9 Changed 6 years ago by Nick Draper

re #10489 Move of one line of code to satifsy cppcheck

Changeset: 15f5c4b94bf7aa616a2197fa5f49d2f22211b9a8

comment:10 Changed 6 years ago by Martyn Gigg

  • Status changed from verify to verifying
  • Tester set to Martyn Gigg

comment:11 Changed 6 years ago by Martyn Gigg

I'd like to suggest a couple of modifications to ExperimentInfo::getInstrumentFilename.

  1. The return from ConfigService::Instance().getInstrumentDirectories can be captured as const &, rather than by value to avoid a copy.
  2. Can we not break out of the for loops early once we have found the file? If we are looking for the first one then it would be good to break as as soon as we find a match?

comment:12 Changed 6 years ago by Nick Draper

re #10489 Save a copy of a vector

Changeset: 94e22176959f6182f5b0bfd0f56c0040444e63d3

comment:13 Changed 6 years ago by Nick Draper

re #10489 fix system tests usage of ParameterDefinition.directoy

Changeset: 684ed7a5f5d828e5a22d712573d6c0562dae5023

comment:14 Changed 6 years ago by Martyn Gigg

The system tests pass for me locally now.

comment:15 Changed 6 years ago by Nick Draper

  • Status changed from verifying to closed

Merge branch 'feature/10489_instrument_directories' of github.com:mantidproject/mantid into feature/10489_instrument_directories

Full changeset: 07ec05cd13d487050e35011cfe34c52ee882548c

comment:16 Changed 6 years ago by Martyn Gigg

Merge remote-tracking branch 'origin/feature/10489_instrument_directories'

Full changeset: 965778d1306bd81ae933d90d9e7bd65771350cc1

comment:17 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 11331

Note: See TracTickets for help on using tickets.