Skip to content

Commit c2ca5e2

Browse files
Merge branch 'main' into edgarrmondragon/refactor/capabilities
2 parents 5b4a7e6 + 39e1619 commit c2ca5e2

File tree

111 files changed

+3118
-1896
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

111 files changed

+3118
-1896
lines changed

.flake8

Lines changed: 0 additions & 10 deletions
This file was deleted.

.github/ISSUE_TEMPLATE/bug.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ body:
1313
attributes:
1414
label: Singer SDK Version
1515
description: Version of the library you are using
16-
placeholder: "0.38.0"
16+
placeholder: "0.39.1"
1717
validations:
1818
required: true
1919
- type: checkboxes

.github/dependabot.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ updates:
66
interval: weekly
77
time: "12:00"
88
reviewers: [meltano/engineering]
9-
labels: [deps]
9+
labels: [Dependencies]
1010
groups:
1111
development-dependencies:
1212
dependency-type: development
@@ -21,7 +21,7 @@ updates:
2121
interval: weekly
2222
time: "12:00"
2323
reviewers: [meltano/engineering]
24-
labels: [deps]
24+
labels: [Dependencies]
2525
groups:
2626
ci:
2727
patterns:
@@ -31,7 +31,7 @@ updates:
3131
schedule:
3232
interval: weekly
3333
reviewers: [meltano/engineering]
34-
labels: [deps]
34+
labels: [Dependencies]
3535
groups:
3636
actions:
3737
patterns:

.github/semantic.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ types:
1515
- docs
1616
- feat
1717
- fix
18+
- packaging
1819
- perf
1920
- refactor
2021
- revert

