nbval icon indicating copy to clipboard operation
nbval copied to clipboard

Make cell number start at 1 to match IPython/Jupyter

Open peytondmurray opened this issue 4 years ago • 2 comments

Summary of changes:

  • Modified cell_num to start at 1 to match IPython/Jupyter output.

See #171 for the issue.

Pytest Failures

A couple of tests are failing on this branch, but they are also failing on master and are unrelated:

pytest tests/ --nbval --nbval-current-env --nbval-sanitize-with tests/sanitize_defaults.cfg --ignore tests/ipynb-test-samples

...

Results (28.99s):
      40 passed
       2 failed
         - tests/test_coverage.py:14 test_coverage
         - tests/test_ignore.py:18 test_conf_ignore_stderr
       3 skipped

peytondmurray avatar Aug 23 '21 23:08 peytondmurray

This increments for each cell, irrespective of cell type, not each code cell. A better fix is just to change the original cell count index value:

# Start the cell count
cell_num = 1

psychemedia avatar Oct 22 '21 11:10 psychemedia

Totally agree - thanks for catching this!

peytondmurray avatar Nov 05 '21 05:11 peytondmurray