To install from Conda (recommended):
>> conda install -c conda-forge pytest-notebook
To install from PyPi:
>> pip install --pre pytest-notebook
To install the development version:
>> git clone https://github.com/chrisjsewell/pytest-notebook .
>> cd pytest-notebook
>> pip install -e .
#>> pip install -e .[code_style,testing,docs] # install extras for more features
The following will discover and run all unit test:
>> cd pytest-notebook
>> pytest -v
The code style is tested using flake8, with the configuration set in .flake8
, and black.
Installing with pytest-notebook[code_style]
makes the pre-commit package available, which will ensure these tests are passed by reformatting the code and testing for lint errors before submitting a commit. It can be set up by:
>> cd pytest-notebook
>> pre-commit install
Optionally you can run black
and flake8
separately:
>> black .
>> flake8 .
Editors like VS Code also have automatic code reformat utilities, which can check and adhere to this standard.
The documentation can be created locally by:
>> cd pytest-notebook/docs
>> make clean
>> make # or make debug