Skip to content

Commit

Permalink
Merge branch 'main' into 753-validate-taptarget-config-options
Browse files Browse the repository at this point in the history
  • Loading branch information
edgarrmondragon committed Nov 17, 2023
2 parents e8443f8 + b8ab97e commit 05dc8d6
Show file tree
Hide file tree
Showing 131 changed files with 3,905 additions and 3,340 deletions.
1 change: 1 addition & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
[flake8]
max-line-length = 88
exclude = cookiecutter
ignore = E, W
per-file-ignores =
# Don't require docstrings conventions in private modules
singer_sdk/helpers/_*.py:DAR
Expand Down
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.30.0"
placeholder: "0.33.1"
validations:
required: true
- type: checkboxes
Expand Down
10 changes: 8 additions & 2 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,13 @@ name: "CodeQL"
on:
push:
branches: [ "main" ]
pull_request: {}
paths:
- .github/workflows/codeql-analysis.yml
- '**.py' # Any Python file
pull_request:
paths:
- .github/workflows/codeql-analysis.yml
- '**.py' # Any Python file
schedule:
- cron: '37 10 * * 5'

Expand All @@ -31,7 +37,7 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v3.5.3
uses: actions/checkout@v4.1.1

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
Expand Down
44 changes: 44 additions & 0 deletions .github/workflows/codspeed.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: codspeed

on:
push:
branches:
- "main"
pull_request:
# `workflow_dispatch` allows CodSpeed to trigger backtest
# performance analysis in order to generate initial data.
workflow_dispatch:

jobs:
benchmarks:
runs-on: ubuntu-latest
steps:
- name: Check out the repository
uses: actions/[email protected]

- name: Setup Python 3.11
uses: actions/[email protected]
with:
python-version: 3.11
architecture: x64

- name: Install poetry
run: |
curl -fsS https://install.python-poetry.org | python - -y
- name: Configure poetry
run: poetry config virtualenvs.create false

- name: Install project
run: >
poetry install
-vvv
--with dev
--with benchmark
--all-extras
- name: Run benchmarks
uses: CodSpeedHQ/action@v1
with:
token: ${{ secrets.CODSPEED_TOKEN }}
run: pytest tests/ --codspeed
6 changes: 3 additions & 3 deletions .github/workflows/constraints.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
pip==23.2
poetry==1.5.1
pre-commit==3.3.3
pip==23.3.1
poetry==1.7.1
pre-commit==3.5.0
nox==2023.4.22
nox-poetry==1.0.3
7 changes: 5 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/checkout@v3.5.3
uses: actions/checkout@v4.1.1

- 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 Expand Up @@ -74,7 +74,10 @@ jobs:
path: |
/tmp/tap-*
/tmp/target-*
/tmp/mapper-*
!/tmp/tap-*/.mypy_cache/
!/tmp/target-*/.mypy_cache/
!/tmp/mapper-*/.mypy_cache/
!/tmp/tap-*/.tox/
!/tmp/target-*/.tox/
!/tmp/mapper-*/.tox/
23 changes: 2 additions & 21 deletions .github/workflows/dependency-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@ on:
workflow_dispatch:
inputs: {}

env:
FOSSA_CLI_INSTALLER_VERSION: '3.3.10'

permissions:
contents: read

Expand All @@ -16,26 +13,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout the repository
uses: actions/checkout@v3.5.3
uses: actions/checkout@v4.1.1

- name: GitHub dependency vulnerability check
if: ${{ github.event_name == 'pull_request_target' }}
uses: actions/dependency-review-action@v3.0.6
uses: actions/dependency-review-action@v3.1.2
with:
fail-on-severity: high

- name: FOSSA dependency license check
run: |
# `$FOSSA_CLI_INSTALLER_VERSION` only controls the version of the installer used - the latest version of `fossa-cli` will always be used.
curl --no-progress-meter -H 'Cache-Control: no-cache' https://raw.githubusercontent.com/fossas/fossa-cli/v${FOSSA_CLI_INSTALLER_VERSION}/install-latest.sh | bash
echo '## FOSSA dependency license check' >> $GITHUB_STEP_SUMMARY
echo '' >> $GITHUB_STEP_SUMMARY
fossa analyze --fossa-api-key ${{ secrets.MELTYBOT_FOSSA_API_KEY }} --revision ${{ github.sha }} |& tee fossa_analyze.log
fossa test --fossa-api-key ${{ secrets.MELTYBOT_FOSSA_API_KEY }} --revision ${{ github.sha }}
TEST_FAILED=$?
FOSSA_REPORT_LINK="$(grep -A 1 '[ INFO] View FOSSA Report:' fossa_analyze.log | tail -n 1 | sed -e 's/^\[ INFO\]\s*//')"
echo "[FOSSA detected $([ $TEST_FAILED -ne 0 ] && echo -n '' || echo 'no ')issues](${FOSSA_REPORT_LINK})" >> $GITHUB_STEP_SUMMARY
exit $TEST_FAILED
11 changes: 6 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
name: Release

