Python - Update workflow and Makefile with tests

This commit is contained in:
Anthony MOI
2020-04-01 16:20:20 -04:00
parent 837791ee1f
commit b03fea1d66
3 changed files with 25 additions and 9 deletions

View File

@@ -1,9 +1,13 @@
.PHONY: style check-style
.PHONY: style check-style test
# Format source code automatically
style:
black --line-length 100 --target-version py35 examples tokenizers tests
# Check the source code is formatted correctly
check-style:
black --check --line-length 100 --target-version py35 examples tokenizers tests
# Launch the test suite
test:
python -m pytest -s -v tests

View File

@@ -1,6 +1,9 @@
from setuptools import setup
from setuptools_rust import Binding, RustExtension
extras = {}
extras["testing"] = ["pytest"]
setup(
name="tokenizers",
version="0.7.0-rc3",
@@ -13,6 +16,7 @@ setup(
url="https://github.com/huggingface/tokenizers",
license="Apache License 2.0",
rust_extensions=[RustExtension("tokenizers.tokenizers", binding=Binding.PyO3)],
extras_require=extras,
classifiers=[
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",