Skip to content

Commit

Permalink
Merge branch 'main' into edgarrmondragon/feat/python3.13
Browse files Browse the repository at this point in the history
  • Loading branch information
edgarrmondragon committed Oct 2, 2024
2 parents 8541ff8 + 743bfaf commit be2cb48
Show file tree
Hide file tree
Showing 30 changed files with 2,525 additions and 1,349 deletions.
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,14 @@ repos:
)$
- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.29.2
rev: 0.29.3
hooks:
- id: check-dependabot
- id: check-github-workflows
- id: check-readthedocs

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.6.7
rev: v0.6.8
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix, --show-fixes]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,4 @@ jobs:
- name: Publish
## TODO: create a trusted publisher on PyPI
## https://docs.pypi.org/trusted-publishers/
uses: pypa/gh-action-pypi-publish@v1.9.0
uses: pypa/gh-action-pypi-publish@v1.10.2
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,12 @@ on:
- tox.ini
workflow_dispatch:

env:
FORCE_COLOR: 1

jobs:
pytest:
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: {{ '${{secrets.GITHUB_TOKEN}}' }}
strategy:
fail-fast: false
matrix:
Expand All @@ -43,13 +44,7 @@ jobs:
uses: actions/setup-python@v5
with:
python-version: {{ '${{ matrix.python-version }}' }}
- name: Install Poetry
run: |
pip install poetry
- name: Install dependencies
run: |
poetry env use {{ '${{ matrix.python-version }}' }}
poetry install
- name: Test with pytest
- run: pipx install tox
- name: Run Tox
run: |
poetry run pytest
tox -e $(echo py{{ '${{ matrix.python-version }}' }} | tr -d .)
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@ repos:
- id: trailing-whitespace

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

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.6.4
rev: v0.6.8
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix, --show-fixes]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ python_version = "3.12"
warn_unused_configs = true

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

[tool.ruff.lint]
Expand All @@ -64,14 +63,11 @@ select = ["ALL"]
[tool.ruff.lint.flake8-annotations]
allow-star-arg-any = true

[tool.ruff.lint.isort]
known-first-party = ["{{cookiecutter.library_name}}"]

[tool.ruff.lint.pydocstyle]
convention = "google"

[build-system]
requires = ["poetry-core==1.9.0"]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"

[tool.poetry.scripts]
Expand Down
17 changes: 5 additions & 12 deletions cookiecutter/mapper-template/{{cookiecutter.mapper_id}}/tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,11 @@

[tox]
envlist = py3{9,10,11,12,13}
isolated_build = true
requires =
tox>=4.19

[testenv]
allowlist_externals = poetry
deps =
pytest
commands =
poetry install -v
poetry run pytest

[testenv:pytest]
# Run the python tests.
# To execute, run `tox -e pytest`
envlist = py3{9,10,11,12,13}
commands =
poetry install -v
poetry run pytest
pytest {posargs}
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,4 @@ jobs:
- name: Publish
## TODO: create a trusted publisher on PyPI
## https://docs.pypi.org/trusted-publishers/
uses: pypa/gh-action-pypi-publish@v1.9.0
uses: pypa/gh-action-pypi-publish@v1.10.2
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,12 @@ on:
- tox.ini
workflow_dispatch:

env:
FORCE_COLOR: 1

