Skip to content
Open
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
8 changes: 7 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,10 @@ MANIFEST
# perso
dev
**/*.egg-info
.idea
.idea

## docs
docs/_build
docs/md/generated
_docs
**/.ipynb_checkpoints
15 changes: 15 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
version: 2

build:
os: "ubuntu-22.04"
tools:
python: "3.8"
jobs:
post_create_environment:
- pip install poetry
- poetry config virtualenvs.create false
post_install:
- poetry install --with docs

sphinx:
configuration: docs/conf.py
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)
Binary file added docs/_static/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
190 changes: 190 additions & 0 deletions docs/_static/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,190 @@
:root {
/* --pst-color-inline-code: 33, 125, 224; */
--mystnb-source-margin-color: darkgrey;
--pst-color-secondary: var(--pst-color-primary) !important;
--pst-color-link-hover: var(--pst-color-primary) !important;
}

html {
--pst-color-secondary: var(--pst-color-primary) !important;
--pst-color-inline-code: #e5448b !important;
--pst-color-inline-code-links: var(--pst-color-primary) !important;
}


/* Block read write */

.blockread,
.blockwrite,
.blockmodify {
width: 50px;
text-align: center;
border-radius: 9px;
font-size: 13px;
margin-bottom: 0px;
padding: 2px 6px 2px 6px;
/* margin-right: 5px; */
opacity: 85%;
}

.blockread {
color: rgb(65, 65, 65);
background-color: rgba(65, 65, 65, 0.082);
border-color: rgb(65, 65, 65);
}

.blockwrite {
color: rgb(76, 120, 201);
background-color: rgb(76, 120, 201, 0.082);
border-color: rgb(76, 120, 201);
}

.blockmodify {
color: rgb(201, 84, 76);
background-color: rgb(201, 84, 76, 0.082);
border-color: rgb(201, 84, 76);
}


/* Headings */

h2 {
text-decoration: underline;
font-size: 22px;
}


/* Code cells */

.highlight pre {
line-height: 20px !important;
font-weight: 500 !important;
font-family: ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation Mono, monospace !important;
font-size: 13px;
}

div.cell_output pre {
background-color: white !important;
}

.highlight pre {
padding: 12px !important;
}


/* no cell number */

.prompt {
display: none !important;
}

.rst-content code.literal {
color: #575757
}

.docutils.literal.notranslate pre {
color: #575757
}

.xr-attrs dt {
background: inherit !important;
color: inherit !important;
border-top: inherit !important;
}

div.nboutput.container div.output_area>div {
text-align: left !important;
}

div.nboutput.container div.output_area {
text-align: center !important;
}

.highlight .nn {
color: black !important;
font-weight: normal !important;
}

.highlight .kn,
.highlight .k,
.highlight .kc,
.highlight .ow {
color: #d73a49 !important;
font-weight: normal !important;
}

.highlight .mi,
.highlight .mf,
.highlight .nb,
.highlight .bp {
color: #005cc5 !important
}

.highlight .c1,
.highlight .o {
color: #6a737d !important
}

.highlight .sa,
.highlight .sé,
.highlight .s2,
.highlight .sd {
color: #032f62 !important
}

.highlight .nd {
color: #005cc5 !important;
font-weight: normal !important;
}

.highlight .p,
.highlight .mi,
.highlight .mf {
font-weight: normal !important;
}

.highlight .si {
color: #70a0d0 !important;
}

/* code,
code span.pre {
background: none;
color: var(--color-brand-primary)
} */

/* Dataframe */

.cell_output .dataframe {
font-size: 0.85em;
width: 100%;
}

/* prose logo font */
.navbar-brand.logo .logo__title {
font-style: italic;
font-weight: bold;
font-family: Georgia, 'Times New Roman', Times, serif;
color: #404040;
font-size: 2rem;
}

.version-nb {
margin-top: -12px;
font-style: italic;
font-weight: bold;
color: var(--pst-color-primary);
font-size: 15px;
}

.navbar-brand:hover {
text-decoration: none !important;
}

nav.bd-links li>a:hover {
text-decoration: none;
}

/* nav.bd-links .current > a {
box-shadow: none;
} */
99 changes: 99 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
# Configuration file for the Sphinx documentation builder.
#
# This file only contains a selection of the most common options. For a full
# list see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html

# -- Path setup --------------------------------------------------------------

# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
#
# import os
# import sys
# sys.path.insert(0, os.path.abspath('.'))


# -- Project information -----------------------------------------------------

project = "verse"
copyright = "2023, Mathilde Timmermans"
author = "Mathilde Timmermans"


# -- General configuration ---------------------------------------------------

# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
"myst_nb",
"sphinx_copybutton",
"sphinx.ext.autodoc",
"sphinx.ext.napoleon",
"sphinx.ext.autosummary",
"sphinx_design",
]


# Add any paths that contain templates here, relative to this directory.
templates_path = ["_templates"]

# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This pattern also affects html_static_path and html_extra_path.
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]


# -- Options for HTML output -------------------------------------------------

# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
html_theme = "sphinx_book_theme"

# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ["_static"]

# Title
# get version number from pyproject.toml
# --------------------------------------
import toml

pyproject = toml.load("../pyproject.toml")
version = pyproject["tool"]["poetry"]["version"]
html_short_title = "verse"
html_title = f"{html_short_title}"
# -----

source_suffix = {
".rst": "restructuredtext",
".ipynb": "myst-nb",
".myst": "myst-nb",
}

root_doc = "index"

html_theme_options = {
"repository_url": "https://github.com/mathtimm/verse",
"use_repository_button": True,
}

nb_render_image_options = {"align": "center"}

myst_enable_extensions = [
"dollarmath",
]

templates_path = ["_templates"]
nb_execution_mode = "auto"
nb_execution_raise_on_error = True
remove_code_source = True

html_css_files = ["style.css"]

autodoc_typehints = "signature"
autoclass_content = "both"
31 changes: 31 additions & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
---
sd_hide_title: true
---

# verse

```{image} _static/logo.png
:width: 400px
:align: center
```

<b>verse</b> is an extension of the <b>prose</b> package for TESS follow-up observations and results reporting.
It gives access to additional features and properties specific to TESS Objects of Interest observations.
A built-in function allows the user to model quickly the transit by making use of the <b>exoplanet</b> and <b>pymc3</b> packages and by retrieving priors directly from the TESS Transit Finder and the ExoFOP database.
<b>verse</b> creates observation reports and uploads the files directly onto ExoFOP for registered members of the TESS Follow-Up Observing Program (TFOP).

```{toctree}
:maxdepth: 0
:caption: Get started

md/installation
ipynb/quickstart
ipynb/acknowledgement
```

```{toctree}
:maxdepth: 0
:caption: Tutorials

ipynb/photometry
```
24 changes: 24 additions & 0 deletions docs/ipynb/photometry.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Photomerty"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": []
}
],
"metadata": {
"language_info": {
"name": "python"
},
"orig_nbformat": 4
},
"nbformat": 4,
"nbformat_minor": 2
}
Loading