/opentaal-python

Python package by OpenTaal for processing Dutch texts

Primary LanguagePythonMIT LicenseMIT

GitHub last commit GitHub commit activity GitHub Repo stars GitHub watchers GitHub Sponsors Liberapay patrons

OpenTaal Python

Python package by OpenTaal for efficiently processing Dutch texts.

logo Stichting OpenTaal

Prerequisites

Install the following packages for usage

sudo apt-get -y install libexttextcat-dev
pip install -r requirements/use.txt
python3 -c "import ucto; ucto.installdata()"

Install also the following packages for development

pip install -r requirements/dev.txt

Code checking

Static code check is done with

flake8 --ignore E252 opentaal tests

Unit tests

Run unit tests with

pytest

Noting the following options

-v verbose
-s show output print statements
--durations=10 show 10 slowest methods

Code coverage

Run unit tests with code coverage and view report in HTML

pytest --cov=opentaal --cov-branch --cov-report=html
browse htmlcov/index.html

Profiling

Profile unit tests and view report in HTML

python3 -m cProfile -o pytest.prof -m pytest
snakeviz pytest.prof

API documentation

Generate API documentation and view it in HTML with

cd docs
make html  # TODO see tox file
browse _build/html/index.html

TO DO

  • mypy --ignore-missing-imports --implicit-optional opentaal tests
  • create tox.ini see https://tox.wiki/en/4.11.3/
  • create file .github/workflows/build.yml
  • create readthedocs.yml
  • create codecov.yml
  • publish on PyPI

Donating is also possible with Donate using Liberapay

https://github.com/Alir3z4/html2text/blob/master/html2text/__init__.py

https://github.com/Alir3z4/html2text/blob/master/html2text/cli.py

https://github.com/Alir3z4/html2text/blob/master/html2text/config.py

https://github.com/Alir3z4/html2text/blob/master/docs/usage.md

https://pypi.org/project/beautifulsoup4/

Versioning

Update the version number in both setup.py and in docs/conf.py.