Skip to content

Commit

Permalink
Merge branch 'main' into edgarrmondragon/refactor/jsonschema-draft-20…
Browse files Browse the repository at this point in the history
…2012
  • Loading branch information
edgarrmondragon authored Oct 18, 2024
2 parents 25d1670 + 316282e commit 95a6047
Show file tree
Hide file tree
Showing 31 changed files with 333 additions and 149 deletions.
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/bug.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ body:
description: Version of Python you are using
options:
- "NA"
- "3.13"
- "3.12"
- "3.11"
- "3.10"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/api-changes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: 3.12
python-version: 3.x

- name: Install tools
env:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codspeed.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: 3.12
python-version: 3.x
architecture: x64

- name: Install poetry
Expand Down
17 changes: 5 additions & 12 deletions .github/workflows/cookiecutter-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,8 @@ env:

jobs:
lint:
name: Cookiecutter E2E Python ${{ matrix.python-version }} / ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: true
matrix:
include:
- { python-version: "3.12", os: "ubuntu-latest" }

name: Cookiecutter E2E Python
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Upgrade pip
Expand All @@ -50,8 +44,7 @@ jobs:
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
architecture: x64
python-version: 3.x
cache: 'pip'
cache-dependency-path: 'poetry.lock'

Expand All @@ -69,12 +62,12 @@ jobs:
- name: Run Nox
run: |
nox --python=${{ matrix.python-version }} --session=test_cookiecutter
nox --session=test_cookiecutter
- uses: actions/upload-artifact@v4
if: always()
with:
name: cookiecutter-${{ matrix.os }}-py${{ matrix.python-version }}
name: cookiecutter-ubuntu-latest-py3x
path: |
/tmp/tap-*
/tmp/target-*
Expand Down
20 changes: 16 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,17 @@ jobs:
matrix:
session: [tests]
os: ["ubuntu-latest", "macos-latest", "windows-latest"]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
python-version:
- "3.8"
- "3.9"
- "3.10"
- "3.11"
- "3.12"
- "3.13"
sqlalchemy: ["2"]
include:
- { session: tests, python-version: "3.12", os: "ubuntu-latest", sqlalchemy: "1" }
- { session: doctest, python-version: "3.12", os: "ubuntu-latest", sqlalchemy: "2" }
- { session: tests, python-version: "3.13", os: "ubuntu-latest", sqlalchemy: "1" }
- { session: doctest, python-version: "3.13", os: "ubuntu-latest", sqlalchemy: "2" }
- { session: mypy, python-version: "3.12", os: "ubuntu-latest", sqlalchemy: "2" }
- { session: deps, python-version: "3.12", os: "ubuntu-latest", sqlalchemy: "2" }

Expand All @@ -64,6 +70,7 @@ jobs:
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
allow-prereleases: true

- name: Upgrade pip
env:
Expand All @@ -88,6 +95,8 @@ jobs:
- name: Run Nox
env:
SQLALCHEMY_VERSION: ${{ matrix.sqlalchemy }}
PIP_PRE: "1"
UV_PRERELEASE: allow
run: |
nox --verbose
Expand Down Expand Up @@ -134,6 +143,9 @@ jobs:
nox --version
- name: Run Nox
env:
PIP_PRE: "1"
UV_PRERELEASE: allow
run: |
nox -- -m "external"
Expand All @@ -147,7 +159,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.12'
python-version: '3.x'

- name: Upgrade pip
env:
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/version_bump.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,7 @@ jobs:

- uses: actions/setup-python@v5
with:
python-version: "3.12"
architecture: x64
python-version: "3.x"

- name: Bump version
id: cz-bump
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ repos:
- id: trailing-whitespace

- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.29.3
rev: 0.29.4
hooks:
- id: check-dependabot
- id: check-github-workflows
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ classifiers = [
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
]
license = "Apache-2.0"
{%- if cookiecutter.variant != "None (Skip)" %}
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 = py3{9,10,11,12}
envlist = py3{9,10,11,12,13}
requires =
tox>=4.19

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ classifiers = [
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
]
license = "Apache-2.0"
{%- if cookiecutter.variant != "None (Skip)" %}
Expand Down
2 changes: 1 addition & 1 deletion 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 = py3{9,10,11,12}
envlist = py3{9,10,11,12,13}
requires =
tox>=4.19

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ classifiers = [
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
]
license = "Apache-2.0"
{%- if cookiecutter.variant != "None (Skip)" %}
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 = py3{9,10,11,12}
envlist = py3{9,10,11,12,13}
requires =
tox>=4.19

Expand Down
16 changes: 13 additions & 3 deletions docs/implementation/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,19 @@ values from environment variables, and from a `.env` file if present within the
working directory, which match the exact name of a setting, along with a prefix determined
by the plugin name.

> For example: For a sample plugin named `tap-my-example` and settings named "username" and "access_key", the SDK will automatically scrape
> the settings from environment variables `TAP_MY_EXAMPLE_USERNAME` and
> `TAP_MY_EXAMPLE_ACCESS_KEY`, if they exist.
```{note}
For example, for a sample plugin named `tap-my-example` and settings named `username` and `access_key`, the SDK will automatically scrape
the settings from environment variables `TAP_MY_EXAMPLE_USERNAME` and
`TAP_MY_EXAMPLE_ACCESS_KEY` respectively, if they exist.
```

The following value types are automatically cast to the appropriate Python type:

- integer (e.g. `TAP_MY_EXAMPLE_PORT=5432`)
- boolean (e.g. `TAP_MY_EXAMPLE_DEBUG=true`)
- JSON arrays (e.g. `TAP_MY_EXAMPLE_ARRAY='["a", "b", "c"]'`)
- JSON objects (e.g. `TAP_MY_EXAMPLE_OBJECT='{"key": "value"}'`)


## Tap-Specific CLI Options

Expand Down
27 changes: 23 additions & 4 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import shutil
import sys
import tempfile
import typing as t
from pathlib import Path

import nox
Expand All @@ -23,7 +24,14 @@
COOKIECUTTER_REPLAY_FILES = list(Path("./e2e-tests/cookiecutters").glob("*.json"))

package = "singer_sdk"
python_versions = ["3.12", "3.11", "3.10", "3.9", "3.8"]
python_versions = [
"3.13",
"3.12",
"3.11",
"3.10",
"3.9",
"3.8",
]
main_python_version = "3.12"
locations = "singer_sdk", "tests", "noxfile.py", "docs/conf.py"
nox.options.sessions = (
Expand All @@ -35,7 +43,7 @@
)

poetry_config = nox.project.load_toml("pyproject.toml")["tool"]["poetry"]
test_dependencies = poetry_config["group"]["dev"]["dependencies"].keys()
test_dependencies: dict[str, t.Any] = poetry_config["group"]["dev"]["dependencies"]
typing_dependencies = poetry_config["group"]["typing"]["dependencies"].keys()


Expand All @@ -53,7 +61,18 @@ def mypy(session: nox.Session) -> None:
@nox.session(python=python_versions)
def tests(session: nox.Session) -> None:
"""Execute pytest tests and compute coverage."""
session.install(".[faker,jwt,parquet,s3]")
extras = [
"faker",
"jwt",
"parquet",
"s3",
]

if session.python == "3.13":
# https://github.com/apache/arrow/issues/43519
extras.remove("parquet")

session.install(f".[{','.join(extras)}]")
session.install(*test_dependencies)

sqlalchemy_version = os.environ.get("SQLALCHEMY_VERSION")
Expand Down Expand Up @@ -95,7 +114,7 @@ def benches(session: nox.Session) -> None:
)


@nox.session(name="deps", python=python_versions)
@nox.session(name="deps", python=main_python_version)
def dependencies(session: nox.Session) -> None:
"""Check issues with dependencies."""
session.install(".[s3,testing]")
Expand Down
Loading

0 comments on commit 95a6047

Please sign in to comment.