Ticket #1302 (closed: fixed)

Opened 10 years ago

Last modified 5 years ago

Modify FileValidator extension checking to be more generic

Reported by: Peter Peterson Owned by: Peter Peterson
Priority: minor Milestone: Iteration 24
Component: Keywords:
Cc: Blocked By:
Blocking: Tester: Janik Zikovsky

Description

Rather than looking for the extension to be the stuff after the final ".", have it look for the file ending. This way things that have double extensions (i.e. .tar.gz, .hdf.nxs) as well as extensions that don't start with "." (i.e. _neutron_event.dat, _pulseid.dat) can be matched against. The functionality is similar to python's endswith is the correct analogy. For filters that still want to have an extension start with a ".", they can just add it to the specification of the filter. Most users won't notice that the "." is no longer required.

Change History

comment:1 Changed 10 years ago by Peter Peterson

  • Owner set to Peter Peterson
  • Status changed from new to accepted

comment:2 Changed 10 years ago by Peter Peterson

(In [4925]) Implemented an endswith function and encapsulated the single extension method in the FileProperty class. Refs #1302, fixes #1301.

comment:3 Changed 10 years ago by Peter Peterson

(In [4926]) Added the . back into the extension so the match will be identical to before. Refs #1302.

comment:4 Changed 10 years ago by Peter Peterson

(In [4927]) Using fancy new file extension validator to verify based on a double extension. Refs #1302.

comment:5 Changed 10 years ago by Peter Peterson

(In [4929]) Put the dots back into the extensions to reproduce the old behavior. Refs #1302.

comment:6 Changed 10 years ago by Peter Peterson

(In [4930]) Put the dots back into the extensions to reproduce the old behavior. Refs #1302.

comment:7 Changed 10 years ago by Peter Peterson

  • Status changed from accepted to testing
  • Resolution set to fixed

The last ticket resolved the issue.

comment:8 Changed 10 years ago by Peter Peterson

(In [4931]) This should fix the random warning messages that where coming up when loading the gui. Refs #1302.

comment:9 Changed 10 years ago by Peter Peterson

  • Status changed from testing to reopened
  • Resolution fixed deleted

This generates a bunch of warnings along the lines of FileValidator-[Warning] Unrecognized extension in file "".

comment:10 Changed 10 years ago by Peter Peterson

  • Status changed from reopened to accepted

comment:11 Changed 10 years ago by Peter Peterson

(In [4935]) This should suppress all of the ugly warning messages on startup. Refs #1302.

comment:12 Changed 10 years ago by Peter Peterson

This has spawned a new ticket for the GUI #1336.

comment:13 Changed 10 years ago by Peter Peterson

  • Status changed from accepted to testing
  • Resolution set to fixed

The work for this appears to be done.

comment:14 Changed 10 years ago by Nick Draper

  • Status changed from testing to verify

Moved to verify state

comment:15 Changed 10 years ago by Janik Zikovsky

  • Status changed from verify to verifying
  • Tester set to Janik Zikovsky

comment:16 Changed 10 years ago by Janik Zikovsky

(In [5929]) Refs #1302: extra test for more complex extension.

comment:17 Changed 10 years ago by Janik Zikovsky

  • Status changed from verifying to closed

comment:18 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 2149

Note: See TracTickets for help on using tickets.