Skip to content

Commit

Permalink
Merge branch 'main' into 1836-bug-_parse_timestamps_in_record-throws-…
Browse files Browse the repository at this point in the history
…exception-for-key-not-present-in-schema
  • Loading branch information
edgarrmondragon authored Jul 20, 2023
2 parents 3ed9f0d + 384cff7 commit e73adff
Show file tree
Hide file tree
Showing 18 changed files with 131 additions and 89 deletions.
7 changes: 7 additions & 0 deletions .github/stale.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# This config file extends the shared Meltano GitHub org stale bot config:
# https://github.com/meltano/.github/blob/main/.github/stale.yml

_extends: .github

# In most cases, this file should not be updated.
# Updates to the stale bot config should be shared by all Meltano GitHub repositories.
2 changes: 1 addition & 1 deletion .github/workflows/constraints.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pip==23.1.2
pip==23.2
poetry==1.5.1
pre-commit==3.3.3
nox==2023.4.22
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/cookiecutter-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
poetry --version
- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v4.6.1
uses: actions/setup-python@v4.7.0
with:
python-version: ${{ matrix.python-version }}
architecture: x64
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
uses: actions/checkout@v3.5.3

- name: Set up Python
uses: actions/setup-python@v4.6.1
uses: actions/setup-python@v4.7.0
with:
python-version: "3.10"

Expand Down Expand Up @@ -56,4 +56,4 @@ jobs:
file_glob: true

- name: Publish
uses: pypa/gh-action-pypi-publish@v1.8.7
uses: pypa/gh-action-pypi-publish@v1.8.8
6 changes: 3 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ jobs:
poetry --version
- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v4.6.1
uses: actions/setup-python@v4.7.0
with:
python-version: ${{ matrix.python-version }}
architecture: x64
Expand Down Expand Up @@ -121,7 +121,7 @@ jobs:
poetry --version
- name: Setup Python 3.10
uses: actions/setup-python@v4.6.1
uses: actions/setup-python@v4.7.0
with:
python-version: '3.10'
architecture: x64
Expand Down Expand Up @@ -161,7 +161,7 @@ jobs:
poetry --version
- name: Set up Python
uses: actions/setup-python@v4.6.1
uses: actions/setup-python@v4.7.0
with:
python-version: '3.10'
cache: 'pip'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/version_bump.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
fetch-depth: 0

- name: Set up Python
uses: actions/setup-python@v4.6.1
uses: actions/setup-python@v4.7.0
with:
python-version: "3.10"
architecture: x64
Expand Down
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,17 +36,17 @@ repos:
)$
- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.23.2
rev: 0.23.3
hooks:
- id: check-dependabot
- id: check-github-workflows
- id: check-readthedocs

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.0.277
rev: v0.0.278
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
args: [--fix, --exit-non-zero-on-fix, --show-fixes]
exclude: |
(?x)^(
cookiecutter/.*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ repos:
rev: v0.0.269
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
args: [--fix, --exit-non-zero-on-fix, --show-fixes]

- repo: https://github.com/psf/black
rev: 23.3.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ repos:
rev: v0.0.269
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
args: [--fix, --exit-non-zero-on-fix, --show-fixes]

- repo: https://github.com/psf/black
rev: 23.3.0
Expand Down
2 changes: 1 addition & 1 deletion docs/cli_commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ plugins:
extractors:
- name: my-tap
namespace: my_tap
executable: ./my-tap.sh
executable: -e .
capabilities:
- state
- catalog
Expand Down
94 changes: 47 additions & 47 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -215,11 +215,13 @@ requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"

[tool.poetry.scripts]
pytest11 = { callable = "singer_sdk:testing.pytest_plugin", extras = ["testing"] }
pytest11 = { reference = "singer_sdk:testing.pytest_plugin", extras = ["testing"], type = "console" }

[tool.ruff]
exclude = [
"cookiecutter/*",
"singer_sdk/helpers/_simpleeval.py",
"tests/core/test_simpleeval.py",
]
ignore = [
"ANN101", # Missing type annotation for `self` in method
Expand Down
7 changes: 5 additions & 2 deletions singer_sdk/sinks/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,9 @@ def datetime_error_treatment(self) -> DatetimeErrorTreatmentEnum:
def key_properties(self) -> list[str]:
"""Return key properties.
Override this method to return a list of key properties in a format that is
compatible with the target.
Returns:
A list of stream key properties.
"""
Expand Down Expand Up @@ -331,10 +334,10 @@ def _singer_validate_message(self, record: dict) -> None:
Raises:
MissingKeyPropertiesError: If record is missing one or more key properties.
"""
if not all(key_property in record for key_property in self.key_properties):
if any(key_property not in record for key_property in self._key_properties):
msg = (
f"Record is missing one or more key_properties. \n"
f"Key Properties: {self.key_properties}, "
f"Key Properties: {self._key_properties}, "
f"Record Keys: {list(record.keys())}"
)
raise MissingKeyPropertiesError(
Expand Down
Loading

0 comments on commit e73adff

Please sign in to comment.