Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrating from setup.py to pyproject.toml #252

Merged
merged 5 commits into from
Mar 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,4 @@ jobs:
env:
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
run: |
pytest tests
run: pytest
6 changes: 5 additions & 1 deletion paperqa/version.py
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")
52 changes: 52 additions & 0 deletions pyproject.toml
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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
37 changes: 0 additions & 37 deletions setup.py

This file was deleted.

Loading