Setup Python env
python -m venv .venv
. ./.venv/bin/activateInstall dependencies:
poetry installInstall CUDA 12.1 version of torch and torchvision (Linux/Windows, GPU support):
poetry run pip install torch==2.5.1+cu121 torchvision==0.20.1+cu121 --index-url https://download.pytorch.org/whl/cu121poetry run python test.pyCheck code quality with pylint:
python lint.pyOr directly:
poetry run pylint doc_page_extractorFor macOS developers, PyTorch CUDA version is not compatible. Use the following steps:
# Install only main dependencies first (skip dev group to avoid CUDA installation)
poetry install
# Install PyTorch CPU version
poetry run pip install torch torchvision --index-url https://download.pytorch.org/whl/cpuClean old builds and create distribution files:
python build.pyMake sure all checks pass:
poetry run python test.py
python lint.py