Skip to content

Commit

Permalink
Merge pull request #143 from pfizer-opensource/development
Browse files Browse the repository at this point in the history
Version 0.14.1.post1
  • Loading branch information
LukasAdamowicz authored Mar 1, 2024
2 parents 5e8ba50 + 9c8b7b6 commit 7cc8962
Show file tree
Hide file tree
Showing 18 changed files with 125 additions and 163 deletions.
10 changes: 3 additions & 7 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
"sphinx.ext.autosummary",
"numpydoc",
"sphinx.ext.coverage",
"sphinx_panels",
"sphinx_design",
]

# this is needed for some reason...
Expand All @@ -73,7 +73,7 @@
#
# This is also used if you do content translation via gettext catalogs.
# Usually you set "language" from the command line for these cases.
language = None
language = "en"

# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
Expand Down Expand Up @@ -243,11 +243,7 @@
"skdh.features.lib.extensions",
"skdh.io._extensions",
"skdh.utility._extensions",
"skdh.preprocessing._extensions",
]

# -----------------------------------------------------------------------------
# Sphinx Panels
# -----------------------------------------------------------------------------
panels_add_bootstrapp_css = False

# -- Extension configuration -------------------------------------------------
132 changes: 47 additions & 85 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,91 +12,53 @@ Scikit Digital Health

`SciKit-Digital-Health` is a Python package with methods for reading, pre-processing, manipulating, and analyzing Inertial Meausurement Unit data. `scikit-digital-health` contains the following sub-modules:

.. panels::
:img-top-cls: pl-3 pr-3
:card: shadow

:img-top: _static/skdh_io.svg

:badge:`skdh.io,badge-primary`

+++
.. link-button:: skdh io
:type: ref
:text: Ingestion of common binary data files and generic data stores.
:classes: btn-outline-primary stretched-link btn-block

---
:img-top: _static/skdh_preproc.svg
:badge:`skdh.preprocessing,badge-primary`
+++
.. link-button:: skdh preprocessing
:type: ref
:text: Pre-processing algorithms for inertial data.
:classes: btn-outline-primary stretched-link btn-block

---
:img-top: _static/skdh_context.svg
:badge:`skdh.context,badge-primary`
+++
.. link-button:: skdh context
:type: ref
:text: Context detection methods for inertial sensor data.
:classes: btn-outline-primary stretched-link btn-block

---
:img-top: _static/skdh_gait.svg
:badge:`skdh.gait,badge-primary`
+++
.. link-button:: skdh gait
:type: ref
:text: Gait detection and analysis from lumbar inertial data.
:classes: btn-outline-primary stretched-link btn-block

---
:img-top: _static/skdh_s2s.svg
:badge:`skdh.sit2stand,badge-primary`
+++
.. link-button:: skdh sit2stand
:type: ref
:text: Sit-to-stand detection and analysis from lumbar inertial data.
:classes: btn-outline-primary stretched-link btn-block

---
:img-top: _static/skdh_activity.svg
:badge:`skdh.activity,badge-primary`
+++
.. link-button:: skdh activity
:type: ref
:text: Actigraphy & activity analysis from inertial data.
:classes: btn-outline-primary stretched-link btn-block

---
:img-top: _static/skdh_sleep.svg
:badge:`skdh.sleep,badge-primary`
+++
.. link-button:: skdh sleep
:type: ref
:text: Sleep detection and analysis from wrist inertial data.
:classes: btn-outline-primary stretched-link btn-block

---
:img-top: _static/skdh_features.svg
:badge:`skdh.features,badge-primary`
+++
.. link-button:: skdh features
:type: ref
:text: Common time-series signal features.
:classes: btn-outline-primary stretched-link btn-block

---
:img-top: _static/skdh_utility.svg
:badge:`skdh.utility,badge-primary`
+++
.. link-button:: skdh utility
:type: ref
:text: Utility functions for time-series analysis.
:classes: btn-outline-primary stretched-link btn-block
.. grid:: 1 2 2 2
:gutter: 2

