Skip to content

Commit a214c43

Browse files
author
Alan Christie
committed
docs: Add initial RTD content
1 parent 096a07e commit a214c43

File tree

10 files changed

+194
-2
lines changed

10 files changed

+194
-2
lines changed

.gitignore

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ venv/
66
**/__pycache__
77
.mypy_cache/
88
./config.yaml
9-
xchemalign/xchem_align.egg-info/
10-
xchemalign/_version.py
9+
src/xchemalign.egg-info/
10+
src/xchemalign/_version.py
1111
test-data/outputs/upload_*
1212
test-data/outputs/upload-v2/upload_*
1313
test-data/outputs/upload-v2/*.log

.readthedocs.yaml

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Read the Docs configuration file for Sphinx projects
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-22.04
10+
tools:
11+
python: "3.12"
12+
13+
# Build documentation in the "docs/" directory with Sphinx
14+
sphinx:
15+
configuration: docs/source/conf.py
16+
17+
# Optionally build your docs in additional formats such as PDF and ePub
18+
# formats:
19+
# - pdf
20+
# - epub
21+
22+
# Optional but recommended, declare the Python requirements required
23+
# to build your documentation
24+
# See https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html
25+
python:
26+
install:
27+
- requirements: requirements.txt

docs/Makefile

+20
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 = source
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/make.bat

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
@ECHO OFF
2+
3+
pushd %~dp0
4+
5+
REM Command file for Sphinx documentation
6+
7+
if "%SPHINXBUILD%" == "" (
8+
set SPHINXBUILD=sphinx-build
9+
)
10+
set SOURCEDIR=source
11+
set BUILDDIR=build
12+
13+
%SPHINXBUILD% >NUL 2>NUL
14+
if errorlevel 9009 (
15+
echo.
16+
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
17+
echo.installed, then set the SPHINXBUILD environment variable to point
18+
echo.to the full path of the 'sphinx-build' executable. Alternatively you
19+
echo.may add the Sphinx directory to PATH.
20+
echo.
21+
echo.If you don't have Sphinx installed, grab it from
22+
echo.https://www.sphinx-doc.org/
23+
exit /b 1
24+
)
25+
26+
if "%1" == "" goto help
27+
28+
%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
29+
goto end
30+
31+
:help
32+
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
33+
34+
:end
35+
popd

docs/source/_static/README.md

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# A placeholder file

docs/source/_static/css/custom.css

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
/* Newlines (\a) and/* spaces (\20) before each parameter */
2+
.sig-param::before {
3+
content: "\a\20\20\20\20\20\20\20\20\20\20\20\20\20\20\20\20";
4+
white-space: pre;
5+
}
6+
7+
/* Newline after the last parameter (so the closing bracket is on a new line) */
8+
dt em.sig-param:last-of-type::after {
9+
content: "\a";
10+
white-space: pre;
11+
}
12+
13+
/* To have blue background of width of the block (instead of width of content) */
14+
dl.class > dt:first-of-type {
15+
display: block !important;
16+
}*/
17+
18+
/*Newlines (\a) and spaces (\20) before each parameter*/
19+
dl.class em:not([class])::before {
20+
content: "\a\20\20\20\20\20\20\20\20\20\20\20\20\20\20\20\20";
21+
white-space: pre;
22+
}
23+
24+
/*Newline after the last parameter (so the closing bracket is on a new line)*/
25+
dl.class em:not([class]):last-of-type::after {
26+
content: "\a";
27+
white-space: pre;
28+
}
29+
30+
/*To have blue background of width of the block (instead of width of content)*/
31+
dl.class > dt:first-of-type {
32+
display: block !important;
33+
}
34+
35+
/*To use the full window width for content*/
36+
.wy-nav-content {
37+
max-width: none;
38+
}

docs/source/_templates/README.md

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# A placeholder file

docs/source/conf.py

+60
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
# Configuration file for the Sphinx documentation builder.
2+
#
3+
# This file only contains a selection of the most common options. For a full
4+
# list see the documentation:
5+
# https://www.sphinx-doc.org/en/master/usage/configuration.html
6+
7+
# -- Path setup --------------------------------------------------------------
8+
9+
# If extensions (or modules to document with autodoc) are in another directory,
10+
# add these directories to sys.path here. If the directory is relative to the
11+
# documentation root, use os.path.abspath to make it absolute, like shown here.
12+
#
13+
# import os
14+
# import sys
15+
# sys.path.insert(0, os.path.abspath('.'))
16+
17+
# -- Project information -----------------------------------------------------
18+
19+
project = 'XChem Align'
20+
copyright = '2025, Diamond Light Source' # pylint: disable=redefined-builtin
21+
author = 'Diamond Light Source'
22+
23+
# -- General configuration ---------------------------------------------------
24+
25+
# Add any Sphinx extension module names here, as strings. They can be
26+
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
27+
# ones.
28+
extensions = [
29+
'sphinx.ext.autodoc',
30+
'sphinx.ext.doctest',
31+
'sphinx.ext.intersphinx',
32+
'sphinx.ext.todo',
33+
'sphinx.ext.coverage',
34+
'sphinx.ext.imgmath',
35+
'myst_parser',
36+
]
37+
38+
# Add any paths that contain templates here, relative to this directory.
39+
templates_path = ['_templates']
40+
41+
# List of patterns, relative to source directory, that match files and
42+
# directories to ignore when looking for source files.
43+
# This pattern also affects html_static_path and html_extra_path.
44+
exclude_patterns = []
45+
46+
master_doc = 'index'
47+
48+
49+
# -- Options for HTML output -------------------------------------------------
50+
51+
# The theme to use for HTML and HTML Help pages. See the documentation for
52+
# a list of builtin themes.
53+
#
54+
html_theme = 'sphinx_rtd_theme'
55+
html_css_files = ["css/custom.css"]
56+
57+
# Add any paths that contain custom static files (such as style sheets) here,
58+
# relative to this directory. They are copied after the builtin static files,
59+
# so a file named "default.css" will overwrite the builtin "default.css".
60+
html_static_path = ['_static']

docs/source/index.md

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
2+
# XChem Align
3+
4+
Placeholder file for XCHem Align documentation root.

requirements.tst

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Requirements for a ReadTheDocs documentation setup.
2+
sphinx==7.2.6
3+
sphinx_rtd_theme==2.0.0
4+
sphinx-notfound-page==1.1.0
5+
6+
myst-parser==4.*

0 commit comments

Comments
 (0)