Skip to content

Commit

Permalink
Sync with template
Browse files Browse the repository at this point in the history
  • Loading branch information
blakeNaccarato committed Jun 28, 2024
1 parent 3d259d7 commit 555c9f6
Show file tree
Hide file tree
Showing 33 changed files with 1,621 additions and 849 deletions.
11 changes: 11 additions & 0 deletions .all-contributorsrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"commitConvention": "angular",
"commitType": "docs",
"contributorsPerLine": 7,
"files": [
"CONTRIBUTORS.md",
"README.md"
],
"projectName": "boilercore",
"projectOwner": "softboiler"
}
4 changes: 2 additions & 2 deletions .copier-answers.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# Changes here will be overwritten by Copier; NEVER EDIT MANUALLY
_commit: 1949a71
_commit: 0764b33
_src_path: gh:blakeNaccarato/copier-python
actions_runner: ubuntu-22.04
active: true
github_repo_name: boilercore
project_description: Common functionality of boiler repositories.
project_description: Common functionality of boiler repositories
project_email: [email protected]
project_name: boilercore
project_owner_github_username: softboiler
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/changerelease.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ on:
workflow_dispatch:
push:
branches: ["main"]
tags: ["*"]
paths: ["CHANGELOG.md"]
defaults:
run:
Expand All @@ -21,5 +20,5 @@ jobs:
steps:
- uses: "dropseed/changerelease@3b121c9e98fa055f59a32b023cb4fd2325f4d9dc" # v1.6.0
with:
github_token: "${{ secrets.GITHUB_TOKEN }}"
github_token: "${{ github.token }}"
tag_prefix: ""
10 changes: 6 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ jobs:
with:
python-version: "${{ matrix.python }}"
- run: "scripts/Sync-Py.ps1"
- run: "sphinx-build -EaT docs _site"
- run: ". scripts/Initialize-Shell.ps1; sphinx-build -EaT docs _site"
- uses: "actions/upload-pages-artifact@56afc609e74202658d3ffba0e8f6dda462b719fa" # v3.0.1
deploy-docs:
if: github.event_name != 'pull_request'
Expand Down Expand Up @@ -155,11 +155,13 @@ jobs:
- "macos-13"
- "ubuntu-22.04"
- "windows-2022"
# ? https://github.com/actions/python-versions/releases
python:
# - "3.10" # ? `scripts` currently requires `tomllib`, which is > 3.10
# - "3.10" # ? Using some 3.11-specific features
- "3.11"
# - "3.12" # ? No support in my commit-pinned fork of cachier
# - "3.13.0-alpha.5" # ? https://github.com/PyO3/pyo3/issues/3555
# - "3.13.0-beta.2" # ? https://github.com/indygreg/python-zstandard/issues/210
# - "3.14.0-alpha.0" # ? https://github.com/PyO3/pyo3/issues/3555
runs-on: "${{ matrix.runner }}"
steps:
- uses: "actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332" # v4.1.7
Expand All @@ -179,7 +181,7 @@ jobs:
# ! https://github.com/pytest-dev/pytest-cov/issues/479#issuecomment-1247444988
- run: ". scripts/Initialize-Shell.ps1; pytest --cov --cov-config pyproject.toml"
- if: startsWith(matrix.runner, 'ubuntu') && matrix.python == '3.11'
uses: "codecov/codecov-action@125fc84a9a348dbcf27191600683ec096ec9021c" # v4.4.1
uses: "codecov/codecov-action@e28ff129e5465c2c0dcc6f003fc735cb6ae0c673" # v4.5.0
env:
CODECOV_TOKEN: "${{ secrets.CODECOV_TOKEN }}"
lock:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/high.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Test the upper-bound dependencies of the project
# Test upper-bound project dependencies
name: "high"
on:
workflow_dispatch:
Expand Down Expand Up @@ -48,7 +48,7 @@ jobs:
with:
python-version: "${{ matrix.python }}"
- run: "scripts/Sync-Py.ps1"
- run: "sphinx-build -EaT docs _site"
- run: ". scripts/Initialize-Shell.ps1; sphinx-build -EaT docs _site"
- uses: "actions/upload-pages-artifact@56afc609e74202658d3ffba0e8f6dda462b719fa" # v3.0.1
ruff:
needs: "sync"
Expand Down
40 changes: 18 additions & 22 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,37 +1,33 @@
# Publish a Python package to PyPI
# Publish release
name: "release"
on:
workflow_dispatch:
defaults:
run:
shell: "pwsh"
env:
UV_CACHE_DIR: ".cache/uv-cache"
UV_SYSTEM_PYTHON: "true"
release:
types: ["published"]
jobs:
release:
permissions:
contents: "write"
id-token: "write"
attestations: "write"
strategy:
matrix:
runner: ["ubuntu-22.04"]
python: ["3.11"]
runs-on: "${{ matrix.runner }}"
environment:
name: "release"
url: "https://pypi.org/p/boilercv"
steps:
- uses: "dropseed/changerelease@3b121c9e98fa055f59a32b023cb4fd2325f4d9dc" # v1.6.0
with:
github_token: "${{ secrets.GITHUB_TOKEN }}"
tag_prefix: ""
- uses: "actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332" # v4.1.7
with:
submodules: True
- uses: "actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9" # v4.0.2
with:
path: "${{ env.UV_CACHE_DIR }}"
key: "uv-${{ matrix.runner }}-${{ matrix.python }}-${{ hashFiles('lock.json') }}"
- uses: "actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d" # v5.1.0
with:
python-version: "${{ matrix.python }}"
- run: "scripts/Sync-Py.ps1"
- run: ". scripts/Initialize-Shell.ps1; flit publish"
- run: "curl -LsSf https://astral.sh/uv/install.sh | sh"
- run: "python -m pip install build; python -m build --installer uv"
- uses: actions/attest-build-provenance@bdd51370e0416ac948727f861e03c2f05d32d78e # v1.3.2
with:
subject-path: "dist/**"
- run: "gh release upload '${{ github.event.release.tag_name }}' dist/**"
env:
FLIT_USERNAME: "__token__"
FLIT_PASSWORD: "${{ secrets.PYPI_TOKEN }}"
GITHUB_TOKEN: "${{ github.token }}"
- uses: "pypa/gh-action-pypi-publish@ec4db0b4ddc65acdf4bff5fa45ac92d78b56bdf0" # v1.9.0
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ repos:
|tests/.*
)$
- repo: "https://github.com/charliermarsh/ruff-pre-commit"
rev: "v0.4.8"
rev: "v0.4.10"
hooks:
- id: "ruff"
args: ["--extend-fixable", "PIE790"]
Expand Down
1 change: 0 additions & 1 deletion .python-versions

