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

Add .pre-commit-config.yaml #67

Merged
merged 15 commits into from
Jun 6, 2024
Merged
Show file tree
Hide file tree
Changes from 4 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
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/ISSUE_TEMPLATE_BUGS.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ assignees:

## Specifications
<!--- Point out the version of peakdet you are running and your OS version -->
- Python version:
- Python version:
- phys2bids version:
- Platform:

Expand Down
8 changes: 4 additions & 4 deletions .github/ISSUE_TEMPLATE/ISSUE_TEMPLATE_DISCUSSION.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: Discussion
about: Use this template to start a discussion issue, i.e. an issue that
about: Use this template to start a discussion issue, i.e. an issue that
maestroque marked this conversation as resolved.
Show resolved Hide resolved
title: ''
labels: Discussion
assignees: ''
Expand All @@ -22,6 +22,6 @@ I'm opening this discussion because/I think that/I noticed that...
<!--- Repeat the concept in a very few, short (max 3) questions -->
<!--- Remember that the aim is not to give a "tldr", but to help address salient points. -->

-
-
-
-
-
-
6 changes: 3 additions & 3 deletions .github/ISSUE_TEMPLATE/ISSUE_TEMPLATE_GENERAL.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@ assignees: ''
## Next Steps
<!--- Provide possible steps to take in order to address the issue -->

*
*
*
*
*
*
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/ISSUE_TEMPLATE_MEETING.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ assignees: smoia

maestroque marked this conversation as resolved.
Show resolved Hide resolved
The call will take place over **Skype** [here](https://join.skype.com/Rm4B7R30TG6g).

Find the agenda [here]() and don't be scared to add/suggest/press for topics!
Find the agenda [here]() and don't be scared to add/suggest/press for topics!

Old minutes are [here](https://drive.google.com/open?id=1zfc-hgRcU1k2XdqKD8v6TGwQX_jeCUea)
38 changes: 38 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-added-large-files
- id: check-case-conflict
- id: check-merge-conflict
- repo: https://github.com/psf/black
rev: 23.11.0
maestroque marked this conversation as resolved.
Show resolved Hide resolved
hooks:
- id: black
- repo: https://github.com/pycqa/isort
rev: 5.13.0
hooks:
- id: isort
- repo: https://github.com/pycqa/flake8
rev: 6.1.0
hooks:
- id: flake8
- repo: https://github.com/pycqa/pydocstyle
rev: 6.3.0
hooks:
- id: pydocstyle
- repo: https://github.com/pre-commit/pygrep-hooks
rev: v1.10.0
hooks:
- id: rst-backticks
- id: rst-directive-colons
- id: rst-inline-touching-normal
- repo: https://github.com/codespell-project/codespell
rev: v2.2.6
hooks:
- id: codespell
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,4 +72,4 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d

<!-- ALL-CONTRIBUTORS-LIST:END -->

This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!
This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!
51 changes: 28 additions & 23 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,22 @@
# documentation root, use os.path.abspath to make it absolute, like shown here.
import os
import sys

import matplotlib as mpl
mpl.use('Agg')

mpl.use("Agg")

# -- Project information -----------------------------------------------------

# Add project name, copyright holder, and author(s)
project = 'peakdet'
copyright = '2018, peakdet developers'
author = 'Ross Markello'
project = "peakdet"
copyright = "2018, peakdet developers"
author = "Ross Markello"

# Import project to get version info
sys.path.insert(0, os.path.abspath(os.path.pardir))
import peakdet # noqa

# The short X.Y version
version = peakdet.__version__
# The full version, including alpha/beta/rc tags
Expand All @@ -34,14 +37,14 @@
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
'matplotlib.sphinxext.plot_directive',
'sphinx.ext.autodoc',
'sphinx.ext.autosummary',
'sphinx.ext.doctest',
'sphinx.ext.intersphinx',
'sphinx.ext.mathjax',
'sphinx.ext.napoleon',
'sphinx.ext.viewcode',
"matplotlib.sphinxext.plot_directive",
"sphinx.ext.autodoc",
"sphinx.ext.autosummary",
"sphinx.ext.doctest",
"sphinx.ext.intersphinx",
"sphinx.ext.mathjax",
"sphinx.ext.napoleon",
"sphinx.ext.viewcode",
]

# Generate the API documentation when building
Expand All @@ -50,13 +53,13 @@
autoclass_content = "class"

# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
templates_path = ["_templates"]

# The suffix(es) of source filenames.
source_suffix = '.rst'
source_suffix = ".rst"

# The master toctree document.
master_doc = 'index'
master_doc = "index"

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand All @@ -68,17 +71,18 @@
# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This pattern also affects html_static_path and html_extra_path .
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]

