Skip to content

Commit 653ca8b

Browse files
author
Lando Calrissian
committed
Initial commit
0 parents  commit 653ca8b

20 files changed

+5366
-0
lines changed

.claude/CLAUDE.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../AGENTS.md

.copier-answers.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# This file is managed by Copier; DO NOT EDIT OR REMOVE.
2+
_commit: v0.5.0-2-g164bf73
3+
_src_path: .
4+
add_autobump_workflow: true
5+
author_email: lando@calrissian.org
6+
author_name: Lando Calrissian
7+
github_url: https://github.com/LandoCalrissian/package
8+
github_user: LandoCalrissian
9+
minimal_python_version: py311
10+
project_short_description: Example Package
11+
project_slug: package
12+
use_devcontainer: false

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
pixi.lock merge=binary linguist-language=YAML linguist-generated=true

.github/CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* @LandoCalrissian

.github/dependabot.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: github-actions
4+
directory: /
5+
schedule:
6+
interval: monthly
7+
groups:
8+
gh-actions:
9+
patterns:
10+
- "*"
11+
cooldown:
12+
default-days: 7

.github/workflows/build.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: Build
2+
on:
3+
- push
4+
jobs:
5+
build:
6+
runs-on: ubuntu-latest
7+
permissions:
8+
contents: read
9+
steps:
10+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
11+
with:
12+
fetch-depth: 0
13+
- name: Set up pixi
14+
uses: prefix-dev/setup-pixi@a0af7a228712d6121d37aba47adf55c1332c9c2e # v0.9.4
15+
- name: Derive version
16+
id: version
17+
if: startsWith(github.ref, 'refs/tags/')
18+
shell: bash
19+
run: echo "version=$(git describe --tags --abbrev=0 | sed 's/^v//')" >> $GITHUB_OUTPUT
20+
- name: Replace version
21+
if: startsWith(github.ref, 'refs/tags/')
22+
run: |
23+
sed -i -e "s/0.0.0/${STEPS_VERSION_OUTPUTS_VERSION}/g" pyproject.toml
24+
env:
25+
STEPS_VERSION_OUTPUTS_VERSION: ${{ steps.version.outputs.version }}
26+
- name: Build project
27+
run: pixi run build-wheel
28+
- name: Check package
29+
run: pixi run check-wheel
30+
- name: Upload package
31+
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
32+
with:
33+
name: artifact
34+
path: dist/*
35+
release:
36+
name: Publish package
37+
if: startsWith(github.ref, 'refs/tags/')
38+
needs: [build]
39+
runs-on: ubuntu-latest
40+
permissions:
41+
id-token: write
42+
environment: pypi
43+
steps:
44+
- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
45+
with:
46+
name: artifact
47+
path: dist
48+
- name: Publish package on PyPi
49+
uses: pypa/gh-action-pypi-publish@ed0c53931b1dc9bd32cbe73a98c7f6766f8a527e # v1.13.0

.github/workflows/ci.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: CI
2+
on:
3+
- push
4+
# Automatically stop old builds on the same branch/PR
5+
concurrency:
6+
group: ${{ github.workflow }}-${{ github.ref }}
7+
cancel-in-progress: true
8+
permissions:
9+
contents: read
10+
jobs:
11+
lint:
12+
name: Lint
13+
timeout-minutes: 30
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Checkout branch
17+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
18+
- name: Set up pixi
19+
uses: prefix-dev/setup-pixi@a0af7a228712d6121d37aba47adf55c1332c9c2e # v0.9.4
20+
- name: Run linting
21+
run: pixi run lint
22+
env:
23+
CLICOLOR_FORCE: 1
24+
pytest:
25+
timeout-minutes: 30
26+
runs-on: ${{ matrix.os }}
27+
strategy:
28+
fail-fast: false
29+
matrix:
30+
environment:
31+
- py311
32+
- py312
33+
- py313
34+
- py314
35+
os:
36+
- ubuntu-latest
37+
- macos-latest
38+
- windows-latest
39+
steps:
40+
- name: Checkout branch
41+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
42+
with:
43+
fetch-depth: 0
44+
- name: Set up pixi
45+
uses: prefix-dev/setup-pixi@a0af7a228712d6121d37aba47adf55c1332c9c2e # v0.9.4
46+
with:
47+
environments: ${{ matrix.environment }}
48+
- name: Run pytest
49+
run: pixi run -e ${{ matrix.environment }} test-coverage --color=yes

.github/workflows/scorecard.yml

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
# This workflow uses actions that are not certified by GitHub. They are provided
2+
# by a third-party and are governed by separate terms of service, privacy
3+
# policy, and support documentation.
4+
5+
name: Scorecard supply-chain security
6+
on:
7+
# For Branch-Protection check. Only the default branch is supported. See
8+
# https://github.com/ossf/scorecard/blob/main/docs/checks.md#branch-protection
9+
branch_protection_rule:
10+
# To guarantee Maintained check is occasionally updated. See
11+
# https://github.com/ossf/scorecard/blob/main/docs/checks.md#maintained
12+
schedule:
13+
- cron: "34 5 * * 0"
14+
workflow_dispatch:
15+
push:
16+
branches: ["main"]
17+
18+
# Declare default permissions as read only.
19+
permissions: read-all
20+
21+
jobs:
22+
analysis:
23+
name: Scorecard analysis
24+
runs-on: ubuntu-latest
25+
# `publish_results: true` only works when run from the default branch. conditional can be removed if disabled.
26+
if: (github.event.repository.default_branch == github.ref_name || github.event_name == 'pull_request') && github.repository == 'LandoCalrissian/package'
27+
permissions:
28+
# Needed to upload the results to code-scanning dashboard.
29+
security-events: write
30+
# Needed to publish results and get a badge (see publish_results below).
31+
id-token: write
32+
# Uncomment the permissions below if installing in a private repository.
33+
# contents: read
34+
# actions: read
35+
36+
steps:
37+
- name: "Checkout code"
38+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
39+
with:
40+
persist-credentials: false
41+
42+
- name: "Run analysis"
43+
uses: ossf/scorecard-action@4eaacf0543bb3f2c246792bd56e8cdeffafb205a # v2.4.3
44+
with:
45+
results_file: results.sarif
46+
results_format: sarif
47+
# (Optional) "write" PAT token. Uncomment the `repo_token` line below if:
48+
# - you want to enable the Branch-Protection check on a *public* repository, or
49+
# - you are installing Scorecard on a *private* repository
50+
# To create the PAT, follow the steps in https://github.com/ossf/scorecard-action?tab=readme-ov-file#authentication-with-fine-grained-pat-optional.
51+
# repo_token: ${{ secrets.SCORECARD_TOKEN }}
52+
53+
# Public repositories:
54+
# - Publish results to OpenSSF REST API for easy access by consumers
55+
# - Allows the repository to include the Scorecard badge.
56+
# - See https://github.com/ossf/scorecard-action#publishing-results.
57+
# For private repositories:
58+
# - `publish_results` will always be set to `false`, regardless
59+
# of the value entered here.
60+
publish_results: true
61+
62+
# (Optional) Uncomment file_mode if you have a .gitattributes with files marked export-ignore
63+
# file_mode: git
64+
65+
# Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF
66+
# format to the repository Actions tab.
67+
- name: "Upload artifact"
68+
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
69+
with:
70+
name: SARIF file
71+
path: results.sarif
72+
retention-days: 5
73+
74+
# Upload the results to GitHub's code scanning dashboard (optional).
75+
# Commenting out will disable upload of results to your repo's Code Scanning dashboard
76+
- name: "Upload to code-scanning"
77+
uses: github/codeql-action/upload-sarif@0d579ffd059c29b07949a3cce3983f0780820c98 # v4.32.6
78+
with:
79+
sarif_file: results.sarif
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Update lockfiles
2+
permissions:
3+
contents: write
4+
pull-requests: write
5+
6+
on:
7+
workflow_dispatch:
8+
schedule:
9+
- cron: 0 5 1 * *
10+
11+
jobs:
12+
pixi-update:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
16+
- name: Set up pixi
17+
uses: prefix-dev/setup-pixi@a0af7a228712d6121d37aba47adf55c1332c9c2e # v0.9.4
18+
with:
19+
run-install: false
20+
- name: Update lockfiles
21+
run: |
22+
pixi update --json --no-install | pixi exec pixi-diff-to-markdown >> diff.md
23+
- name: Create pull request
24+
uses: peter-evans/create-pull-request@c0f553fe549906ede9cf27b5156039d195d2ece0 # v8.1.0
25+
with:
26+
token: ${{ secrets.GITHUB_TOKEN }}
27+
commit-message: Update pixi lockfile
28+
title: Update pixi lockfile
29+
body-path: diff.md
30+
branch: update-pixi
31+
base: main
32+
labels: pixi
33+
delete-branch: true
34+
add-paths: pixi.lock

0 commit comments

Comments
 (0)