Skip to content

Commit

Permalink
Merge branch 'main' into v1
Browse files Browse the repository at this point in the history
  • Loading branch information
edgarrmondragon committed Nov 7, 2024
2 parents b6b73c1 + c0b341c commit 9d3f8d4
Show file tree
Hide file tree
Showing 157 changed files with 6,381 additions and 1,513 deletions.
27 changes: 17 additions & 10 deletions .github/ISSUE_TEMPLATE/bug.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
name: Bug Report
description: File a bug report
title: "bug: <title>"
labels: ["kind/Bug", "valuestream/SDK"]
type: Fix
assignees:
- edgarrmondragon

body:
- type: markdown
Expand All @@ -13,7 +15,7 @@ body:
attributes:
label: Singer SDK Version
description: Version of the library you are using
placeholder: "0.39.1"
placeholder: "0.41.0"
validations:
required: true
- type: checkboxes
Expand All @@ -29,14 +31,13 @@ body:
label: Python Version
description: Version of Python you are using
options:
- "3.6 (EOL)"
- "3.7 (EOL)"
- "3.8"
- "3.9"
- "3.10"
- "3.11"
- "3.12"
- "NA"
- "3.13"
- "3.12"
- "3.11"
- "3.10"
- "3.9"
- "3.8 or earlier"
validations:
required: true
- type: dropdown
Expand All @@ -61,7 +62,7 @@ body:
description: What operating system you are using
placeholder: "Windows"
validations:
required: true
required: false
- type: textarea
id: what-happened
attributes:
Expand All @@ -78,3 +79,9 @@ body:
render: Python
validations:
required: false
- type: input
id: slack_or_linen
attributes:
label: Link to Slack/Linen
description: Provide a link to the Slack or Linen conversation, if applicable
placeholder: "https://..."
3 changes: 3 additions & 0 deletions .github/ISSUE_TEMPLATE/docs.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
name: Documentation change
description: Request a documentation change
title: "docs: <title>"
type: Docs
labels: ["Documentation", "valuestream/SDK"]
assignees:
- edgarrmondragon

body:
- type: markdown
Expand Down
6 changes: 4 additions & 2 deletions .github/ISSUE_TEMPLATE/feature.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@ name: Feature request
description: Request a new feature
title: "feat: <title>"
labels: ["kind/Feature", "valuestream/SDK"]
type: Feat
assignees:
- meltano/engineering
- edgarrmondragon

body:
- type: markdown
Expand All @@ -16,7 +17,8 @@ body:
label: Feature scope
description: Functionality this new feature would impact
options:
- Taps (catalog, state, stream maps, tests, etc.)
- Taps (catalog, state, tests, etc.)
- Inline mapping (stream maps, flattening, etc.)
- Targets (data type handling, batching, SQL object generation, tests, etc.)
- Configuration (settings parsing, validation, etc.)
- CLI (options, error messages, logging, etc.)
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/api-changes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,14 @@ jobs:
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: 3.12
python-version: 3.x

- name: Install tools
env:
PIP_CONSTRAINT: ${{ github.workspace }}/.github/workflows/constraints.txt
run: |
python -Im pip install -U pip
pipx install griffe nox
pipx inject nox nox-poetry
pipx list
- name: Set REF
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ name: "CodeQL"

on:
push:
branches: [ "main" ]
branches:
- "main"
- "v*"
paths:
- .github/workflows/codeql-analysis.yml
- '**.py' # Any Python file
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/codspeed.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
push:
branches:
- "main"
- "v*"
paths:
- "singer_sdk/**"
- "tests/**"
Expand All @@ -30,7 +31,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: 3.12
python-version: 3.x
architecture: x64

- name: Install poetry
Expand Down
13 changes: 5 additions & 8 deletions .github/workflows/constraints.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
griffe==0.48.0
pip==24.2
poetry==1.8.3
poetry-plugin-export==1.8.0
poetry-dynamic-versioning==1.4.0
pre-commit==3.8.0
nox==2024.4.15
nox-poetry==1.0.3
griffe~=1.5
pip==24.3.1
poetry==1.8.4
pre-commit==4.0.1
nox==2024.10.9
34 changes: 14 additions & 20 deletions .github/workflows/cookiecutter-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ on:
- "e2e-tests/cookiecutters/**"
- ".github/workflows/cookiecutter-e2e.yml"
push:
branches: [main]
branches:
- main
- v*
paths:
- "cookiecutter/**"
- "e2e-tests/cookiecutters/**"
Expand All @@ -24,14 +26,8 @@ env:

