Skip to content

Commit

Permalink
DX: drop support for Python 3.6 (#52)
Browse files Browse the repository at this point in the history
* DOC: update links to compwa.github.io
* FIX: swith to new `tab-set` syntax
* MAINT: add missing newline
* FIX: remove `jupyter` from `doc` dependencies
* FIX: remove `sphinx-math-dollar` extension
* FIX: remove `sphobjinv` from requirements
* FIX: remove `sphinx-panels` from dependencies
  • Loading branch information
redeboer authored Jan 20, 2024
1 parent 9334ba7 commit b509a61
Show file tree
Hide file tree
Showing 9 changed files with 122 additions and 119 deletions.
2 changes: 0 additions & 2 deletions .cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@
"docs/conf.py",
"labels.toml",
"pyproject.toml",
"setup.cfg",
"setup.py",
"tox.ini",
"typings"
],
Expand Down
2 changes: 1 addition & 1 deletion .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<!--
For the PR title, follow a conventional commit message style:
https://compwa-org.readthedocs.io/en/stable/develop.html#commit-conventions
https://compwa.github.io/develop#commit-conventions
-->

<!--
Expand Down
27 changes: 13 additions & 14 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,6 @@ repos:
- id: check-hooks-apply
- id: check-useless-excludes

- repo: https://github.com/ComPWA/policy
rev: 0.2.0
hooks:
- id: check-dev-files
args:
- --allow-labels
- --ignore-author
- --keep-issue-templates
- --no-notebooks
- --no-prettierrc
- --repo-name=bossdoc
- --repo-title=BOSS Documentation
- id: format-setup-cfg

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
Expand All @@ -51,6 +37,19 @@ repos:
hooks:
- id: black

- repo: https://github.com/ComPWA/policy
rev: 0.2.0
hooks:
- id: check-dev-files
args:
- --allow-labels
- --ignore-author
- --keep-issue-templates
- --no-notebooks
- --no-prettierrc
- --repo-name=bossdoc
- --repo-title=BOSS Documentation

