Skip to content

Commit 0b1ffa7

Browse files
committed
chore: Set up repo structure with cookiecutter
1 parent c381151 commit 0b1ffa7

18 files changed

+338
-2
lines changed

CHANGELOG.md

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Changelog
2+
3+
<!--next-version-placeholder-->
4+
5+
## v0.1.0 (03/05/2022)
6+
7+
- First release of `emg-decompy`!

CONDUCT.md

+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# Code of Conduct
2+
3+
## Our Pledge
4+
5+
In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.
6+
7+
## Our Standards
8+
9+
Examples of behavior that contributes to creating a positive environment include:
10+
11+
* Using welcoming and inclusive language
12+
* Being respectful of differing viewpoints and experiences
13+
* Gracefully accepting constructive criticism
14+
* Focusing on what is best for the community
15+
* Showing empathy towards other community members
16+
17+
Examples of unacceptable behavior by participants include:
18+
19+
* The use of sexualized language or imagery and unwelcome sexual attention or advances
20+
* Trolling, insulting/derogatory comments, and personal or political attacks
21+
* Public or private harassment
22+
* Publishing others' private information, such as a physical or electronic address, without explicit permission
23+
* Other conduct which could reasonably be considered inappropriate in a professional setting
24+
25+
## Our Responsibilities
26+
27+
Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.
28+
29+
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
30+
31+
## Scope
32+
33+
This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.
34+
35+
## Enforcement
36+
37+
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
38+
39+
Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.
40+
41+
## Attribution
42+
43+
This Code of Conduct is adapted from the [Contributor Covenant homepage](http://contributor-covenant.org/version/1/4), version 1.4.

CONTRIBUTING.md

+73
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
# Contributing
2+
3+
Contributions are welcome, and they are greatly appreciated! Every little bit
4+
helps, and credit will always be given.
5+
6+
## Types of Contributions
7+
8+
### Report Bugs
9+
10+
If you are reporting a bug, please include:
11+
12+
* Your operating system name and version.
13+
* Any details about your local setup that might be helpful in troubleshooting.
14+
* Detailed steps to reproduce the bug.
15+
16+
### Fix Bugs
17+
18+
Look through the GitHub issues for bugs. Anything tagged with "bug" and "help
19+
wanted" is open to whoever wants to implement it.
20+
21+
### Implement Features
22+
23+
Look through the GitHub issues for features. Anything tagged with "enhancement"
24+
and "help wanted" is open to whoever wants to implement it.
25+
26+
### Write Documentation
27+
28+
You can never have enough documentation! Please feel free to contribute to any
29+
part of the documentation, such as the official docs, docstrings, or even
30+
on the web in blog posts, articles, and such.
31+
32+
### Submit Feedback
33+
34+
If you are proposing a feature:
35+
36+
* Explain in detail how it would work.
37+
* Keep the scope as narrow as possible, to make it easier to implement.
38+
* Remember that this is a volunteer-driven project, and that contributions
39+
are welcome :)
40+
41+
## Get Started!
42+
43+
Ready to contribute? Here's how to set up `emg-decompy` for local development.
44+
45+
1. Download a copy of `emg-decompy` locally.
46+
2. Install `emg-decompy` using `poetry`:
47+
48+
```console
49+
$ poetry install
50+
```
51+
52+
3. Use `git` (or similar) to create a branch for local development and make your changes:
53+
54+
```console
55+
$ git checkout -b name-of-your-bugfix-or-feature
56+
```
57+
58+
4. When you're done making changes, check that your changes conform to any code formatting requirements and pass any tests.
59+
60+
5. Commit your changes and open a pull request.
61+
62+
## Pull Request Guidelines
63+
64+
Before you submit a pull request, check that it meets these guidelines:
65+
66+
1. The pull request should include additional tests if appropriate.
67+
2. If the pull request adds functionality, the docs should be updated.
68+
3. The pull request should work for all currently supported operating systems and versions of Python.
69+
70+
## Code of Conduct
71+
72+
Please note that the `emg-decompy` project is released with a
73+
Code of Conduct. By contributing to this project you agree to abide by its terms.

LICENSE

100644100755
+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2022 UBC-SPL-MDS
3+
Copyright (c) 2022, Daniel King
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal
@@ -19,3 +19,4 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1919
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
2020
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
2121
SOFTWARE.
22+

README.md

