Skip to content
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

FEAT: import TRs from compwa.github.io #1

Merged
merged 14 commits into from
Oct 1, 2024
Merged
Show file tree
Hide file tree
Changes from 11 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
419 changes: 419 additions & 0 deletions .cspell.json

Large diffs are not rendered by default.

17 changes: 17 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
root = true

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

[*.{ipynb,md}]
indent_size = unset

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

[LICENSE]
indent_size = unset
10 changes: 10 additions & 0 deletions .envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
if [ -e .venv ]; then
source .venv/bin/activate
elif [ -e venv ]; then
source venv/bin/activate
elif [ -e .pixi ]; then
watch_file pixi.lock
eval "$(pixi shell-hook)"
else
layout anaconda
fi
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pixi.lock linguist-language=YAML linguist-generated=true
39 changes: 39 additions & 0 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name-template: ComPWA Technical Reports $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: |
_See all documentation for this version [here](https://report.rtfd.io/en/$NEXT_PATCH_VERSION)._

$CHANGES

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

on:
release:
types:
- prereleased
- released

jobs:
milestone:
if: startsWith(github.ref, 'refs/tags')
uses: ComPWA/actions/.github/workflows/close-milestone.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
46 changes: 46 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: CI

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: |-
${{ github.ref != format('refs/heads/{0}', github.event.repository.default_branch) }}

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:
doc:
uses: ComPWA/actions/.github/workflows/ci-docs.yml@v1
permissions:
pages: write
id-token: write
with:
apt-packages: graphviz
gh-pages: true
python-version: "3.12"
specific-pip-packages: ${{ inputs.specific-pip-packages }}
style:
if: inputs.specific-pip-packages == ''
secrets:
token: ${{ secrets.PAT }}
uses: ComPWA/actions/.github/workflows/pre-commit.yml@v1
with:
python-version: "3.12"
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 }}
44 changes: 44 additions & 0 deletions .github/workflows/notebooks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Run all notebooks

on:
workflow_dispatch:
inputs:
notebook-selector:
description: Relative path to notebooks
required: false
type: string

jobs:
pytest:
name: Test all notebooks
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v4
with:
key: |
${{ github.workflow }}-${{ github.job }}-${{ runner.os }}-${{ hashFiles('.constraints/py3.*.txt', 'setup.cfg') }}
path: |
.pytest_cache
~/.cache/pip/
- uses: actions/setup-python@v5
with:
python-version: "3.9"
- name: Install dependencies
run: |
sudo apt-get -y install graphviz
pip install .[test]
- run: |
function run-nbmake() {
set +e
pytest --nbmake ${{ github.event.inputs.notebook-selector }}
error_code=$?
set -e
echo "Pytest returned error code $error_code"
case $error_code in
0|5) return 0;;
*) return $error_code;;
esac
}
run-nbmake
# cspell:ignore esac
14 changes: 14 additions & 0 deletions .github/workflows/pr-linting.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: PR linting
on:
pull_request:
types:
- edited
- labeled
- opened
- reopened
- synchronize
- unlabeled

jobs:
lint-pr:
uses: ComPWA/actions/.github/workflows/pr-linting.yml@v1
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@v6
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
57 changes: 57 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# Output files
*.gv
*.json
*.npy
*.pdf
*.pickle
*.png
*.svg
*.v2
*.xml
*.yaml
*.yml

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

# Temporary files
*.pyc
*condaenv.*
.coverage
.coverage.*
.ipynb_checkpoints/
.jupyter_ystore.db
.mypy*/
.pytest_cache/
.virtual_documents/
__pycache__/
htmlcov/
oryx-build-commands.txt
prof/

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

# Settings
.idea/
**.code-workspace

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