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

Adding documentation in RTD #121

Merged
merged 6 commits into from
Jan 10, 2020
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
5 changes: 1 addition & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<img alt="Phys2BIDS" src="https://github.com/physiopy/phys2bids/blob/master/docs/phys2bids_logo1280×640.png" height="150">
<img alt="Phys2BIDS" src="https://github.com/physiopy/phys2bids/blob/master/docs/_static/phys2bids_logo1280×640.png" height="150">

phys2bids
=========
Expand Down Expand Up @@ -40,9 +40,6 @@ if your output is: ``phys2bids 1.2.0-beta`` or similar, phys2bids is ready to be
**The project is currently under development**.
Any suggestion/bug report is welcome! Feel free to open an issue.

At the very moment, it assumes all the extracted channels from a file
have the same sampling freq.

This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!

## Contributors ✨
Expand Down
7 changes: 7 additions & 0 deletions docs/api.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
.. _api:

===
API
===

Coming soon.
7 changes: 7 additions & 0 deletions docs/bestpractice.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
.. _bestpractice:

================================================
Best Practices for Collecting Physiological Data
================================================

Coming soon.
6 changes: 3 additions & 3 deletions docs/cli.rst
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
.. _cli:

------------------
==================
Command-line usage
------------------
==================

You can invoke the primary workflow of ``phys2bids`` from the command line.

.. _cli_phys2bids:

The ``phys2bids`` command
=========================
-------------------------

.. argparse::
:ref: phys2bids.cli.run._get_parser
Expand Down
17 changes: 15 additions & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@

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

master_doc = 'index'

# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
Expand Down Expand Up @@ -75,6 +77,14 @@
# The name of the Pygments (syntax highlighting) style to use.
pygments_style = 'sphinx'

# Integrate GitHub
html_context = {
"display_github": True, # Integrate GitHub
"github_user": "physiopy", # Username
"github_repo": "phys2bids", # Repo name
"github_version": "master", # Version
"conf_py_path": "/docs/", # Path in the checkout to the docs root
}

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

Expand All @@ -87,7 +97,7 @@
# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
# documentation.
html_theme_options = {}
# html_theme_options = {}

# 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,
Expand All @@ -97,7 +107,11 @@
# https://github.com/rtfd/sphinx_rtd_theme/issues/117
def setup(app): # noqa
app.add_stylesheet('theme_overrides.css')
app.add_javascript("https://cdn.rawgit.com/chrisfilo/zenodo.js/v0.1/zenodo.js")


html_favicon = '_static/phys2bids_logo2000x400.png'
html_logo = '_static/phys2bids_logo2000x400.png'

# -- Options for HTMLHelp output ---------------------------------------------

Expand All @@ -110,5 +124,4 @@ def setup(app): # noqa
'python': ('https://docs.python.org/3.6', None),
'matplotlib': ('https://matplotlib.org', None),
'numpy': ('https://docs.scipy.org/doc/numpy', None),
'pandas': ('https://pandas-docs.github.io/pandas-docs-travis/', None),
}
34 changes: 34 additions & 0 deletions docs/contributing.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
.. _contributing:

=============================
Contributing to ``phys2bids``
=============================

First of all: thank you!

Contributions can be made in different ways, not only code!
As we follow the `all-contributors`_ specification, any contribution will be recognised accordingly.

The first thing you might want to do, is having a look at the ``contributors.md`` file as well as the ``conduct.md`` guidelines.

The second thing is to install ``phys2bids`` as a developer.
This will let you run the program with the latest modification, without requiring to re-install it every time.

.. _`all-contributors`: https://github.com/all-contributors/all-contributors


Linux and mac developer installation
------------------------------------

Be sure to have git installed, then open a terminal and use the command::
``git clone https://github.com/smoia/phys2bids.git``

Move in the ``phy2bids`` folder and execute the command::
``pip3 install -e .``


User testing
------------

Coming soon.

7 changes: 7 additions & 0 deletions docs/heuristic.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
.. _heuristic:

==============================
How to set up a heuristic file
==============================

Tutorial coming soon.
7 changes: 7 additions & 0 deletions docs/howto.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
.. _howto:

====================
How to use phys2bids
====================

Tutorial coming soon.
26 changes: 26 additions & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,36 @@
phys2bids
=========

.. image:: _static/phys2bids_logo1280×640.png
:alt: phys2bids logo
:align: center

.. image:: https://zenodo.org/badge/DOI/10.5281/zenodo.3586045.svg
:target: https://doi.org/10.5281/zenodo.3586045

.. image:: https://badges.gitter.im/phys2bids/community.svg
:target: https://badges.gitter.im/phys2bids/community.svg)](https://gitter.im/phys2bids/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge

Phys2bids is a python3 library meant to format physiological files in BIDS.
It was born for AcqKnowledge files (BIOPAC), and at the moment it supports
``.acq`` files as well as ``.txt`` files obtained by labchart
(ADInstruments).
It doesn't support physiological files recorded with the MRI, as you can find a software for it [here](https://github.com/tarrlab/physio2bids).

**The project is currently under development**.
Any suggestion/bug report is welcome! Feel free to open an issue.

Contents
--------

.. toctree::
:maxdepth: 1

installation
howto
heuristic
bestpractice
cli
contributing
license
api
54 changes: 54 additions & 0 deletions docs/installation.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
.. _installation:

============
Installation
============

Requirements
------------

``phys2bids`` requires python 3.6 or above, as well as the modules:
- ``numpy >= 1.9.3``
- ``matplotlib >= 3.1.1``

Depending on the processed files, it might require the **manual installation** of other modules.
At the moment, those modules are:
- `bioread`_, for AcqKnowledge (``.acq``) files.

.. _`bioread`: https://github.com/uwmadison-chm/bioread

Linux and mac installation
--------------------------

Download the package from github and uncompress it.
Alternatively, if you have ``git``, use the command::
``git clone https://github.com/smoia/phys2bids.git``

Install with ``pip``
^^^^^^^^^^^^^^^^^^^^

Open a terminal in the ``phy2bids`` folder and execute the command::
``pip3 install .``

If python 3 is already your default, you might use instead::
``pip install .``

If you need to install other libraries, you can call again ``pip``::
``pip3 install bioread``

Install without ``pip``
^^^^^^^^^^^^^^^^^^^^^^^

Open a terminal in the phy2bids folder and execute the command::
``python3 setup.py``

If python 3 is already your default, you might use instead::
``python setup.py``

Check your installation!
^^^^^^^^^^^^^^^^^^^^^^^^

Type the command::
``phys2bids -v``

If your output is: ``phys2bids 1.2.0-beta`` or similar, ``phys2bids`` is ready to be used.
19 changes: 19 additions & 0 deletions docs/license.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
.. _license:

=======
License
=======

Copyright 2019, The Phys2BIDS community.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.