Skip to content

Commit 726b039

Browse files
authored
Merge pull request #220 from punch-mission/add-rtd
Create .readthedocs.yaml
2 parents c81980e + a8de70a commit 726b039

File tree

4 files changed

+38
-42
lines changed

4 files changed

+38
-42
lines changed

.github/workflows/docs.yml

-38
This file was deleted.

.readthedocs.yaml

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# .readthedocs.yaml
2+
# Read the Docs configuration file
3+
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
4+
5+
# Required
6+
version: 2
7+
8+
# Set the OS, Python version and other tools you might need
9+
build:
10+
os: ubuntu-22.04
11+
tools:
12+
python: "3.12"
13+
14+
15+
# Build documentation in the "docs/" directory with Sphinx
16+
sphinx:
17+
configuration: docs/source/conf.py
18+
19+
# Optionally build your docs in additional formats such as PDF and ePub
20+
formats:
21+
- pdf
22+
- epub
23+
24+
# Optional but recommended, declare the Python requirements required
25+
# to build your documentation
26+
# See https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html
27+
python:
28+
install:
29+
- method: pip
30+
extra_requirements:
31+
- all
32+
- docs
33+
path: .

docs/source/conf.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,15 @@
77
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information
88
import os
99
import sys
10+
from importlib.metadata import version as get_version
1011

1112
sys.path.insert(0, os.path.abspath("../.."))
1213

1314

1415
project = "regularizepsf"
1516
copyright = "2023, J. Marcus Hughes and the PUNCH Science Operations Center"
1617
author = "J. Marcus Hughes and the PUNCH Science Operations Center"
17-
release = "0.4.0"
18+
release: str = get_version("regularizepsf")
1819

1920
# -- General configuration ---------------------------------------------------
2021
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration

pyproject.toml

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
[build-system]
2-
requires = ["setuptools", "wheel", "numpy", "Cython>=0.29.21"]
2+
requires = ["setuptools", "wheel", "numpy", "Cython>=0.29.21", "setuptools-scm>=8"]
33
build-backend = "setuptools.build_meta"
44

55
[tool.setuptools]
66
packages = ["regularizepsf"]
77

88
[project]
99
name = "regularizepsf"
10-
version = "0.4.1"
10+
dynamic = ["version"]
1111
requires-python = ">3.10"
1212
description = "Point spread function modeling and regularization"
1313
dependencies = [
@@ -40,9 +40,9 @@ docs = [
4040
"pydata-sphinx-theme",
4141
"sphinx-autoapi"
4242
]
43-
4443
dev = ["regularizepsf[test, docs]", "pre-commit"]
4544

45+
[tool.setuptools_scm]
4646

4747
[tool.ruff]
4848
exclude = ['tests/*']

0 commit comments

Comments
 (0)