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

Add webpage #63

Merged
merged 14 commits into from
Oct 2, 2024
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
28 changes: 28 additions & 0 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: documentation

on: [push, pull_request, workflow_dispatch]

permissions:
contents: write

jobs:
build_docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
lfs: false
- uses: prefix-dev/[email protected]
with:
pixi-version: latest
cache: true
locked: false
frozen: false
environments: doc
- run: pixi run -e doc build_docs
- uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./doc/build/html
publish_branch: 'gh-pages'
force_orphan: 'false'
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,4 @@ dist
.pixi
*.egg-info
*.lcov
/doc/build
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ PyRASA is a Python library designed to separate and parametrize aperiodic (fract


## Documentation
Documentation for PyRASA, including detailed descriptions of functions, parameters, and examples, will soon be available [here].
Documentation for PyRASA, including detailed descriptions of functions, parameters, and tutorials is available [here](https://schmidtfa.github.io/pyrasa/index.html).


### Installation
Expand Down
20 changes: 20 additions & 0 deletions doc/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 = source
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)
35 changes: 35 additions & 0 deletions doc/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=source
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
11 changes: 11 additions & 0 deletions doc/source/_autoexamples/pyrasa.irasa.irasa.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
pyrasa.irasa.irasa
==================

.. currentmodule:: pyrasa.irasa

.. autofunction:: irasa

.. _sphx_glr_backreferences_pyrasa.irasa.irasa:

.. minigallery:: pyrasa.irasa.irasa
:add-heading:
11 changes: 11 additions & 0 deletions doc/source/_autoexamples/pyrasa.irasa.irasa_sprint.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
pyrasa.irasa.irasa\_sprint
==========================

.. currentmodule:: pyrasa.irasa

.. autofunction:: irasa_sprint

.. _sphx_glr_backreferences_pyrasa.irasa.irasa_sprint:

.. minigallery:: pyrasa.irasa.irasa_sprint
:add-heading:
11 changes: 11 additions & 0 deletions doc/source/_autoexamples/pyrasa.irasa_mne.irasa_epochs.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
pyrasa.irasa\_mne.irasa\_epochs
===============================

.. currentmodule:: pyrasa.irasa_mne

.. autofunction:: irasa_epochs

.. _sphx_glr_backreferences_pyrasa.irasa_mne.irasa_epochs:

.. minigallery:: pyrasa.irasa_mne.irasa_epochs
:add-heading:
11 changes: 11 additions & 0 deletions doc/source/_autoexamples/pyrasa.irasa_mne.irasa_raw.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
pyrasa.irasa\_mne.irasa\_raw
============================

.. currentmodule:: pyrasa.irasa_mne

.. autofunction:: irasa_raw

.. _sphx_glr_backreferences_pyrasa.irasa_mne.irasa_raw:

.. minigallery:: pyrasa.irasa_mne.irasa_raw
:add-heading:
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
pyrasa.utils.aperiodic\_utils.compute\_aperiodic\_model
=======================================================

.. currentmodule:: pyrasa.utils.aperiodic_utils

.. autofunction:: compute_aperiodic_model

.. _sphx_glr_backreferences_pyrasa.utils.aperiodic_utils.compute_aperiodic_model:

.. minigallery:: pyrasa.utils.aperiodic_utils.compute_aperiodic_model
:add-heading:
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
pyrasa.utils.aperiodic\_utils.compute\_aperiodic\_model\_sprint
===============================================================

.. currentmodule:: pyrasa.utils.aperiodic_utils

.. autofunction:: compute_aperiodic_model_sprint

.. _sphx_glr_backreferences_pyrasa.utils.aperiodic_utils.compute_aperiodic_model_sprint:

.. minigallery:: pyrasa.utils.aperiodic_utils.compute_aperiodic_model_sprint
:add-heading:
13 changes: 13 additions & 0 deletions doc/source/_autoexamples/pyrasa.utils.fit_funcs.AbstractFitFun.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
pyrasa.utils.fit\_funcs.AbstractFitFun
======================================

.. currentmodule:: pyrasa.utils.fit_funcs

.. autoclass:: AbstractFitFun
:special-members: __contains__,__getitem__,__iter__,__len__,__add__,__sub__,__mul__,__div__,__neg__,__hash__
:members:

.. _sphx_glr_backreferences_pyrasa.utils.fit_funcs.AbstractFitFun:

.. minigallery:: pyrasa.utils.fit_funcs.AbstractFitFun
:add-heading:
13 changes: 13 additions & 0 deletions doc/source/_autoexamples/pyrasa.utils.fit_funcs.FixedFitFun.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
pyrasa.utils.fit\_funcs.FixedFitFun
===================================

.. currentmodule:: pyrasa.utils.fit_funcs

.. autoclass:: FixedFitFun
:special-members: __contains__,__getitem__,__iter__,__len__,__add__,__sub__,__mul__,__div__,__neg__,__hash__
:members:

.. _sphx_glr_backreferences_pyrasa.utils.fit_funcs.FixedFitFun:

.. minigallery:: pyrasa.utils.fit_funcs.FixedFitFun
:add-heading:
13 changes: 13 additions & 0 deletions doc/source/_autoexamples/pyrasa.utils.fit_funcs.KneeFitFun.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
pyrasa.utils.fit\_funcs.KneeFitFun
==================================

.. currentmodule:: pyrasa.utils.fit_funcs

.. autoclass:: KneeFitFun
:special-members: __contains__,__getitem__,__iter__,__len__,__add__,__sub__,__mul__,__div__,__neg__,__hash__
:members:

.. _sphx_glr_backreferences_pyrasa.utils.fit_funcs.KneeFitFun:

.. minigallery:: pyrasa.utils.fit_funcs.KneeFitFun
:add-heading:
11 changes: 11 additions & 0 deletions doc/source/_autoexamples/pyrasa.utils.peak_utils.get_band_info.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
pyrasa.utils.peak\_utils.get\_band\_info
========================================

.. currentmodule:: pyrasa.utils.peak_utils

.. autofunction:: get_band_info

.. _sphx_glr_backreferences_pyrasa.utils.peak_utils.get_band_info:

.. minigallery:: pyrasa.utils.peak_utils.get_band_info
:add-heading:
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
pyrasa.utils.peak\_utils.get\_peak\_params
==========================================

.. currentmodule:: pyrasa.utils.peak_utils

.. autofunction:: get_peak_params

.. _sphx_glr_backreferences_pyrasa.utils.peak_utils.get_peak_params:

.. minigallery:: pyrasa.utils.peak_utils.get_peak_params
:add-heading:
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
pyrasa.utils.peak\_utils.get\_peak\_params\_sprint
==================================================

.. currentmodule:: pyrasa.utils.peak_utils

.. autofunction:: get_peak_params_sprint

.. _sphx_glr_backreferences_pyrasa.utils.peak_utils.get_peak_params_sprint:

.. minigallery:: pyrasa.utils.peak_utils.get_peak_params_sprint
:add-heading:
33 changes: 33 additions & 0 deletions doc/source/_static/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
a[class^="sphx-glr-backref-module-mne_bids"] {
/* make all MNE-BIDS backrefs bold */
font-weight: 800;
}

span.option {
/* avoid breaking lines in our command-line parameters */
white-space: nowrap;
}

/* ************************************************* Previous / Next buttons */
.prev-next-bottom a.left-prev:before {
content:"❮\00A0"
}
.prev-next-bottom a.right-next:after {
content:"\00A0❯"
}
.prev-next-bottom a.right-next {
text-align: right;
}

/* ************************************************* truncate version string */
div.navbar-item:first-child {
overflow-x: hidden;
}
a.navbar-brand.logo {
flex-shrink: 1;
overflow-x: hidden;
}
p.logo__title {
overflow-x: hidden;
text-overflow: ellipsis;
}
12 changes: 12 additions & 0 deletions doc/source/_templates/autosummary/class.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{{ fullname | escape | underline}}

.. currentmodule:: {{ module }}

.. autoclass:: {{ objname }}
:special-members: __contains__,__getitem__,__iter__,__len__,__add__,__sub__,__mul__,__div__,__neg__,__hash__
:members:

.. _sphx_glr_backreferences_{{ fullname }}:

.. minigallery:: {{ fullname }}
:add-heading:
10 changes: 10 additions & 0 deletions doc/source/_templates/autosummary/function.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{{ fullname | escape | underline}}

.. currentmodule:: {{ module }}

.. autofunction:: {{ objname }}

.. _sphx_glr_backreferences_{{ fullname }}:

.. minigallery:: {{ fullname }}
:add-heading:
18 changes: 18 additions & 0 deletions doc/source/_templates/layout.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{%- extends "pydata_sphinx_theme/layout.html" %}

{% block fonts %}
<!-- add `style` or `link` tags with your CSS `@font-face` declarations here -->
<!-- ... and a `style` tag with setting `font-family` in `body` and `.header-style` -->
<!-- ... and optionally preload the `woff2` for snappier page loads -->
<!-- or add a `style` tag with a font fallback chain with good cross-platform coverage -->
<style>
body,.header-style {font-family: 'Source Sans Pro', sans-serif;}
code,kbd,pre,samp {font-family: 'Source Code Pro', monospace;}
</style>
{% endblock %}

{% block extrahead %}
<script type="text/javascript" src="{{ pathto('_static/copybutton.js', 1) }}"></script>
<script type="text/javascript" src="{{ pathto('_static/scrollfix.js', 1) }}"></script>
{{ super() }}
{% endblock %}
Loading
Loading