This file was deleted.

65 changes: 62 additions & 3 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,27 @@
"default": "",
"options": ["", "modelfun"]
},
// * -------------------------------------------------------------------------- * //
{
"id": "version",
"type": "promptString",
"description": "Version number."
},
{
"id": "dependency",
"type": "promptString",
"description": "Show tree of packages requesting this dependency."
},
{
"id": "templateOptions",
"description": "Template options.",
"type": "pickString",
"options": ["", "-Stay", "-Stay -Prompt", "-Recopy -Prompt"]
"options": ["", "-Prompt", "-Stay", "-Stay -Prompt", "-Recopy -Prompt"]
},
{
"id": "changeType",
"description": "Change type.",
"type": "pickString",
"options": ["breaking", "deprecation", "change"]
}
],
"tasks": [
Expand Down Expand Up @@ -93,7 +108,7 @@
}
},
{
"label": "setup: Perform first-time setup",
"label": "setup: Initialize repository",
"type": "shell",
"command": "scripts/Initialize-Repo.ps1",
"icon": { "id": "file-symlink-directory" },
Expand All @@ -106,6 +121,29 @@
"icon": { "id": "file-symlink-directory" },
"problemMatcher": []
},
{
"label": "setup: Initialize Windows machine",
"type": "shell",
"options": { "shell": { "executable": "powershell" } },
"command": "scripts/Initialize-Windows.ps1",
"icon": { "id": "file-symlink-directory" },
"problemMatcher": []
},
{
"label": "setup: Initialize Linux/MacOS machine",
"type": "shell",
"options": { "shell": { "executable": "bash" } },
"command": "scripts/Initialize-LinuxMacOS.sh",
"icon": { "id": "file-symlink-directory" },
"problemMatcher": []
},
{
"label": "setup: Finish initializing machine (cross-platform)",
"type": "shell",
"command": "scripts/Initialize-Machine.ps1",
"icon": { "id": "file-symlink-directory" },
"problemMatcher": []
},

