Skip to content

Commit

Permalink
chore(templates): Bump cookiecutter dependencies (#2139)
Browse files Browse the repository at this point in the history
  • Loading branch information
edgarrmondragon authored Jan 9, 2024
1 parent 873ea36 commit 27f0745
Show file tree
Hide file tree
Showing 13 changed files with 65 additions and 46 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ jobs:
GITHUB_TOKEN: {{ '${{secrets.GITHUB_TOKEN}}' }}
strategy:
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Python {{ '${{ matrix.python-version }}' }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: {{ '${{ matrix.python-version }}' }}
- name: Install Poetry
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,19 @@ repos:
- id: trailing-whitespace

- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.27.2
rev: 0.27.3
hooks:
- id: check-dependabot
- id: check-github-workflows

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.1.6
rev: v0.1.11
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix, --show-fixes]
- id: ruff-format

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.7.1
rev: v1.8.0
hooks:
- id: mypy
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,15 @@ keywords = [
"Mapper",
"{{cookiecutter.name}}",
]
classifiers = [
"Intended Audience :: Developers",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
]
license = "Apache-2.0"
{%- if cookiecutter.variant != "None (Skip)" %}
packages = [
Expand All @@ -21,7 +30,7 @@ packages = [
{%- endif %}

[tool.poetry.dependencies]
python = ">=3.8,<4"
python = ">=3.8"
singer-sdk = { version="~=0.34.1" }
fs-s3fs = { version = "~=1.1.1", optional = true }

Expand All @@ -33,12 +42,12 @@ singer-sdk = { version="~=0.34.1", extras = ["testing"] }
s3 = ["fs-s3fs"]

[tool.mypy]
python_version = "3.9"
python_version = "3.11"
warn_unused_configs = true

[tool.ruff]
src = ["{{cookiecutter.library_name}}"]
target-version = "py37"
target-version = "py38"

[tool.ruff.lint]
ignore = [
Expand All @@ -59,7 +68,7 @@ known-first-party = ["{{cookiecutter.library_name}}"]
convention = "google"

[build-system]
requires = ["poetry-core>=1.0.8"]
requires = ["poetry-core==1.8.1"]
build-backend = "poetry.core.masonry.api"

[tool.poetry.scripts]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# This file can be used to customize tox tests as well as other test frameworks like flake8 and mypy

[tox]
envlist = py37, py38, py39, py310, py311
envlist = py{38,39,310,311,312}
isolated_build = true

[testenv]
Expand All @@ -13,7 +13,7 @@ commands =
[testenv:pytest]
# Run the python tests.
# To execute, run `tox -e pytest`
envlist = py37, py38, py39, py310, py311
envlist = py{38,39,310,311,312}
commands =
poetry install -v
poetry run pytest
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ jobs:
GITHUB_TOKEN: {{ '${{secrets.GITHUB_TOKEN}}' }}
strategy:
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Python {{ '${{ matrix.python-version }}' }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: {{ '${{ matrix.python-version }}' }}
- name: Install Poetry
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,20 @@ repos:
- id: trailing-whitespace

- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.27.2
rev: 0.27.3
hooks:
- id: check-dependabot
- id: check-github-workflows

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.1.6
rev: v0.1.11
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix, --show-fixes]
- id: ruff-format

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.7.1
rev: v1.8.0
hooks:
- id: mypy
additional_dependencies:
Expand Down
20 changes: 13 additions & 7 deletions cookiecutter/tap-template/{{cookiecutter.tap_id}}/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,15 @@ keywords = [
"ELT",
"{{cookiecutter.source_name}}",
]
classifiers = [
"Intended Audience :: Developers",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
]
license = "Apache-2.0"
{%- if cookiecutter.variant != "None (Skip)" %}
packages = [
Expand All @@ -20,16 +29,13 @@ packages = [
{%- endif %}

[tool.poetry.dependencies]
python = ">=3.8,<4"
python = ">=3.8"
importlib-resources = { version = "==6.1.*", python = "<3.9" }
singer-sdk = { version="~=0.34.1" }
fs-s3fs = { version = "~=1.1.1", optional = true }
{%- if cookiecutter.stream_type in ["REST", "GraphQL"] %}
requests = "~=2.31.0"
{%- endif %}
{%- if cookiecutter.auth_method in ("OAuth2", "JWT") %}
cached-property = "~=1" # Remove after Python 3.7 support is dropped
{%- endif %}

[tool.poetry.group.dev.dependencies]
pytest = ">=7.4.0"
Expand All @@ -39,15 +45,15 @@ singer-sdk = { version="~=0.34.1", extras = ["testing"] }
s3 = ["fs-s3fs"]

[tool.mypy]
python_version = "3.9"
python_version = "3.11"
warn_unused_configs = true
{%- if cookiecutter.stream_type == 'SQL' %}
plugins = "sqlmypy"
{%- endif %}

[tool.ruff]
src = ["{{cookiecutter.library_name}}"]
target-version = "py37"
target-version = "py38"

[tool.ruff.lint]
ignore = [
Expand All @@ -68,7 +74,7 @@ known-first-party = ["{{cookiecutter.library_name}}"]
convention = "google"

[build-system]
requires = ["poetry-core>=1.0.8"]
requires = ["poetry-core==1.8.1"]
build-backend = "poetry.core.masonry.api"

[tool.poetry.scripts]
Expand Down
4 changes: 2 additions & 2 deletions cookiecutter/tap-template/{{cookiecutter.tap_id}}/tox.ini
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# This file can be used to customize tox tests as well as other test frameworks like flake8 and mypy

[tox]
envlist = py37, py38, py39, py310, py311
envlist = py{38,39,310,311,312}
isolated_build = true

[testenv]
Expand All @@ -13,7 +13,7 @@ commands =
[testenv:pytest]
# Run the python tests.
# To execute, run `tox -e pytest`
envlist = py37, py38, py39, py310, py311
envlist = py{38,39,310,311,312}
commands =
poetry install -v
poetry run pytest
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
from __future__ import annotations

import sys
{%- if cookiecutter.auth_method in ("OAuth2", "JWT") %}
from functools import cached_property
{%- endif %}
from typing import Any, Callable, Iterable

import requests
Expand Down Expand Up @@ -38,14 +41,6 @@

{% endif -%}

{%- if cookiecutter.auth_method in ("OAuth2", "JWT") -%}
if sys.version_info >= (3, 8):
from functools import cached_property
else:
from cached_property import cached_property

{% endif -%}

if sys.version_info >= (3, 9):
import importlib.resources as importlib_resources
else:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ jobs:
GITHUB_TOKEN: {{ '${{secrets.GITHUB_TOKEN}}' }}
strategy:
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Python {{ '${{ matrix.python-version }}' }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: {{ '${{ matrix.python-version }}' }}
- name: Install Poetry
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,20 @@ repos:
- id: trailing-whitespace

- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.27.2
rev: 0.27.3
hooks:
- id: check-dependabot
- id: check-github-workflows

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.1.6
rev: v0.1.11
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix, --show-fixes]
- id: ruff-format

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.7.1
rev: v1.8.0
hooks:
- id: mypy
additional_dependencies:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,15 @@ keywords = [
"ELT",
"{{cookiecutter.destination_name}}",
]
classifiers = [
"Intended Audience :: Developers",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
]
license = "Apache-2.0"
{%- if cookiecutter.variant != "None (Skip)" %}
packages = [
Expand All @@ -20,7 +29,7 @@ packages = [
{%- endif %}

[tool.poetry.dependencies]
python = ">=3.8,<4"
python = ">=3.8"
singer-sdk = { version="~=0.34.1" }
fs-s3fs = { version = "~=1.1.1", optional = true }
{%- if cookiecutter.serialization_method != "SQL" %}
Expand All @@ -36,7 +45,7 @@ s3 = ["fs-s3fs"]

[tool.ruff]
src = ["{{cookiecutter.library_name}}"]
target-version = "py37"
target-version = "py38"

[tool.ruff.lint]
ignore = [
Expand All @@ -57,7 +66,7 @@ known-first-party = ["{{cookiecutter.library_name}}"]
convention = "google"

[build-system]
requires = ["poetry-core>=1.0.8"]
requires = ["poetry-core==1.8.1"]
build-backend = "poetry.core.masonry.api"

[tool.poetry.scripts]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# This file can be used to customize tox tests as well as other test frameworks like flake8 and mypy

[tox]
envlist = py37, py38, py39, py310, py311
envlist = py{38,39,310,311,312}
isolated_build = true

[testenv]
Expand All @@ -13,7 +13,7 @@ commands =
[testenv:pytest]
# Run the python tests.
# To execute, run `tox -e pytest`
envlist = py37, py38, py39, py310, py311
envlist = py{38,39,310,311,312}
commands =
poetry install -v
poetry run pytest

0 comments on commit 27f0745

Please sign in to comment.