jobs:
pytest:
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: {{ '${{secrets.GITHUB_TOKEN}}' }}
strategy:
fail-fast: false
matrix:
Expand All @@ -43,13 +44,7 @@ jobs:
uses: actions/setup-python@v5
with:
python-version: {{ '${{ matrix.python-version }}' }}
- name: Install Poetry
run: |
pip install poetry
- name: Install dependencies
run: |
poetry env use {{ '${{ matrix.python-version }}' }}
poetry install
- name: Test with pytest
- run: pipx install tox
- name: Run Tox
run: |
poetry run pytest
tox -e $(echo py{{ '${{ matrix.python-version }}' }} | tr -d .)
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@ repos:
- id: trailing-whitespace

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

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.6.4
rev: v0.6.8
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix, --show-fixes]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ Now you can test and orchestrate using Meltano:
# Test invocation:
meltano invoke {{ cookiecutter.tap_id }} --version
# OR run a test `elt` pipeline:
meltano elt {{ cookiecutter.tap_id }} target-jsonl
meltano run {{ cookiecutter.tap_id }} target-jsonl
```

### SDK Dev Guide
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ packages = [

[tool.poetry.dependencies]
python = ">=3.9"
importlib-resources = { version = "==6.4.*", python = "<3.9" }
singer-sdk = { version="~=0.40.0", extras = [
{%- if cookiecutter.auth_method == "JWT" -%}"jwt", {% endif -%}
{%- if cookiecutter.faker_extra -%}"faker",{%- endif -%}
Expand Down Expand Up @@ -64,7 +63,6 @@ plugins = "sqlmypy"
{%- endif %}

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

[tool.ruff.lint]
Expand All @@ -79,14 +77,11 @@ select = ["ALL"]
[tool.ruff.lint.flake8-annotations]
allow-star-arg-any = true

[tool.ruff.lint.isort]
known-first-party = ["{{cookiecutter.library_name}}"]

[tool.ruff.lint.pydocstyle]
convention = "google"

[build-system]
requires = ["poetry-core==1.9.0"]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"

[tool.poetry.scripts]
Expand Down
17 changes: 5 additions & 12 deletions cookiecutter/tap-template/{{cookiecutter.tap_id}}/tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,11 @@

[tox]
envlist = py3{9,10,11,12,13}
isolated_build = true
requires =
tox>=4.19

[testenv]
allowlist_externals = poetry
deps =
pytest
commands =
poetry install -v
poetry run pytest

[testenv:pytest]
# Run the python tests.
# To execute, run `tox -e pytest`
envlist = py3{9,10,11,12,13}
commands =
poetry install -v
poetry run pytest
pytest {posargs}
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,4 @@ jobs:
- name: Publish
## TODO: create a trusted publisher on PyPI
## https://docs.pypi.org/trusted-publishers/
uses: pypa/gh-action-pypi-publish@v1.9.0
uses: pypa/gh-action-pypi-publish@v1.10.2
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,12 @@ on:
- tox.ini
workflow_dispatch:

env:
FORCE_COLOR: 1

jobs:
pytest:
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: {{ '${{secrets.GITHUB_TOKEN}}' }}
strategy:
fail-fast: false
matrix:
Expand All @@ -43,13 +44,7 @@ jobs:
uses: actions/setup-python@v5
with:
python-version: {{ '${{ matrix.python-version }}' }}
- name: Install Poetry
run: |
pip install poetry
- name: Install dependencies
run: |
poetry env use {{ '${{ matrix.python-version }}' }}
poetry install
- name: Test with pytest
- run: pipx install tox
- name: Run Tox
run: |
poetry run pytest
tox -e $(echo py{{ '${{ matrix.python-version }}' }} | tr -d .)
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@ repos:
- id: trailing-whitespace

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

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.6.4
rev: v0.6.8
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix, --show-fixes]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ python_version = "3.12"
warn_unused_configs = true

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

[tool.ruff.lint]
Expand All @@ -66,14 +65,11 @@ select = ["ALL"]
[tool.ruff.lint.flake8-annotations]
allow-star-arg-any = true

[tool.ruff.lint.isort]
known-first-party = ["{{cookiecutter.library_name}}"]

[tool.ruff.lint.pydocstyle]
convention = "google"

[build-system]
requires = ["poetry-core==1.9.0"]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"

[tool.poetry.scripts]
Expand Down
17 changes: 5 additions & 12 deletions cookiecutter/target-template/{{cookiecutter.target_id}}/tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,11 @@

[tox]
envlist = py3{9,10,11,12,13}
isolated_build = true
requires =
tox>=4.19

[testenv]
allowlist_externals = poetry
deps =
pytest
commands =
poetry install -v
poetry run pytest

[testenv:pytest]
# Run the python tests.
# To execute, run `tox -e pytest`
envlist = py3{9,10,11,12,13}
commands =
poetry install -v
poetry run pytest
pytest {posargs}
Loading

0 comments on commit be2cb48

Please sign in to comment.