.. grid-item-card:: :bdg-primary:`skdh.io`
:img-top: _static/skdh_io.svg
:link: skdh-io
:link-type: ref

.. grid-item-card:: :bdg-primary:`skdh.preprocessing`
:img-top: _static/skdh_preproc.svg
:link: skdh-preprocessing
:link-type: ref

.. grid-item-card:: :bdg-primary:`skdh.context`
:img-top: _static/skdh_context.svg
:link: skdh-context
:link-type: ref

.. grid-item-card:: :bdg-primary:`skdh.gait`
:img-top: _static/skdh_gait.svg
:link: skdh-gait
:link-type: ref

.. grid-item-card:: :bdg-primary:`skdh.sit2stand`
:img-top: _static/skdh_s2s.svg
:link: skdh-sit2stand
:link-type: ref

.. grid-item-card:: :bdg-primary:`skdh.activity`
:img-top: _static/skdh_activity.svg
:link: skdh-activity
:link-type: ref

.. grid-item-card:: :bdg-primary:`skdh.sleep`
:img-top: _static/skdh_sleep.svg
:link: skdh-sleep
:link-type: ref

.. grid-item-card:: :bdg-primary:`skdh.features`
:img-top: _static/skdh_features.svg
:link: skdh-features
:link-type: ref

.. grid-item-card:: :bdg-primary:`skdh.utility`
:img-top: _static/skdh_utility.svg
:link: skdh-utility
:link-type: ref


..
Expand Down
2 changes: 1 addition & 1 deletion docs/ref/activity.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.. _skdh activity:
.. _skdh-activity:

.. automodule:: skdh.activity
:ignore-module-all:
2 changes: 1 addition & 1 deletion docs/ref/context.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.. _skdh context:
.. _skdh-context:

.. automodule:: skdh.context
:ignore-module-all:
2 changes: 1 addition & 1 deletion docs/ref/features.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.. _skdh features:
.. _skdh-features:

.. automodule:: skdh.features
:ignore-module-all:
2 changes: 1 addition & 1 deletion docs/ref/gait.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.. _skdh gait:
.. _skdh-gait:

.. automodule:: skdh.gait
:ignore-module-all:
2 changes: 1 addition & 1 deletion docs/ref/gait_old.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.. _skdh gait_old:
.. _skdh-gait_old:

.. automodule:: skdh.gait_old
:ignore-module-all:
2 changes: 1 addition & 1 deletion docs/ref/io.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.. _skdh io:
.. _skdh-io:

.. automodule:: skdh.io
:ignore-module-all:
2 changes: 1 addition & 1 deletion docs/ref/preprocessing.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.. _skdh preprocessing:
.. _skdh-preprocessing:

.. automodule:: skdh.preprocessing
:ignore-module-all:
2 changes: 1 addition & 1 deletion docs/ref/sit2stand.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.. _skdh sit2stand:
.. _skdh-sit2stand:

.. automodule:: skdh.sit2stand
:ignore-module-all:
2 changes: 1 addition & 1 deletion docs/ref/skdh.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.. _skdh base:
.. _skdh-base:

.. automodule:: skdh
:ignore-module-all:
2 changes: 1 addition & 1 deletion docs/ref/sleep.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.. _skdh sleep:
.. _skdh-sleep:

.. automodule:: skdh.sleep
:ignore-module-all:
2 changes: 1 addition & 1 deletion docs/ref/utility.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.. _skdh utility:
.. _skdh-utility:

.. automodule:: skdh.utility
:ignore-module-all:
2 changes: 1 addition & 1 deletion docs/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ matplotlib
numpydoc
sphinx>=2.2.0
pydata-sphinx-theme
sphinx-panels
sphinx-design
76 changes: 39 additions & 37 deletions docs/src/dev/adding_documentation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,69 +19,71 @@ Other than this, the docstrings will be automatically scanned and generated, wit