# The name of the Pygments (syntax highlighting) style to use.
pygments_style = 'sphinx'
pygments_style = "sphinx"

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

# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
import sphinx_rtd_theme # noqa
html_theme = 'sphinx_rtd_theme'

html_theme = "sphinx_rtd_theme"
html_show_sourcelink = False

# Theme options are theme-specific and customize the look and feel of a theme
Expand All @@ -89,18 +93,18 @@
# 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,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['_static']
html_static_path = ["_static"]

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

# Output file base name for HTML help builder.
htmlhelp_basename = 'peakdetdoc'
htmlhelp_basename = "peakdetdoc"

# -- Extension configuration -------------------------------------------------
intersphinx_mapping = {
'matplotlib': ('https://matplotlib.org', None),
'numpy': ('https://docs.scipy.org/doc/numpy', None),
'scipy': ('https://docs.scipy.org/doc/scipy/reference', None),
"matplotlib": ("https://matplotlib.org", None),
"numpy": ("https://docs.scipy.org/doc/numpy", None),
"scipy": ("https://docs.scipy.org/doc/scipy/reference", None),
}

doctest_global_setup = """
Expand All @@ -110,6 +114,7 @@
"""

from peakdet.tests.utils import get_test_data_path # noqa

plot_working_directory = get_test_data_path()
plot_include_source = True
plot_formats = [("png", 90)]
Expand Down
1 change: 0 additions & 1 deletion docs/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,3 @@
pandas
sphinx>=1.2
sphinx_rtd_theme

2 changes: 1 addition & 1 deletion docs/user_guide/physio.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
The ``Physio`` data object
--------------------------

The primary funtionality of :py:mod:`peakdet` relies on its operations being
The primary functionality of :py:mod:`peakdet` relies on its operations being
performed on physiological data loaded into a :py:class:`peakdet.Physio`
object. So, before we get into using :py:mod:`peakdet`, its best to understand
a little bit about this helper class!
Expand Down
44 changes: 31 additions & 13 deletions peakdet/__init__.py
Original file line number Diff line number Diff line change
@@ -1,18 +1,36 @@
__all__ = [
'delete_peaks', 'edit_physio', 'filter_physio', 'interpolate_physio',
'peakfind_physio', 'plot_physio', 'reject_peaks',
'load_physio', 'save_physio', 'load_history', 'save_history',
'load_rtpeaks', 'Physio', 'HRV', '__version__'
"delete_peaks",
"edit_physio",
"filter_physio",
"interpolate_physio",
"peakfind_physio",
"plot_physio",
"reject_peaks",
"load_physio",
"save_physio",
"load_history",
"save_history",
"load_rtpeaks",
"Physio",
"HRV",
"__version__",
]

from peakdet.analytics import (HRV)
from peakdet.external import (load_rtpeaks)
from peakdet.io import (load_physio, save_physio, load_history, save_history)
from peakdet.operations import (delete_peaks, edit_physio, filter_physio,
interpolate_physio, peakfind_physio,
plot_physio, reject_peaks)
from peakdet.physio import (Physio)
from peakdet.analytics import HRV
from peakdet.external import load_rtpeaks
from peakdet.io import load_history, load_physio, save_history, save_physio
from peakdet.operations import (
delete_peaks,
edit_physio,
filter_physio,
interpolate_physio,
peakfind_physio,
plot_physio,
reject_peaks,
)
from peakdet.physio import Physio

from ._version import get_versions
__version__ = get_versions()['version']
del get_versions

__version__ = get_versions()["version"]
del get_versions
Loading