taucmdr icon indicating copy to clipboard operation
taucmdr copied to clipboard

Renumber fails if compressing gaps

Open zbeekman opened this issue 6 years ago • 3 comments

When deleting trials and then trying to compress the gaps, an error message is thrown:

$ tau trial list -s
0
10
20
30
$ tau trial renumber 10 --to 1
['10', '--to', '1']
usage: {'prog': 'tau trial renumber'} [trial_number...] --to [new_trial_number...]
tau trial renumber: error: This renumbering would delete trial 1. If you would like to delete this trial use the `trial delete` subcommand.

I have created an extra unit test that should catch this.

zbeekman avatar May 07 '18 17:05 zbeekman

See https://travis-ci.org/ParaToolsInc/taucmdr/builds/376030856#L3317 for an example.

zbeekman avatar May 07 '18 19:05 zbeekman

To run tests locally the best way to do this is:

  1. Install TAU Commander (any version, just so that you get miniconda and the various packages)
  2. Set miniconda at the front of your path: export PATH="$INSTALLDIR/conda/bin:$PATH"
  3. Make sure you you are using miniconda's executables: which pip ; which python
  4. Install development packages (if not gathering coverage data or building sphynx docs this probably is not required)
pip install -r requirements.txt
  1. Run the tests:
python setup.py test

zbeekman avatar May 13 '18 15:05 zbeekman

EDIT: Comment moved to it's own new issue

zbeekman avatar May 24 '18 18:05 zbeekman