Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
347a3c8
Switch to pydoclint
AndrewSazonov Mar 13, 2026
469cbb6
Fix utils
henrikjacobsenfys Mar 13, 2026
496cd58
Fix sample_model
henrikjacobsenfys Mar 13, 2026
bf77cd4
fix resolution_model
henrikjacobsenfys Mar 13, 2026
b8917c7
fix model_base
henrikjacobsenfys Mar 13, 2026
2d59670
Fix instrument_model
henrikjacobsenfys Mar 13, 2026
64236c7
fix jump_diffusion
henrikjacobsenfys Mar 13, 2026
d7caad1
diffusion model base
henrikjacobsenfys Mar 13, 2026
0534811
brownian
henrikjacobsenfys Mar 13, 2026
baa7450
Fix pixi-scipp related issue
AndrewSazonov Mar 13, 2026
e0318c5
Apply auto formatting
AndrewSazonov Mar 13, 2026
886a53c
Aply unsafe auto formatting
AndrewSazonov Mar 13, 2026
dec92c5
More linting
henrikjacobsenfys Mar 14, 2026
1170f8f
pixi run fix
henrikjacobsenfys Mar 14, 2026
8356c54
model_component
henrikjacobsenfys Mar 15, 2026
9dbc9e9
mixins
henrikjacobsenfys Mar 15, 2026
109c968
lorentzian
henrikjacobsenfys Mar 15, 2026
6b32460
gaussian
henrikjacobsenfys Mar 15, 2026
41d8409
exponential
henrikjacobsenfys Mar 15, 2026
2523d96
delta function
henrikjacobsenfys Mar 15, 2026
e52139b
dho
henrikjacobsenfys Mar 15, 2026
81f67a1
component collection
henrikjacobsenfys Mar 15, 2026
2ba2420
background model
henrikjacobsenfys Mar 15, 2026
1058245
experiment
henrikjacobsenfys Mar 15, 2026
8569950
numerical convolution base
henrikjacobsenfys Mar 15, 2026
b3fb3ad
numerical convolution
henrikjacobsenfys Mar 15, 2026
7287387
docstring lint done
henrikjacobsenfys Mar 16, 2026
b79f3b0
pixi run fix
henrikjacobsenfys Mar 16, 2026
e68c9e3
fix tests
henrikjacobsenfys Mar 16, 2026
16197df
add a few tests
henrikjacobsenfys Mar 16, 2026
6450ead
delete temp files
henrikjacobsenfys Mar 16, 2026
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
2 changes: 1 addition & 1 deletion .copier-answers.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# WARNING: Do not edit this file manually.
# Any changes will be overwritten by Copier.
_commit: v0.10.1-2-gd05af4f
_commit: v0.10.1-23-g55e8e0e
_src_path: gh:easyscience/templates
app_docs_url: https://easyscience.github.io/dynamics-app
app_doi: 10.5281/zenodo.18877180
Expand Down
90 changes: 46 additions & 44 deletions .github/workflows/lint-format.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
# The workflow is divided into several steps:
# - Check the validity of pyproject.toml
# - Check code linting
# - Check code formatting
# - Check formatting of docstrings in the code
# - Check formatting of Markdown, YAML, TOML, etc. files
# The workflow checks
# - the validity of pyproject.toml,
# - the presence and correctness of SPDX license headers,
# - linting and formatting of Python code,
# - linting and formatting of docstrings in Python code,
# - formatting of non-Python files (like markdown and toml).
# - linting of Python code in Jupyter notebooks (for library template).
#
# A summary of the checks is added to the GitHub Actions summary.

name: Lint and format checks

Expand Down Expand Up @@ -46,56 +49,53 @@ jobs:
- name: Run post-install developer steps
run: pixi run post-install

# Check the validity of pyproject.toml
- name: Check validity of pyproject.toml
id: check_pyproject
id: pyproject
continue-on-error: true
shell: bash
run: pixi run pyproject-check

# Check the presence and correctness of SPDX license headers in
# the code files
- name: Check SPDX license headers
id: check_spdx_headers
id: license_headers
continue-on-error: true
shell: bash
run: pixi run spdx-check
run: pixi run license-check

# Check code linting with Ruff in the project root
- name: Check code linting
id: check_code_linting
- name: Check linting of Python code
id: py_lint
continue-on-error: true
shell: bash
run: pixi run py-lint-check

# Check code formatting with Ruff in the project root
- name: Check code formatting
id: check_code_formatting
- name: Check formatting of Python code
id: py_format
continue-on-error: true
shell: bash
run: pixi run py-format-check

# Check formatting of docstrings in the code with docformatter
- name: Check formatting of docstrings in the code
id: check_docs_formatting
- name: Check linting of docstrings in Python code
id: docstring_lint
continue-on-error: true
shell: bash
run: pixi run docs-format-check
run: pixi run docstring-lint-check

# Check formatting of MD, YAML, TOML, etc. files with Prettier in
# the project root
- name: Check formatting of MD, YAML, TOML, etc. files
id: check_others_formatting
- name: Check formatting of docstrings in Python code
id: docstring_format
continue-on-error: true
shell: bash
run: pixi run docstring-format-check

