From 3a69a969958f055221c04e279a21e9e8e790f6c0 Mon Sep 17 00:00:00 2001 From: smoia Date: Fri, 3 Jan 2020 17:56:24 +0100 Subject: [PATCH 1/5] Removed one frequency only warning --- README.md | 3 --- 1 file changed, 3 deletions(-) diff --git a/README.md b/README.md index d4babef41..e73251da0 100644 --- a/README.md +++ b/README.md @@ -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 ✨ From 0017899043b8a1e67d5c73d8efa63fc6ab500f01 Mon Sep 17 00:00:00 2001 From: smoia Date: Fri, 3 Jan 2020 18:54:18 +0100 Subject: [PATCH 2/5] Started writing the docs --- docs/cli.rst | 6 +++--- docs/conf.py | 15 +++++++++++++-- docs/index.rst | 21 +++++++++++++++++++++ 3 files changed, 37 insertions(+), 5 deletions(-) diff --git a/docs/cli.rst b/docs/cli.rst index 145d1bf9c..5929c3ffb 100644 --- a/docs/cli.rst +++ b/docs/cli.rst @@ -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 diff --git a/docs/conf.py b/docs/conf.py index 526fd0ad9..de69f13e5 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -75,6 +75,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 ------------------------------------------------- @@ -87,7 +95,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, @@ -97,7 +105,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 = 'phys2bids_logo1280×640.png' +html_logo = 'phys2bids_logo1280×640.png' # -- Options for HTMLHelp output --------------------------------------------- @@ -110,5 +122,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), } diff --git a/docs/index.rst b/docs/index.rst index 7494aa39c..1d65fe90b 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -2,10 +2,31 @@ phys2bids ========= +Phys2BIDS + +[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.3586045.svg)](https://doi.org/10.5281/zenodo.3586045) +[![Join the chat at https://gitter.im/phys2bids/community](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 \ No newline at end of file From 7682bb3576f731d599b6e8cf1df364dc6319812c Mon Sep 17 00:00:00 2001 From: smoia Date: Fri, 3 Jan 2020 18:54:26 +0100 Subject: [PATCH 3/5] More docs --- docs/api.rst | 7 ++++++ docs/bestpractice.rst | 7 ++++++ docs/contributing.rst | 34 +++++++++++++++++++++++++++ docs/heuristic.rst | 7 ++++++ docs/howto.rst | 7 ++++++ docs/installation.rst | 54 +++++++++++++++++++++++++++++++++++++++++++ docs/license.rst | 19 +++++++++++++++ 7 files changed, 135 insertions(+) create mode 100644 docs/api.rst create mode 100644 docs/bestpractice.rst create mode 100644 docs/contributing.rst create mode 100644 docs/heuristic.rst create mode 100644 docs/howto.rst create mode 100644 docs/installation.rst create mode 100644 docs/license.rst diff --git a/docs/api.rst b/docs/api.rst new file mode 100644 index 000000000..35ef1e148 --- /dev/null +++ b/docs/api.rst @@ -0,0 +1,7 @@ +.. _api: + +=== +API +=== + +Coming soon. \ No newline at end of file diff --git a/docs/bestpractice.rst b/docs/bestpractice.rst new file mode 100644 index 000000000..8c10e39e2 --- /dev/null +++ b/docs/bestpractice.rst @@ -0,0 +1,7 @@ +.. _bestpractice: + +================================================ +Best Practices for Collecting Physiological Data +================================================ + +Coming soon. \ No newline at end of file diff --git a/docs/contributing.rst b/docs/contributing.rst new file mode 100644 index 000000000..c09c35f4d --- /dev/null +++ b/docs/contributing.rst @@ -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. + diff --git a/docs/heuristic.rst b/docs/heuristic.rst new file mode 100644 index 000000000..ab245a25f --- /dev/null +++ b/docs/heuristic.rst @@ -0,0 +1,7 @@ +.. _heuristic: + +============================== +How to set up a heuristic file +============================== + +Tutorial coming soon. \ No newline at end of file diff --git a/docs/howto.rst b/docs/howto.rst new file mode 100644 index 000000000..f66e6d4bb --- /dev/null +++ b/docs/howto.rst @@ -0,0 +1,7 @@ +.. _howto: + +==================== +How to use phys2bids +==================== + +Tutorial coming soon. \ No newline at end of file diff --git a/docs/installation.rst b/docs/installation.rst new file mode 100644 index 000000000..b42e3c623 --- /dev/null +++ b/docs/installation.rst @@ -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. \ No newline at end of file diff --git a/docs/license.rst b/docs/license.rst new file mode 100644 index 000000000..c69aa935b --- /dev/null +++ b/docs/license.rst @@ -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. \ No newline at end of file From 0c5a7a5cd64e0a65aa9e423dfeacf68670033217 Mon Sep 17 00:00:00 2001 From: smoia Date: Thu, 9 Jan 2020 22:55:54 +0100 Subject: [PATCH 4/5] Declared index as master_doc and corrected format of all-contributors link --- docs/conf.py | 12 +++++++----- docs/contributing.rst | 4 ++-- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index de69f13e5..a7266241e 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -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. @@ -77,11 +79,11 @@ # 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 + "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 ------------------------------------------------- diff --git a/docs/contributing.rst b/docs/contributing.rst index c09c35f4d..c10210761 100644 --- a/docs/contributing.rst +++ b/docs/contributing.rst @@ -7,14 +7,14 @@ 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. +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 +.. _`all-contributors`: https://github.com/all-contributors/all-contributors Linux and mac developer installation From 69fafbd7862fbe1269a5b14bc61ec7b996e656fd Mon Sep 17 00:00:00 2001 From: smoia Date: Fri, 10 Jan 2020 12:20:16 +0100 Subject: [PATCH 5/5] Adapted logo to new position and changed imaging formatting from MD to RST --- README.md | 2 +- docs/conf.py | 4 ++-- docs/index.rst | 11 ++++++++--- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index e73251da0..47f622a73 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -Phys2BIDS +Phys2BIDS phys2bids ========= diff --git a/docs/conf.py b/docs/conf.py index a7266241e..e632014b4 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -110,8 +110,8 @@ def setup(app): # noqa app.add_javascript("https://cdn.rawgit.com/chrisfilo/zenodo.js/v0.1/zenodo.js") -html_favicon = 'phys2bids_logo1280×640.png' -html_logo = 'phys2bids_logo1280×640.png' +html_favicon = '_static/phys2bids_logo2000x400.png' +html_logo = '_static/phys2bids_logo2000x400.png' # -- Options for HTMLHelp output --------------------------------------------- diff --git a/docs/index.rst b/docs/index.rst index 1d65fe90b..e83f716ad 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -2,10 +2,15 @@ phys2bids ========= -Phys2BIDS +.. image:: _static/phys2bids_logo1280×640.png + :alt: phys2bids logo + :align: center -[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.3586045.svg)](https://doi.org/10.5281/zenodo.3586045) -[![Join the chat at https://gitter.im/phys2bids/community](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) +.. 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