Skip to content

Commit e72bb76

Browse files
committed
Add documentation
1 parent 71b5207 commit e72bb76

20 files changed

+507
-33
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ coverage.xml
5454
.hypothesis/
5555
.pytest_cache/
5656
cover/
57+
src/astro_image_display_api/version.py
5758

5859
# Translations
5960
*.mo
@@ -74,6 +75,7 @@ instance/
7475

7576
# Sphinx documentation
7677
docs/_build/
78+
docs/api/
7779

7880
# PyBuilder
7981
.pybuilder/

.pre-commit-config.yaml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
ci:
2-
autoupdate_commit_msg: 'chore: update pre-commit hooks'
3-
41
repos:
52
- repo: https://github.com/pre-commit/pre-commit-hooks
63
rev: v5.0.0
@@ -26,6 +23,7 @@ repos:
2623
- id: mixed-line-ending
2724
# Makes all line endings unix-style
2825
args: [--fix=lf]
26+
exclude: docs/make.bat
2927

3028

3129
# Per the ruff documentation, this should be before black
@@ -47,3 +45,9 @@ repos:
4745
rev: v2.4.1
4846
hooks:
4947
- id: codespell
48+
49+
# Make pre-commit-ci more reasonable
50+
ci:
51+
autofix_prs: false
52+
autoupdate_commit_msg: '[pre-commit.ci] pre-commit autoupdate'
53+
autoupdate_schedule: weekly

.readthedocs.yaml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Read the Docs configuration file
2+
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
3+
4+
# Required
5+
version: 2
6+
7+
# Set the OS, Python version, and other tools you might need
8+
build:
9+
os: ubuntu-24.04
10+
tools:
11+
python: "3.13"
12+
13+
# Build documentation in the "docs/" directory with Sphinx
14+
sphinx:
15+
configuration: docs/conf.py
16+
17+
# Optionally, but recommended,
18+
# declare the Python requirements required to build your documentation
19+
# See https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html
20+
# python:
21+
# install:
22+
# - requirements: docs/requirements.txt

docs/Makefile

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Minimal makefile for Sphinx documentation
2+
#
3+
4+
# You can set these variables from the command line, and also
5+
# from the environment for the first two.
6+
SPHINXOPTS ?=
7+
SPHINXBUILD ?= sphinx-build
8+
SOURCEDIR = .
9+
BUILDDIR = _build
10+
11+
# Put it first so that "make" without argument is like "make help".
12+
help:
13+
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
14+
15+
.PHONY: help Makefile
16+
17+
# Catch-all target: route all unknown targets to Sphinx using the new
18+
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
19+
%: Makefile
20+
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

docs/_static/aida-logo.svg

Lines changed: 56 additions & 0 deletions
Loading

docs/_static/astropy.css

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
/* Copied from astropy repo */
2+
/* Main page overview cards */
3+
4+
.sd-card .sd-card-img-top {
5+
height: 52px;
6+
width: 52px;
7+
margin-left: auto;
8+
margin-right: auto;
9+
margin-top: 10px;
10+
}
11+
12+
/* Dark theme tweaking */
13+
html[data-theme=dark] .sd-card img[src*='.svg'] {
14+
filter: invert(0.82) brightness(0.8) contrast(1.2);
15+
}
16+
17+
/* Flip the colours on graphviz graphs on dark mode */
18+
html[data-theme="dark"] div.graphviz > object.inheritance {
19+
filter: invert(0.82) brightness(0.8) contrast(1.2);
20+
}
21+
html[data-theme="dark"] div.graphviz > object.graphviz {
22+
filter: invert(0.82) brightness(0.8) contrast(1.2);
23+
}
24+
html[data-theme="dark"] ul.cooframelegend {
25+
filter: invert(0.82) brightness(0.8) contrast(1.2);
26+
}

docs/api.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
.. _api_reference:
2+
3+
AID API Reference
4+
=================
5+
6+
.. automodapi:: astro_image_display_api.interface_definition
7+
:no-inheritance-diagram:

0 commit comments

Comments
 (0)