jobs:
lint:
name: Cookiecutter E2E Python ${{ matrix.python-version }} / ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: true
matrix:
include:
- { python-version: "3.12", os: "ubuntu-latest" }

name: Cookiecutter E2E Python
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Upgrade pip
Expand All @@ -46,38 +42,36 @@ jobs:
PIP_CONSTRAINT: ${{ github.workspace }}/.github/workflows/constraints.txt
run: |
pipx install poetry
pipx inject poetry poetry-plugin-export
poetry --version
poetry self show plugins
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
architecture: x64
cache: 'pip'
cache-dependency-path: 'poetry.lock'
python-version: 3.x

- uses: astral-sh/setup-uv@v3
with:
version: ">=0.4.30"

- name: Install pre-commit
run: |
pipx install pre-commit
uv tool install --with=pre-commit-uv pre-commit
pre-commit --version
- name: Install Nox
env:
PIP_CONSTRAINT: ${{ github.workspace }}/.github/workflows/constraints.txt
run: |
pipx install nox
pipx inject nox nox-poetry
uv tool install nox
nox --version
- name: Run Nox
run: |
nox --python=${{ matrix.python-version }} --session=test_cookiecutter
nox --session=test_cookiecutter
- uses: actions/upload-artifact@v4
if: always()
with:
name: cookiecutter-${{ matrix.os }}-py${{ matrix.python-version }}
name: cookiecutter-ubuntu-latest-py3x
path: |
/tmp/tap-*
/tmp/target-*
Expand Down
60 changes: 49 additions & 11 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,52 @@ on:

jobs:
build:
name: Build artifacts
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: hynek/build-and-inspect-python-package@v2

check-tag:
name: Check tag
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/')
outputs:
is_final: ${{ steps.check.outputs.is_final }}
steps:
- name: Check if tag is a pre-release
id: check
run: |
echo "is_final=$(echo '${{ github.ref }}' | grep -qE '^v[0-9]+\.[0-9]+\.[0-9]+$' && echo 'true' || echo 'false')" >> $GITHUB_OUTPUT
provenance:
name: Provenance
runs-on: ubuntu-latest
needs: [build]
if: startsWith(github.ref, 'refs/tags/')
permissions:
id-token: write # Needed for attestations
attestations: write # Needed for attestations
outputs:
bundle-path: ${{ steps.attest.outputs.bundle-path }}
steps:
- uses: actions/download-artifact@v4
with:
name: Packages
path: dist
- uses: actions/attest-build-provenance@v1
id: attest
with:
subject-path: "./dist/singer_sdk*"
- uses: actions/upload-artifact@v4
with:
name: Attestations
path: ${{ steps.attest.outputs.bundle-path }}

publish:
name: Publish to PyPI
name: PyPI
runs-on: ubuntu-latest
needs: [build]
environment:
Expand All @@ -28,38 +65,39 @@ jobs:
name: Packages
path: dist
- name: Publish
uses: pypa/gh-action-pypi-publish@v1.9.0
uses: pypa/gh-action-pypi-publish@v1.11.0

upload-to-release:
name: Upload files to release
runs-on: ubuntu-latest
needs: [build]
if: startsWith(github.ref, 'refs/tags/')
needs: [build, check-tag, provenance]
if: ${{ startsWith(github.ref, 'refs/tags/') && needs.check-tag.outputs.is_final == 'true' }}
permissions:
contents: write # Needed for uploading files to the release
id-token: write # Needed for attestations
attestations: write # Needed for attestations

steps:
- uses: actions/download-artifact@v4
with:
name: Packages
path: dist

- uses: actions/download-artifact@v4
with:
name: Attestations
path: attestations

- name: Upload wheel and sdist to release
uses: svenstaro/upload-release-action@v2
with:
file: dist/singer_sdk*
tag: ${{ github.ref }}
overwrite: true
file_glob: true
- uses: actions/attest-build-provenance@v1
id: attest
with:
subject-path: "./dist/singer_sdk*"

- name: Upload attestations to release
uses: svenstaro/upload-release-action@v2
with:
file: ${{ steps.attest.outputs.bundle-path }}
file: attestations/attestation.jsonl
tag: ${{ github.ref }}
overwrite: true
asset_name: attestations.intoto.jsonl
Loading

0 comments on commit 9d3f8d4

Please sign in to comment.