-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #22 from SamEdwardes/feature/python3.12
Add support for Python 3.12
- Loading branch information
Showing
9 changed files
with
1,893 additions
and
2,534 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
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,25 +1,66 @@ | ||
default: | ||
@just --list | ||
|
||
[group('package')] | ||
build: | ||
rm -rf dist | ||
uv build | ||
|
||
[group('package')] | ||
publish-test: | ||
rm -rf dist | ||
uv build | ||
uv publish --token $(op read "op://Private/Test PyPI/Token") --publish-url https://test.pypi.org/legacy/ | ||
open https://test.pypi.org/project/spacypdfreader/ | ||
|
||
[group('package')] | ||
publish: | ||
rm -rf dist | ||
uv build | ||
uv publish --token $(op read "op://Private/PyPI/Token") | ||
open https://pypi.org/project/spacypdfreader/ | ||
|
||
[group('lint')] | ||
format: | ||
# Source code | ||
poetry run black spacypdfreader | ||
poetry run isort spacypdfreader | ||
# Tests | ||
poetry run black tests | ||
poetry run isort tests | ||
# Sort imports | ||
uvx ruff check --select I --fix . | ||
# Format code | ||
uvx ruff format . | ||
|
||
test: | ||
poetry run pytest | ||
poetry run pytest --doctest-modules spacypdfreader/ | ||
[group('lint')] | ||
lint: | ||
uvx ruff check . | ||
|
||
[group('tests')] | ||
test version="3.12": | ||
uv run --python {{version}} --all-extras pytest | ||
|
||
[group('tests')] | ||
test-matrix: | ||
just test 3.9 | ||
just test 3.10 | ||
just test 3.11 | ||
just test 3.12 | ||
|
||
[group('tests')] | ||
test-pre-release-python: | ||
# As of 2024-10-04 3.13 is failing | ||
just test 3.13 | ||
|
||
[group('tests')] | ||
test-gha: | ||
gh workflow run pytest.yml --ref $(git branch --show-current) | ||
|
||
[group('docs')] | ||
preview-docs: | ||
poetry run mkdocs serve | ||
uv run mkdocs serve | ||
|
||
[group('docs')] | ||
publish-docs: | ||
rm -rf site | ||
mkdocs build | ||
mkdocs gh-deploy | ||
uv run mkdocs build | ||
uv run mkdocs gh-deploy | ||
|
||
publish: | ||
poetry publish --build | ||
[group('docs')] | ||
test-docs: | ||
uv run --python 3.12 --all-extras pytest --doctest-modules spacypdfreader/ |
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 was deleted.
Oops, something went wrong.
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,36 +1,48 @@ | ||
[tool.poetry] | ||
[project] | ||
name = "spacypdfreader" | ||
version = "0.3.1" | ||
version = "0.3.2" | ||
description = "A PDF to text extraction pipeline component for spaCy." | ||
authors = ["SamEdwardes <[email protected]>"] | ||
license = "MIT" | ||
readme = "README.md" | ||
repository = "https://github.com/SamEdwardes/spaCyPDFreader" | ||
maintainers = [ | ||
{name = "Sam Edwardes", email = "[email protected]"} | ||
] | ||
keywords = ["python", "spacy", "nlp", "pdf", "pdfs"] | ||
requires-python = ">=3.9" | ||
dependencies = [ | ||
"pdfminer-six>=20240706", | ||
"rich>=13.9.2", | ||
"spacy>=3.8.2", | ||
] | ||
|
||
[tool.poetry.dependencies] | ||
python = ">=3.8,<3.12" | ||
spacy = "^3.4" | ||
rich = "^10.15.2" | ||
"pdfminer.six" = "^20211012" | ||
pytesseract = {version = "^0.3.8", optional = true} | ||
pdf2image = {version = "^1.16.0", optional = true} | ||
numpy = "^1.24.2" | ||
Pillow = {version = "^9.4.0", optional = true} | ||
[project.urls] | ||
Homepage = "https://samedwardes.github.io/spacypdfreader" | ||
Documentation = "https://samedwardes.github.io/spacypdfreader" | ||
Repository = "https://github.com/SamEdwardes/spaCyPDFreader.git" | ||
Issues = "https://github.com/SamEdwardes/spaCyPDFreader/issues" | ||
Changelog = "https://github.com/SamEdwardes/spacypdfreader/blob/main/docs/changelog.md" | ||
|
||
[tool.poetry.extras] | ||
pytesseract = ["pytesseract", "Pillow", "pdf2image"] | ||
|
||
[tool.poetry.group.dev.dependencies] | ||
pytest = "^6.2.5" | ||
en-core-web-sm = {url = "https://github.com/explosion/spacy-models/releases/download/en_core_web_sm-3.4.1/en_core_web_sm-3.4.1-py3-none-any.whl"} | ||
mkdocs-material = "^9.1.1" | ||
mkdocs-include-markdown-plugin = "^4.0.3" | ||
mkdocstrings = {extras = ["python"], version = "^0.20.0"} | ||
ipykernel = "^6.25.2" | ||
black = "^23.9.1" | ||
isort = "^5.12.0" | ||
[project.optional-dependencies] | ||
pytesseract = [ | ||
"pdf2image>=1.17.0", | ||
"pillow>=10.4.0", | ||
"pytesseract>=0.3.13", | ||
] | ||
|
||
[build-system] | ||
requires = ["poetry-core>=1.0.0"] | ||
build-backend = "poetry.core.masonry.api" | ||
requires = ["hatchling"] | ||
build-backend = "hatchling.build" | ||
|
||
[tool.uv] | ||
dev-dependencies = [ | ||
"mkdocs>=1.6.1", | ||
"mkdocs-include-markdown-plugin>=6.2.2", | ||
"mkdocs-material>=9.5.39", | ||
"pytest>=8.3.3", | ||
"en-core-web-sm", | ||
"mkdocstrings>=0.26.1", | ||
"mkdocstrings-python>=1.11.1", | ||
] | ||
|
||
[tool.uv.sources] | ||
en-core-web-sm = { url = "https://github.com/explosion/spacy-models/releases/download/en_core_web_sm-3.8.0/en_core_web_sm-3.8.0-py3-none-any.whl" } |
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
Oops, something went wrong.