- name: Check formatting of non-Python files (md, toml, etc.)
id: nonpy_format
continue-on-error: true
shell: bash
run: pixi run nonpy-format-check

# Check formatting of Jupyter Notebooks in the tutorials folder
- name: Prepare notebooks and check formatting
id: check_notebooks_formatting
- name: Check linting of Python code in Jupyter notebooks (ipynb)
id: notebook_lint
continue-on-error: true
shell: bash
run: pixi run notebook-format-check
run: pixi run notebook-lint-check

# Add summary
- name: Add quality checks summary
Expand All @@ -107,24 +107,26 @@ jobs:
echo ""
echo "| Check | Status |"
echo "|-------|--------|"
echo "| pyproject.toml | ${{ steps.check_pyproject.outcome == 'success' && '✅' || '❌' }} |"
echo "| SPDX headers | ${{ steps.check_spdx_headers.outcome == 'success' && '✅' || '❌' }} |"
echo "| py lint | ${{ steps.check_code_linting.outcome == 'success' && '✅' || '❌' }} |"
echo "| py format | ${{ steps.check_code_formatting.outcome == 'success' && '✅' || '❌' }} |"
echo "| docstring format | ${{ steps.check_docs_formatting.outcome == 'success' && '✅' || '❌' }} |"
echo "| nonpy format | ${{ steps.check_others_formatting.outcome == 'success' && '✅' || '❌' }} |"
echo "| notebooks format | ${{ steps.check_notebooks_formatting.outcome == 'success' && '✅' || '❌' }} |"
echo "| pyproject.toml | ${{ steps.pyproject.outcome == 'success' && '✅' || '❌' }} |"
echo "| license headers | ${{ steps.license_headers.outcome == 'success' && '✅' || '❌' }} |"
echo "| py lint | ${{ steps.py_lint.outcome == 'success' && '✅' || '❌' }} |"
echo "| py format | ${{ steps.py_format.outcome == 'success' && '✅' || '❌' }} |"
echo "| docstring lint | ${{ steps.docstring_lint.outcome == 'success' && '✅' || '❌' }} |"
echo "| docstring format | ${{ steps.docstring_format.outcome == 'success' && '✅' || '❌' }} |"
echo "| nonpy format | ${{ steps.nonpy_format.outcome == 'success' && '✅' || '❌' }} |"
echo "| notebooks lint | ${{ steps.notebook_lint.outcome == 'success' && '✅' || '❌' }} |"
} >> "$GITHUB_STEP_SUMMARY"

# Fail job if any check failed
- name: Fail job if any check failed
if: |
steps.check_pyproject.outcome == 'failure'
|| steps.check_spdx_headers.outcome == 'failure'
|| steps.check_code_linting.outcome == 'failure'
|| steps.check_code_formatting.outcome == 'failure'
|| steps.check_docs_formatting.outcome == 'failure'
|| steps.check_others_formatting.outcome == 'failure'
|| steps.check_notebooks_formatting.outcome == 'failure'
steps.pyproject.outcome == 'failure'
|| steps.license_headers.outcome == 'failure'
|| steps.py_lint.outcome == 'failure'
|| steps.py_format.outcome == 'failure'
|| steps.docstring_lint.outcome == 'failure'
|| steps.docstring_format.outcome == 'failure'
|| steps.nonpy_format.outcome == 'failure'
|| steps.notebook_lint.outcome == 'failure'
shell: bash
run: exit 1
31 changes: 19 additions & 12 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ repos:
pass_filenames: false
stages: [manual]

- id: spdx-headers-check
name: pixi run spdx-check
entry: pixi run spdx-check
- id: license-headers-check
name: pixi run license-check
entry: pixi run license-check
language: system
pass_filenames: false
stages: [manual]
Expand All @@ -32,23 +32,30 @@ repos:
pass_filenames: false
stages: [manual]

- id: pixi-nonpy-format-check
name: pixi run nonpy-format-check
entry: pixi run nonpy-format-check
- id: pixi-docstring-lint-check
name: pixi run docstring-lint-check
entry: pixi run docstring-lint-check
language: system
pass_filenames: false
stages: [manual]

- id: pixi-docstring-format-check
name: pixi run docstring-format-check
entry: pixi run docstring-format-check
language: system
pass_filenames: false
stages: [manual]

- id: pixi-docs-format-check
name: pixi run docs-format-check
entry: pixi run docs-format-check
- id: pixi-nonpy-format-check
name: pixi run nonpy-format-check
entry: pixi run nonpy-format-check
language: system
pass_filenames: false
stages: [manual]

- id: pixi-notebook-format-check
name: pixi run notebook-format-check
entry: pixi run notebook-format-check
- id: pixi-notebook-lint-check
name: pixi run notebook-lint-check
entry: pixi run notebook-lint-check
language: system
pass_filenames: false
stages: [manual]
Expand Down
Loading
Loading