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 tests for python 3.12 #182

Closed
wants to merge 4 commits into from
Closed
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: 2 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.8', '3.9', '3.10', '3.11']
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13']
# Tests for 3.12+ failing with https://github.com/python-poetry/poetry/issues/7611
fail-fast: false

steps:
Expand Down
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
rev: v5.0.0
hooks:
- id: check-toml
- id: check-yaml
- id: end-of-file-fixer
- id: mixed-line-ending
- id: trailing-whitespace
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.4.10
rev: v0.8.5
hooks:
- id: ruff
- id: ruff-format
Expand Down
2 changes: 1 addition & 1 deletion noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
DEFAULT_COVERAGE_FORMATS = ['html', 'term']


@session(python=['3.8', '3.9', '3.10'])
@session(python=['3.8', '3.9', '3.10', '3.11', '3.12', '3.13'])
def test(session):
"""Run tests for a specific python version"""
test_paths = session.posargs or ['test']
Expand Down
1,497 changes: 814 additions & 683 deletions poetry.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion pyinaturalist_convert/csv.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ def is_csv_export(file_path: PathOrStr) -> bool:
"""Check if a file is a CSV export from the iNaturalist export tool (to distinguish from
converted API results)
"""
with open(file_path) as f:
with open(file_path, encoding='utf-8') as f:
reader = DictReader(f)
fields = next(reader).keys()
# Just check for a field name that's only in the export and not in API results
Expand Down
2 changes: 1 addition & 1 deletion pyinaturalist_convert/sqlite.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ def _next_row(self) -> List:


def get_fields(csv_path: PathOrStr, delimiter: str = ',') -> List[str]:
with open(csv_path) as f:
with open(csv_path, encoding='utf-8') as f:
reader = csv_reader(f, delimiter=delimiter)
return next(reader)

Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "pyinaturalist-convert"
version = "0.6.5"
version = "0.6.6"
description = "Data conversion tools for iNaturalist observations and taxonomy"
authors = ["Jordan Cook"]
license = "MIT"
Expand Down Expand Up @@ -44,7 +44,7 @@ boto3 = {optional=true, version=">=1.20"}
geojson = {optional=true, version=">=2.5"}
gpxpy = {optional=true, version=">=1.4"}
markuppy = {optional=true, version=">=1.12"}
numpy = {optional=true, version="<2.0"}
numpy = {optional=true, version=">=1.20"}
odfpy = {optional=true, version=">=1.4"}
openpyxl = {optional=true, version=">=2.6"}
pandas = {optional=true, version=">=1.2"}
Expand Down
Loading