Skip to content

Commit cd1aab3

Browse files
authored
docs: add documentation (#286)
* Created New documentation Added a source folder with new documentation files * Create sphinx-docs.yml Created and configured the workflow for the SACRO Viewer documentation to automatically build using Sphinx. * Update sphinx-docs.yml * Included more content and worked on the userguide 1. Included More content 2. Includes more content in the introduction.rst, index.rst. 3. Added more content on User guide 4. Included a log. 5. Developer guide * Fixed some content errors 1. Added more content on the developer's guide 2. Added Sacro logo 3. Fix formating issues 4. Removed FAQ and help page * Update architecture.rst * Re-push to reflect changes 1. Added more content on the developer's guide 2. Added Sacro logo 3. Fix formating issues 4. Removed FAQ and help page * cleaned up some of the rst files, fixed the user_guide. Added more con tent * Delete docs/build directory * Add responsive styles and card component styles
1 parent 1cab23e commit cd1aab3

File tree

12 files changed

+1266
-0
lines changed

12 files changed

+1266
-0
lines changed

.github/workflows/sphinx-docs.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
---
2+
name: sphinx build
3+
4+
on:
5+
push:
6+
branches:
7+
- main
8+
paths-ignore:
9+
- '**.md'
10+
- '**.cff'
11+
12+
jobs:
13+
build:
14+
15+
runs-on: ubuntu-latest
16+
17+
steps:
18+
- name: Checkout
19+
uses: actions/checkout@v5
20+
21+
- name: Install documentation dependencies
22+
run: |
23+
pip install sphinx>=5.0 sphinx-issues sphinx-prompt pydata-sphinx-theme sphinx-design
24+
sphinx-build ./docs/source ./docs/_build/html/
25+
26+
27+
- name: Deploy to GitHub Pages
28+
uses: peaceiris/actions-gh-pages@v3
29+
with:
30+
github_token: ${{ secrets.GITHUB_TOKEN }}
31+
publish_dir: docs/_build/html/
32+
force_orphan: true
33+
...
12.7 KB
Loading

docs/source/_static/css/custom.css

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
2+
.sd-card {
3+
transition: transform 0.2s ease-in-out;
4+
border-radius: 0.5rem;
5+
overflow: hidden;
6+
word-wrap: break-word;
7+
}
8+
9+
.sd-card:hover {
10+
transform: translateY(-5px);
11+
}
12+
13+
.sd-card-title {
14+
font-weight: 600;
15+
word-wrap: break-word;
16+
overflow-wrap: break-word;
17+
}
18+
19+
.sd-card-body {
20+
overflow: hidden;
21+
}
22+
23+
[data-theme="light"] .sd-card-title {
24+
color: #212529 !important;
25+
}
26+
27+
[data-theme="dark"] .sd-card-title {
28+
color: #fff !important;
29+
}
30+
31+
@media (prefers-color-scheme: light) {
32+
.sd-card-title {
33+
color: #212529 !important;
34+
}
35+
}
36+
37+
@media (prefers-color-scheme: dark) {
38+
.sd-card-title {
39+
color: #fff !important;
40+
}
41+
}
42+
43+
.sd-card-footer {
44+
border-top: 1px solid rgba(0,0,0,0.1);
45+
padding-top: 0.5rem;
46+
word-wrap: break-word;
47+
}
48+
49+
50+
@media (max-width: 992px) {
51+
.sd-container-fluid .sd-row {
52+
flex-direction: column;
53+
}
54+
55+
.sd-col {
56+
flex: 0 0 100% !important;
57+
max-width: 100% !important;
58+
width: 100% !important;
59+
}
60+
61+
.sd-card {
62+
margin-bottom: 1rem;
63+
width: 100% !important;
64+
}
65+
}
66+
67+
@media (max-width: 1280px) {
68+
.navbar-brand {
69+
white-space: nowrap;
70+
overflow: hidden;
71+
text-overflow: ellipsis;
72+
max-width: 120px;
73+
}
74+
75+
.navbar-nav {
76+
font-size: 0.85rem;
77+
}
78+
79+
.navbar-nav .nav-link {
80+
padding-left: 0.5rem;
81+
padding-right: 0.5rem;
82+
}
83+
}
84+
85+
@media (max-width: 992px) {
86+
.navbar-brand {
87+
max-width: 100px;
88+
}
89+
}

docs/source/conf.py

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
"""Configuration file for the Sphinx documentation builder."""
2+
3+
# -- Path setup --------------------------------------------------------------
4+
5+
import os
6+
import sys
7+
8+
sys.path.insert(0, os.path.abspath("../../"))
9+
10+
# -- Project information -----------------------------------------------------
11+
12+
project = "SACRO Viewer"
13+
copyright = "2025, GRAIMATTER and SACRO Project Team"
14+
author = "GRAIMATTER and SACRO Project Team"
15+
release = "0.1.0"
16+
17+
# -- General configuration ---------------------------------------------------
18+
19+
extensions = [
20+
"sphinx.ext.autodoc",
21+
"sphinx.ext.doctest",
22+
"sphinx.ext.imgconverter",
23+
"sphinx.ext.intersphinx",
24+
"sphinx.ext.mathjax",
25+
"sphinx.ext.viewcode",
26+
"sphinx.ext.napoleon",
27+
"sphinx_issues",
28+
"sphinx_prompt",
29+
"pydata_sphinx_theme",
30+
"sphinx_design",
31+
]
32+
33+
exclude_patterns = []
34+
35+
# -- Options for HTML output -------------------------------------------------
36+
37+
html_theme = "pydata_sphinx_theme"
38+
html_theme_options = {"navigation_depth": 2}
39+
40+
html_static_path = ["_static"]
41+
html_css_files = [
42+
"css/custom.css",
43+
]
44+
45+
# -- -------------------------------------------------------------------------
46+
47+
autodoc_default_options = {
48+
"members": True,
49+
"inherited-members": True,
50+
"member-order": "groupwise",
51+
"special-members": "__init__",
52+
"undoc-members": True,
53+
"exclude-members": "__weakref__",
54+
}
55+
56+
# Napoleon settings for Google/NumPy style docstrings
57+
napoleon_google_docstring = True
58+
napoleon_numpy_docstring = True
59+
napoleon_include_init_with_doc = False
60+
napoleon_include_private_with_doc = False
61+
napoleon_include_special_with_doc = True
62+
napoleon_use_admonition_for_examples = False
63+
napoleon_use_admonition_for_notes = False
64+
napoleon_use_admonition_for_references = False
65+
napoleon_use_ivar = False
66+
napoleon_use_param = True
67+
napoleon_use_rtype = True
68+
69+
# Intersphinx mapping for external documentation
70+
intersphinx_mapping = {
71+
"python": ("https://docs.python.org/3", None),
72+
"django": ("https://docs.djangoproject.com/en/stable/", "https://docs.djangoproject.com/en/stable/_objects/"),
73+
}

0 commit comments

Comments
 (0)