diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index f35baa1..821061c 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -39,6 +39,13 @@ repos: hooks: - id: taplo + - repo: https://github.com/pappasam/toml-sort + rev: v0.23.1 + hooks: + - id: toml-sort + args: + - --in-place + - repo: https://github.com/astral-sh/ruff-pre-commit rev: v0.5.1 hooks: diff --git a/docs/conf.py b/docs/conf.py index 6845b4f..71a2ab7 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -1,3 +1,5 @@ +import os + comments_config = { "hypothesis": True, } @@ -22,6 +24,7 @@ "html_image", "smartquotes", ] +nb_execution_mode = "cache" if os.environ.get("EXECUTE_NB") else "off" nb_execution_show_tb = True nb_execution_timeout = -1 nitpicky = True diff --git a/pixi.toml b/pixi.toml index 1c65630..c3af090 100644 --- a/pixi.toml +++ b/pixi.toml @@ -7,21 +7,6 @@ name = "gluex-nstar" platforms = ["linux-64"] readme = "README.md" -[tasks] -docnb = """ -sphinx-build \ - -nW --keep-going \ - -b html \ - docs/ docs/_build/html -""" -docnblive = """ -sphinx-autobuild \ - --watch docs \ - -nW --keep-going \ - -b html \ - docs/ docs/_build/html -""" - [dependencies] ampform = ">=0.15.4,<0.16" black = ">=24.4.2,<24.5" @@ -51,3 +36,39 @@ sphinx-book-theme = ">=1.1.2,<1.2" sphinx-comments = ">=0.0.3,<0.1" sphinx-copybutton = ">=0.5.2,<0.6" sympy = ">=1.12,<2" + +[tasks.doc] +cmd = """ +sphinx-build \ + -nW --keep-going \ + -b html \ + docs/ docs/_build/html +""" + +[tasks.doclive] +cmd = """ +sphinx-autobuild \ + --watch docs \ + -nW --keep-going \ + -b html \ + docs/ docs/_build/html +""" + +[tasks.docnb] +cmd = """ +sphinx-build \ + -nW --keep-going \ + -b html \ + docs/ docs/_build/html +""" +env = {EXECUTE_NB = "yes"} + +[tasks.docnblive] +cmd = """ +sphinx-autobuild \ + --watch docs \ + -nW --keep-going \ + -b html \ + docs/ docs/_build/html +""" +env = {EXECUTE_NB = "yes"} diff --git a/pyproject.toml b/pyproject.toml index 529cce1..3a7d335 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -15,3 +15,17 @@ select = ["ALL"] "D100", "INP001", ] + +[tool.tomlsort] +all = false +ignore_case = true +in_place = true +sort_first = [ + "build-system", + "project", + "tool.setuptools", + "tool.setuptools_scm", +] +sort_table_keys = true +spaces_indent_inline_array = 4 +trailing_comma_inline_array = true