-
Notifications
You must be signed in to change notification settings - Fork 679
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Removed setup.py in favor of pyproject.toml metadata * Moved to importlib.metadata for version * Added pytest testpaths to shorten invocation * Added setuptools build backend to ensure it will be properly installed * Documenting where version now lives, per PR comments
- Loading branch information
1 parent
f4a5a77
commit c1bd914
Showing
4 changed files
with
58 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,5 @@ | ||
__version__ = "4.3.0" | ||
from importlib.metadata import version | ||
|
||
# If you're looking to bump the version, this now | ||
# lives in the pyproject.toml's [project] section | ||
__version__ = version("paper-qa") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,45 @@ | ||
[build-system] | ||
build-backend = "setuptools.build_meta" | ||
requires = ["setuptools >= 61.0"] | ||
|
||
[project] | ||
authors = [ | ||
{email = "[email protected]", name = "Andrew White"}, | ||
] | ||
# Full list: https://pypi.python.org/pypi?%3Aaction=list_classifiers | ||
classifiers = [ | ||
"License :: OSI Approved :: Apache Software License", | ||
"Operating System :: OS Independent", | ||
"Programming Language :: Python :: 3 :: Only", | ||
"Programming Language :: Python :: 3.10", | ||
"Programming Language :: Python :: 3.11", | ||
"Programming Language :: Python :: 3.12", | ||
"Programming Language :: Python :: 3.8", | ||
"Programming Language :: Python :: 3.9", | ||
"Programming Language :: Python", | ||
] | ||
dependencies = [ | ||
"PyCryptodome", | ||
"html2text", | ||
"numpy", | ||
"openai>=1", | ||
"pydantic>=2", | ||
"pypdf", | ||
"tiktoken>=0.4.0", | ||
] | ||
description = "LLM Chain for answering questions from docs" | ||
keywords = ["question answering"] | ||
license = {file = "LICENSE"} | ||
maintainers = [ | ||
{email = "[email protected]", name = "James Braza"}, | ||
{email = "[email protected]", name = "Andrew White"}, | ||
] | ||
name = "paper-qa" | ||
readme = "README.md" | ||
requires-python = ">=3.8" | ||
urls = {repository = "https://github.com/whitead/paper-qa"} | ||
version = "4.3.0" | ||
|
||
[tool.codespell] | ||
check-filenames = true | ||
check-hidden = true | ||
|
@@ -55,6 +97,13 @@ module = [ | |
"sentence_transformers", # SEE: https://github.com/UKPLab/sentence-transformers/issues/1723 | ||
] | ||
|
||
[tool.pytest.ini_options] | ||
# List of directories that should be searched for tests when no specific directories, | ||
# files or test ids are given in the command line when executing pytest from the rootdir | ||
# directory. File system paths may use shell-style wildcards, including the recursive ** | ||
# pattern. | ||
testpaths = ["tests"] | ||
|
||
[tool.ruff] | ||
# Line length to use when enforcing long-lines violations (like `E501`). | ||
line-length = 120 | ||
|
@@ -134,6 +183,9 @@ max-doc-length = 120 # Match line-length | |
# defaults when analyzing docstring sections. | ||
convention = "google" | ||
|
||
[tool.setuptools.packages.find] | ||
include = ["paperqa*"] | ||
|
||
[tool.tomlsort] | ||
all = true | ||
in_place = true | ||
|