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

Add support for Python 3.13 #68

Merged
merged 4 commits into from
Oct 31, 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
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
os:
- ubuntu-latest
- windows-latest
python-version: ['3.10', '3.11', '3.12']
python-version: ['3.10', '3.11', '3.12', '3.13']
steps:
- uses: actions/checkout@v4
- name: Install poetry
Expand Down
15 changes: 13 additions & 2 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ license = "GPL-3.0-only"
readme = "README.md"

[tool.poetry.dependencies]
python = ">=3.10,<3.13"
python = ">=3.10,<4"
regex = "^2024.9.11"
bioc = "^2.1"
beautifulsoup4 = "^4.12.3"
Expand All @@ -21,6 +21,7 @@ lxml = "^5.3.0"
networkx = "^3.4.2"
opencv-contrib-python = "^4.10.0.84"
python-levenshtein = "^0.26.1"
filetype = "^1.2.0"

[tool.poetry.group.dev.dependencies]
pytest = "^8.3.2"
Expand Down
8 changes: 4 additions & 4 deletions run_app.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import argparse
import imghdr
import re
from datetime import datetime
from pathlib import Path

from filetype import is_image
from tqdm import tqdm

from src.autoCORPus import autoCORPus
Expand Down Expand Up @@ -62,9 +62,9 @@ def get_file_type(file_path):
return "linked_tables"
else:
return "main_text"
elif imghdr.what(file_path):
# imghdr returns the type of image a file is (png/jpeg etc or None if not an image)
# this should be tidied up to only include the image types which are supported by AC instead of any image files
elif is_image(file_path):
# this should be tidied up to only include the image types which are supported
# by AC instead of any image files
return "table_images"
else:
print(
Expand Down