Skip to content

Commit d318165

Browse files
committed
update build; update sphinx
1 parent 491467d commit d318165

5 files changed

Lines changed: 51 additions & 30 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ instance/
6363

6464
# Sphinx documentation
6565
docs/_build/
66+
docs/source/sg_execution_times.rst
6667

6768
# PyBuilder
6869
target/

MANIFEST.in

Lines changed: 0 additions & 4 deletions
This file was deleted.

docs/source/changelog.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
.. mdinclude:: ../../CHANGELOG.md
1+
.. include:: ../../CHANGELOG.md
2+
:parser: myst_parser.docutils_

docs/source/conf.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ def setup(app):
5555
"sphinx.ext.napoleon", # parameters look better than with numpydoc only
5656
"numpydoc",
5757
"sphinx_gallery.gen_gallery",
58-
"m2r2",
58+
"myst_parser",
5959
]
6060

6161
# autosummaries from source-files
@@ -87,8 +87,12 @@ def setup(app):
8787

8888
# The suffix(es) of source filenames.
8989
# You can specify multiple suffix as a list of string:
90+
source_suffix = {
91+
".rst": "restructuredtext",
92+
".md": "markdown",
93+
}
9094
# source_suffix = ['.rst', '.md']
91-
source_suffix = ".rst"
95+
# source_suffix = ".rst"
9296

9397
# The master toctree document.
9498
# --> this is the sitemap (or content-list in latex -> needs a heading)
@@ -141,7 +145,7 @@ def setup(app):
141145
# 'canonical_url': '',
142146
# 'analytics_id': '',
143147
"logo_only": False,
144-
"display_version": True,
148+
"version_selector": True,
145149
"prev_next_buttons_location": "top",
146150
# 'style_external_links': False,
147151
# 'vcs_pageview_mode': '',
@@ -267,7 +271,7 @@ def setup(app):
267271
# Remove the "Download all examples" button from the top level gallery
268272
"download_all_examples": False,
269273
# Sort gallery example by file name instead of number of lines (default)
270-
"within_subsection_order": FileNameSortKey,
274+
"within_subsection_order": "FileNameSortKey",
271275
# directory where function granular galleries are stored
272276
"backreferences_dir": None,
273277
# Modules for which function level galleries are created. In

pyproject.toml

Lines changed: 40 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
[build-system]
22
requires = [
3-
"setuptools>=64",
4-
"setuptools_scm>=7",
3+
"hatchling>=1.8.0",
4+
"hatch-vcs",
55
]
6-
build-backend = "setuptools.build_meta"
6+
build-backend = "hatchling.build"
77

88
[project]
9-
requires-python = ">=3.7"
9+
requires-python = ">=3.8"
1010
name = "anaflow"
1111
authors = [{name = "Sebastian Mueller", email = "sebastian.mueller@ufz.de"}]
1212
readme = "README.md"
13-
license = {text = "MIT"}
13+
license = "MIT"
1414
dynamic = ["version"]
1515
description = "AnaFlow - analytical solutions for the groundwater-flow equation."
1616
classifiers = [
@@ -29,10 +29,12 @@ classifiers = [
2929
"Programming Language :: Python",
3030
"Programming Language :: Python :: 3",
3131
"Programming Language :: Python :: 3 :: Only",
32-
"Programming Language :: Python :: 3.6",
33-
"Programming Language :: Python :: 3.7",
3432
"Programming Language :: Python :: 3.8",
3533
"Programming Language :: Python :: 3.9",
34+
"Programming Language :: Python :: 3.10",
35+
"Programming Language :: Python :: 3.11",
36+
"Programming Language :: Python :: 3.12",
37+
"Programming Language :: Python :: 3.13",
3638
"Topic :: Scientific/Engineering",
3739
"Topic :: Software Development",
3840
"Topic :: Utilities",
@@ -45,17 +47,17 @@ dependencies = [
4547

4648
[project.optional-dependencies]
4749
doc = [
48-
"m2r2>=0.2.8",
49-
"matplotlib>=3",
50+
"myst-parser",
51+
"matplotlib>=3.7",
5052
"numpydoc>=1.1",
51-
"sphinx>=4",
53+
"sphinx>=7",
5254
"sphinx-gallery>=0.8",
53-
"sphinx-rtd-theme>=1,<1.1",
55+
"sphinx-rtd-theme>=3",
5456
]
5557
test = ["pytest-cov>=3"]
5658
check = [
57-
"black>=24,<25",
58-
"isort[colors]<6",
59+
"black>=25",
60+
"isort[colors]",
5961
"pylint",
6062
]
6163

@@ -67,22 +69,39 @@ Tracker = "https://github.com/GeoStat-Framework/anaflow/issues"
6769
Changelog = "https://github.com/GeoStat-Framework/anaflow/blob/main/CHANGELOG.md"
6870
Conda-Forge = "https://anaconda.org/conda-forge/anaflow"
6971

70-
[tool.setuptools]
71-
license-files = ["LICENSE"]
72+
[tool.hatch.version]
73+
source = "vcs"
74+
fallback_version = "0.0.0.dev0"
7275

73-
[tool.setuptools_scm]
74-
write_to = "src/anaflow/_version.py"
75-
write_to_template = "__version__ = '{version}'"
76+
[tool.hatch.version.raw-options]
7677
local_scheme = "no-local-version"
77-
fallback_version = "0.0.0.dev0"
78+
79+
[tool.hatch.build.hooks.vcs]
80+
version-file = "src/anaflow/_version.py"
81+
template = "__version__ = '{version}'"
82+
83+
[tool.hatch.build.targets.sdist]
84+
include = [
85+
"/src",
86+
"/tests",
87+
]
88+
89+
[tool.hatch.build.targets.wheel]
90+
packages = ["src/anaflow"]
7891

7992
[tool.isort]
8093
profile = "black"
8194
multi_line_output = 3
8295

8396
[tool.black]
84-
exclude = "_version.py"
85-
target-version = ["py37"]
97+
target-version = [
98+
"py38",
99+
"py39",
100+
"py310",
101+
"py311",
102+
"py312",
103+
"py313",
104+
]
86105

87106
[tool.coverage]
88107
[tool.coverage.run]

0 commit comments

Comments
 (0)