-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from ghammad/develop
Develop
- Loading branch information
Showing
31 changed files
with
3,885 additions
and
356 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -65,6 +65,7 @@ instance/ | |
|
||
# Sphinx documentation | ||
docs/_build/ | ||
docs/source/_autosummary | ||
|
||
# PyBuilder | ||
target/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
# This file is a template, and might need editing before it works on your project. | ||
# Official language image. Look for the different tagged releases at: | ||
# https://hub.docker.com/r/library/python/tags/ | ||
image: python:latest | ||
|
||
# Change pip's cache directory to be inside the project directory since we can | ||
# only cache local items. | ||
variables: | ||
PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache" | ||
|
||
# Pip's cache doesn't store the python packages | ||
# https://pip.pypa.io/en/stable/reference/pip_install/#caching | ||
# | ||
# If you want to also cache the installed packages, you have to install | ||
# them in a virtualenv and cache it as well. | ||
cache: | ||
paths: | ||
- .cache/pip | ||
- venv/ | ||
|
||
stages: | ||
- build | ||
- test | ||
- deploy | ||
|
||
before_script: | ||
- python -V # Print out python version for debugging | ||
- pip install virtualenv | ||
- virtualenv venv | ||
- source venv/bin/activate | ||
|
||
run: | ||
stage: build | ||
script: | ||
- pip install -e . | ||
|
||
test: | ||
stage: test | ||
script: | ||
- pip install pytest | ||
- python -m pytest -vv --disable-pytest-warnings pyActigraphy/tests/ | ||
# - python setup.py test | ||
|
||
pages: | ||
stage: deploy | ||
script: | ||
- pip install sphinx sphinx-bootstrap-theme | ||
- cd docs ; make html | ||
- mv build/html/ ../public/ | ||
artifacts: | ||
paths: | ||
- public | ||
only: | ||
- master |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,102 @@ | ||
.. image:: https://img.shields.io/badge/License-GPL%20v3-blue.svg | ||
:target: https://www.gnu.org/licenses/gpl-3.0 | ||
.. image:: https://gitlab.com/ghammad/pyActigraphy/badges/master/pipeline.svg | ||
:target: https://gitlab.com/ghammad/pyActigraphy/commits/master | ||
|
||
**pyActigraphy** | ||
================ | ||
Open-source python package for actigraphy data analysis. | ||
|
||
|
||
This package is meant to provide a comprehensive set of tools to: | ||
|
||
* read actigraphy raw data files with various formats | ||
* calculate typical wake/sleep cycle-related variables (ex: IS, IV, ...) | ||
* perform complex analyses (ex: FDA, SSA, HMM, ...) | ||
|
||
Requirements | ||
============ | ||
* python 3.X | ||
* joblib | ||
* pandas | ||
* numba | ||
* numpy | ||
* pyexcel | ||
* pyexcel-ods3 | ||
* scipy | ||
* statsmodels | ||
|
||
Installation | ||
============ | ||
In a (bash) shell, simply type: | ||
|
||
* For users: | ||
|
||
.. code-block:: shell | ||
pip install pyActigraphy | ||
To update the package: | ||
|
||
.. code-block:: shell | ||
pip install -U pyActigraphy | ||
It is strongly recommended to use the latest version of the pyActigraphy package. | ||
|
||
|
||
* For developers: | ||
|
||
.. code-block:: shell | ||
git clone [email protected]:ghammad/pyActigraphy.git | ||
cd pyActigraphy/ | ||
git checkout develop | ||
pip install -e . | ||
Quick start | ||
=========== | ||
|
||
The following example illustrates how to calculate the interdaily stability | ||
with the pyActigraphy package: | ||
|
||
.. code-block:: python | ||
>>> import pyActigraphy | ||
>>> rawAWD = pyActigraphy.io.read_raw_awd(fpath + 'SUBJECT_01.AWD') | ||
>>> rawAWD.IS() | ||
0.6900175913031027 | ||
>>> rawAWD.IS(freq='30min', binarize=True, threshold=4) | ||
0.6245582891144925 | ||
>>> rawAWD.IS(freq='1H', binarize=False) | ||
0.5257020914453097 | ||
Contributing | ||
============ | ||
|
||
There are plenty of ways to contribute to this package, including (but not limiting to): | ||
|
||
* report bugs (and, ideally, how to reproduce the bug) | ||
* suggest improvements | ||
* improve the documentation | ||
* hug or high-five the authors when you meet them! | ||
|
||
Authors | ||
======= | ||
|
||
* **Grégory Hammad** `@ghammad <https://github.com/ghammad>`_ - *Initial and main developer* | ||
* **Mathilde Reyt** `@ReytMathilde <https://github.com/ReytMathilde>`_ | ||
|
||
See also the list of `contributors <https://github.com/ghammad/pyActigraphy/contributors>`_ who participated in this project. | ||
|
||
License | ||
======= | ||
|
||
This project is licensed under the GNU GPL-3.0 License - see the `LICENSE <LICENSE>`_ file for details | ||
|
||
Acknowledgments | ||
=============== | ||
|
||
* **Aubin Ardois** `@aardoi <https://github.com/aardoi>`_ developed the first version of the MTN class during his internship at the CRC, in May-August 2018. | ||
* The CRC colleagues for their support, ideas, etc. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# Minimal makefile for Sphinx documentation | ||
# | ||
|
||
# You can set these variables from the command line. | ||
SPHINXOPTS = | ||
SPHINXBUILD = sphinx-build | ||
SPHINXPROJ = pyActigraphy | ||
SOURCEDIR = source | ||
BUILDDIR = ../../pyActigraphy-docs | ||
PDFBUILDDIR = /tmp | ||
PDF = ../manual.pdf | ||
|
||
# Put it first so that "make" without argument is like "make help". | ||
help: | ||
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) | ||
|
||
.PHONY: help Makefile | ||
|
||
latexpdf: | ||
$(SPHINXBUILD) -b latex $(SPHINXOPTS) $(PDFBUILDDIR)/latex | ||
make -C $(PDFBUILDDIR)/latex all-pdf | ||
cp $(PDFBUILDDIR)/latex/*.pdf $(PDF) | ||
@echo "pdflatex finished; see $(PDF)" | ||
|
||
# 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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
@ECHO OFF | ||
|
||
pushd %~dp0 | ||
|
||
REM Command file for Sphinx documentation | ||
|
||
if "%SPHINXBUILD%" == "" ( | ||
set SPHINXBUILD=sphinx-build | ||
) | ||
set SOURCEDIR=source | ||
set BUILDDIR=build | ||
set SPHINXPROJ=pyActigraphy | ||
|
||
if "%1" == "" goto help | ||
|
||
%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.http://sphinx-doc.org/ | ||
exit /b 1 | ||
) | ||
|
||
%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% | ||
goto end | ||
|
||
:help | ||
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% | ||
|
||
:end | ||
popd |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{{ fullname }} | ||
{{ underline }} | ||
|
||
.. currentmodule:: {{ module }} | ||
|
||
.. autoclass:: {{ objname }} | ||
:special-members: __contains__,__getitem__,__iter__,__len__,__add__,__sub__,__mul__,__div__,__neg__,__hash__ | ||
|
||
{% block methods %} | ||
{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{{ fullname }} | ||
{{ underline }} | ||
|
||
.. currentmodule:: {{ module }} | ||
|
||
.. autofunction:: {{ objname }} | ||
|
||
.. raw:: html | ||
|
||
<div style='clear:both'></div> |
Oops, something went wrong.