Skip to content

Commit

Permalink
add contribution section (#354)
Browse files Browse the repository at this point in the history
  • Loading branch information
timonmerk authored Aug 14, 2024
1 parent 10f2945 commit c7f7192
Show file tree
Hide file tree
Showing 8 changed files with 59 additions and 19 deletions.
36 changes: 36 additions & 0 deletions docs/source/contributing.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
Contribution Guide
==================

Welcome to the contributing guide of py_neuromodulation! We are very happy that you are interested in our project.

In general we recommend placing questions and issues in the `GitHub issue tracker <https://github.com/neuromodulation/py_neuromodulation/issues>`_.

For code formatting we use `ruff <https://docs.astral.sh/ruff/formatter/>`_.

For code development, we recommend using the package manager `rye <https://rye.astral.sh/>`_.

To setup the python environment, type

::

rye pin 3.12

then sync the environment with

::

rye sync

Depending on your operating system, activate the rye virtual environment:

::

. .venv/bin/activate

To install the documentation dependencies use pip:

::

python -m pip install .[docs]


1 change: 1 addition & 0 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ The *py_neuromodulation* toolbox allows for real time capable feature estimation
usage
auto_examples/index
api_documentation
contributing

Why py_neuromodulation?
-----------------------
Expand Down
2 changes: 1 addition & 1 deletion docs/source/nm_analysis.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
nm_analysis.py
==============

.. automodule:: nm_analysis.Feature_Reader
.. automodule:: nm_analysis
:members:
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
nm_stream.py
====================
============

.. automodule:: nm_stream
:members:
28 changes: 14 additions & 14 deletions docs/source/sg_execution_times.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

Computation times
=================
**01:09.048** total execution time for 9 files **from all galleries**:
**00:06.300** total execution time for 9 files **from all galleries**:

.. container::

Expand All @@ -32,30 +32,30 @@ Computation times
* - Example
- Time
- Mem (MB)
* - :ref:`sphx_glr_auto_examples_plot_1_example_BIDS.py` (``..\..\examples\plot_1_example_BIDS.py``)
- 00:25.194
* - :ref:`sphx_glr_auto_examples_plot_1_example_BIDS.py` (``../../examples/plot_1_example_BIDS.py``)
- 00:06.300
- 0.0
* - :ref:`sphx_glr_auto_examples_plot_7_lsl_example.py` (``..\..\examples\plot_7_lsl_example.py``)
- 00:24.770
* - :ref:`sphx_glr_auto_examples_plot_0_first_demo.py` (``../../examples/plot_0_first_demo.py``)
- 00:00.000
- 0.0
* - :ref:`sphx_glr_auto_examples_plot_0_first_demo.py` (``..\..\examples\plot_0_first_demo.py``)
- 00:12.259
* - :ref:`sphx_glr_auto_examples_plot_2_example_add_feature.py` (``../../examples/plot_2_example_add_feature.py``)
- 00:00.000
- 0.0
* - :ref:`sphx_glr_auto_examples_plot_4_example_gridPointProjection.py` (``..\..\examples\plot_4_example_gridPointProjection.py``)
- 00:06.826
* - :ref:`sphx_glr_auto_examples_plot_3_example_sharpwave_analysis.py` (``../../examples/plot_3_example_sharpwave_analysis.py``)
- 00:00.000
- 0.0
* - :ref:`sphx_glr_auto_examples_plot_2_example_add_feature.py` (``..\..\examples\plot_2_example_add_feature.py``)
* - :ref:`sphx_glr_auto_examples_plot_4_example_gridPointProjection.py` (``../../examples/plot_4_example_gridPointProjection.py``)
- 00:00.000
- 0.0
* - :ref:`sphx_glr_auto_examples_plot_3_example_sharpwave_analysis.py` (``..\..\examples\plot_3_example_sharpwave_analysis.py``)
* - :ref:`sphx_glr_auto_examples_plot_5_example_rmap_computing.py` (``../../examples/plot_5_example_rmap_computing.py``)
- 00:00.000
- 0.0
* - :ref:`sphx_glr_auto_examples_plot_5_example_rmap_computing.py` (``..\..\examples\plot_5_example_rmap_computing.py``)
* - :ref:`sphx_glr_auto_examples_plot_6_real_time_demo.py` (``../../examples/plot_6_real_time_demo.py``)
- 00:00.000
- 0.0
* - :ref:`sphx_glr_auto_examples_plot_6_real_time_demo.py` (``..\..\examples\plot_6_real_time_demo.py``)
* - :ref:`sphx_glr_auto_examples_plot_7_lsl_example.py` (``../../examples/plot_7_lsl_example.py``)
- 00:00.000
- 0.0
* - :ref:`sphx_glr_auto_examples_plot_8_cebra_example.py` (``..\..\examples\plot_8_cebra_example.py``)
* - :ref:`sphx_glr_auto_examples_plot_8_cebra_example.py` (``../../examples/plot_8_cebra_example.py``)
- 00:00.000
- 0.0
2 changes: 1 addition & 1 deletion examples/plot_1_example_BIDS.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@
# Nevertheless, the user can also use the pipeline for machine learning decoding.
# It can be used for regression and classification problems and also dimensionality reduction such as PCA and CCA.
#
# Here, we show an example using the XGBOOST classifier. The used labels came from a continuous grip force movement target, named "MOV_RIGHT".
# Here, we show an example using a sklearn linear regression model. The used labels came from a continuous grip force movement target, named "MOV_RIGHT".
#
# First we initialize the :class:`~nm_decode.Decoder` class, which the specified *validation method*, here being a simple 3-fold cross validation,
# the evaluation metric, used machine learning model, and the channels we want to evaluate performances for.
Expand Down
1 change: 1 addition & 0 deletions py_neuromodulation/nm_bursts.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ def calc_feature(self, data: np.ndarray) -> dict:
batch_size = (
filtered_data.shape[-1] if self.batch == 0 else self.samples_overlap
)

self.batch += 1
self.data_buffer = np.concatenate(
(
Expand Down
6 changes: 4 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ dependencies = [
"pynput",
"pyqt5",
"pydantic>=2.7.3",
"pip>=24.2",
"nibabel>=5.2.1",
]

[project.optional-dependencies]
Expand All @@ -75,8 +77,8 @@ docs = [
"sphinx_togglebutton",
]

[tool.rye]
dev-dependencies = ["py-neuromodulation[dev]"]
#[tool.rye]
#dev-dependencies = ["py-neuromodulation[dev]"]

[project.urls]
bugtracker = "https://github.com/neuromodulation/py_neuromodulation/issues"
Expand Down

0 comments on commit c7f7192

Please sign in to comment.