Skip to content
Snippets Groups Projects
README.md 2.98 KiB

DAN: a Segmentation-free Document Attention Network for Handwritten Document Recognition

Python >= 3.10

For more details about this package, make sure to see the documentation available at https://atr.pages.teklia.com/dan/.

Development

For development and tests purpose it may be useful to install the project as a editable package with pip.

  • Use a virtualenv (e.g. with virtualenvwrapper mkvirtualenv -a . dan)
  • Install dan as a package (e.g. pip install -e .)

Linter

Code syntax is analyzed before submitting the code.
To run the linter tools suite you may use pre-commit.

pip install pre-commit
pre-commit run -a

Run tests

Tests are executed with tox using pytest. To install tox,

pip install tox
tox

To reload the test virtual environment you can use tox -r

Run a single test module: tox -- <test_path> Run a single test: tox -- <test_path>::<test_function>

The tests use a large file stored via Git-LFS. Make sure to run git-lfs pull before running them.

Update documentation

Please keep the documentation updated when modifying or adding features. It's pretty easy to do:

pip install -r doc-requirements.txt
mkdocs serve

You can then write in Markdown in the relevant docs/*.md files, and see live output on http://localhost:8000.

Inference