Skip to content

Commit

Permalink
Merge branch 'main' into 1676-fix-incremental-where-clause-typeerror
Browse files Browse the repository at this point in the history
  • Loading branch information
BuzzCutNorman authored Jun 21, 2023
2 parents f774494 + c6a8933 commit 43fa5c7
Show file tree
Hide file tree
Showing 61 changed files with 1,457 additions and 917 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ body:
attributes:
label: Singer SDK Version
description: Version of the library you are using
placeholder: "0.27.0"
placeholder: "0.28.0"
validations:
required: true
- type: checkboxes
Expand Down
5 changes: 3 additions & 2 deletions .github/ISSUE_TEMPLATE/feature.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,11 @@ body:
label: Feature scope
description: Functionality this new feature would impact
options:
- Taps (catalog, state, stream maps, etc.)
- Targets (data type handling, batching, SQL object generation, etc.)
- Taps (catalog, state, stream maps, tests, etc.)
- Targets (data type handling, batching, SQL object generation, tests, etc.)
- Configuration (settings parsing, validation, etc.)
- CLI (options, error messages, logging, etc.)
- Cookiecutter templates
- Other
validations:
required: true
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:

steps:
- name: Checkout repository
uses: actions/[email protected].2
uses: actions/[email protected].3

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/constraints.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
pip==23.1.2
poetry==1.5.0
pre-commit==3.3.2
poetry==1.5.1
pre-commit==3.3.3
nox==2023.4.22
nox-poetry==1.0.2
4 changes: 2 additions & 2 deletions .github/workflows/cookiecutter-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:

steps:
- name: Check out the repository
uses: actions/[email protected].2
uses: actions/[email protected].3

- name: Upgrade pip
env:
Expand All @@ -43,7 +43,7 @@ jobs:
poetry --version
- name: Setup Python ${{ matrix.python-version }}
uses: actions/[email protected].0
uses: actions/[email protected].1
with:
python-version: ${{ matrix.python-version }}
architecture: x64
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/dependency-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout the repository
uses: actions/[email protected].2
uses: actions/[email protected].3

- name: GitHub dependency vulnerability check
if: ${{ github.event_name == 'pull_request_target' }}
uses: actions/[email protected].4
uses: actions/[email protected].6
with:
fail-on-severity: high

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ jobs:

steps:
- name: Checkout code
uses: actions/[email protected].2
uses: actions/[email protected].3

- name: Set up Python
uses: actions/[email protected].0
uses: actions/[email protected].1
with:
python-version: "3.10"

Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:

steps:
- name: Check out the repository
uses: actions/[email protected].2
uses: actions/[email protected].3

- name: Install Poetry
env:
Expand All @@ -43,7 +43,7 @@ jobs:
poetry --version
- name: Setup Python ${{ matrix.python-version }}
uses: actions/[email protected].0
uses: actions/[email protected].1
with:
python-version: ${{ matrix.python-version }}
architecture: x64
Expand Down Expand Up @@ -91,7 +91,7 @@ jobs:

steps:
- name: Check out the repository
uses: actions/[email protected].2
uses: actions/[email protected].3

- name: Install Poetry
env:
Expand All @@ -101,7 +101,7 @@ jobs:
poetry --version
- name: Setup Python 3.10
uses: actions/[email protected].0
uses: actions/[email protected].1
with:
python-version: '3.10'
architecture: x64
Expand Down Expand Up @@ -133,15 +133,15 @@ jobs:
needs: tests
steps:
- name: Check out the repository
uses: actions/[email protected].2
uses: actions/[email protected].3

- name: Install Poetry
run: |
pipx install --pip-args=--constraint=.github/workflows/constraints.txt poetry
poetry --version
- name: Set up Python
uses: actions/[email protected].0
uses: actions/[email protected].1
with:
python-version: '3.10'
cache: 'pip'
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/version_bump.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,12 @@ jobs:
pull-requests: write # to create and update PRs

steps:
- uses: actions/[email protected].2
- uses: actions/[email protected].3
with:
fetch-depth: 0

- name: Set up Python
uses: actions/[email protected].0
uses: actions/[email protected].1
with:
python-version: "3.10"
architecture: x64
Expand Down
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,14 @@ repos:
)$
- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.23.0
rev: 0.23.2
hooks:
- id: check-dependabot
- id: check-github-workflows
- id: check-readthedocs

- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: v0.0.269
rev: v0.0.272
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
Expand Down
23 changes: 23 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,29 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## v0.28.0 (2023-06-05)

### ✨ New