+25-1
Original file line numberDiff line numberDiff line change
@@ -1 +1,25 @@
1-
# emg-decomposition
1+
# emg-decompy
2+
3+
A package for decomposing net motor signals into individual motor unit activity
4+
5+
## Installation
6+
7+
```bash
8+
$ pip install emg-decompy
9+
```
10+
11+
## Usage
12+
13+
- TODO
14+
15+
## Contributing
16+
17+
Interested in contributing? Check out the contributing guidelines. Please note that this project is released with a Code of Conduct. By contributing to this project, you agree to abide by its terms.
18+
19+
## License
20+
21+
`emg-decompy` was created by Daniel King. It is licensed under the terms of the MIT license.
22+
23+
## Credits
24+
25+
`emg-decompy` was created with [`cookiecutter`](https://cookiecutter.readthedocs.io/en/latest/) and the `py-pkgs-cookiecutter` [template](https://github.com/py-pkgs/py-pkgs-cookiecutter).

docs/Makefile

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Minimal makefile for Sphinx documentation
2+
3+
# You can set these variables from the command line.
4+
SPHINXOPTS =
5+
SPHINXBUILD = python -msphinx
6+
SPHINXPROJ = emg-decompy
7+
SOURCEDIR = .
8+
BUILDDIR = _build
9+
10+
# Put it first so that "make" without argument is like "make help".
11+
help:
12+
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
13+
14+
.PHONY: help Makefile
15+
16+
# Catch-all target: route all unknown targets to Sphinx using the new
17+
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
18+
%: Makefile
19+
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

docs/changelog.md

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
```{include} ../CHANGELOG.md
2+
```

docs/conduct.md

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
```{include} ../CONDUCT.md
2+
```

docs/conf.py

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# Configuration file for the Sphinx documentation builder.
2+
#
3+
# This file only contains a selection of the most common options. For a full
4+
# list see the documentation:
5+
# https://www.sphinx-doc.org/en/master/usage/configuration.html
6+
7+
# -- Project information -----------------------------------------------------
8+
9+
project = u"emg-decompy"
10+
copyright = u"2022, Daniel King"
11+
author = u"Daniel King"
12+
13+
# -- General configuration ---------------------------------------------------
14+
15+
# Add any Sphinx extension module names here, as strings. They can be
16+
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
17+
# ones.
18+
extensions = [
19+
"myst_nb",
20+
"autoapi.extension",
21+
"sphinx.ext.napoleon",
22+
"sphinx.ext.viewcode",
23+
]
24+
autoapi_dirs = ["../src"]
25+
26+
# List of patterns, relative to source directory, that match files and
27+
# directories to ignore when looking for source files.
28+
# This pattern also affects html_static_path and html_extra_path.
29+
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]
30+
31+
# -- Options for HTML output -------------------------------------------------
32+
33+
# The theme to use for HTML and HTML Help pages. See the documentation for
34+
# a list of builtin themes.
35+
#
36+
html_theme = "sphinx_rtd_theme"

docs/contributing.md

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
```{include} ../CONTRIBUTING.md
2+
```

docs/example.ipynb

+45
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
{
2+
"cells": [
3+
{
4+
"cell_type": "markdown",
5+
"source": [
6+
"# Example usage\n",
7+
"\n",
8+
"To use `emg-decompy` in a project:"
9+
],
10+
"metadata": {}
11+
},
12+
{
13+
"cell_type": "code",
14+
"execution_count": null,
15+
"source": [
16+
"import emg-decompy\n",
17+
"\n",
18+
"print(emg-decompy.__version__)"
19+
],
20+
"outputs": [],
21+
"metadata": {}
22+
}
23+
],
24+
"metadata": {
25+
"kernelspec": {
26+
"display_name": "Python 3",
27+
"language": "python",
28+
"name": "python3"
29+
},
30+
"language_info": {
31+
"codemirror_mode": {
32+
"name": "ipython",
33+
"version": 3
34+
},
35+
"file_extension": ".py",
36+
"mimetype": "text/x-python",
37+
"name": "python",
38+
"nbconvert_exporter": "python",
39+
"pygments_lexer": "ipython3",
40+
"version": "3.8.5"
41+
}
42+
},
43+
"nbformat": 4,
44+
"nbformat_minor": 4
45+
}

docs/index.md

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
```{include} ../README.md
2+
```
3+
4+
```{toctree}
5+
:maxdepth: 1
6+
:hidden:
7+
8+
example.ipynb
9+
changelog.md
10+
contributing.md
11+
conduct.md
12+
autoapi/index
13+
```

docs/make.bat

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
@ECHO OFF
2+
3+
pushd %~dp0
4+
5+
REM Command file for Sphinx documentation
6+
7+
if "%SPHINXBUILD%" == "" (
8+
set SPHINXBUILD=python -msphinx
9+
)
10+
set SOURCEDIR=.
11+
set BUILDDIR=_build
12+
set SPHINXPROJ=emg-decompy
13+
14+
if "%1" == "" goto help
15+
16+
%SPHINXBUILD% >NUL 2>NUL
17+
if errorlevel 9009 (
18+
echo.
19+
echo.The Sphinx module was not found. Make sure you have Sphinx installed,
20+
echo.then set the SPHINXBUILD environment variable to point to the full
21+
echo.path of the 'sphinx-build' executable. Alternatively you may add the
22+
echo.Sphinx directory to PATH.
23+
echo.
24+
echo.If you don't have Sphinx installed, grab it from
25+
echo.http://sphinx-doc.org/
26+
exit /b 1
27+
)
28+
29+
%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS%
30+
goto end
31+
32+
:help
33+
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS%
34+
35+
:end
36+
popd

docs/requirements.txt

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
myst-nb
2+
sphinx-autoapi
3+
sphinx-rtd-theme

pyproject.toml

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
[tool.poetry]
2+
name = "emg-decompy"
3+
version = "0.1.0"
4+
description = "A package for decomposing net motor signals into individual motor unit activity"
5+
authors = ["Daniel King"]
6+
license = "MIT"
7+
readme = "README.md"
8+
9+
[tool.poetry.dependencies]
10+
python = "^3.9"
11+
12+
[tool.poetry.dev-dependencies]
13+
[tool.semantic_release]
14+
version_variable = "pyproject.toml:version" # version location
15+
branch = "main" # branch to make releases of
16+
changelog_file = "CHANGELOG.md" # changelog file
17+
build_command = "poetry build" # build dists
18+
dist_path = "dist/" # where to put dists
19+
upload_to_release = true # auto-create GitHub release
20+
upload_to_pypi = false # don't auto-upload to PyPI
21+
remove_dist = false # don't remove dists
22+
patch_without_tag = true # patch release by default
23+
24+
[build-system]
25+
requires = ["poetry-core>=1.0.0"]
26+
build-backend = "poetry.core.masonry.api"

src/emg-decompy/__init__.py

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# read version from installed package
2+
from importlib.metadata import version
3+
__version__ = version("emg-decompy")

src/emg-decompy/emg-decompy.py

Whitespace-only changes.

tests/test_emg-decompy.py

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
from emg-decompy import emg-decompy

0 commit comments

Comments
 (0)