Skip to content

Commit af1e876

Browse files
move behind src/nodebpy & docs (#71)
1 parent 0f839b8 commit af1e876

18 files changed

Lines changed: 42 additions & 6 deletions

docs/_config.py

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
"""
2+
Generate _variables.yml for the documentation site.
3+
Run this before building docs to update the version number.
4+
"""
5+
6+
from importlib.metadata import version as get_version
7+
from pathlib import Path
8+
9+
DOC_DIR = Path(__file__).parent
10+
11+
variables_filepath = DOC_DIR / "_variables.yml"
12+
VARIABLES_TPL = """\
13+
version: {version}
14+
"""
15+
16+
17+
def generate_variables_file():
18+
"""
19+
Generate _variables.yml file in the quartodoc project directory
20+
"""
21+
version = get_version("databpy")
22+
contents = VARIABLES_TPL.format(version=version)
23+
variables_filepath.write_text(contents)
24+
25+
26+
if __name__ == "__main__":
27+
generate_variables_file()

docs/_quarto.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
11
project:
22
type: website
33
output-dir: _build
4+
pre-render: _config.py
45

56
filters:
67
- interlinks
78

89
website:
9-
title: "databpy"
10+
page-navigation: true
11+
llms-txt: true
12+
title: "databpy {{< var version >}}"
1013
navbar:
1114
left:
1215
- href: index.qmd

docs/_variables.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
version: 0.7.0

pyproject.toml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,17 @@ Homepage = "https://bradyajohnston.github.io/databpy"
1717
Repository = "https://github.com/bradyajohnston/databpy"
1818
Documentation = "https://bradyajohnston.github.io/databpy"
1919

20+
[build-system]
21+
requires = ["uv_build>=0.8.15,<0.9.0"]
22+
build-backend = "uv_build"
23+
24+
2025
[project.optional-dependencies]
2126
bpy = ["bpy>=5.1"]
2227
dev = [
2328
"fake-bpy-module",
2429
"polars",
25-
"quarto-cli",
30+
"quarto-cli>=1.9",
2631
"quartodoc",
2732
"jupyter",
2833
"polars",
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)