// * -------------------------------------------------------------------------- * //
// * PRE-COMMIT * //
Expand Down Expand Up @@ -139,6 +177,20 @@
// * -------------------------------------------------------------------------- * //
// * OTHER TASKS * //

{
"label": "task: Generate changelog entry",
"type": "shell",
"command": ". scripts/Initialize-Shell.ps1; python -m boilercore_tools add-change ${input:changeType}",
"icon": { "id": "request-changes" },
"problemMatcher": []
},
{
"label": "task: Show tree of packages requesting a dependency",
"type": "shell",
"command": ". scripts/Initialize-Shell.ps1; pipdeptree --reverse --packages ${input:dependency}",
"icon": { "id": "versions" },
"problemMatcher": []
},
{
"label": "task: Run pytest with coverage",
"type": "shell",
Expand Down Expand Up @@ -173,6 +225,13 @@
"command": ". scripts/Initialize-Shell.ps1; snakeviz .prof",
"icon": { "id": "graph-line" },
"problemMatcher": []
},
{
"label": "task: Bump version",
"type": "shell",
"command": "copier update --vcs-ref=$(git rev-parse HEAD:submodules/template) --defaults --data project_version='${input:version}'; git add .; git commit -m 'Bump version'; git push",
"icon": { "id": "graph-line" },
"problemMatcher": []
}
]
}
4 changes: 4 additions & 0 deletions CONTRIBUTORS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Contributors

<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
<!-- ALL-CONTRIBUTORS-LIST:END -->
9 changes: 8 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# `boilercore`
# boilercore

[![All Contributors](https://img.shields.io/github/all-contributors/softboiler/boilercv?color=ee8449&style=flat-square)](#contributors)

Common functionality of boiler repositories.

Expand All @@ -7,3 +9,8 @@ Common functionality of boiler repositories.
- [Changes](<https://softboiler.github.io/boilercore/changelog.html>)
- [Docs](<https://softboiler.github.io/boilercore>)
- [Contributing](<https://softboiler.github.io/boilercore/contributing.html>)

## Contributors

<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
<!-- ALL-CONTRIBUTORS-LIST:END -->
4 changes: 4 additions & 0 deletions docs/contributors.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
:::{include} ../CONTRIBUTORS.md
:relative-docs: docs/
:relative-images:
:::
3 changes: 3 additions & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
# `boilercore`

[![All Contributors](https://img.shields.io/github/all-contributors/softboiler/boilercore?color=ee8449&style=flat-square)](../README.md#contributors)

Common functionality of boiler repositories.

:::{toctree}
:hidden:
contributing
changelog
contributors
apidocs/index
references
:::
6 changes: 6 additions & 0 deletions docs/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ dependencies = [
"sphinxcontrib-bibtex==2.6.2",
"sphinxcontrib-mermaid==0.9.2",
"sphinxcontrib-towncrier==0.4.0a0",
# ? https://nvd.nist.gov/vuln/detail/CVE-2024-37891
# ? via sphinx
"urllib3>=2.2.2",
# ? Other deps
"ipykernel>=6.29.4",
"matplotlib>=3.7.2",
Expand Down Expand Up @@ -59,6 +62,9 @@ ignore_unused = [
"sphinxcontrib-bibtex",
"sphinxcontrib-mermaid",
"sphinxcontrib-towncrier",
# ? https://nvd.nist.gov/vuln/detail/CVE-2024-37891
# ? via sphinx
"urllib3",
]
[tool.fawltydeps.custom_mapping]
ipykernel = ["IPython"]
Expand Down
Loading

0 comments on commit 555c9f6

Please sign in to comment.