- [#1728](https://github.com/meltano/sdk/issues/1728) Add an optional Dependabot file to projects generated from templates
- [#1572](https://github.com/meltano/sdk/issues/1572) Add `batch_config` handling in `append_builtin_config()` -- _**Thanks @aaronsteers!**_
- [#1686](https://github.com/meltano/sdk/issues/1686) Log stream errors
- [#1711](https://github.com/meltano/sdk/issues/1711) Validate records against stream schema in standard tap tests
- [#1709](https://github.com/meltano/sdk/issues/1709) Add a default Apache 2.0 license to tap and target templates

### 🐛 Fixes

- [#1742](https://github.com/meltano/sdk/issues/1742) Recommend `meltano run` in target cookiecutter README

### ⚙️ Under the Hood

- [#936](https://github.com/meltano/sdk/issues/936) Use inheritance to construct plugin CLI

### 📚 Documentation Improvements

- [#1721](https://github.com/meltano/sdk/issues/1721) Remove unsupported `previous_token` from HATEOAS example
- [#1703](https://github.com/meltano/sdk/issues/1703) Fix broken docs link for `record_metadata` page -- _**Thanks @menzenski!**_

## v0.27.0 (2023-05-11)

### ✨ New
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ packages = [

[tool.poetry.dependencies]
python = "<3.12,>=3.7.1"
singer-sdk = { version="^0.27.0" }
singer-sdk = { version="^0.28.0" }
fs-s3fs = { version = "^1.1.1", optional = true }
{%- if cookiecutter.stream_type in ["REST", "GraphQL"] %}
requests = "^2.31.0"
Expand All @@ -32,7 +32,7 @@ cached-property = "^1" # Remove after Python 3.7 support is dropped

[tool.poetry.group.dev.dependencies]
pytest = "^7.2.1"
singer-sdk = { version="^0.27.0", extras = ["testing"] }
singer-sdk = { version="^0.28.0", extras = ["testing"] }

[tool.poetry.extras]
s3 = ["fs-s3fs"]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ Now you can test and orchestrate using Meltano:
# Test invocation:
meltano invoke {{ cookiecutter.target_id }} --version
# OR run a test `elt` pipeline with the Carbon Intensity sample tap:
meltano elt tap-carbon-intensity {{ cookiecutter.target_id }}
meltano run tap-carbon-intensity {{ cookiecutter.target_id }}
```

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

[tool.poetry.dependencies]
python = "<3.12,>=3.7.1"
singer-sdk = { version="^0.27.0" }
singer-sdk = { version="^0.28.0" }
fs-s3fs = { version = "^1.1.1", optional = true }
{%- if cookiecutter.serialization_method != "SQL" %}
requests = "^2.31.0"
{%- endif %}

[tool.poetry.dev-dependencies]
pytest = "^7.2.1"
singer-sdk = { version="^0.27.0", extras = ["testing"] }
singer-sdk = { version="^0.28.0", extras = ["testing"] }

[tool.poetry.extras]
s3 = ["fs-s3fs"]
Expand Down
6 changes: 5 additions & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
author = "Meltano Core Team and Contributors"

# The full version, including alpha/beta/rc tags
release = "0.27.0"
release = "0.28.0"


# -- General configuration ---------------------------------------------------
Expand All @@ -42,6 +42,7 @@
"sphinx_copybutton",
"myst_parser",
"sphinx_reredirects",
"sphinx_inline_tabs",
]

# Add any paths that contain templates here, relative to this directory.
Expand Down Expand Up @@ -69,9 +70,12 @@
"source_branch": "main",
"source_directory": "docs/",
"sidebar_hide_name": True,
"announcement": '<a href="https://meltano.com/cloud/?utm_campaign=top_banner_sdk">Sign up for Public Beta today</a>! Get a 20% discount on purchases before 27th of July!', # noqa: E501
# branding
"light_css_variables": {
"font-stack": "Hanken Grotesk,-apple-system,Helvetica,sans-serif",
"color-announcement-background": "#3A64FA",
"color-announcement-text": "#EEEBEE",
"color-foreground-primary": "#080216",
"color-background-primary": "#E9E5FB",
"color-link": "#3A64FA",
Expand Down
38 changes: 38 additions & 0 deletions docs/guides/custom-clis.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Custom CLIs

## Overview

By default, packages created with the Singer SDK will have a single command, e.g. `tap-my-source`, which will run the application in a Singer-compatible way. However, you may want to add additional commands to your package. For example, you may want to add a command to initialize the database or platform with certain attributes required by the application to run properly.

## Adding a custom command

To add a custom command, you will need to add a new method to your plugin class that returns an instance of [`click.Command`](https://click.palletsprojects.com/en/8.1.x/api/#commands) (or a subclass of it) and decorate it with the `singer_sdk.cli.plugin_cli` decorator. Then you will need to add the command to the `[tool.poetry.scripts]` section of your `pyproject.toml` file.

```python
# tap_shortcut/tap.py

class ShortcutTap(Tap):
"""Shortcut tap class."""

@plugin_cli
def update_schema(cls) -> click.Command:
"""Update the OpenAPI schema for this tap."""
@click.command()
def update():
response = requests.get(
"https://developer.shortcut.com/api/rest/v3/shortcut.swagger.json",
timeout=5,
)
with Path("tap_shortcut/openapi.json").open("w") as f:
f.write(response.text)

return update
```

```toml
# pyproject.toml

[tool.poetry.scripts]
tap-shortcut = "tap_shortcut.tap:ShortcutTap.cli"
tap-shortcut-update-schema = "tap_shortcut.tap:ShortcutTap.update_schema"
```
1 change: 1 addition & 0 deletions docs/guides/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@ The following pages contain useful information for developers building on top of
porting
pagination-classes
custom-clis
```
Loading

0 comments on commit 43fa5c7

Please sign in to comment.