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.10 & update pre-commit hooks #16

Merged
merged 5 commits into from
Oct 9, 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/build_template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
matrix:
# TODO: Fix R pre-commit hook issues with Windows
os: [ ubuntu-latest, macos-latest ]
python: [3.9, '3.10']
python: ['3.10']

steps:
- name: Checkout the revision
Expand Down
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.1.0
rev: v5.0.0
hooks:
- id: check-json
- id: detect-aws-credentials
args: [ --allow-missing-credentials ]
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.1.6
rev: v0.6.9
hooks:
- id: ruff
types_or: [ python, jupyter ]
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ A cookiecutter template for data science projects.

## Getting started

All repositories using cookiecutter use python 3.9. You will need [cookiecutter](https://cookiecutter.readthedocs.io/en/latest/installation.html) installed too.
All repositories using cookiecutter use python 3.10. You will need [cookiecutter](https://cookiecutter.readthedocs.io/en/latest/installation.html) installed too.

Then run:

Expand Down
195 changes: 90 additions & 105 deletions poetry.lock

Large diffs are not rendered by default.

6 changes: 4 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,12 @@ readme = "README.md"
packages = [{include = "experiment_template"}]

[tool.poetry.dependencies]
python = "^3.9"
pre-commit = "^3.0.4"
python = "^3.10"


[tool.poetry.group.dev.dependencies]
pre-commit = "^4.0.1"

[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
- name: Install python or load from cache with dependencies
uses: actions/setup-python@v4
with:
python-version: "3.9"
python-version: "3.10"
cache: "poetry"

- name: Install dependencies
Expand Down
2 changes: 1 addition & 1 deletion {{ cookiecutter.repo_name }}/.github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
- name: Install python or load from cache with dependencies
uses: actions/setup-python@v4
with:
python-version: "3.9"
python-version: "3.10"
cache: "poetry"

- name: Install dependencies
Expand Down
6 changes: 3 additions & 3 deletions {{ cookiecutter.repo_name }}/.pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.1.0
rev: v5.0.0
hooks:
- id: check-json
- id: detect-aws-credentials
args: [ --allow-missing-credentials ]
- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: 'v0.1.5'
rev: 'v0.6.9'
hooks:
- id: ruff
args: [ --fix ]
Expand All @@ -21,6 +21,6 @@ repos:
types: [python]
additional_dependencies: ['[email protected]']
- repo: https://github.com/python-poetry/poetry
rev: '1.7.0'
rev: '1.8.0'
hooks:
- id: poetry-check
2 changes: 1 addition & 1 deletion {{ cookiecutter.repo_name }}/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python:3.9-slim
FROM python:3.10-slim

RUN mkdir /app
WORKDIR /app
Expand Down
2 changes: 1 addition & 1 deletion {{ cookiecutter.repo_name }}/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

## Getting started

This project uses Python 3.9.
This project uses Python 3.10.

Installation instructions:

Expand Down
1,679 changes: 853 additions & 826 deletions {{ cookiecutter.repo_name }}/poetry.lock

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions {{ cookiecutter.repo_name }}/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,20 @@ description = ""
authors = ["CPR Data Science <[email protected]>"]

[tool.poetry.dependencies]
python = "^3.9"
python = ">=3.10,<3.11"
uvicorn = {extras = ["standard"], version = "^0.20.0"}
fastapi = "^0.92.0"

[tool.poetry.group.dev.dependencies]
ruff = "^0.0.247"
black = "^22.1.0"
pyright = "^1.1.267"
pre-commit = "^2.17.0"
python-dotenv = "^0.19.2"
pytest = "^7.0.1"
pytest-dotenv = "^0.5.2"
nbmake = "^1.4.1"
httpx = "^0.23.3"
pre-commit = "^4.0.1"

[build-system]
requires = ["poetry-core>=1.0.0"]
Expand Down
Loading