diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 00000000..845e7e2c --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,10 @@ +repos: + - repo: https://github.com/pycqa/pylint + rev: pylint-2.6.0 + hooks: + - id: pylint + - repo: https://github.com/ambv/black + rev: stable + hooks: + - id: black + language_version: python3 diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 00000000..6b313bcf --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,2 @@ +[tool.black] +line-length = 150 diff --git a/setup.py b/setup.py index e2b2c8f0..2d2eaba1 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ with open("README.md", "r") as f: DESCRIPTION = f.read() setup(name="txtai", - version="2.0.0", + version="2.1.0", author="NeuML", description="AI-powered search engine", long_description=DESCRIPTION, @@ -39,6 +39,14 @@ setup(name="txtai", "transformers>=4.1.1", "uvicorn>=0.12.1" ], + extras_require={ + "dev": [ + "black", + "coverage", + "pre-commit", + "pylint" + ] + }, classifiers=[ "License :: OSI Approved :: Apache Software License", "Operating System :: OS Independent",