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

✨ Python 3.12 #304

Closed
wants to merge 11 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
2 changes: 1 addition & 1 deletion .github/workflows/docker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.9"
python-version: "3.11"
- name: Install Hatch
run: |
python -m pip install --upgrade pip
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- name: Set up Python Environment 3.10
uses: actions/setup-python@v4
with:
python-version: "3.9"
python-version: "3.11"
- name: Install Hatch
run: |
python -m pip install --upgrade pip
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.9"
python-version: "3.11"
- name: Install Hatch
run: |
python -m pip install --upgrade pip
Expand Down Expand Up @@ -47,7 +47,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.9"
python-version: "3.11"
- name: Install Hatch
run: |
python -m pip install --upgrade pip
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.9"
python-version: "3.11"
- name: Install Hatch
run: |
python -m pip install --upgrade pip
Expand Down Expand Up @@ -48,7 +48,7 @@ jobs:
- name: Set up Python Environment
uses: actions/setup-python@v4
with:
python-version: "3.9"
python-version: "3.11"
- name: Install Hatch
run: |
python -m pip install --upgrade pip
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ jobs:
fail-fast: true
matrix:
include:
- { name: Python 3.12, python: "3.12" }
- { name: Python 3.11, python: "3.11" }
- { name: Python 3.10, python: "3.10" }
- { name: Python 3.9, python: "3.9" }
Expand Down
3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,3 @@ node_modules/

# Camply Data Files
camply/providers/usedirect/*/*.json

# Camply Requirements Files
requirements/*.bak
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python:3.9-slim
FROM python:3.11-slim

COPY pyproject.toml /tmp/camply/pyproject.toml
COPY README.md /tmp/camply/README.md
Expand All @@ -7,7 +7,7 @@ COPY camply/ /tmp/camply/camply/
MAINTAINER Justin Flannery <[email protected]>
LABEL description="camply, the campsite finder"

COPY requirements/requirements-prod.txt /tmp/camply/requirements.txt
COPY requirements.txt /tmp/camply/requirements.txt

RUN python -m pip install -r /tmp/camply/requirements.txt && \
python -m pip install /tmp/camply --no-dependencies && \
Expand Down
46 changes: 16 additions & 30 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,20 @@ classifiers = [
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11"
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12"
]
dependencies = [
"click~=8.1.3",
"fake-useragent~=1.1.3",
"pandas~=1.5.3",
"pydantic~=1.10.7",
"pandas~=2.0.3; python_version < '3.9'",
"pandas~=2.1.2; python_version > '3.8'",
"numpy~=1.24.4; python_version < '3.9'",
"numpy~=1.26.1; python_version > '3.8'",
"pydantic~=1.10.13",
"python-dotenv~=1.0.0",
"pytz~=2023.2",
"pyyaml~=6.0",
"pyyaml~=6.0.1",
"ratelimit~=2.2.1",
"requests~=2.31.0",
"rich~=13.3.2",
Expand Down Expand Up @@ -73,12 +77,12 @@ parallel = true

[tool.hatch.envs.default]
dependencies = [
"pytest~=7.3.1",
"pytest~=7.4.3",
"pytest-cov~=4.0.0",
"pytest-mock~=3.10.0",
"pytest-vcr~=1.0.2",
"pytest-xdist~=3.2.1",
"freezegun~=1.2.1",
"time-machine~=2.13.0",
"mkdocs~=1.4.2",
"mkdocs-material~=9.1.6",
"mkdocs-click~=0.8.0",
Expand All @@ -88,21 +92,19 @@ dependencies = [
"mkdocstrings[python]~=0.21.2",
"mkdocs-exclude-search~=0.6.5",
"ruff~=0.1.3",
"mypy~=1.2.0",
"mypy~=1.5.1",
"pandas-stubs~=2.0.0.230412",
"pip-tools~=6.13.0"
]
features = ["all"]
pre-install-commands = ["pip install -U --no-deps -r requirements/requirements-dev.txt"]
python = "3.9"
pre-install-commands = ["python -m pip install --no-deps -r requirements.txt"]
python = "3.11"

[tool.hatch.envs.default.env-vars]
PUSHOVER_PUSH_TOKEN = "{env:PUSHOVER_PUSH_TOKEN:placeholder}"
PUSHOVER_PUSH_USER = "{env:PUSHOVER_PUSH_USER:placeholder}"

[tool.hatch.envs.default.scripts]
_pip_compile = "pip-compile --resolver=backtracking --generate-hashes --all-extras {args:}"
_sed_requirements = "sed -i.bak 's/-r requirements.in/camply (pyproject.toml)/' {args}"
all = ["format", "lint", "test"]
check = [
"mypy --install-types --strict-optional --non-interactive {args:camply/ tests/}"
Expand All @@ -112,32 +114,16 @@ docs-deploy = "python -m mkdocs gh-deploy {args:}"
docs-serve = "python -m mkdocs serve --dev-addr localhost:8000"
format = ["ruff --fix {args:.}", "ruff format {args:.}"]
lint = ["ruff {args:.}", "ruff format --check {args:.}"]
requirements = [
"hatch dep show requirements --project-only --all > requirements.in",
"_pip_compile --output-file requirements/requirements-prod.txt",
"_sed_requirements requirements/requirements-prod.txt",
"hatch dep show requirements --all > requirements.in",
"_pip_compile --output-file requirements/requirements-dev.txt",
"_sed_requirements requirements/requirements-dev.txt",
"rm requirements.in"
]
requirements-upgrade = [
"hatch dep show requirements --project-only --all > requirements.in",
"_pip_compile --output-file requirements/requirements-prod.txt --upgrade",
"_sed_requirements requirements/requirements-prod.txt",
"hatch dep show requirements --all > requirements.in",
"_pip_compile --output-file requirements/requirements-dev.txt --upgrade",
"_sed_requirements requirements/requirements-dev.txt",
"rm requirements.in"
]
requirements = "pip-compile {args:} --generate-hashes --output-file requirements.txt --resolver=backtracking --all-extras"
requirements-upgrade = "pip-compile {args:} --upgrade --generate-hashes --output-file requirements.txt --resolver=backtracking --all-extras"
semantic-release = [
"npm install --prefix .github/semantic_release/",
"npx --prefix .github/semantic_release/ semantic-release {args:}"
]
test = "pytest -n auto --cov=camply --cov-report={env:COVERAGE_REPORT:term-missing} --cov-config=pyproject.toml {args:tests/ -v}"

[[tool.hatch.envs.test.matrix]]
python = ["3.8", "3.9", "3.10", "3.11"]
python = ["3.8", "3.9", "3.10", "3.11", "3.12"]

[tool.hatch.envs.test.scripts]
matrix = "test"
Expand Down
Loading
Loading