pynblint
pynblint copied to clipboard
Pynblint is a linter for Python Jupyter notebooks.
-create the function that searches for imports from the notebook tree -create the function that searches for reqirements from requiremets.txt -create the function that searches for standard libraries from the...
This new Arxiv reference can perhaps be added to the readme: https://arxiv.org/abs/2205.11934
A notebook might present function and class definitions within its code cells. Functions and class methods defined within a notebook should be tested. Check whether functions or class methods defined...
Detect whether a notebook contains duplicate code in its code cells. Recommend code refactoring in case duplicate code is detected.
Imported packages and modules should either be: - local to the project directory or - declared in the project requirements file (e.g., `requirements.txt` or `environment.yml`). By using the [Python ast...
Check whether notebook cells present violations of the PEP8 coding standard. This might be done by applying an existing Python linter (e.g., [Pylint](https://pylint.org) or [Flake8](https://flake8.pycqa.org/en/latest/)) to the source code extracted...
Notebooks written within the same data science repository might contain duplicate code. Such code should be consolidated outside the notebook, i.e., in one or more dedicated Python modules, to be...
Absolute paths are not portable and their use hinders the reproducibility of notebooks. Build a new linting rule to detect if absolute paths are used within code cells.
Concerning the recommendation of putting notebooks under version control, at present we detect the use of `git`. However, we only have a test case for the absence of the `.git`...
It would be great to be able to configure pynblint from a pyproject.toml file instead of its own config file.