-
Notifications
You must be signed in to change notification settings - Fork 71
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into 1676-fix-incremental-where-clause-typeerror
- Loading branch information
Showing
61 changed files
with
1,457 additions
and
917 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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: | ||
|
@@ -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 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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" | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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: | ||
|
@@ -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 | ||
|
@@ -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: | ||
|
@@ -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 | ||
|
@@ -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' | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.