From 84ad67ad88bf848a4749aab5345dc93dd9822de2 Mon Sep 17 00:00:00 2001 From: Nicolas Schmid Date: Tue, 20 Feb 2024 14:57:20 +0100 Subject: [PATCH] feat: configure make, readthedocs --- .readthedocs.yaml | 31 +++++++++++++++++++++++++++++++ docs/Makefile | 2 +- docs/source/conf.py | 16 ++++++++++++++++ docs/source/index.md | 9 ++++----- docs/source/user/docs.md | 2 +- docs/source/user/usage.md | 24 +++--------------------- seismostats/seismicity/catalog.py | 28 +++++++++++++++++++++++++--- 7 files changed, 81 insertions(+), 31 deletions(-) create mode 100644 .readthedocs.yaml diff --git a/.readthedocs.yaml b/.readthedocs.yaml new file mode 100644 index 00000000..e423697c --- /dev/null +++ b/.readthedocs.yaml @@ -0,0 +1,31 @@ +# .readthedocs.yaml +# Read the Docs configuration file +# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details + +# Required +version: 2 + +# Set the OS, Python version and other tools you might need +build: + os: ubuntu-22.04 + tools: + python: "3.12" + # You can also specify other tool versions: + # nodejs: "19" + # rust: "1.64" + # golang: "1.19" + +# Build documentation in the "docs/" directory with Sphinx +sphinx: + configuration: docs/conf.py +# Optionally build your docs in additional formats such as PDF and ePub +# formats: +# - pdf +# - epub + +# Optional but recommended, declare the Python requirements required +# to build your documentation +# See https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html +# python: +# install: +# - requirements: docs/requirements.txt diff --git a/docs/Makefile b/docs/Makefile index bf7f4b09..3b815202 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -20,7 +20,7 @@ help: @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) server: - sphinx-autobuild "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) + sphinx-autobuild "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) --watch "../seismostats" clean: rm -rf $(BUILDDIR)/ \ No newline at end of file diff --git a/docs/source/conf.py b/docs/source/conf.py index 41a2ddde..f6a2b494 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -33,3 +33,19 @@ html_theme = 'pydata_sphinx_theme' html_static_path = ['_static'] +html_theme_options = { + "use_edit_page_button": False, + "icon_links": [ + { + "name": "GitHub", + "url": "https://github.com/swiss-seismological-service/SeismoStats", + "icon": "fa-brands fa-square-github", + "type": "fontawesome", + } + ] +} +html_show_sourcelink = False +navigation_with_keys = True +html_context = { + "default_mode": "light", +} diff --git a/docs/source/index.md b/docs/source/index.md index fb20ea04..86cb9d77 100644 --- a/docs/source/index.md +++ b/docs/source/index.md @@ -5,12 +5,11 @@ User Guide API reference ``` -```{include} ../../README.md -:relative-images: -``` +# Seismo Stats + +Measure your seismicity with **SeismoStats**, a Python package for seismicity analysis. -Check out the {doc}`user/usage` section for further information, including how to -{ref}`install ` the project. +Check out the {doc}`user/usage` section for further information, or the {doc}`reference/index` for a technical reference.