on:
release:
types: [published]
push:
tags:
- v*

permissions:
contents: write # Needed to upload artifacts to the release
Expand All @@ -16,10 +17,10 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v3.5.3
uses: actions/checkout@v4.1.1

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

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

- name: Publish
uses: pypa/[email protected].8
uses: pypa/[email protected].10
22 changes: 13 additions & 9 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ env:

jobs:
tests:
name: Test on ${{ matrix.python-version }} (${{ matrix.session }}) / ${{ matrix.os }}
name: "Test on ${{ matrix.python-version }} (${{ matrix.session }}) / ${{ matrix.os }} / SQLAlchemy: ${{ matrix.sqlalchemy }}"
runs-on: ${{ matrix.os }}
env:
NOXSESSION: ${{ matrix.session }}
Expand All @@ -47,13 +47,15 @@ jobs:
session: [tests]
os: ["ubuntu-latest", "macos-latest", "windows-latest"]
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
sqlalchemy: ["2.*"]
include:
- { session: doctest, python-version: "3.10", os: "ubuntu-latest" }
- { session: mypy, python-version: "3.8", os: "ubuntu-latest" }
- { session: tests, python-version: "3.11", os: "ubuntu-latest", sqlalchemy: "1.*" }
- { session: doctest, python-version: "3.10", os: "ubuntu-latest", sqlalchemy: "2.*" }
- { session: mypy, python-version: "3.8", os: "ubuntu-latest", sqlalchemy: "2.*" }

steps:
- name: Check out the repository
uses: actions/checkout@v3.5.3
uses: actions/checkout@v4.1.1

- name: Install Poetry
env:
Expand All @@ -63,7 +65,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 All @@ -86,6 +88,8 @@ jobs:
nox --version
- name: Run Nox
env:
SQLALCHEMY_VERSION: ${{ matrix.sqlalchemy }}
run: |
nox --python=${{ matrix.python-version }}
Expand All @@ -111,7 +115,7 @@ jobs:

steps:
- name: Check out the repository
uses: actions/checkout@v3.5.3
uses: actions/checkout@v4.1.1

- name: Install Poetry
env:
Expand All @@ -121,7 +125,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 @@ -153,15 +157,15 @@ jobs:
needs: tests
steps:
- name: Check out the repository
uses: actions/checkout@v3.5.3
uses: actions/checkout@v4.1.1

- 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
10 changes: 5 additions & 5 deletions .github/workflows/version_bump.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,19 +35,19 @@ jobs:
pull-requests: write # to create and update PRs

steps:
- uses: actions/checkout@v3.5.3
- uses: actions/checkout@v4.1.1
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

- name: Bump version
id: cz-bump
uses: commitizen-tools/commitizen-action@0.18.2
uses: commitizen-tools/commitizen-action@0.20.0
with:
increment: ${{ github.event.inputs.bump != 'auto' && github.event.inputs.bump || '' }}
prerelease: ${{ github.event.inputs.prerelease != 'none' && github.event.inputs.prerelease || '' }}
Expand All @@ -66,8 +66,7 @@ jobs:
body_path: _changelog_fragment.md
tag_name: v${{ steps.cz-bump.outputs.version }}
prerelease: ${{ github.event.inputs.prerelease != 'none' }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
token: ${{ secrets.MELTYBOT_GITHUB_AUTH_TOKEN }}

- name: Set repo file permissions
run: |
Expand All @@ -77,6 +76,7 @@ jobs:
uses: peter-evans/create-pull-request@v5
id: create-pull-request
with:
token: ${{ secrets.MELTYBOT_GITHUB_AUTH_TOKEN }}
commit-message: "chore: Bump package version"
title: "chore: Release v${{ steps.cz-bump.outputs.version }}"
body: |
Expand Down
24 changes: 9 additions & 15 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ ci:

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
rev: v4.5.0
hooks:
- id: check-json
- id: check-toml
Expand Down Expand Up @@ -36,35 +36,29 @@ repos:
)$
- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.23.3
rev: 0.27.1
hooks:
- id: check-dependabot
- id: check-github-workflows
- id: check-readthedocs

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.0.278
rev: v0.1.5
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix, --show-fixes]
exclude: |
(?x)^(
cookiecutter/.*
)$
- repo: https://github.com/psf/black
rev: 23.7.0
hooks:
- id: black
- id: ruff-format
exclude: |
(?x)^(
cookiecutter/.*|
singer_sdk/helpers/_simpleeval.py|
tests/core/test_simpleeval.py
)$
(?x)^(
cookiecutter/.*
)$
- repo: https://github.com/pycqa/flake8
rev: 6.0.0
rev: 6.1.0
hooks:
- id: flake8
additional_dependencies:
Expand All @@ -76,6 +70,6 @@ repos:
)$
- repo: https://github.com/python-poetry/poetry
rev: 1.5.0
rev: 1.7.0
hooks:
- id: poetry-check
Loading

0 comments on commit 05dc8d6

Please sign in to comment.