- repo: https://github.com/streetsidesoftware/cspell-cli
rev: v8.3.0
hooks:
Expand Down
12 changes: 7 additions & 5 deletions docs/appendices/tips.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,15 +93,17 @@ In addition, you may need to set the remote platform to `"linux"`:
where `"lxslc7.ihep.ac.cn"` is the name of the host in your
[SSH Config file](https://man7.org/linux/man-pages/man5/ssh_config.5.html).

::::{tip}
:::::{tip}

VSCode Remote SSH installs some files into your home directory on the server, in a
folder called `.vscode-server`. This will not work if you experience this (rather
common) problem: {ref}`read-write-access`. It is therefore recommended that you move the
`.vscode-server` folder to a directory where you always have read-write access and then
create a symbolic link to that folder in your actual home folder. Do this as follows:

:::{tabbed} .vscode-server does not yet exist
::::{tab-set}

:::{tab-item} `.vscode-server` does not yet exist

```shell
cd ~
Expand All @@ -111,7 +113,7 @@ ln -s /besfs5/users/$USER/.vscode-server

:::

:::{tabbed} .vscode-server already exists
:::{tab-item} `.vscode-server` already exists

```shell
cd ~
Expand All @@ -120,12 +122,12 @@ ln -s /besfs5/users/$USER/.vscode-server
```

:::
::::

Another major advantage of this set-up is that you won't have problems with
[data quota](../tutorials/getting-started/data-quota.md) when the
`.vscode-server` grows over time.

::::
:::::

### Language navigation for BOSS

Expand Down
15 changes: 9 additions & 6 deletions docs/conf.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
from __future__ import annotations

import os
from typing import Dict
from typing import TYPE_CHECKING

from docutils import nodes
from pybtex.plugin import register_plugin
Expand All @@ -15,7 +17,9 @@
sentence,
words,
)
from sphinx.application import Sphinx

if TYPE_CHECKING:
from sphinx.application import Sphinx

# -- Project information -----------------------------------------------------
project = "BESIII Offline Software System"
Expand Down Expand Up @@ -46,8 +50,7 @@
"sphinx.ext.todo",
"sphinx_comments",
"sphinx_copybutton",
"sphinx_math_dollar",
"sphinx_panels",
"sphinx_design",
"sphinx_thebe",
"sphinx_togglebutton",
"sphinxcontrib.bibtex",
Expand Down Expand Up @@ -113,7 +116,7 @@

# Intersphinx settings
intersphinx_mapping = {
"compwa-org": ("https://compwa-org.readthedocs.io", None),
"compwa": ("https://compwa.github.io", None),
}

# Settings for autosectionlabel
Expand Down Expand Up @@ -185,7 +188,7 @@ def setup(app: Sphinx):
app.add_role("wiki", autolink("https://en.wikipedia.org/wiki/%s", {"_": " "}))


def autolink(pattern: str, replace_mapping: Dict[str, str]):
def autolink(pattern: str, replace_mapping: dict[str, str]):
def role(name, rawtext, text: str, lineno, inliner, options={}, content=[]):
output_text = text
for search, replace in replace_mapping.items():
Expand Down
4 changes: 2 additions & 2 deletions docs/contribute.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ in VSCode!

:::{seealso}

{doc}`compwa-org:develop` on the {doc}`ComPWA website <compwa-org:index>`, which uses
the same set-up.
{doc}`compwa:develop` on the {doc}`ComPWA website <compwa:index>`, which uses the same
set-up.

:::
98 changes: 90 additions & 8 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,92 @@
[build-system]
build-backend = "setuptools.build_meta"
requires = [
"setuptools>=36.2.1", # environment markers
"setuptools>=61.2",
"setuptools_scm",
"wheel",
]

[project]
classifiers = [
"Development Status :: 2 - Pre-Alpha",
"Intended Audience :: Developers",
"Intended Audience :: Education",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)",
"Natural Language :: English",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python",
"Topic :: Scientific/Engineering :: Physics",
"Topic :: Scientific/Engineering",
]
description = "Documentation of the BESIII Offline Software System"
dynamic = ["version"]
keywords = [
"BESIII",
"HEP",
"IHEP",
"particle physics",
"particles",
"physics",
]
license = {text = "GPLv3 or later"}
name = "bossdoc"
requires-python = ">=3.7"

[project.optional-dependencies]
dev = [
"bossdoc[doc]",
"bossdoc[sty]",
"jupyterlab",
"jupyterlab-code-formatter",
"sphinx-autobuild",
"tox >=1.9",
]
doc = [
"Sphinx >=3",
"ipywidgets",
"matplotlib",
"myst-nb >=0.11", # myst_enable_extensions
"sphinx-book-theme",
"sphinx-comments",
"sphinx-copybutton",
"sphinx-design",
"sphinx-thebe",
"sphinx-togglebutton",
"sphinxcontrib-bibtex >=2",
]
format = [
"black",
]
lint = [
"ruff",
]
sty = [
"Sphinx",
"bossdoc[format]",
"bossdoc[lint]",
"docutils",
"pre-commit >=1.4.0",
"pybtex",
]

[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"

[tool.setuptools]
include-package-data = false

[tool.setuptools_scm]
write_to = "version.py"

Expand All @@ -25,12 +107,11 @@ exclude = '''
include = '\.pyi?$'
preview = true
target-version = [
'py310',
'py311',
'py36',
'py37',
'py38',
'py39',
"py310",
"py311",
"py37",
"py38",
"py39",
]

[tool.pyright]
Expand Down Expand Up @@ -69,6 +150,7 @@ extend-select = [
"D",
"EM",
"ERA",
"FA",
"I",
"ICN",
"INP",
Expand Down
75 changes: 0 additions & 75 deletions setup.cfg

This file was deleted.

6 changes: 0 additions & 6 deletions setup.py

This file was deleted.

0 comments on commit b509a61

Please sign in to comment.