Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[run]
source = src/wool
omit =
src/wool/__init__.py
src/wool/protocol/*pb2*

[report]
show_missing = true
precision = 2
1 change: 1 addition & 0 deletions .github/.githubrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
alias cicd="$PWD/scripts/git-cicd.sh"
5 changes: 5 additions & 0 deletions .github/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
.*

!.gitignore
!.githubrc
!.github/
25 changes: 25 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Bug Report
description: Report something that isn't working correctly.
labels: ["bug"]
body:
- type: textarea
id: summary
attributes:
label: Summary
description: What is the bug? Include steps to reproduce if applicable.
validations:
required: true
- type: textarea
id: root-cause
attributes:
label: Root cause
description: What is causing the bug? Include relevant code snippets.
validations:
required: true
- type: textarea
id: affected-code
attributes:
label: Affected code
description: Which files, modules, or components are affected?
validations:
required: false
25 changes: 25 additions & 0 deletions .github/ISSUE_TEMPLATE/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Build
description: Propose a build system or dependency change.
labels: ["build"]
body:
- type: textarea
id: summary
attributes:
label: Summary
description: What build system or dependency change is needed?
validations:
required: true
- type: textarea
id: motivation
attributes:
label: Motivation
description: Why is this change needed?
validations:
required: true
- type: textarea
id: affected-code
attributes:
label: Affected code
description: Which build files, configs, or dependencies are affected?
validations:
required: false
25 changes: 25 additions & 0 deletions .github/ISSUE_TEMPLATE/cicd.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: CI/CD
description: Propose a CI/CD pipeline change.
labels: ["cicd"]
body:
- type: textarea
id: summary
attributes:
label: Summary
description: What CI/CD change is needed?
validations:
required: true
- type: textarea
id: motivation
attributes:
label: Motivation
description: Why is this change needed? What does it improve?
validations:
required: true
- type: textarea
id: affected-code
attributes:
label: Affected code
description: Which workflows, pipelines, or config files are affected?
validations:
required: false
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
blank_issues_enabled: false
25 changes: 25 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Feature Request
description: Propose a new feature or capability.
labels: ["feature"]
body:
- type: textarea
id: summary
attributes:
label: Summary
description: What is the feature? Describe the desired behavior.
validations:
required: true
- type: textarea
id: motivation
attributes:
label: Motivation
description: Why is this feature needed? What problem does it solve?
validations:
required: true
- type: textarea
id: affected-code
attributes:
label: Affected code
description: Which files, modules, or components would be affected?
validations:
required: false
25 changes: 25 additions & 0 deletions .github/ISSUE_TEMPLATE/refactor.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Refactor
description: Propose a code restructuring without behavior change.
labels: ["refactor"]
body:
- type: textarea
id: summary
attributes:
label: Summary
description: What should be restructured and what does the end state look like?
validations:
required: true
- type: textarea
id: motivation
attributes:
label: Motivation
description: Why is this restructuring needed?
validations:
required: true
- type: textarea
id: affected-code
attributes:
label: Affected code
description: Which files, modules, or components are affected?
validations:
required: false
25 changes: 25 additions & 0 deletions .github/ISSUE_TEMPLATE/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Test
description: Add or improve test coverage or test infrastructure.
labels: ["test"]
body:
- type: textarea
id: summary
attributes:
label: Summary
description: What needs to be tested or what test infrastructure is needed?
validations:
required: true
- type: textarea
id: motivation
attributes:
label: Motivation
description: Why is this test work needed? What gap does it fill?
validations:
required: true
- type: textarea
id: affected-code
attributes:
label: Affected code
description: Which files, modules, or components are affected?
validations:
required: false
22 changes: 22 additions & 0 deletions .github/actions/add-label/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Add label
description: Add specified label to pull request.
inputs:
label:
description: Label to add to the pull request.
required: true
type: string

runs:
using: composite
steps:
- name: Verify event
if: ${{ github.event_name != 'pull_request' }}
shell: bash
run: |
echo "Error: This action can only be used on pull request events."
exit 1

- name: Add label
shell: bash
run: |
gh pr edit "${{ github.event.number }}" --add-label "${{ inputs.label }}"
34 changes: 34 additions & 0 deletions .github/actions/build-release/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Build release
description: Build distribution for the target version.
inputs:
source:
required: true
type: string
version:
required: true
type: string

runs:
using: composite
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-tags: true
persist-credentials: false
ref: ${{ inputs.version }}

- name: Install uv & prepare python
uses: astral-sh/setup-uv@v5
with:
enable-cache: false

- name: Build distribution artifacts
shell: bash
run: uv build . --sdist --wheel --out-dir ${{ inputs.source }}-dist-${{ inputs.version }}

- name: Store distribution artifacts
uses: actions/upload-artifact@v4
with:
name: ${{ inputs.source }}-dist-${{ inputs.version }}
path: ${{ inputs.source }}-dist-${{ inputs.version }}/
31 changes: 31 additions & 0 deletions .github/actions/get-touched-files/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Get touched files
description: Get a list of files that have been modified in a pull request.
inputs:
pathspec:
description: 'Optional pathspec(s) to filter files. E.g., "src/**" will only get files in the src directory.'
required: false
type: string
outputs:
touched:
description: 'List of files that have been modified in a pull request.'
value: ${{ steps.get-touched-files.outputs.touched }}

runs:
using: composite
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
persist-credentials: false

- name: Get touched files
id: get-touched-files
shell: bash
run: |
eval "pathspec=('${{ inputs.pathspec }}')"
echo "pathspec: '${pathspec[@]}'"
touched=$(git diff --name-only HEAD origin/master -- ${pathspec[@]})
touched=$(echo "$touched" | tr '\n' ' ' | xargs)
echo "touched: '$touched'"
echo "touched=$touched" >> $GITHUB_OUTPUT
32 changes: 32 additions & 0 deletions .github/actions/get-wool-labs-app-token/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: get-wool-labs-app-token
description: "Obtain a GitHub App installation access token to use in place of a PAT"
inputs:
app-id:
description: "The ID of the GitHub App"
required: true
app-installation-id:
description: "The installation ID of the GitHub App"
required: true
app-private-key:
description: "The private key of the GitHub App"
required: true
outputs:
access-token:
description: "Access token to use in place of a PAT"
value: ${{ steps.generate-access-token.outputs.access-token }}

runs:
using: "composite"
steps:
- name: Generate Access Token
id: generate-access-token
shell: bash
run: |
echo "${{ inputs.app-private-key }}" > /tmp/app-private-key.pem
access_token="$(APP_INSTALLATION_ID=${{ inputs.app-installation-id }} \
APP_ID=${{ inputs.app-id }} \
SIGNING_KEY_PATH="/tmp/app-private-key.pem" \
.github/scripts/generate-github-access-token.sh)"
echo "::add-mask::$access_token"
echo "access-token=$access_token" >> $GITHUB_OUTPUT

30 changes: 30 additions & 0 deletions .github/actions/publish-github-release/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Publish release to GitHub
description: Publish the target version to GitHub.

inputs:
source:
required: true
type: string
version:
required: true
type: string

runs:
using: composite
steps:
- name: Download distribution artifacts
uses: actions/download-artifact@v4
with:
name: ${{ inputs.source }}-dist-${{ inputs.version }}
path: ${{ inputs.source }}-dist-${{ inputs.version }}/

- name: Sign the artifacts with Sigstore
uses: sigstore/gh-action-sigstore-python@v3.0.0
with:
inputs: ./${{ inputs.source }}-dist-${{ inputs.version }}/*.tar.gz ./${{ inputs.source }}-dist-${{ inputs.version }}/*.whl

- name: Upload artifact signatures to GitHub release
shell: bash
env:
GH_TOKEN: ${{ github.token }}
run: gh release upload ${{ inputs.version }} ${{ inputs.source }}-dist-${{ inputs.version }}/** --repo ${{ github.repository }}
30 changes: 30 additions & 0 deletions .github/actions/publish-pypi-release/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Publish release to PyPI
description: Publish the target version to PyPI.

inputs:
source:
required: true
type: string
version:
required: true
type: string
pypi-token:
required: true
type: string

runs:
using: composite
steps:
- name: Download distribution artifacts
uses: actions/download-artifact@v4
with:
name: ${{ inputs.source }}-dist-${{ inputs.version }}
path: ${{ inputs.source }}-dist-${{ inputs.version }}/

- name: Install uv
uses: astral-sh/setup-uv@v5

- name: Upload distribution to PyPI
shell: bash
run: |
.github/scripts/publish-distribution.sh --source ${{ inputs.source }}-dist-${{ inputs.version }} ${{ inputs.pypi-token }}
Loading
Loading