Skip to content

Latest commit

 

History

History
56 lines (36 loc) · 1.15 KB

README.md

File metadata and controls

56 lines (36 loc) · 1.15 KB

ipython-beartype

IPython extension type-checking IPython environments with beartype.

Installation

pip install ipython_beartype

Usage

Within an IPython / Jupyter notebook session, do the following:

%load_ext ipython_beartype
%beartype

All the type annotations in the following cells will be type checked.

Local Development / Testing

  • Create and activate a virtual environment
  • Run pip install -r requirements-dev.txt to do an editable install
  • Run pytest to run tests

Type Checking

Run mypy .

Create and upload a package to PyPI

Make sure to bump the version in setup.cfg.

Then run the following commands:

rm -rf build dist
python setup.py sdist bdist_wheel

Then upload it to PyPI using twine:

twine upload dist/*

Credits

Thanks to knyazer and patrick-kidger for building the jaxtyping IPython extension, which was used as the base for this extension.

Also special thanks to leycec for creating beartype and the IPython team.