-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #40 from gdsfactory/update-cicd
update pyproject/workflows
- Loading branch information
Showing
12 changed files
with
367 additions
and
388 deletions.
There are no files selected for viewing
This file contains 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,67 @@ | ||
name-template: 'v$RESOLVED_VERSION' | ||
tag-template: 'v$RESOLVED_VERSION' | ||
change-template: '- $TITLE [#$NUMBER](https://github.com/gdsfactory/kweb/pull/$NUMBER)' | ||
template: | | ||
# What's Changed | ||
$CHANGES | ||
**Full Changelog**: https://github.com/$OWNER/$REPOSITORY/compare/$PREVIOUS_TAG...v$RESOLVED_VERSION | ||
categories: | ||
- title: 'Breaking' | ||
label: 'breaking' | ||
- title: 'New' | ||
labels: | ||
- 'enhancement' | ||
- 'feature' | ||
- title: 'Bug Fixes' | ||
label: 'bug' | ||
- title: 'Maintenance' | ||
label: 'maintenance' | ||
- title: 'Documentation' | ||
label: 'documentation' | ||
- title: 'Other changes' | ||
- title: 'Dependency Updates' | ||
label: 'dependencies' | ||
collapse-after: 5 | ||
|
||
# Change major/breaking to major and enhancement/minor to minor after v1.0 | ||
version-resolver: | ||
minor: | ||
labels: | ||
- 'breaking' | ||
patch: | ||
labels: | ||
- 'enhancement' | ||
- 'bug' | ||
- 'maintenance' | ||
- 'documentation' | ||
- 'dependencies' | ||
- 'security' | ||
default: patch | ||
|
||
exclude-labels: | ||
- 'github_actions' | ||
|
||
autolabeler: | ||
- label: 'documentation' | ||
files: | ||
- '*.md' | ||
branch: | ||
- '/docs-.+/' | ||
- label: 'bug' | ||
branch: | ||
- '/^fix-.+/' | ||
title: | ||
- '/^fix/i' | ||
- label: 'enhancement' | ||
branch: | ||
- '/^feature-.+/' | ||
- '/^add-.+/' | ||
- '/^improve-.+/' | ||
title: | ||
- '/^add\s/i' | ||
- label: 'github_actions' | ||
files: | ||
- '.github/**/*.yml' |
This file contains 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,18 @@ | ||
name: Update Changelog | ||
|
||
on: | ||
pull_request: | ||
types: [ closed ] | ||
|
||
jobs: | ||
changelog: | ||
name: Update changelog | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
ref: main | ||
- uses: rhysd/changelog-from-release/action@v3 | ||
with: | ||
file: CHANGELOG.md | ||
github_token: ${{ secrets.GITHUB_TOKEN }} |
This file contains 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,37 @@ | ||
name: Release Drafter and Labels | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
types: [edited, opened, reopened, synchronize, unlabeled, labeled] | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
update_release_draft: | ||
permissions: | ||
contents: write | ||
pull-requests: write | ||
runs-on: ubuntu-latest | ||
steps: | ||
# Drafts your next Release notes as Pull Requests are merged into "master" | ||
- uses: release-drafter/release-drafter@v6 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
require_label: | ||
if: github.event.pull_request | ||
needs: update_release_draft | ||
runs-on: ubuntu-latest | ||
permissions: | ||
issues: write | ||
pull-requests: write | ||
steps: | ||
- uses: mheap/github-action-required-labels@v5 | ||
with: | ||
mode: minimum | ||
count: 1 | ||
labels: "breaking, bug, github_actions, documentation, dependencies, enhancement, feature, maintenance, security" | ||
add_comment: true |
This file contains 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
This file contains 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,147 +1,68 @@ | ||
exclude: | | ||
(?x)( | ||
^src/kweb/static/bootstrap/ | ||
) | ||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: "v4.4.0" | ||
rev: "v4.5.0" | ||
hooks: | ||
- id: check-added-large-files | ||
exclude: | | ||
(?x)^( | ||
dodata/docs/_static/.* | ||
)$ | ||
- id: check-case-conflict | ||
- id: check-merge-conflict | ||
- id: check-symlinks | ||
- id: check-yaml | ||
- id: debug-statements | ||
- id: end-of-file-fixer | ||
exclude: 'changelog\.d/.*|CHANGLEOG\.md' | ||
- id: mixed-line-ending | ||
- id: name-tests-test | ||
args: ["--pytest-test-first"] | ||
- id: requirements-txt-fixer | ||
- id: trailing-whitespace | ||
# - id: end-of-file-fixer | ||
# - id: mixed-line-ending | ||
# - id: name-tests-test | ||
# args: ["--pytest-test-first"] | ||
# - id: trailing-whitespace | ||
|
||
- repo: https://github.com/charliermarsh/ruff-pre-commit | ||
rev: "v0.2.0" | ||
hooks: | ||
- id: ruff | ||
- repo: https://github.com/djlint/djLint | ||
rev: v1.34.1 | ||
hooks: | ||
- id: djlint-reformat-jinja | ||
files: "\\.html" | ||
types_or: ['html'] | ||
exclude: | | ||
(?x)^( | ||
changelog\.d/.*| | ||
CHANGELOG\.md | ||
src/kweb/static/bootstrap/.* | ||
)$ | ||
- repo: https://github.com/pycqa/isort | ||
rev: "5.12.0" | ||
- id: djlint-jinja | ||
files: "\\.html" | ||
types_or: ['html'] | ||
exclude: | | ||
(?x)^( | ||
src/kweb/static/bootstrap/.* | ||
)$ | ||
- repo: https://github.com/shellcheck-py/shellcheck-py | ||
rev: v0.9.0.6 | ||
hooks: | ||
- id: isort | ||
files: "kweb/.*" | ||
args: ["--profile", "black", "--filter-files"] | ||
|
||
- repo: https://github.com/psf/black | ||
rev: "23.7.0" | ||
- id: shellcheck | ||
|
||
- repo: https://github.com/macisamuele/language-formatters-pre-commit-hooks | ||
rev: v2.12.0 | ||
hooks: | ||
- id: black | ||
|
||
# - repo: https://github.com/pycqa/flake8 | ||
# rev: "647996c743f9e77368ce46cc74abe98549dd4c3a" | ||
# hooks: | ||
# - id: flake8 | ||
- id: pretty-format-toml | ||
args: [--autofix] | ||
|
||
- repo: https://github.com/codespell-project/codespell | ||
rev: v2.2.6 | ||
hooks: | ||
- id: codespell | ||
additional_dependencies: | ||
- tomli | ||
exclude: | | ||
(?x)^( | ||
src/kweb/static/bootstrap/.* | ||
)$ | ||
- repo: https://github.com/kynan/nbstripout | ||
rev: 0.6.1 | ||
rev: 0.7.1 | ||
hooks: | ||
- id: nbstripout | ||
files: ".ipynb" | ||
|
||
- repo: https://github.com/asottile/pyupgrade | ||
rev: v3.10.1 | ||
hooks: | ||
- id: pyupgrade | ||
args: [--py310-plus, --keep-runtime-typing] | ||
|
||
# - repo: https://github.com/codespell-project/codespell | ||
# rev: 3841ffe24aba604a5d16439c8216b018a7ec649a | ||
# hooks: | ||
# - id: codespell | ||
# args: ["-L TE,TE/TM,te,ba,FPR,fpr_spacing,ro,donot"] | ||
|
||
- repo: https://github.com/shellcheck-py/shellcheck-py | ||
rev: v0.9.0.5 | ||
hooks: | ||
- id: shellcheck | ||
|
||
# - repo: https://github.com/pre-commit/pygrep-hooks | ||
# rev: 7b4409161486c6956bb3206ce96db5d56731b1b9 # Use the ref you want to point at | ||
# hooks: | ||
# - id: python-use-type-annotations | ||
|
||
- repo: https://github.com/PyCQA/bandit | ||
rev: 1.7.5 | ||
hooks: | ||
- id: bandit | ||
args: [--exit-zero] | ||
# ignore all tests, not just tests data | ||
exclude: ^tests/ | ||
# - repo: https://github.com/pre-commit/mirrors-mypy | ||
# rev: "v0.991" | ||
# hooks: | ||
# - id: mypy | ||
# exclude: ^(docs/|example-plugin/|tests/fixtures) | ||
# additional_dependencies: | ||
# - "pydantic" | ||
# - repo: https://github.com/terrencepreilly/darglint | ||
# rev: master | ||
# hooks: | ||
# - id: darglint | ||
# - repo: https://github.com/pycqa/pydocstyle | ||
# rev: "a6fe4222012e990042c86cdaaa904a8d059752ee" | ||
# hooks: | ||
# - id: pydocstyle | ||
# additional_dependencies: ["pydocstyle[toml]"] | ||
# - repo: https://github.com/asottile/reorder_python_imports | ||
# rev: 2b2f0c74acdb3de316e23ceb7dd0d7945c354050 | ||
# hooks: | ||
# - id: reorder-python-imports | ||
# - repo: https://github.com/PyCQA/pylint | ||
# rev: v2.14.1 | ||
# hooks: | ||
# - id: pylint | ||
# args: [--exit-zero] | ||
# - repo: https://github.com/macisamuele/language-formatters-pre-commit-hooks | ||
# rev: 6565d773ca281682d7062d4c0be74538cc474cc9 | ||
# hooks: | ||
# - id: pretty-format-java | ||
# args: [--autofix] | ||
# - id: pretty-format-kotlin | ||
# args: [--autofix] | ||
# - id: pretty-format-yaml | ||
# args: [--autofix, --indent, "2"] | ||
# - repo: https://github.com/adrienverge/yamllint.git | ||
# rev: v1.21.0 # or higher tag | ||
# hooks: | ||
# - id: yamllint | ||
# args: [--format, parsable, --strict] | ||
# - repo: https://github.com/jumanjihouse/pre-commit-hook-yamlfmt | ||
# rev: 0.1.0 # or specific tag | ||
# hooks: | ||
# - id: yamlfmt | ||
- repo: https://github.com/pre-commit/pygrep-hooks | ||
rev: "v1.10.0" | ||
hooks: | ||
- id: python-check-blanket-noqa | ||
- id: python-check-blanket-type-ignore | ||
- id: python-no-log-warn | ||
- id: python-no-eval | ||
- id: python-use-type-annotations | ||
- id: rst-backticks | ||
- id: rst-directive-colons | ||
- id: rst-inline-touching-normal | ||
# - repo: https://github.com/nbQA-dev/nbQA | ||
# rev: 3e5186603806260939b5f1b0372c058203c65553 | ||
# hooks: | ||
# - id: nbqa-black | ||
# additional_dependencies: [jupytext, black] # optional, only if you're using Jupytext | ||
# - id: nbqa-pyupgrade | ||
# args: ["--py37-plus"] | ||
# # - id: nbqa-flake8 | ||
# # - id: nbqa-isort | ||
# # args: ["--float-to-top"] | ||
- repo: https://github.com/charliermarsh/ruff-pre-commit | ||
rev: "v0.0.285" | ||
hooks: | ||
- id: ruff |
This file contains 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
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.