.github/workflows/api-changes.yml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: API Changes
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- singer_sdk/**
7+
- .github/workflows/api-changes.yml
8+
- CHANGELOG.md
9+
workflow_dispatch:
10+
11+
concurrency:
12+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
13+
cancel-in-progress: true
14+
15+
permissions: # added using https://github.com/step-security/secure-repo
16+
contents: read
17+
18+
jobs:
19+
check-api-changes:
20+
name: Check API Changes
21+
runs-on: ubuntu-latest
22+
env:
23+
NOXSESSION: api
24+
steps:
25+
- name: Check out the repository
26+
uses: actions/checkout@v4
27+
with:
28+
fetch-depth: 0
29+
30+
- name: Setup Python
31+
uses: actions/setup-python@v5
32+
with:
33+
python-version: 3.12
34+
35+
- name: Install tools
36+
env:
37+
PIP_CONSTRAINT: ${{ github.workspace }}/.github/workflows/constraints.txt
38+
run: |
39+
python -Im pip install -U pip
40+
pipx install griffe nox
41+
pipx inject nox nox-poetry
42+
pipx list
43+
44+
- name: Set REF
45+
id: set-ref
46+
if: always() && !startsWith(github.head_ref, 'release/')
47+
run: |
48+
echo "ref=${{ github.event.pull_request.base.sha }}" >> $GITHUB_OUTPUT
49+
50+
# Check API against the latest commit on the base branch
51+
- name: Run Nox
52+
run: |
53+
nox -- ${{ steps.set-ref.outputs.ref }}

.github/workflows/codspeed.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ jobs:
4848
--with benchmark
4949
--all-extras
5050
51-
- uses: CodSpeedHQ/action@v2
51+
- uses: CodSpeedHQ/action@v3
5252
with:
5353
token: ${{ secrets.CODSPEED_TOKEN }}
5454
run: pytest tests/ --codspeed

.github/workflows/constraints.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
pip==24.1.2
1+
griffe==0.48.0
2+
pip==24.2
23
poetry==1.8.3
34
poetry-plugin-export==1.8.0
45
poetry-dynamic-versioning==1.4.0
5-
pre-commit==3.7.1
6+
pre-commit==3.8.0
67
nox==2024.4.15
78
nox-poetry==1.0.3

.github/workflows/test.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -113,9 +113,6 @@ jobs:
113113
SAMPLE_TAP_GITLAB_GROUP_IDS: ${{ secrets.SAMPLE_TAP_GITLAB_GROUP_IDS }}
114114
SAMPLE_TAP_GITLAB_PROJECT_IDS: ${{ secrets.SAMPLE_TAP_GITLAB_PROJECT_IDS }}
115115
SAMPLE_TAP_GITLAB_START_DATE: "2022-01-01T00:00:00Z"
116-
SAMPLE_TAP_GOOGLE_ANALYTICS_CLIENT_EMAIL: ${{ secrets.SAMPLE_TAP_GOOGLE_ANALYTICS_CLIENT_EMAIL }}
117-
SAMPLE_TAP_GOOGLE_ANALYTICS_PRIVATE_KEY: ${{ secrets.SAMPLE_TAP_GOOGLE_ANALYTICS_PRIVATE_KEY }}
118-
SAMPLE_TAP_GOOGLE_ANALYTICS_VIEW_ID: ${{ secrets.SAMPLE_TAP_GOOGLE_ANALYTICS_VIEW_ID }}
119116

120117
steps:
121118
- uses: actions/checkout@v4

.pre-commit-config.yaml

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -43,14 +43,14 @@ repos:
4343
)$
4444
4545
- repo: https://github.com/python-jsonschema/check-jsonschema
46-
rev: 0.29.0
46+
rev: 0.29.1
4747
hooks:
4848
- id: check-dependabot
4949
- id: check-github-workflows
5050
- id: check-readthedocs
5151

5252
- repo: https://github.com/astral-sh/ruff-pre-commit
53-
rev: v0.5.2
53+
rev: v0.5.7
5454
hooks:
5555
- id: ruff
5656
args: [--fix, --exit-non-zero-on-fix, --show-fixes]
@@ -64,18 +64,6 @@ repos:
6464
cookiecutter/.*
6565
)$
6666
67-
- repo: https://github.com/pycqa/flake8
68-
rev: 7.1.0
69-
hooks:
70-
- id: flake8
71-
additional_dependencies:
72-
- darglint==1.8.1
73-
files: |
74-
(?x)^(
75-
singer_sdk/.*|
76-
samples/.*
77-
)$
78-
7967
- repo: https://github.com/python-poetry/poetry
8068
rev: 1.8.0
8169
hooks:

.readthedocs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ version: 2
33
build:
44
os: ubuntu-22.04
55
tools:
6-
python: "3.11"
6+
python: "3.12"
77

88
sphinx:
99
builder: html

CHANGELOG.md

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,57 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## v0.39.1 (2024-08-07)
9+
10+
### 🐛 Fixes
11+
12+
- [#2589](https://github.com/meltano/sdk/issues/2589) Make sink assertion compatible with stream maps -- _**Thanks @JCotton1123!**_
13+
- [#2592](https://github.com/meltano/sdk/issues/2592) Fixed typos in `--about` plain text output
14+
- [#2580](https://github.com/meltano/sdk/issues/2580) Date fields are now properly serialized as ISO dates, i.e. "YYYY-MM-DD"
15+
- [#2583](https://github.com/meltano/sdk/issues/2583) Quote add-column-ddl with column starting with `_` (underscore) based on engine -- _**Thanks @haleemur!**_
16+
- [#2582](https://github.com/meltano/sdk/issues/2582) DDL for adding a column now uses a SQLAlchemy-compiled clause to apply proper quoting -- _**Thanks @haleemur!**_
17+
- [#2418](https://github.com/meltano/sdk/issues/2418) Check replication method instead of key to determine if a SQL stream is sorted
18+
19+
### ⚙️ Under the Hood
20+
21+
- [#2520](https://github.com/meltano/sdk/issues/2520) Remove unused dependencies `pendulum` and `python-dateutil`
22+
23+
### 📚 Documentation Improvements
24+
25+
- [#2579](https://github.com/meltano/sdk/issues/2579) Documented support for `packaging` semantic type in contributing guide
26+
27+
## v0.39.0 (2024-07-27)
28+
29+
### ✨ New
30+
31+
- [#2432](https://github.com/meltano/sdk/issues/2432) Developers can now customize the default logging configuration for their taps/targets by adding `default_logging.yml` to their package
32+
- [#2531](https://github.com/meltano/sdk/issues/2531) The `json` module is now avaiable to stream maps -- _**Thanks @grigi!**_
33+
- [#2529](https://github.com/meltano/sdk/issues/2529) Stream sync context is now available to all instances methods as a `Stream.context` attribute
34+
35+
### 🐛 Fixes
36+
37+
- [#2554](https://github.com/meltano/sdk/issues/2554) Use mapped stream aliases when handling `ACTIVATE_VERSION` messages in the base target class
38+
- [#2526](https://github.com/meltano/sdk/issues/2526) Moved up the supported Python versions in the Markdown output of `--about`
39+
40+
### ⚙️ Under the Hood
41+
42+
- [#2564](https://github.com/meltano/sdk/issues/2564) Make `SQLSink` a generic with a `SQLConnector` type parameter
43+
- [#2540](https://github.com/meltano/sdk/issues/2540) Implement abstract `serialize_message` for Singer writers
44+
- [#2259](https://github.com/meltano/sdk/issues/2259) Centralize JSON SerDe into helper functions -- _**Thanks @BuzzCutNorman!**_
45+
- [#2525](https://github.com/meltano/sdk/issues/2525) Make `PyJWT` and `cryptography` dependencies optional
46+
- [#2528](https://github.com/meltano/sdk/issues/2528) Moved class-level attributes to the top in REST tap template
47+
- [#2132](https://github.com/meltano/sdk/issues/2132) Limit internal usage of pendulum
48+
49+
### 📚 Documentation Improvements
50+
51+
- [#2557](https://github.com/meltano/sdk/issues/2557) Document that `get_starting_timestamp` requires setting a non-null replication_key
52+
- [#2556](https://github.com/meltano/sdk/issues/2556) Reference state partitioning in stream partitioning page
53+
- [#2536](https://github.com/meltano/sdk/issues/2536) Prepare for RTD addons migration
54+
- [#2535](https://github.com/meltano/sdk/issues/2535) Added more intersphinx links to Python and Faker docs
55+
- [#2530](https://github.com/meltano/sdk/issues/2530) Explained how the request URL is generated from `url_base`, `path` and the sync context
56+
- [#2527](https://github.com/meltano/sdk/issues/2527) Updated the footer
57+
- [#2506](https://github.com/meltano/sdk/issues/2506) Fixed a typo in the stream maps docs
58+
859
## v0.38.0 (2024-06-17)
960

1061
### ✨ New

cookiecutter/mapper-template/{{cookiecutter.mapper_id}}/.pre-commit-config.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,19 +18,19 @@ repos:
1818
- id: trailing-whitespace
1919

2020
- repo: https://github.com/python-jsonschema/check-jsonschema
21-
rev: 0.28.6
21+
rev: 0.29.1
2222
hooks:
2323
- id: check-dependabot
2424
- id: check-github-workflows
2525

2626
- repo: https://github.com/astral-sh/ruff-pre-commit
27-
rev: v0.5.0
27+
rev: v0.5.6
2828
hooks:
2929
- id: ruff
3030
args: [--fix, --exit-non-zero-on-fix, --show-fixes]
3131
- id: ruff-format
3232

3333
- repo: https://github.com/pre-commit/mirrors-mypy
34-
rev: v1.10.1
34+
rev: v1.11.1
3535
hooks:
3636
- id: mypy

cookiecutter/mapper-template/{{cookiecutter.mapper_id}}/meltano.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,18 +13,26 @@ plugins:
1313
streams:
1414
- stream_name: animals
1515
input_filename: https://raw.githubusercontent.com/meltano/tap-smoke-test/main/demo-data/animals-data.jsonl
16+
1617
loaders:
1718
- name: target-jsonl
1819
variant: andyh1203
1920
pip_url: target-jsonl
21+
2022
mappers:
2123
- name: "{{cookiecutter.mapper_id}}"
22-
pip_url: -e .
2324
namespace: "{{cookiecutter.library_name}}"
24-
# TODO: replace these with the actual settings
25+
pip_url: -e .
26+
27+
# TODO: Declare settings and their types here:
2528
settings:
2629
- name: example_config
2730
kind: string
31+
label: Example Config
32+
description: An example configuration setting
33+
34+
# TODO: Declare mapping instances here:
35+
# https://docs.meltano.com/guide/mappers/#example-1
2836
mappings:
2937
- name: example
3038
config:

cookiecutter/mapper-template/{{cookiecutter.mapper_id}}/pyproject.toml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ name = "{{cookiecutter.variant}}-{{cookiecutter.mapper_id}}"
55
name = "{{cookiecutter.mapper_id}}"
66
{%- endif %}
77
version = "0.0.1"
8-
description = "`{{cookiecutter.mapper_id}}` is a Singer mapper {{cookiecutter.name}}, built with the Meltano Singer SDK."
8+
description = "Singer mapper {{cookiecutter.name}}, built with the Meltano Singer SDK."
99
readme = "README.md"
1010
authors = ["{{ cookiecutter.admin_name }} <{{ cookiecutter.admin_email }}>"]
1111
keywords = [
@@ -31,16 +31,19 @@ packages = [
3131

3232
[tool.poetry.dependencies]
3333
python = ">=3.8"
34-
singer-sdk = { version="~=0.38.0"{{ ', extras = ["faker"]' if cookiecutter.faker_extra }} }
34+
singer-sdk = { version="~=0.39.1"{{ ', extras = ["faker"]' if cookiecutter.faker_extra }} }
3535
fs-s3fs = { version = "~=1.1.1", optional = true }
3636

3737
[tool.poetry.group.dev.dependencies]
38-
pytest = ">=7.4.0"
39-
singer-sdk = { version="~=0.38.0", extras = ["testing"] }
38+
pytest = ">=8"
39+
singer-sdk = { version="~=0.39.1", extras = ["testing"] }
4040

4141
[tool.poetry.extras]
4242
s3 = ["fs-s3fs"]
4343

44+
[tool.pytest.ini_options]
45+
addopts = '--durations=10'
46+
4447
[tool.mypy]
4548
python_version = "3.12"
4649
warn_unused_configs = true

cookiecutter/tap-template/{{cookiecutter.tap_id}}/.pre-commit-config.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,20 +18,20 @@ repos:
1818
- id: trailing-whitespace
1919

2020
- repo: https://github.com/python-jsonschema/check-jsonschema
21-
rev: 0.28.6
21+
rev: 0.29.1
2222
hooks:
2323
- id: check-dependabot
2424
- id: check-github-workflows
2525

2626
- repo: https://github.com/astral-sh/ruff-pre-commit
27-
rev: v0.5.0
27+
rev: v0.5.6
2828
hooks:
2929
- id: ruff
3030
args: [--fix, --exit-non-zero-on-fix, --show-fixes]
3131
- id: ruff-format
3232

3333
- repo: https://github.com/pre-commit/mirrors-mypy
34-
rev: v1.10.1
34+
rev: v1.11.1
3535
hooks:
3636
- id: mypy
3737
additional_dependencies:

cookiecutter/tap-template/{{cookiecutter.tap_id}}/meltano.yml

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,32 @@ plugins:
1515
- discover
1616
- about
1717
- stream-maps
18-
config:
19-
start_date: '2010-01-01T00:00:00Z'
18+
19+
# TODO: Declare settings and their types here:
2020
settings:
21-
# TODO: To configure using Meltano, declare settings and their types here:
2221
- name: username
22+
label: Username
23+
description: The username to use for authentication
24+
2325
- name: password
2426
kind: password
27+
label: Password
28+
description: The password to use for authentication
2529
sensitive: true
30+
2631
- name: start_date
27-
value: '2010-01-01T00:00:00Z'
32+
kind: date_iso8601
33+
label: Start Date
34+
description: Initial date to start extracting data from
35+
36+
# TODO: Declare required settings here:
37+
settings_group_validation:
38+
- [username, password]
39+
40+
# TODO: Declare default configuration values here:
41+
config:
42+
start_date: '2010-01-01T00:00:00Z'
43+
2844
loaders:
2945
- name: target-jsonl
3046
variant: andyh1203

0 commit comments

Comments
 (0)