collab-uniba / pynblint

Pynblint is a linter for Python Jupyter notebooks.
MIT License
40 stars 2 forks source link

Detect duplicate notebook that have not been renamed #75

Closed louieQ closed 2 years ago

louieQ commented 2 years ago

Jupyter Notebook's file explorer allows users to create duplicates of their notebooks (select the tickbox to the left of a notebook name, then Duplicate in the context menu that appears above).

image

Notebook duplicates are named according to the following pattern:

<original-notebook-name>-Copy<progressive-number>.ipynb

E.g., by creating two duplicates of the same notebook named "TryJupyter.ipynb", I would get TryJupyter-Copy1.ipynb and TryJupyter-Copy2.ipynb.

To be easily distinguished from their original copy, such duplicate notebooks should be renamed as soon as they are created.

Add a linting rule to detect the presence of duplicate notebooks that have not been renamed within a repository.