Skip to content

Commit

Permalink
Sync with template
Browse files Browse the repository at this point in the history
  • Loading branch information
blakeNaccarato committed Jul 5, 2024
1 parent 67d33b7 commit 14a0cb1
Show file tree
Hide file tree
Showing 22 changed files with 192 additions and 159 deletions.
19 changes: 15 additions & 4 deletions .all-contributorsrc
Original file line number Diff line number Diff line change
@@ -1,11 +1,22 @@
{
"commitConvention": "angular",
"commitType": "docs",
"contributorsPerLine": 7,
"files": [
"CONTRIBUTORS.md",
"README.md"
"CONTRIBUTORS.md",
"README.md"
],
"projectName": "boilercore",
"projectOwner": "softboiler"
"projectOwner": "softboiler",
"commitType": "docs",
"contributors": [
{
"login": "blakeNaccarato",
"name": "Blake Naccarato",
"avatar_url": "https://avatars.githubusercontent.com/u/20692450?v=4",
"profile": "https://www.blakenaccarato.com/",
"contributions": [
"code"
]
}
]
}
2 changes: 1 addition & 1 deletion .copier-answers.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Changes here will be overwritten by Copier; NEVER EDIT MANUALLY
_commit: 2024.1.1-11-g3eb904d
_commit: 2024.1.1-41-g4b4fb7f
_src_path: gh:blakeNaccarato/copier-python
actions_runner: ubuntu-22.04
active: true
Expand Down
49 changes: 28 additions & 21 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"ghcr.io/devcontainers/features/powershell:1.4.0": {
"version": "7.4.1"
},
"ghcr.io/devcontainers/features/python:1.6.1": {
"ghcr.io/devcontainers/features/python:1.6.2": {
"version": "3.11"
},
"ghcr.io/devcontainers/features/desktop-lite:1.2.0": {
Expand Down Expand Up @@ -57,41 +57,48 @@
"pythonREPLSmartSend",
"pythonTestAdapter",
"pythonTerminalEnvVarActivation"
]
],
// ? Not picked up in workspace settings in Codespaces
"[python]": {
"editor.defaultFormatter": "charliermarsh.ruff",
"editor.wordWrap": "off"
},
"[ipynb]": {
"editor.defaultFormatter": "charliermarsh.ruff",
"editor.wordWrap": "off"
}
},
"extensions": [
"aaron-bond.better-comments@3.0.2",
"bierner.markdown-mermaid@1.22.0",
"bierner.markdown-mermaid@1.23.1",
"bierner.markdown-preview-github-styles@2.0.4",
"charliermarsh.ruff@2024.16.0",
"davidanson.vscode-markdownlint@0.54.0",
"charliermarsh.ruff@2024.30.0",
"davidanson.vscode-markdownlint@0.55.0",
"donjayamanne.githistory@0.6.20",
"eamodio.gitlens@14.9.0",
"eamodio.gitlens@15.1.0",
"esbenp.prettier-vscode@10.4.0",
"executablebookproject.myst-highlight@0.11.0",
"github.codespaces@1.16.17",
"github.codespaces@1.16.23",
"GitHub.remotehub@0.62.0",
"github.vscode-github-actions@0.26.2",
"github.vscode-pull-request-github@0.80.1",
"iterative.dvc@1.2.11",
"ms-azuretools.vscode-docker@1.29.0",
"ms-python.debugpy@2024.2.0",
"ms-python.python@2024.2.1",
"ms-python.vscode-pylance@2024.3.2",
"ms-toolsai.jupyter@2024.1.1",
"ms-vscode-remote.remote-containers@0.353.0",
"github.vscode-github-actions@0.26.3",
"github.vscode-pull-request-github@0.88.1",
"iterative.dvc@1.2.14",
"ms-azuretools.vscode-docker@1.29.1",
"ms-python.debugpy@2024.6.0",
"ms-python.python@2024.8.1",
"ms-python.vscode-pylance@2024.6.1",
"ms-toolsai.jupyter@2024.4.0",
"ms-vscode-remote.remote-containers@0.369.0",
"ms-vscode.powershell@2024.2.2",
"njpwerner.autodocstring@0.6.1",
"njpwerner.autodocstring@0.6.1",
"redhat.vscode-yaml@1.14.0",
"rodolphebarbanneau.python-docstring-highlighter@0.2.3",
"redhat.vscode-yaml@1.15.0",
"rodolphebarbanneau.python-docstring-highlighter@0.2.3",
"ryanluker.vscode-coverage-gutters@2.11.1",
"sourcery.sourcery@1.16.0",
"sourcery.sourcery@1.19.0",
"stkb.rewrap@1.16.3",
"TakumiI.markdowntable@0.11.0",
"tamasfe.even-better-toml@0.19.2",
"yy0931.mplstyle@1.14.3",
"yy0931.mplstyle@1.14.4",
"yzhang.markdown-all-in-one@3.6.2"
]
}
Expand Down
4 changes: 0 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -155,13 +155,9 @@ jobs:
- "macos-13"
- "ubuntu-22.04"
- "windows-2022"
# ? https://github.com/actions/python-versions/releases
python:
# - "3.10" # ? Using some 3.11-specific features
- "3.11"
- "3.12"
# - "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 Down
4 changes: 3 additions & 1 deletion .github/workflows/high.yml
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,9 @@ jobs:
- "macos-13"
- "ubuntu-22.04"
- "windows-2022"
python: ["3.11"]
python:
- "3.11"
- "3.12"
runs-on: "${{ matrix.runner }}"
steps:
- uses: "actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332" # v4.1.7
Expand Down
13 changes: 11 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
# Publish release
name: "release"
concurrency:
group: "${{ github.workflow }}-${{ github.ref }}"
cancel-in-progress: True
on:
release:
types: ["published"]
defaults:
run:
shell: "pwsh"
jobs:
release:
permissions:
Expand All @@ -22,8 +28,8 @@ jobs:
- uses: "actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d" # v5.1.0
with:
python-version: "${{ matrix.python }}"
- run: "curl -LsSf https://astral.sh/uv/install.sh | sh"
- run: "python -m pip install build; python -m build --installer uv"
- run: "scripts/Sync-Py.ps1 -Release"
- run: ". scripts/Initialize-Shell.ps1; python -m build --installer uv"
- uses: actions/attest-build-provenance@bdd51370e0416ac948727f861e03c2f05d32d78e # v1.3.2
with:
subject-path: "dist/**"
Expand All @@ -32,4 +38,7 @@ jobs:
GITHUB_TOKEN: "${{ github.token }}"
- uses: "pypa/gh-action-pypi-publish@ec4db0b4ddc65acdf4bff5fa45ac92d78b56bdf0" # v1.9.0
changerelease:
needs: "release"
permissions:
contents: "write"
uses: "./.github/workflows/changerelease.yml"
1 change: 1 addition & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
"git.confirmNoVerifyCommit": false,
"git.commandsToLog": ["commit", "push"],
//! Line-width
"git.inputValidation": true,
"git.inputValidationSubjectLength": 88,
"git.inputValidationLength": 1e100,
"editor.wordWrapColumn": 88,
Expand Down
80 changes: 43 additions & 37 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,32 +5,25 @@
"version": "2.0.0",
"inputs": [
{
"id": "stage",
"id": "templateOptions",
"type": "pickString",
"description": "stage",
"default": "",
"options": ["", "modelfun"]
"description": "Template options.",
"options": ["", "-Prompt", "-Stay", "-Stay -Prompt", "-Recopy -Prompt"]
},
{
"id": "version",
"id": "ref",
"type": "promptString",
"description": "Version number."
"description": "Commit SHA or other VCS reference."
},
{
"id": "dependency",
"type": "promptString",
"description": "Show tree of packages requesting this dependency."
},
{
"id": "templateOptions",
"type": "pickString",
"description": "Template options.",
"options": ["", "-Prompt", "-Stay", "-Stay -Prompt", "-Recopy -Prompt"]
},
{
"id": "ref",
"id": "version",
"type": "promptString",
"description": "Commit SHA or other VCS reference.",
"description": "Version number."
},
{
"id": "changeType",
Expand Down Expand Up @@ -156,46 +149,38 @@
"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 * //
// * OTHER TASKS * //

{
"label": "pre-commit",
"label": "task: pre-commit",
"type": "shell",
"command": ". scripts/Initialize-Shell.ps1; pre-commit",
"icon": { "id": "git-commit" },
"problemMatcher": []
},
{
"label": "pre-commit: all",
"label": "task: pre-commit (all)",
"type": "shell",
"command": ". scripts/Initialize-Shell.ps1; pre-commit run --all-files",
"icon": { "id": "git-commit" },
"problemMatcher": []
},

// * -------------------------------------------------------------------------- * //
// * GIT * //

{
"label": "git: Rebase back to fork",
"label": "task: Rebase back to fork",
"type": "shell",
"command": "git rebase -i --fork-point main",
"icon": { "id": "git-branch" },
"problemMatcher": []
},

// * -------------------------------------------------------------------------- * //
// * 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",
Expand Down Expand Up @@ -225,14 +210,14 @@
"problemMatcher": []
},
{
"label": "task: profile this file",
"label": "task: Profile this file",
"type": "shell",
"command": ". scripts/Initialize-Shell.ps1; python -m cProfile -o .prof ${file}",
"icon": { "id": "graph-line" },
"problemMatcher": []
},
{
"label": "task: view profile results with snakeviz",
"label": "task: View profile results with snakeviz",
"type": "shell",
"command": ". scripts/Initialize-Shell.ps1; snakeviz .prof",
"icon": { "id": "graph-line" },
Expand All @@ -241,8 +226,29 @@
{
"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'; towncrier build --version '${input:version}'",
"icon": { "id": "graph-line" },
"command": ". scripts/Initialize-Shell.ps1; copier update --vcs-ref=$(git rev-parse HEAD:submodules/template) --defaults --data project_version='${input:version}'; towncrier build --yes --version '${input:version}'; git add .; git commit -m '${input:version}'",
"icon": { "id": "tag" },
"problemMatcher": []
},
{
"label": "task: Release version",
"type": "shell",
"command": ". scripts/Initialize-Shell.ps1; $version = (Get-Content '.copier-answers.yml' | Select-String -Pattern '^project_version:\\s(.+)$').Matches.Groups[1].value; git tag --sign -m $version $version; git push; gh release create --discussion-category='announcements' --notes='' --title=$version --verify-tag $version",
"icon": { "id": "tag" },
"problemMatcher": []
},
{
"label": "task: Update changelog",
"type": "shell",
"command": ". scripts/Initialize-Shell.ps1; python -m boilercore_tools add-change ${input:changeType}",
"icon": { "id": "tag" },
"problemMatcher": []
},
{
"label": "task: Update changelog with the latest commit's message",
"type": "shell",
"command": ". scripts/Initialize-Shell.ps1; towncrier create +$((Get-Date).ToUniversalTime().ToString('o').Replace(':','-')).change.md --content $($(git log -1 --format='%s') + ' ([' + $(git rev-parse --short HEAD) + '](https://github.com/softboiler/boilercore/commit/' + $(git rev-parse HEAD) + '))\n')",
"icon": { "id": "tag" },
"problemMatcher": []
}
]
Expand Down
13 changes: 13 additions & 0 deletions CONTRIBUTORS.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,17 @@
# Contributors

<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
<!-- prettier-ignore-start -->
<!-- markdownlint-disable -->
<table>
<tbody>
<tr>
<td align="center" valign="top" width="14.28%"><a href="https://www.blakenaccarato.com/"><img src="https://avatars.githubusercontent.com/u/20692450?v=4?s=100" width="100px;" alt="Blake Naccarato"/><br /><sub><b>Blake Naccarato</b></sub></a><br /><a href="#code-blakeNaccarato" title="Code">💻</a></td>
</tr>
</tbody>
</table>

<!-- markdownlint-restore -->
<!-- prettier-ignore-end -->

<!-- ALL-CONTRIBUTORS-LIST:END -->
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,17 @@ pip install 'cachier @ git+https://github.com/blakeNaccarato/cachier@db7f394a553
## Contributors

<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
<!-- prettier-ignore-start -->
<!-- markdownlint-disable -->
<table>
<tbody>
<tr>
<td align="center" valign="top" width="14.28%"><a href="https://www.blakenaccarato.com/"><img src="https://avatars.githubusercontent.com/u/20692450?v=4?s=100" width="100px;" alt="Blake Naccarato"/><br /><sub><b>Blake Naccarato</b></sub></a><br /><a href="#code-blakeNaccarato" title="Code">💻</a></td>
</tr>
</tbody>
</table>

<!-- markdownlint-restore -->
<!-- prettier-ignore-end -->

<!-- ALL-CONTRIBUTORS-LIST:END -->
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ def dpath(path: Path, rel: Path = DOCS) -> str:
"default_mode": "light"
}
COMMON_OPTIONS = {
"repository_url": f"https://github.com/{USER}/{PACKAGE}",
"repository_url": f"https://github.com/{USER}/{REPO}",
"path_to_docs": dpath(DOCS),
}
html_theme_options = {
Expand Down
2 changes: 1 addition & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# `boilercore`
# boilercore

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

Expand Down
Loading

0 comments on commit 14a0cb1

Please sign in to comment.