Skip to content

Commit

Permalink
FIX: define dev dependencies as dependency groups (#65)
Browse files Browse the repository at this point in the history
* MAINT: update lock files
* FIX: remove `pre-commit-uv` and `tox` from environment
* FIX: remove `notebooks` dependency group
* FIX: remove thebe and launch buttons
  • Loading branch information
redeboer authored Oct 30, 2024
1 parent 315b615 commit 62fb705
Show file tree
Hide file tree
Showing 6 changed files with 159 additions and 1,796 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ on:

jobs:
doc:
uses: ComPWA/actions/.github/workflows/ci-docs.yml@v2
uses: ComPWA/actions/.github/workflows/ci-docs.yml@v2.1
permissions:
pages: write
id-token: write
Expand All @@ -38,4 +38,4 @@ jobs:
if: inputs.specific-pip-packages == ''
secrets:
token: ${{ secrets.PAT }}
uses: ComPWA/actions/.github/workflows/pre-commit.yml@v2
uses: ComPWA/actions/.github/workflows/pre-commit.yml@v2.1
8 changes: 4 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ repos:
- id: check-useless-excludes

- repo: https://github.com/ComPWA/policy
rev: 0.5.0
rev: 0.5.6
hooks:
- id: check-dev-files
args:
Expand All @@ -24,7 +24,7 @@ repos:
- --repo-title=BOSS Documentation

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.7.0
rev: v0.7.1
hooks:
- id: ruff
args: [--fix]
Expand Down Expand Up @@ -84,11 +84,11 @@ repos:
)$
- repo: https://github.com/ComPWA/pyright-pre-commit
rev: v1.1.385
rev: v1.1.386
hooks:
- id: pyright

- repo: https://github.com/astral-sh/uv-pre-commit
rev: 0.4.24
rev: 0.4.28
hooks:
- id: uv-lock
6 changes: 5 additions & 1 deletion .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,11 @@ build:
pixi global install uv
- |-
export UV_LINK_MODE=copy
uv run --extra doc --locked --with tox \
uv run \
--group doc \
--locked \
--no-dev \
--with tox \
tox -e doc
mkdir -p $READTHEDOCS_OUTPUT
mv docs/_build/html $READTHEDOCS_OUTPUT
18 changes: 1 addition & 17 deletions docs/conf.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
from __future__ import annotations

from sphinx_api_relink.helpers import get_execution_mode
from sphinx_api_relink.linkcode import (
_get_commit_sha, # pyright:ignore[reportPrivateUsage]
)
Expand All @@ -25,7 +24,7 @@
copyright = "2020, BESIII"
default_role = "py:obj"
extensions = [
"myst_nb",
"myst_parser",
"sphinx.ext.autosectionlabel",
"sphinx.ext.intersphinx",
"sphinx.ext.mathjax",
Expand All @@ -35,7 +34,6 @@
"sphinx_copybutton",
"sphinx_design",
"sphinx_pybtex_etal_style",
"sphinx_thebe",
"sphinx_togglebutton",
"sphinxcontrib.bibtex",
]
Expand All @@ -51,13 +49,6 @@
html_sourcelink_suffix = ""
html_theme = "sphinx_book_theme"
html_theme_options = {
"launch_buttons": {
"binderhub_url": "https://mybinder.org",
"colab_url": "https://colab.research.google.com",
"notebook_interface": "jupyterlab",
"thebe": True,
"thebelab": True,
},
"path_to_docs": "docs",
"repository_url": f"https://github.com/redeboer/{REPO_NAME}",
"repository_branch": BRANCH,
Expand Down Expand Up @@ -97,18 +88,11 @@
"smartquotes",
]
myst_update_mathjax = False
nb_execution_mode = get_execution_mode()
nb_execution_timeout = -1
nb_output_stderr = "remove"
nitpicky = True # warn if cross-references are missing
panels_add_bootstrap_css = False # remove panels css to get wider main content
primary_domain = "py"
project = "BESIII Offline Software System"
pygments_style = "sphinx"
thebe_config = {
"repository_url": html_theme_options["repository_url"],
"repository_branch": html_theme_options["repository_branch"],
}
todo_include_todos = True
suppress_warnings = [
"myst.domains",
Expand Down
46 changes: 17 additions & 29 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,48 +20,36 @@ license = {text = "GPLv3 or later"}
name = "bossdoc"
requires-python = ">=3.12"

[project.optional-dependencies]
[project.readme]
content-type = "text/markdown"
file = "README.md"

[project.urls]
Changelog = "https://github.com/redeboer/bossdoc/releases"
Documentation = "http://bes3.rtfd.io"
Source = "https://github.com/redeboer/bossdoc"
Tracker = "https://github.com/redeboer/bossdoc/issues"

[dependency-groups]
dev = [
"bossdoc[doc]",
"bossdoc[sty]",
"jupyterlab",
"jupyterlab-code-formatter",
"ruff",
"sphinx-autobuild",
"tox >=1.9",
{include-group = "doc"},
{include-group = "style"},
]
doc = [
"Sphinx >=3",
"ipywidgets",
"matplotlib",
"myst-nb",
"myst-parser",
"sphinx",
"sphinx-api-relink",
"sphinx-book-theme",
"sphinx-comments",
"sphinx-copybutton",
"sphinx-design",
"sphinx-pybtex-etal-style",
"sphinx-thebe",
"sphinx-togglebutton",
"sphinxcontrib-bibtex >=2",
]
sty = [
"bossdoc[types]",
"pre-commit-uv",
"ruff",
]
types = [
"sphinx-api-relink",
]

[project.readme]
content-type = "text/markdown"
file = "README.md"

[project.urls]
Changelog = "https://github.com/redeboer/bossdoc/releases"
Documentation = "http://bes3.rtfd.io"
Source = "https://github.com/redeboer/bossdoc"
Tracker = "https://github.com/redeboer/bossdoc/issues"
style = ["sphinx-api-relink"]

[tool.setuptools]
include-package-data = false
Expand Down
Loading

0 comments on commit 62fb705

Please sign in to comment.