Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 61 additions & 0 deletions .github/workflows/docs-deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: Deploy Documentation

on:
push:
branches:
- main
workflow_dispatch: # Allow manual triggering

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write

# Allow only one concurrent deployment
concurrency:
group: "pages"
cancel-in-progress: true

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
cache: 'pip'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r docs/requirements.txt
pip install -e .

- name: Build documentation
run: |
cd docs
make html

- name: Setup Pages
uses: actions/configure-pages@v4

- name: Upload Pages artifact
uses: actions/upload-pages-artifact@v3
with:
path: docs/_build/html/

deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
48 changes: 48 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Documentation

on:
pull_request:
branches:
- main
schedule:
# Run nightly at 2:00 AM UTC
- cron: '0 2 * * *'
workflow_dispatch: # Allow manual triggering

jobs:
build-docs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
cache: 'pip'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r docs/requirements.txt
pip install -e .

- name: Build documentation
run: |
cd docs
make html

- name: Upload documentation artifact
uses: actions/upload-artifact@v4
with:
name: documentation
path: docs/_build/html/
retention-days: 7

- name: Check for warnings
run: |
cd docs
# Rebuild with warnings as errors to catch issues
make clean
sphinx-build -W -b html . _build/html
20 changes: 20 additions & 0 deletions docs/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Minimal makefile for Sphinx documentation
#

# You can set these variables from the command line, and also
# from the environment for the first two.
SPHINXOPTS ?=
SPHINXBUILD ?= sphinx-build
SOURCEDIR = .
BUILDDIR = _build

# Put it first so that "make" without argument is like "make help".
help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

.PHONY: help Makefile

# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
Empty file added docs/_static/.gitkeep
Empty file.
Empty file added docs/_templates/.gitkeep
Empty file.
23 changes: 23 additions & 0 deletions docs/api/config.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
Config Module
=============

.. automodule:: radclss.config
:members:
:undoc-members:
:show-inheritance:

radclss.config.default_config
-----------------------------

.. automodule:: radclss.config.default_config
:members:
:undoc-members:
:show-inheritance:

radclss.config.output_config
----------------------------

.. automodule:: radclss.config.output_config
:members:
:undoc-members:
:show-inheritance:
15 changes: 15 additions & 0 deletions docs/api/core.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
Core Module
===========

.. automodule:: radclss.core
:members:
:undoc-members:
:show-inheritance:

radclss.core.radclss_core
-------------------------

.. automodule:: radclss.core.radclss_core
:members:
:undoc-members:
:show-inheritance:
15 changes: 15 additions & 0 deletions docs/api/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
API Reference
=============

This section contains the complete API documentation for radclss, automatically
generated from the source code docstrings.

.. toctree::
:maxdepth: 2
:caption: Modules:

core
config
io
util
vis
15 changes: 15 additions & 0 deletions docs/api/io.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
IO Module
=========

.. automodule:: radclss.io
:members:
:undoc-members:
:show-inheritance:

radclss.io.write
----------------

.. automodule:: radclss.io.write
:members:
:undoc-members:
:show-inheritance:
15 changes: 15 additions & 0 deletions docs/api/util.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
Util Module
===========

.. automodule:: radclss.util
:members:
:undoc-members:
:show-inheritance:

radclss.util.column_utils
-------------------------

.. automodule:: radclss.util.column_utils
:members:
:undoc-members:
:show-inheritance:
15 changes: 15 additions & 0 deletions docs/api/vis.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
Visualization Module
====================

.. automodule:: radclss.vis
:members:
:undoc-members:
:show-inheritance:

radclss.vis.quicklooks
----------------------

.. automodule:: radclss.vis.quicklooks
:members:
:undoc-members:
:show-inheritance:
70 changes: 70 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
# Configuration file for the Sphinx documentation builder.
#
# For the full list of built-in configuration values, see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html

import os
import sys

# Add the source directory to the path so autodoc can find the modules
sys.path.insert(0, os.path.abspath("../src"))

# -- Project information -----------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information

project = "radclss"
copyright = "2025, radclss contributors"
author = "radclss contributors"
release = "0.1.0"

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

extensions = [
"sphinx.ext.autodoc",
"sphinx.ext.autosummary",
"sphinx.ext.napoleon",
"sphinx.ext.viewcode",
"sphinx.ext.intersphinx",
]

# Autodoc settings
autodoc_default_options = {
"members": True,
"undoc-members": True,
"show-inheritance": True,
"member-order": "bysource",
}

# Generate autosummary pages automatically
autosummary_generate = True

# Napoleon settings for Google/NumPy style docstrings
napoleon_google_docstring = True
napoleon_numpy_docstring = True
napoleon_include_init_with_doc = True
napoleon_include_private_with_doc = False
napoleon_include_special_with_doc = True

# Intersphinx mapping
intersphinx_mapping = {
"python": ("https://docs.python.org/3", None),
"numpy": ("https://numpy.org/doc/stable/", None),
"pandas": ("https://pandas.pydata.org/docs/", None),
}

templates_path = ["_templates"]
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]

# -- Options for HTML output -------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output

html_theme = "sphinx_rtd_theme"
html_static_path = ["_static"]

# Theme options
html_theme_options = {
"navigation_depth": 4,
"collapse_navigation": False,
"sticky_navigation": True,
}
33 changes: 33 additions & 0 deletions docs/getting_started.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
Getting Started
===============

Installation
------------

You can install radclss using pip:

.. code-block:: bash

pip install radclss

Or install from source:

.. code-block:: bash

git clone https://github.com/your-org/radclss.git
cd radclss
pip install -e .

Quick Start
-----------

Here's a simple example to get you started:

.. code-block:: python

import radclss

# Your example code here
pass

For more detailed examples, see the :doc:`api/index` documentation.
18 changes: 18 additions & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
radclss Documentation
=====================

Welcome to the radclss documentation!

.. toctree::
:maxdepth: 2
:caption: Contents:

getting_started
api/index

Indices and tables
==================

* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`
35 changes: 35 additions & 0 deletions docs/make.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
@ECHO OFF

pushd %~dp0

REM Command file for Sphinx documentation

if "%SPHINXBUILD%" == "" (
set SPHINXBUILD=sphinx-build
)
set SOURCEDIR=.
set BUILDDIR=_build

%SPHINXBUILD% >NUL 2>NUL
if errorlevel 9009 (
echo.
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
echo.installed, then set the SPHINXBUILD environment variable to point
echo.to the full path of the 'sphinx-build' executable. Alternatively you
echo.may add the Sphinx directory to PATH.
echo.
echo.If you don't have Sphinx installed, grab it from
echo.https://www.sphinx-doc.org/
exit /b 1
)

if "%1" == "" goto help

%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
goto end

:help
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%

:end
popd
Loading
Loading