Skip to content

Commit 1c13b24

Browse files
author
Lando Calrissian
committed
Initial project skeleton
0 parents  commit 1c13b24

17 files changed

+861
-0
lines changed

.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.4.1-26-g8b1221a
3+
_src_path: .
4+
add_autobump_workflow: true
5+
author_email: [email protected]
6+
author_name: Lando Calrissian
7+
github_url: https://github.com/LandoCalrissian/package
8+
github_user: LandoCalrissian
9+
minimal_python_version: py313
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: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
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+
- "*"

.github/workflows/build.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: Build
2+
on:
3+
pull_request:
4+
push:
5+
branches:
6+
- main
7+
tags:
8+
- "*"
9+
10+
jobs:
11+
build:
12+
runs-on: ubuntu-latest
13+
permissions:
14+
contents: read
15+
steps:
16+
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
17+
with:
18+
fetch-depth: 0
19+
- name: Set up pixi
20+
uses: prefix-dev/setup-pixi@fef5c9568ca6c4ff7707bf840ab0692ba3f08293 # v0.9.0
21+
with:
22+
environments: build
23+
- name: Build project
24+
run: pixi run -e build build-wheel
25+
- name: Check package
26+
run: pixi run -e build check-wheel
27+
- name: Upload package
28+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
29+
with:
30+
name: artifact
31+
path: dist/*
32+
33+
release:
34+
name: Publish package
35+
if: startsWith(github.ref, 'refs/tags/')
36+
needs: [build]
37+
runs-on: ubuntu-latest
38+
permissions:
39+
id-token: write
40+
environment: pypi
41+
steps:
42+
- uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0
43+
with:
44+
name: artifact
45+
path: dist
46+
- name: Publish package on PyPi
47+
uses: pypa/gh-action-pypi-publish@ed0c53931b1dc9bd32cbe73a98c7f6766f8a527e # v1.13.0

.github/workflows/ci.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: CI
2+
on:
3+
pull_request:
4+
push:
5+
branches:
6+
- main
7+
8+
# Automatically stop old builds on the same branch/PR
9+
concurrency:
10+
group: ${{ github.workflow }}-${{ github.ref }}
11+
cancel-in-progress: true
12+
13+
permissions:
14+
contents: read
15+
16+
jobs:
17+
pre-commit:
18+
timeout-minutes: 30
19+
runs-on: ubuntu-latest
20+
steps:
21+
- name: Checkout branch
22+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
23+
- name: Set up pixi
24+
uses: prefix-dev/setup-pixi@fef5c9568ca6c4ff7707bf840ab0692ba3f08293 # v0.9.0
25+
with:
26+
environments: default lint
27+
- name: pre-commit
28+
run: pixi run pre-commit-run --color=always --show-diff-on-failure
29+
30+
pytest:
31+
timeout-minutes: 30
32+
runs-on: ${{ matrix.os }}
33+
strategy:
34+
fail-fast: false
35+
matrix:
36+
environment:
37+
- py313
38+
os:
39+
- ubuntu-latest
40+
- macos-latest
41+
- windows-latest
42+
steps:
43+
- name: Checkout branch
44+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
45+
with:
46+
fetch-depth: 0
47+
- name: Set up pixi
48+
uses: prefix-dev/setup-pixi@fef5c9568ca6c4ff7707bf840ab0692ba3f08293 # v0.9.0
49+
with:
50+
environments: ${{ matrix.environment }}
51+
- name: Install repository
52+
run: pixi run -e ${{ matrix.environment }} postinstall
53+
- name: Run pytest
54+
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@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
39+
with:
40+
persist-credentials: false
41+
42+
- name: "Run analysis"
43+
uses: ossf/scorecard-action@05b42c624433fc40578a4040d5cf5e36ddca8cde # v2.4.2
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@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
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@2d92b76c45b91eb80fc44c74ce3fce0ee94e8f9d # v3.30.0
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@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
16+
- name: Set up pixi
17+
uses: prefix-dev/setup-pixi@fef5c9568ca6c4ff7707bf840ab0692ba3f08293 # v0.9.0
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@271a8d0340265f705b14b6d32b9829c1cb33d45e # v7.0.8
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)