Ticket #1303 (closed: fixed)

Opened 10 years ago

Last modified 5 years ago

New type of IntArrayProperty

Reported by: Peter Peterson Owned by: Peter Peterson
Priority: major Milestone: Iteration 24
Component: Keywords:
Cc: Blocked By:
Blocking: Tester: Mathieu Doucet

Description

In data loaders that understand partial files there is a consistent need to specify a list of spectra. Currently this is done by using three properties: integer min, integer max, array<int>. It would be much better if there was a single property that simply took a range of integers, rather than a comma separated list, and returned an vector of integers as a result. To handle ranges where negative numbers are allowed the syntax could use commas "," and colons ":". Some examples:

1:10000
-27:-24
1,2,5:20

This would remove the need for having three separate properties and all of the fancy logic associated with putting them together in to a single array of spectra numbers.

Change History

comment:1 Changed 10 years ago by Nick Draper

I'd be tempted to allow - to be used as a range seperator as well, so 12-24.

I know this will not be so pretty for negative numbers, -12--24, but people can always choose to use the colon.

comment:2 Changed 10 years ago by Peter Peterson

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

comment:3 Changed 10 years ago by Peter Peterson

(In [4972]) Made the exception message a bit clearer as to what is wrong. Refs #1303.

comment:4 Changed 10 years ago by Peter Peterson

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

(In [4979]) Reworked the code to reuse more of it while adding the functionality of using either dash or colon to specify ranges of ints and uints. Fixes #1303.

comment:5 Changed 10 years ago by Nick Draper

  • Status changed from closed to verify

moved to verify status

comment:6 Changed 10 years ago by Nick Draper

Moved to verify state

comment:7 Changed 10 years ago by Mathieu Doucet

  • Status changed from verify to verifying
  • Tester set to Mathieu Doucet

comment:8 Changed 10 years ago by Mathieu Doucet

  • Status changed from verifying to verify

(In [5898]) Added a few more tests to cover the list of possible uses. Closes #1303

comment:9 Changed 10 years ago by Mathieu Doucet

  • Status changed from verify to verifying

comment:10 Changed 10 years ago by Mathieu Doucet

  • Status changed from verifying to closed

comment:11 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 2150

Note: See TracTickets for help on using tickets.