Documentation of the your new module occurs almost fully in the ``__init__.py`` file
for the module. This will contain any information on the module, how it works, as
well as any relevant background information (e.g. :ref:`Gait <skdh gait>`). For
well as any relevant background information (e.g. :ref:`Gait <skdh-gait>`). For
another good reference from NumPy, see the
`numpy.fft <https://numpy.org/doc/stable/reference/routines.fft.html>`_ page.

Next is the file directing Sphinx to automatically find and document the custom
module, ``docs/ref/custom_module.rst``. Finally, to make the new module show up
in the API reference, add it to the ``docs/ref/index.rst`` toctree!

.. tabbed:: src/skdh/custom_module/\_\_init\_\_.py
:selected:
.. tab-set::

.. code-block:: python
.. tab-item:: src/skdh/custom_module/\_\_init\_\_.py
:selected:

"""
IMU <Custom Module> (:mod:`skdh.custom_module`)
===============================================
.. code-block:: python
.. currentmodule:: skdh.custom_module
"""
IMU <Custom Module> (:mod:`skdh.custom_module`)
===============================================
Inertial sensor <custom module>
-------------------------------
.. currentmodule:: skdh.custom_module
.. _Remove the `` below
Inertial sensor <custom module>
-------------------------------
.. ``autosummary``::
:toctree: generated/
.. _Remove the `` below
CustomClass .. _this is the name of your class
.. ``autosummary``::
:toctree: generated/
Headline 2
----------
content
"""
from skdh.custom_module.custom_module import CustomModule
CustomClass .. _this is the name of your class
.. tabbed:: docs/ref/custom_module.rst
Headline 2
----------
content
"""
from skdh.custom_module.custom_module import CustomModule
.. code:: rst
.. tab-item:: docs/ref/custom_module.rst

..
_Give it a custom explicit reference label
.. code:: rst
.. _skdh custom-module:
..
_Give it a custom explicit reference label
.. automodule:: skdh.custom_module
:ignore-module-all:
.. _skdh custom-module:
.. tabbed:: docs/ref/index.rst
.. automodule:: skdh.custom_module
:ignore-module-all:
.. code:: rst
.. tab-item:: docs/ref/index.rst

.. _skdh api reference:
.. code:: rst
API Reference
=============
.. _skdh api reference:
.. toctree::
:maxdepth: 2
API Reference
=============
gait
sit2stand
read
custom_module
.. toctree::
:maxdepth: 2
gait
sit2stand
read
custom_module
And thats it! Before pushing and creating a pull request, make sure that the documentation builds properly:

Expand Down
30 changes: 16 additions & 14 deletions docs/src/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,28 +3,30 @@ Installation

Both PyPI and Conda-Forge should have pre-built wheels for major distributions.

.. tabbed:: conda
.. tab-set::

::
.. tab-item:: conda

conda install -c conda-forge scikit-digital-health
::

.. tabbed:: pip
:selected:
conda install -c conda-forge scikit-digital-health

::
.. tab-item:: pip
:selected:

pip install scikit-digital-health
::

.. tabbed:: pip from GitHub
pip install scikit-digital-health

::
.. tab-item:: pip from GitHub

pip install git+ssh://git@github.com/PfizerRD/scikit-digital-health.git
# install from a specific tag
pip install git+ssh://git@github.com/PfizerRD/scikit-digital-health@0.9.10
# install from a specific branch
pip install git+ssh://git@github.com/PfizerRD/scikit-digital-health@development
::

pip install git+ssh://git@github.com/PfizerRD/scikit-digital-health.git
# install from a specific tag
pip install git+ssh://git@github.com/PfizerRD/scikit-digital-health@0.9.10
# install from a specific branch
pip install git+ssh://git@github.com/PfizerRD/scikit-digital-health@development

Run-time requirements
^^^^^^^^^^^^^^^^^^^^^
Expand Down
Loading

0 comments on commit 7cc8962

Please sign in to comment.