Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sphinx docs #218

Draft
wants to merge 5 commits into
base: master
Choose a base branch
from
Draft
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
21 changes: 21 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
version: 2

build:
os: ubuntu-22.04
tools:
python: latest
rust: latest
apt_packages:
- cmake
- libceres-dev
- libfftw3-dev
- libgsl-dev

sphinx:
configuration: docs/conf.py

python:
install:
- requirements: docs/requirements.txt
- method: pip
path: light-curve
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)
58 changes: 58 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# 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

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

project = "light-curve"
copyright = "2023, Konstantin Malanchev, Anastasia Lavrukhina"
author = "Konstantin Malanchev, Anastasia Lavrukhina"

# -- 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",
"sphinxcontrib.katex",
]

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 = "alabaster"
html_static_path = ["_static"]


# KaTeX
katex_inline = ["$", "$"]
katex_display = ["$$", "$$"]


# Convert docstrings from Markdown to reStructuredText
def docstring(app, what, name, obj, options, lines):
# import re

import m2r2

md = "\n".join(lines)

# Replace '$$' with '```math ... ```'
# md = re.sub(r'\$\$(.*?)\$\$', r'```math\n\1\n```', md)

rst = m2r2.convert(md)

lines.clear()
lines.extend(rst.splitlines())


def setup(app):
app.connect("autodoc-process-docstring", docstring)
21 changes: 21 additions & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
.. light-curve documentation master file, created by
sphinx-quickstart on Tue May 30 16:32:24 2023.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.

Welcome to light-curve's documentation!
=======================================

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

modules.rst


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

* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`
250 changes: 250 additions & 0 deletions docs/light_curve.light_curve_py.features.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,250 @@
light\_curve.light\_curve\_py.features package
==============================================

.. automodule:: light_curve.light_curve_py.features
:members:
:undoc-members:
:show-inheritance:

Submodules
----------

light\_curve.light\_curve\_py.features.adnormal module
------------------------------------------------------

.. automodule:: light_curve.light_curve_py.features.adnormal
:members:
:undoc-members:
:show-inheritance:

light\_curve.light\_curve\_py.features.amplitude module
-------------------------------------------------------

.. automodule:: light_curve.light_curve_py.features.amplitude
:members:
:undoc-members:
:show-inheritance:

light\_curve.light\_curve\_py.features.beyondnstd module
--------------------------------------------------------

.. automodule:: light_curve.light_curve_py.features.beyondnstd
:members:
:undoc-members:
:show-inheritance:

light\_curve.light\_curve\_py.features.bins module
--------------------------------------------------

.. automodule:: light_curve.light_curve_py.features.bins
:members:
:undoc-members:
:show-inheritance:

light\_curve.light\_curve\_py.features.cusum module
---------------------------------------------------

.. automodule:: light_curve.light_curve_py.features.cusum
:members:
:undoc-members:
:show-inheritance:

light\_curve.light\_curve\_py.features.eta module
-------------------------------------------------

.. automodule:: light_curve.light_curve_py.features.eta
:members:
:undoc-members:
:show-inheritance:

light\_curve.light\_curve\_py.features.etae module
--------------------------------------------------

.. automodule:: light_curve.light_curve_py.features.etae
:members:
:undoc-members:
:show-inheritance:

light\_curve.light\_curve\_py.features.excvar module
----------------------------------------------------

.. automodule:: light_curve.light_curve_py.features.excvar
:members:
:undoc-members:
:show-inheritance:

light\_curve.light\_curve\_py.features.extractor module
-------------------------------------------------------

.. automodule:: light_curve.light_curve_py.features.extractor
:members:
:undoc-members:
:show-inheritance:

light\_curve.light\_curve\_py.features.flux\_n\_not\_det\_before\_fd module
---------------------------------------------------------------------------

.. automodule:: light_curve.light_curve_py.features.flux_n_not_det_before_fd
:members:
:undoc-members:
:show-inheritance:

light\_curve.light\_curve\_py.features.intpercrange module
----------------------------------------------------------

.. automodule:: light_curve.light_curve_py.features.intpercrange
:members:
:undoc-members:
:show-inheritance:

light\_curve.light\_curve\_py.features.kurtosis module
------------------------------------------------------

.. automodule:: light_curve.light_curve_py.features.kurtosis
:members:
:undoc-members:
:show-inheritance:

light\_curve.light\_curve\_py.features.linfit module
----------------------------------------------------

.. automodule:: light_curve.light_curve_py.features.linfit
:members:
:undoc-members:
:show-inheritance:

light\_curve.light\_curve\_py.features.lintrend module
------------------------------------------------------

.. automodule:: light_curve.light_curve_py.features.lintrend
:members:
:undoc-members:
:show-inheritance:

light\_curve.light\_curve\_py.features.magnitude\_n\_not\_det\_before\_fd module
--------------------------------------------------------------------------------

.. automodule:: light_curve.light_curve_py.features.magnitude_n_not_det_before_fd
:members:
:undoc-members:
:show-inheritance:

light\_curve.light\_curve\_py.features.magnpratio module
--------------------------------------------------------

.. automodule:: light_curve.light_curve_py.features.magnpratio
:members:
:undoc-members:
:show-inheritance:

light\_curve.light\_curve\_py.features.maxslope module
------------------------------------------------------

.. automodule:: light_curve.light_curve_py.features.maxslope
:members:
:undoc-members:
:show-inheritance:

light\_curve.light\_curve\_py.features.mean module
--------------------------------------------------

.. automodule:: light_curve.light_curve_py.features.mean
:members:
:undoc-members:
:show-inheritance:

light\_curve.light\_curve\_py.features.meanvar module
-----------------------------------------------------

.. automodule:: light_curve.light_curve_py.features.meanvar
:members:
:undoc-members:
:show-inheritance:

light\_curve.light\_curve\_py.features.medabsdev module
-------------------------------------------------------

.. automodule:: light_curve.light_curve_py.features.medabsdev
:members:
:undoc-members:
:show-inheritance:

light\_curve.light\_curve\_py.features.medbufrperc module
---------------------------------------------------------

.. automodule:: light_curve.light_curve_py.features.medbufrperc
:members:
:undoc-members:
:show-inheritance:

light\_curve.light\_curve\_py.features.median module
----------------------------------------------------

.. automodule:: light_curve.light_curve_py.features.median
:members:
:undoc-members:
:show-inheritance:

light\_curve.light\_curve\_py.features.otsusplit module
-------------------------------------------------------

.. automodule:: light_curve.light_curve_py.features.otsusplit
:members:
:undoc-members:
:show-inheritance:

light\_curve.light\_curve\_py.features.pdiffmperc module
--------------------------------------------------------

.. automodule:: light_curve.light_curve_py.features.pdiffmperc
:members:
:undoc-members:
:show-inheritance:

light\_curve.light\_curve\_py.features.percampl module
------------------------------------------------------

.. automodule:: light_curve.light_curve_py.features.percampl
:members:
:undoc-members:
:show-inheritance:

light\_curve.light\_curve\_py.features.redchi2 module
-----------------------------------------------------

.. automodule:: light_curve.light_curve_py.features.redchi2
:members:
:undoc-members:
:show-inheritance:

light\_curve.light\_curve\_py.features.skew module
--------------------------------------------------

.. automodule:: light_curve.light_curve_py.features.skew
:members:
:undoc-members:
:show-inheritance:

light\_curve.light\_curve\_py.features.stdev module
---------------------------------------------------

.. automodule:: light_curve.light_curve_py.features.stdev
:members:
:undoc-members:
:show-inheritance:

light\_curve.light\_curve\_py.features.stetsonk module
------------------------------------------------------

.. automodule:: light_curve.light_curve_py.features.stetsonk
:members:
:undoc-members:
:show-inheritance:

light\_curve.light\_curve\_py.features.weightmean module
--------------------------------------------------------

.. automodule:: light_curve.light_curve_py.features.weightmean
:members:
:undoc-members:
:show-inheritance:
Loading
Loading