Skip to content

Commit

Permalink
FEAT: convert _relink_references.py to module
Browse files Browse the repository at this point in the history
  • Loading branch information
redeboer committed Dec 3, 2023
1 parent 3269eb5 commit 27dd3a7
Show file tree
Hide file tree
Showing 22 changed files with 991 additions and 0 deletions.
51 changes: 51 additions & 0 deletions .cspell.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
{
"version": "0.2",
"enableFiletypes": [
"git-commit",
"github-actions-workflow",
"julia",
"jupyter"
],
"flagWords": [
"analyse",
"colour",
"comparision",
"favour",
"flavour",
"hte",
"optimise",
"paramater",
"parmater",
"transision",
"transisions"
],
"ignorePaths": [
"**/.cspell.json",
".editorconfig",
".gitignore",
".pre-commit-config.yaml",
".prettierignore",
".vscode/*",
"pyproject.toml"
],
"language": "en-US",
"words": [
"autoapi",
"autodoc",
"ComPWA",
"conda",
"mypy",
"PYTHONHASHSEED",
"SymPy"
],
"ignoreWords": [
"PyPI",
"commitlint",
"prereleased",
"refdomain",
"refspecific",
"reftarget",
"reftype",
"rtfd"
]
}
20 changes: 20 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
root = true

[*]
end_of_line = lf
indent_size = 2
indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true

[*.ipynb]
indent_size = unset

[*.{py,toml}]
indent_size = 4

[LICENSE]
indent_size = unset

[setup.cfg]
indent_size = 4
37 changes: 37 additions & 0 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name-template: sphinx-api-relink $NEXT_PATCH_VERSION
tag-template: $NEXT_PATCH_VERSION

references:
- main
- epic/*

categories:
- title: ✨ New features
label: ✨ Feature
- title: ⚠️ Enhancements and optimizations
label: ⚙️ Enhancement
- title: ⚠️ API changes
label: ⚠️ Interface
- title: ⚠️ Changes that may affect behavior
label: ❗ Behavior
- title: 🐛 Bug fixes
label: 🐛 Bug
- title: 📝 Documentation
label: 📝 Docs
- title: 🔨 Maintenance
label: 🔨 Maintenance
- title: 🖱️ Developer Experience
label: 🖱️ DX

change-template: "- $TITLE (#$NUMBER)"

replacers:
- search: /([A-Z]+!?:\s*)(.*)/g
replace: $2

sort-direction: ascending

template: |
$CHANGES
_The full changelog as commits can be found [here](https://github.com/ComPWA/sphinx-api-relink/compare/$PREVIOUS_TAG...$NEXT_PATCH_VERSION)._
20 changes: 20 additions & 0 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: CD

on:
release:
types:
- prereleased
- released

jobs:
milestone:
if: startsWith(github.ref, 'refs/tags')
uses: ComPWA/actions/.github/workflows/close-milestone.yml@v1
pypi:
if: startsWith(github.ref, 'refs/tags')
secrets: inherit
uses: ComPWA/actions/.github/workflows/publish-to-pypi.yml@v1
push:
if: startsWith(github.ref, 'refs/tags') && !github.event.release.prerelease
secrets: inherit
uses: ComPWA/actions/.github/workflows/push-to-version-branches.yml@v1
33 changes: 33 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: CI

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

env:
PYTHONHASHSEED: "0"

on:
push:
branches:
- main
- epic/*
- "[0-9]+.[0-9]+.x"
pull_request:
branches:
- main
- epic/*
- "[0-9]+.[0-9]+.x"
workflow_dispatch:
inputs:
specific-pip-packages:
description: Run CI with specific pip packages
required: false
type: string

jobs:
style:
if: inputs.specific-pip-packages == ''
secrets:
token: ${{ secrets.PAT }}
uses: ComPWA/actions/.github/workflows/pre-commit.yml@v1
22 changes: 22 additions & 0 deletions .github/workflows/clean-caches.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Clean caches

on:
pull_request:
types:
- closed
workflow_dispatch:
inputs:
ref:
description: Clean caches for this branch name or ref
required: false
type: string

jobs:
cleanup:
name: Remove caches
runs-on: ubuntu-22.04
steps:
- uses: ComPWA/actions/clean-caches@v1
with:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
ref: ${{ inputs.ref }}
33 changes: 33 additions & 0 deletions .github/workflows/pr-linting.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: PR linting
on:
pull_request:
types:
- edited
- labeled
- opened
- reopened
- synchronize
- unlabeled

jobs:
check-labels:
name: Check labels
runs-on: ubuntu-22.04
steps:
- uses: docker://agilepathway/pull-request-label-checker:latest # cspell:ignore agilepathway
with:
any_of: >-
🐛 Bug,✨ Feature,⚙️ Enhancement,⚠️ Interface,❗ Behavior,📝 Docs,🔨 Maintenance,🖱️ DX
none_of: Epic,💫 Good first issue
repo_token: ${{ secrets.GITHUB_TOKEN }}

check-title:
name: Check title
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- run: npm install @compwa/commitlint-config
- name: Create commitlint config
run: |
echo "module.exports = {extends: ['@compwa/commitlint-config']}" > commitlint.config.js
- uses: JulienKode/[email protected] # cspell:ignore kode
16 changes: 16 additions & 0 deletions .github/workflows/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Release Drafter

on:
push:
branches:
- main
- epic/*
workflow_dispatch:

jobs:
update_release_draft:
runs-on: ubuntu-22.04
steps:
- uses: release-drafter/release-drafter@v5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
63 changes: 63 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
/Jamroot

# Output files
*.gv
*.json
*.npy
*.out
*.pdf
*.pickle
*.png
*.root
*.svg
*.v2
*.xml
*.yaml
*.yml

# Temporary files
.fuse_hidden*
.ipynb_checkpoints/
__pycache__/

# Build files
*.egg-info/
*build/
.eggs/
.fuse_*
dist/
version.py

# Temporary files
*.pyc
*condaenv.*
.coverage
.coverage.*
.ipynb_checkpoints/
.mypy*/
.pytest_cache/
__pycache__/
htmlcov/
prof/

# Virtual environments
*venv/
.tox/
pyvenv*/

# Settings
.idea/
**.code-workspace

# Exceptions
!.clang-format
!.cspell.json
!.github/*.yml
!.github/*/*.yml
!.gitpod.yml
!.pre-commit-config.yaml
!.readthedocs.yml
!.vscode/*.json
!codecov.yml
!environment.yml
!pyrightconfig.json
Loading

0 comments on commit 27dd3a7

Please sign in to comment.