Skip to content

Commit ce5a41e

Browse files
Merge branch 'main' into edgarrmondragon/feat/signals
2 parents b795525 + 3de2b98 commit ce5a41e

File tree

8 files changed

+133
-55
lines changed

8 files changed

+133
-55
lines changed

.github/workflows/constraints.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
griffe==1.1.0
1+
griffe==1.2.0
22
pip==24.2
33
poetry==1.8.3
44
poetry-plugin-export==1.8.0

.pre-commit-config.yaml

Lines changed: 2 additions & 2 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.1
46+
rev: 0.29.2
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.6.1
53+
rev: v0.6.2
5454
hooks:
5555
- id: ruff
5656
args: [--fix, --exit-non-zero-on-fix, --show-fixes]

cookiecutter/mapper-template/{{cookiecutter.mapper_id}}/.github/workflows/test.yml

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,26 @@
33

44
name: Test {{cookiecutter.mapper_id}}
55

6-
on: [push]
6+
on:
7+
push:
8+
branches: [main]
9+
paths:
10+
- .github/workflows/test.yml
11+
- {{ cookiecutter.library_name }}/**
12+
- tests/**
13+
- poetry.lock
14+
- pyproject.toml
15+
- tox.ini
16+
pull_request:
17+
branches: [main]
18+
paths:
19+
- .github/workflows/test.yml
20+
- {{ cookiecutter.library_name }}/**
21+
- tests/**
22+
- poetry.lock
23+
- pyproject.toml
24+
- tox.ini
25+
workflow_dispatch:
726

827
jobs:
928
pytest:
@@ -13,7 +32,12 @@ jobs:
1332
strategy:
1433
fail-fast: false
1534
matrix:
16-
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
35+
python-version:
36+
- "3.8"
37+
- "3.9"
38+
- "3.10"
39+
- "3.11"
40+
- "3.12"
1741
steps:
1842
- uses: actions/checkout@v4
1943
- name: Set up Python {{ '${{ matrix.python-version }}' }}

cookiecutter/tap-template/{{cookiecutter.tap_id}}/.github/workflows/test.yml

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,26 @@
33

44
name: Test {{cookiecutter.tap_id}}
55

6-
on: [push]
6+
on:
7+
push:
8+
branches: [main]
9+
paths:
10+
- .github/workflows/test.yml
11+
- {{ cookiecutter.library_name }}/**
12+
- tests/**
13+
- poetry.lock
14+
- pyproject.toml
15+
- tox.ini
16+
pull_request:
17+
branches: [main]
18+
paths:
19+
- .github/workflows/test.yml
20+
- {{ cookiecutter.library_name }}/**
21+
- tests/**
22+
- poetry.lock
23+
- pyproject.toml
24+
- tox.ini
25+
workflow_dispatch:
726

827
jobs:
928
pytest:
@@ -13,7 +32,12 @@ jobs:
1332
strategy:
1433
fail-fast: false
1534
matrix:
16-
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
35+
python-version:
36+
- "3.8"
37+
- "3.9"
38+
- "3.10"
39+
- "3.11"
40+
- "3.12"
1741
steps:
1842
- uses: actions/checkout@v4
1943
- name: Set up Python {{ '${{ matrix.python-version }}' }}

cookiecutter/target-template/{{cookiecutter.target_id}}/.github/workflows/test.yml

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,26 @@
33

44
name: Test {{cookiecutter.target_id}}
55

6-
on: [push]
6+
on:
7+
push:
8+
branches: [main]
9+
paths:
10+
- .github/workflows/test.yml
11+
- {{ cookiecutter.library_name }}/**
12+
- tests/**
13+
- poetry.lock
14+
- pyproject.toml
15+
- tox.ini
16+
pull_request:
17+
branches: [main]
18+
paths:
19+
- .github/workflows/test.yml
20+
- {{ cookiecutter.library_name }}/**
21+
- tests/**
22+
- poetry.lock
23+
- pyproject.toml
24+
- tox.ini
25+
workflow_dispatch:
726

827
jobs:
928
pytest:
@@ -13,7 +32,12 @@ jobs:
1332
strategy:
1433
fail-fast: false
1534
matrix:
16-
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
35+
python-version:
36+
- "3.8"
37+
- "3.9"
38+
- "3.10"
39+
- "3.11"
40+
- "3.12"
1741
steps:
1842
- uses: actions/checkout@v4
1943
- name: Set up Python {{ '${{ matrix.python-version }}' }}

poetry.lock

Lines changed: 40 additions & 36 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ pyarrow = { version = ">=13", optional = true }
9090
pytest = {version=">=7.2.1", optional = true}
9191

9292
# installed as optional 'faker' extra
93-
faker = {version = ">=22.5,<27.0", optional = true}
93+
faker = {version = ">=22.5,<29.0", optional = true}
9494

9595
# Crypto extras
9696
cryptography = { version = ">=3.4.6", optional = true }

singer_sdk/sinks/core.py

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -611,7 +611,7 @@ def _after_process_record(self, context: dict) -> None:
611611

612612
# SDK developer overrides:
613613

614-
def preprocess_record(self, record: dict, context: dict) -> dict: # noqa: ARG002, PLR6301
614+
def preprocess_record(self, record: dict, context: dict) -> dict: # noqa: PLR6301, ARG002
615615
"""Process incoming record and return a modified result.
616616
617617
Args:
@@ -743,12 +743,15 @@ def process_batch_files(
743743
tail,
744744
mode="rb",
745745
) as file:
746-
context_file = (
747-
gzip_open(file) if encoding.compression == "gzip" else file
748-
)
749-
context = {
750-
"records": [deserialize_json(line) for line in context_file] # type: ignore[attr-defined]
751-
}
746+
if encoding.compression == "gzip":
747+
with gzip_open(file) as context_file:
748+
context = {
749+
"records": [
750+
deserialize_json(line) for line in context_file
751+
]
752+
}
753+
else:
754+
context = {"records": [deserialize_json(line) for line in file]}
752755
self.process_batch(context)
753756
elif (
754757
importlib.util.find_spec("pyarrow")
@@ -760,8 +763,7 @@ def process_batch_files(
760763
tail,
761764
mode="rb",
762765
) as file:
763-
context_file = file
764-
table = pq.read_table(context_file)
766+
table = pq.read_table(file)
765767
context = {"records": table.to_pylist()}
766768
self.process_batch(context)
767769
else:

0 commit comments

Comments
 (0)