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 .copier-answers.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Changes here will be overwritten by Copier; NEVER EDIT MANUALLY
_commit: v0.7.3
_src_path: gh:ahcodedev/python-project-template
description: Python PriceCharting API Client
github_repo: ahcodedev/pypricecharting
package_name: pypricecharting
project_name: pypricecharting
use_docs: true
use_releases: true
27 changes: 2 additions & 25 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,34 +18,11 @@
// Set *default* container specific settings.json values on container create.
"settings": {
"python.autoComplete.extraPaths": ["/workspaces"],
"python.defaultInterpreterPath": "/usr/local/bin/python",
"editor.tabSize": 4,
"files.autoSave": "afterDelay",
"files.trimTrailingWhitespace": true,
"terminal.integrated.localEchoStyle": "dim",
"[python]": {
"editor.defaultFormatter": "charliermarsh.ruff",
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.fixAll.ruff": "explicit",
"source.organizeImports.ruff": "explicit"
}
},
"python.testing.pytestArgs": [
"tests"
],
"python.testing.unittestEnabled": false,
"python.testing.pytestEnabled": true
"python.defaultInterpreterPath": "${workspaceFolder}/.venv/bin/python"
},

// Add the IDs of extensions you want installed when the container is created.
"extensions": [
"Anthropic.claude-code",
"charliermarsh.ruff",
"DavidAnson.vscode-markdownlint",
"ms-python.python",
"ms-python.vscode-pylance"
]
"extensions": []
}
},

Expand Down
2 changes: 1 addition & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
.devcontainer/* -linguist-detectable
.github/** -linguist-detectable
.github/** -linguist-detectable
6 changes: 3 additions & 3 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ updates:
labels: ["dependencies"]
groups:
github-actions:
patterns: ["*"]
update-types: ["minor", "patch"]

# Python dependencies in pyproject.toml / uv.lock
- package-ecosystem: "uv"
Expand All @@ -31,7 +31,7 @@ updates:
- package-ecosystem: "docker"
directory: "/.devcontainer"
schedule:
interval: "monthly"
interval: "weekly"
cooldown:
default-days: 7
labels: ["dependencies"]
Expand All @@ -40,7 +40,7 @@ updates:
- package-ecosystem: "devcontainers"
directory: "/"
schedule:
interval: "monthly"
interval: "weekly"
cooldown:
default-days: 7
labels: ["dependencies"]
2 changes: 1 addition & 1 deletion .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Add a release label to this PR from the Labels section of the PR sidebar
## Checklist

- [ ] `just lint` passes
- [ ] `just test` passes
- [ ] `just coverage` passes
- [ ] Tests added or updated for the change
- [ ] Docs updated if needed (`README.md`, `docs/`, `CLAUDE.md`)
- [ ] Release label added
35 changes: 35 additions & 0 deletions .github/workflows/dependabot-auto-merge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Dependabot Auto-Merge

# Enables auto-merge on Dependabot PRs for minor and patch updates. The PR merges once
# required status checks pass. Needs "Allow auto-merge" enabled in the repo settings.

on:
pull_request:
types: [ opened, reopened, synchronize ]

permissions: {}

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}

jobs:
auto-merge:
if: github.event.pull_request.user.login == 'dependabot[bot]'
runs-on: ubuntu-latest
timeout-minutes: 15
permissions:
contents: write
pull-requests: write
steps:
- name: Fetch Dependabot metadata
id: metadata
uses: dependabot/fetch-metadata@25dd0e34f4fe68f24cc83900b1fe3fe149efef98 # v3.1.0

- name: Enable auto-merge
if: steps.metadata.outputs.update-type != 'version-update:semver-major'
env:
GH_TOKEN: ${{ github.token }}
PR_URL: ${{ github.event.pull_request.html_url }}
run: |
gh pr merge --auto --squash "$PR_URL"
32 changes: 29 additions & 3 deletions .github/workflows/python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,14 @@ on:

permissions: {}

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}

jobs:
code-check-and-unit-test:
runs-on: ubuntu-slim
runs-on: ubuntu-latest
timeout-minutes: 15
permissions:
contents: read
steps:
Expand All @@ -24,11 +29,32 @@ jobs:
version: ">=0.13,<0.14"
- name: Setup environment
run: |
uv tool install rust-just
uv tool install rust-just==1.59.0
uv tool install actionlint-py==1.7.12.25
uv tool install yamllint==1.38.0
just sync
- name: Lint
run: |
just ci-lint
- name: Spell check
uses: crate-ci/typos@276087d9a4f06398b3e04825487805e2d7375888 # v1.52.2
- name: Unit tests
run: |
just test
just coverage
- name: Docs build
run: |
just docs-build
markdownlint:
runs-on: ubuntu-latest
timeout-minutes: 15
permissions:
contents: read
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
# Keep markdownlint-cli2 in step with the VS Code markdownlint extension
- name: Markdownlint
uses: DavidAnson/markdownlint-cli2-action@696eb3f2509270d7b882d2aa68347bc676e7af34 # v25.0.0
with:
globs: "**/*.md"
4 changes: 3 additions & 1 deletion .github/workflows/release-drafter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,5 +46,7 @@ jobs:
with:
mode: minimum
count: 1
labels: "breaking, feature, enhancement, bug, fix, chore, ci, dependencies, documentation, refactor, skip-changelog"
labels: >-
breaking, feature, enhancement, bug, fix, chore, ci, dependencies, documentation, refactor,
skip-changelog
use_api: true
58 changes: 46 additions & 12 deletions .github/workflows/security.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,14 @@ on:

permissions: {}

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}

jobs:
zizmor:
runs-on: ubuntu-slim
runs-on: ubuntu-latest
timeout-minutes: 15
permissions:
contents: read # only needed for private or internal repos
actions: read # only needed for private or internal repos
Expand All @@ -24,18 +29,47 @@ jobs:
uses: zizmorcore/zizmor-action@45d7276c9ca790aabd705e31ca99c6185c3e76dd # v0.8.1
with:
advanced-security: false
gitleaks:
runs-on: ubuntu-slim
pip-audit:
runs-on: ubuntu-latest
timeout-minutes: 15
permissions:
contents: read
steps:
- name: Checkout repository
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Install uv
uses: astral-sh/setup-uv@68559e99cc807c1eb7e9238fd43a15bba460eec2 # v10.3.3
with:
enable-cache: false
version: ">=0.13,<0.14"
- name: Setup environment
run: |
uv tool install rust-just==1.59.0
just sync
- name: Audit dependencies
run: |
just audit
betterleaks:
runs-on: ubuntu-latest
timeout-minutes: 15
permissions:
contents: read # needed for private repos
pull-requests: read # gitleaks lists the PR's commits to scan
contents: read # needed to check out a private repo
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
fetch-depth: 0
- name: Check gitleaks
uses: gitleaks/gitleaks-action@e0c47f4f8be36e29cdc102c57e68cb5cbf0e8d1e # v3.0.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITLEAKS_ENABLE_COMMENTS: false
persist-credentials: false
fetch-depth: 0
# betterleaks has no official action or PyPI package, so it is built from source
- name: Install Go
uses: actions/setup-go@d8cbb8045d7f43706b9177cceb36c1f91a6644d5 # v7.1.0
with:
go-version: stable
cache: false
- name: Install betterleaks
run: |
go install github.com/betterleaks/betterleaks@v1.10.1
- name: Scan git history for secrets
run: |
"$(go env GOPATH)/bin/betterleaks" git --redact .
Loading
Loading