-
Notifications
You must be signed in to change notification settings - Fork 1
Modernize #68
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Modernize #68
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,24 +1,34 @@ | ||
| version: 2 | ||
| updates: | ||
| - package-ecosystem: "devcontainers" | ||
| directory: "/" | ||
| - package-ecosystem: github-actions | ||
| directory: / | ||
| schedule: | ||
| interval: "monthly" | ||
|
|
||
| - package-ecosystem: "github-actions" | ||
| directory: "/" | ||
| schedule: | ||
| interval: "monthly" | ||
| interval: monthly | ||
| groups: | ||
| ci-dependencies: | ||
| patterns: | ||
| - "*" | ||
| cooldown: | ||
| default-days: 7 | ||
|
|
||
| - package-ecosystem: "pip" | ||
| directory: "/" | ||
| - package-ecosystem: uv | ||
| directory: / | ||
| schedule: | ||
| interval: "monthly" | ||
| interval: monthly | ||
| groups: | ||
| python-dependencies: | ||
| patterns: | ||
| - "*" | ||
| cooldown: | ||
| default-days: 7 | ||
|
|
||
| - package-ecosystem: pre-commit | ||
| directory: / | ||
| schedule: | ||
| interval: monthly | ||
| groups: | ||
| pre-commit-dependencies: | ||
| patterns: | ||
| - "*" | ||
| cooldown: | ||
| default-days: 7 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,20 +1,25 @@ | ||
| name: "Dependency Review" | ||
| name: Dependency Review | ||
|
|
||
| on: | ||
| push: | ||
| branches: | ||
| - main | ||
| pull_request: | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| jobs: | ||
| dependency-review: | ||
| runs-on: ubuntu-latest | ||
| runs-on: ubuntu-slim | ||
|
shenanigansd marked this conversation as resolved.
|
||
|
|
||
| steps: | ||
| - name: "Checkout Repository" | ||
| uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | ||
| - name: Checkout Repository | ||
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | ||
| with: | ||
| persist-credentials: false | ||
|
|
||
| - name: "Dependency Review" | ||
| uses: actions/dependency-review-action@a6993e2c61fd5dc440b409aa1d6904921c5e1894 # v4.3.5 | ||
| - name: Dependency Review | ||
| uses: actions/dependency-review-action@2031cfc080254a8a887f58cffee85186f0e49e48 # v4.9.0 | ||
| with: | ||
| config-file: darbiadev/.github/.github/dependency-review-config.yaml@main | ||
| config-file: darbiadev/.github/.github/dependency-review-config.yaml@a5bf74504f1a843e026621c41517952fa3a09f81 | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,61 @@ | ||
| name: Docs | ||
|
|
||
| on: | ||
| push: | ||
| branches: | ||
| - main | ||
| pull_request: | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| jobs: | ||
| build: | ||
| runs-on: ubuntu-slim | ||
|
|
||
| steps: | ||
|
shenanigansd marked this conversation as resolved.
|
||
| - name: Checkout repository | ||
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | ||
| with: | ||
| persist-credentials: false | ||
|
|
||
| - name: Install uv | ||
| uses: astral-sh/setup-uv@cec208311dfd045dd5311c1add060b2062131d57 # v8.0.0 | ||
| with: | ||
| enable-cache: true | ||
|
|
||
| - name: Setup Python | ||
| uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 | ||
| with: | ||
| python-version-file: "pyproject.toml" | ||
|
|
||
| - name: Sync dependencies | ||
| run: uv sync --group docs | ||
|
|
||
| - name: Build docs | ||
| run: uv run sphinx-build --builder dirhtml --nitpicky docs site | ||
|
|
||
| - name: Upload artifact | ||
| uses: actions/upload-pages-artifact@7b1f4a764d45c48632c6b24a0339c27f5614fb0b # v4.0.0 | ||
| with: | ||
| path: ./site | ||
|
|
||
| deploy: | ||
| if: ${{ github.ref == 'refs/heads/main' }} | ||
|
|
||
| permissions: | ||
| contents: read | ||
| pages: write | ||
| id-token: write | ||
|
|
||
| environment: | ||
| name: github-pages | ||
| url: ${{ steps.deployment.outputs.page_url }} | ||
|
|
||
| runs-on: ubuntu-slim | ||
|
|
||
|
shenanigansd marked this conversation as resolved.
|
||
| needs: build | ||
| steps: | ||
| - name: Deploy to GitHub Pages | ||
| id: deployment | ||
| uses: actions/deploy-pages@cd2ce8fcbc39b97be8ca5fce6e763baed58fa128 # v5.0.0 | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,38 +1,122 @@ | ||
| name: "Python CI" | ||
| name: Python CI | ||
|
|
||
| on: | ||
| push: | ||
| branches: | ||
| - main | ||
| pull_request: | ||
|
|
||
| jobs: | ||
| pre-commit: | ||
| uses: darbiadev/.github/.github/workflows/generic-precommit.yaml@41518576ed6c499ed3e68d5cbceaeaa50abd471a # v14.1.0 | ||
| permissions: | ||
| contents: read | ||
|
|
||
| jobs: | ||
| lint: | ||
| needs: pre-commit | ||
| uses: darbiadev/.github/.github/workflows/python-lint.yaml@41518576ed6c499ed3e68d5cbceaeaa50abd471a # v14.1.0 | ||
| runs-on: ubuntu-slim | ||
|
shenanigansd marked this conversation as resolved.
|
||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | ||
| with: | ||
| persist-credentials: false | ||
|
|
||
| - name: Install uv | ||
| uses: astral-sh/setup-uv@cec208311dfd045dd5311c1add060b2062131d57 # v8.0.0 | ||
| with: | ||
| enable-cache: true | ||
| resolution-strategy: "lowest" | ||
|
|
||
| - name: Setup Python | ||
| uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 | ||
| with: | ||
| python-version-file: "pyproject.toml" | ||
|
|
||
| - name: Sync dependencies | ||
| run: uv sync --group dev --group tests | ||
|
|
||
| - name: Run prek | ||
| run: uv run prek run --all-files | ||
|
|
||
| - name: Check formatting | ||
| run: uv run ruff format --check . | ||
|
|
||
| - name: Run Ruff checks | ||
| run: uv run ruff check --output-format=github . | ||
|
|
||
| - name: Run mypy | ||
| run: uv run mypy --strict src/ tests/ | ||
|
|
||
| - name: Run ty | ||
| run: uv run ty check . | ||
|
|
||
| test: | ||
| needs: lint | ||
| strategy: | ||
| matrix: | ||
| os: [ ubuntu-latest ] | ||
| python-version: [ "3.12" ] | ||
|
|
||
| uses: darbiadev/.github/.github/workflows/python-test.yaml@41518576ed6c499ed3e68d5cbceaeaa50abd471a # v14.1.0 | ||
| with: | ||
| os: ${{ matrix.os }} | ||
| python-version: ${{ matrix.python-version }} | ||
| secrets: | ||
| codecov-token: ${{ secrets.CODECOV_TOKEN }} | ||
|
|
||
| docs: | ||
| # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages | ||
| runs-on: ubuntu-slim | ||
| steps: | ||
|
shenanigansd marked this conversation as resolved.
|
||
| - name: Checkout repository | ||
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | ||
| with: | ||
| persist-credentials: false | ||
|
|
||
| - name: Install uv | ||
| uses: astral-sh/setup-uv@cec208311dfd045dd5311c1add060b2062131d57 # v8.0.0 | ||
| with: | ||
| enable-cache: true | ||
| resolution-strategy: "lowest" | ||
|
|
||
| - name: Setup Python | ||
| uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 | ||
| with: | ||
| python-version: 3.14 | ||
|
|
||
| - name: Sync dependencies | ||
| run: uv sync --group dev --group tests | ||
|
|
||
| - name: Run tests with coverage | ||
| run: uv run python -m coverage run -m pytest -v --junitxml=junit.xml | ||
|
|
||
| - name: Create coverage report | ||
| run: uv run coverage xml -o coverage.xml | ||
|
|
||
| - name: Upload coverage reports | ||
| if: ${{ !cancelled() }} | ||
| uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0 | ||
| with: | ||
| name: coverage-reports | ||
| path: | | ||
| coverage.xml | ||
| junit.xml | ||
| if-no-files-found: error | ||
|
|
||
| codecov: | ||
| runs-on: ubuntu-slim | ||
| needs: [test] | ||
| if: ${{ always() }} | ||
|
shenanigansd marked this conversation as resolved.
|
||
| permissions: | ||
| contents: read | ||
| pages: write | ||
| id-token: write | ||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | ||
| with: | ||
| persist-credentials: false | ||
|
|
||
| - name: Download coverage reports | ||
| if: ${{ !cancelled() }} | ||
| uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 | ||
| with: | ||
| name: coverage-reports | ||
| path: coverage | ||
|
|
||
| - name: Upload coverage to Codecov | ||
| if: ${{ !cancelled() }} | ||
| uses: codecov/codecov-action@57e3a136b779b570ffcdbf80b3bdc90e7fab3de2 # v6.0.0 | ||
| with: | ||
| report_type: coverage | ||
| use_oidc: true | ||
| files: coverage/coverage.xml | ||
|
|
||
| uses: darbiadev/.github/.github/workflows/github-pages-python-sphinx.yaml@41518576ed6c499ed3e68d5cbceaeaa50abd471a # v14.1.0 | ||
| - name: Upload test results to Codecov | ||
| if: ${{ !cancelled() }} | ||
| uses: codecov/codecov-action@57e3a136b779b570ffcdbf80b3bdc90e7fab3de2 # v6.0.0 | ||
| with: | ||
| report_type: test_results | ||
| use_oidc: true | ||
| files: coverage/junit.xml | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,63 +1,54 @@ | ||
| name: "Publish Python 🐍 distributions 📦 to PyPI" | ||
| name: Publish Python 🐍 distributions 📦 to PyPI | ||
|
|
||
| on: | ||
| push: | ||
| branches: | ||
| - main | ||
| pull_request: | ||
| branches: | ||
| - main | ||
| release: | ||
| types: [published] | ||
| types: | ||
| - published | ||
|
|
||
| jobs: | ||
| build: | ||
| name: "Build distribution 📦" | ||
| name: Build distribution 📦 | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| attestations: write | ||
| id-token: write | ||
|
|
||
| steps: | ||
| - name: "Checkout repository" | ||
| uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | ||
|
|
||
| - name: "Set up Python 3.x" | ||
| uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0 | ||
| - name: Checkout repository | ||
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | ||
| with: | ||
| python-version: "3.x" | ||
| cache: "pip" | ||
| cache-dependency-path: "pyproject.toml" | ||
|
|
||
| - name: "Install pypa/build" | ||
| run: >- | ||
| python -m | ||
| pip install | ||
| build | ||
| --user | ||
|
|
||
| - name: "Build a binary wheel and a source tarball" | ||
| run: >- | ||
| python -m | ||
| build | ||
| --outdir dist/ | ||
| persist-credentials: false | ||
|
|
||
| - name: "Upload packages" | ||
| uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3 | ||
| - name: Build and inspect Python 🐍 package 📦 | ||
| uses: hynek/build-and-inspect-python-package@fe0a0fb1925ca263d076ca4f2c13e93a6e92a33e # v2.17.0 | ||
| with: | ||
| name: python-package-distributions | ||
| path: dist/ | ||
| attest-build-provenance-github: ${{ github.event.action == 'published' }} | ||
|
|
||
| publish-to-pypi: | ||
| name: "Publish Python 🐍 distribution 📦 to PyPI" | ||
| name: Publish Python 🐍 distribution 📦 to PyPI | ||
| needs: build | ||
| if: ${{ github.event.action == 'published' }} | ||
| runs-on: ubuntu-latest | ||
| environment: | ||
| name: pypi | ||
| url: https://pypi.org/project/letsbuilda-pypi/ | ||
| url: https://pypi.org/project/bpp/${{ github.ref_name }} | ||
| permissions: | ||
| id-token: write | ||
|
|
||
| steps: | ||
| - name: "Download dists" | ||
| uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 | ||
| with: | ||
| name: python-package-distributions | ||
| path: dist/ | ||
| - name: Download dists | ||
| uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 | ||
| with: | ||
| name: Packages | ||
| path: dist/ | ||
|
|
||
| - name: "Publish distribution 📦 to PyPI" | ||
| uses: pypa/gh-action-pypi-publish@f7600683efdcb7656dec5b29656edb7bc586e597 # v1.10.3 | ||
| with: | ||
| verbose: true | ||
| print-hash: true | ||
| - name: Publish distribution 📦 to PyPI | ||
| uses: pypa/gh-action-pypi-publish@ed0c53931b1dc9bd32cbe73a98c7f6766f8a527e # v1.13.0 | ||
| with: | ||
| print-hash: true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,13 +1,7 @@ | ||
| # JetBrains | ||
| .idea | ||
|
|
||
| # Packaging | ||
| *.egg-info | ||
| dist | ||
| build | ||
|
|
||
| # Cache | ||
| __pycache__ | ||
|
|
||
| # Docs | ||
| docs/build |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.