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

Remove the broken badge, add coding guidelines and simplify PR/issue templates #86

Merged
merged 6 commits into from
Dec 5, 2024
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
26 changes: 26 additions & 0 deletions .github/ISSUE_TEMPLATE/01_bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Bug report

## Checklist before submitting an issue

- [ ] I have checked the [existing issues](https://github.com/biomarkersParkinson/tsdf/issues) and couldn't find an issue about this bug.

## Bug details

**Describe the bug**

A clear and concise description of what the bug is.

**To Reproduce**

Steps to reproduce the behavior:
1. install `tsdf` using pip
2. run method `example_method` with parameters
3. ...

**Error Message**

If applicable, add the error message.

**Expected behavior**

A clear and concise description of what you expected to happen.
13 changes: 13 additions & 0 deletions .github/ISSUE_TEMPLATE/10_feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Feature request

## Checklist before submitting an issue

- [ ] I have checked the [existing issues](https://github.com/biomarkersParkinson/tsdf/issues) and couldn't find an issue about this bug.

## Feature details

**Feature Description**
A clear and concise description of the feature you're proposing.

**Problem and Motivation**
Please describe the problem you are facing or the limitation with the current setup. Explain the motivation behind this feature request. For example, "I'm always frustrated when [...]."
10 changes: 10 additions & 0 deletions .github/ISSUE_TEMPLATE/20_blank.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Blank issue

## Checklist before submitting an issue

- [ ] I have checked the [existing issues](https://github.com/biomarkersParkinson/tsdf/issues) and couldn't find an issue about this bug.

## Issue details
<!--
Whatever you write here must have something to do with the code you get from running `copier`.
-->
44 changes: 0 additions & 44 deletions .github/ISSUE_TEMPLATE/bug_report.md

This file was deleted.

31 changes: 0 additions & 31 deletions .github/ISSUE_TEMPLATE/feature_request.md

This file was deleted.

26 changes: 26 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Pull request

## Describe your changes

Please include a summary of the changes and the related issue. Please also include relevant motivation and context.

## Type of change

Please select options that are relevant.

- [ ] Bug fix
- [ ] New feature
- [ ] Other

## Issue ticket number and link

<!-- add all related issues to the list below -->
Refs:
- #ISSUE_NUMBER_1
- #ISSUE_NUMBER_2

## Checklist before requesting a review

- [ ] I have read the [contribution guidelines](https://github.com/biomarkersParkinson/tsdf/blob/main/CONTRIBUTING.md)
- [ ] I have documented my code, particularly in hard-to-understand areas
- [ ] I have added tests that prove my fix is effective or that my feature works
50 changes: 16 additions & 34 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -1,44 +1,26 @@
---
name: Pull Request
about: Create a pull request to contribute to the project
title: ''
labels: ''
assignees: ''
# Pull request

---
## Describe your changes

## Description
<!-- Provide a detailed description of the changes or features implemented in this pull request. Explain the problem it solves or the feature it adds to the project. -->
Please include a summary of the changes and the related issue. Please also include relevant motivation and context.

## Related Issue(s)
<!-- List related issues or tasks that this pull request addresses. Use the format `#issue_number` to automatically link them here. -->
## Type of change

Please select options that are relevant.

## Type of Change
<!-- Identify the type of change(s) made in this pull request. Check all that apply. -->
- [ ] Bug fix
- [ ] New feature
- [ ] Enhancement to an existing feature
- [ ] Documentation update
- [ ] Other (please specify):

## How Has This Been Tested?
<!-- Describe the tests that you ran to verify your changes. Include relevant details for your test configuration or mention which tests cover these changes. -->

## Checklist
- [ ] I have followed the project's style guidelines.
- [ ] My code includes relevant unit tests to cover my changes.
- [ ] I have updated the documentation to reflect my changes (if applicable).
- [ ] My changes do not introduce any new warnings or errors.
- [ ] I have performed a self-review of my own code.
- [ ] All new and existing unit tests pass successfully with my changes.
- [ ] My commit messages are clear and meaningful.
- [ ] Other

## Additional Notes
<!-- Include any additional information, or notes that may be relevant or helpful to reviewers. -->
## Issue ticket number and link

## Impact
<!-- Describe any potential impacts this change may have on the project. This can include, but is not limited to, performance implications, changes in behavior, or dependency updates. -->
<!-- add all related issues to the list below -->
Refs:
- #ISSUE_NUMBER_1
- #ISSUE_NUMBER_2

## Reviewer(s)
<!-- Optionally tag any specific reviewers you would like to review your pull request. -->
## Checklist before requesting a review

- [ ] I have read the [contribution guidelines](https://github.com/biomarkersParkinson/tsdf/blob/main/CONTRIBUTING.md)
- [ ] I have documented my code, particularly in hard-to-understand areas
- [ ] I have added tests that prove my fix is effective or that my feature works
42 changes: 40 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Contributing
# Contributing guidelines

Contributions are welcome, and they are greatly appreciated! Every little bit helps, and credit will always be given.
We welcome any kind of contribution to our software, from simple comment or question to a full fledged [pull request](https://help.github.com/articles/about-pull-requests/). Please read and follow our [Code of Conduct](CODE_OF_CONDUCT.md).

## Types of Contributions

Expand Down Expand Up @@ -76,6 +76,44 @@ Before you submit a pull request, ensure it meets these guidelines:
2. If the pull request adds functionality, the documentation should be updated accordingly.
3. The pull request should work for Python's currently supported versions and major operating systems.

## Code Style Guide

Please follow the coding standards and conventions outlined below when contributing to this project.

1. **Use PEP 8 for Python code**: We follow the [PEP 8](https://www.python.org/dev/peps/pep-0008/) style guide for Python code. You can use tools like `black` to help enforce this.

2. **Naming Conventions**:
* Function names: `snake_case`.
* Class names: `PascalCase`.
* Constants: `UPPER_CASE_WITH_UNDERSCORES`.

3. **Docstrings**: All public methods, functions, and classes should have clear and complete docstrings. We use the [NumPy docstring style guide](https://numpydoc.readthedocs.io/en/latest/format.html) for consistency. Here is an example:

```python
def my_function(param1: int, param2: str) -> None:
"""
Brief summary of the function.

Parameters
----------
param1 : int
Description of `param1`.
param2 : str
Description of `param2`.

Returns
-------
None
"""
print(f"{param1}, {param2}")
```

4. **Type Annotations**: We use [PEP 484](https://www.python.org/dev/peps/pep-0484/) type hints throughout the codebase. Please ensure that all functions and methods are properly annotated.

5. **Testing**: Ensure that your code is covered by unit tests. We use `pytest` for testing. Add new tests for any added functionality.

We appreciate your contributions and adherence to the style guide. This helps maintain the quality and readability of the codebase.

## Code of Conduct

Please note that the `tsdf` project is released with a Code of Conduct. By contributing to this project, you agree to abide by its terms.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
| Badges | |
|:----:|----|
| **Packages and Releases** | [![Latest release](https://img.shields.io/github/release/biomarkersparkinson/tsdf.svg)](https://github.com/biomarkersparkinson/tsdf/releases/latest) [![PyPI](https://img.shields.io/pypi/v/tsdf.svg)](https://pypi.python.org/pypi/tsdf/) [![Static Badge](https://img.shields.io/badge/RSD-tsdf-lib)](https://research-software-directory.org/software/tsdf) |
| **Build Status** | [![](https://img.shields.io/badge/python-3.10+-blue.svg)](https://www.python.org/downloads/) ![Python package](https://github.com/biomarkersparkinson/tsdf/workflows/Python%20package/badge.svg) [![pytype Type Check](https://github.com/biomarkersParkinson/tsdf/actions/workflows/pytype-checking.yml/badge.svg)](https://github.com/biomarkersParkinson/tsdf/actions/workflows/pytype-checking.yml) |
| **Build Status** | [![](https://img.shields.io/badge/python-3.10+-blue.svg)](https://www.python.org/downloads/) ![Python package](https://github.com/biomarkersparkinson/tsdf/workflows/Python%20package/badge.svg) |
| **DOI** | [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.7867899.svg)](https://doi.org/10.5281/zenodo.7867899) |
| **License** | [![GitHub license](https://img.shields.io/github/license/biomarkersParkinson/tsdf)](https://github.com/biomarkersparkinson/tsdf/blob/main/LICENSE) |
| **Fairness** | [![fair-software.eu](https://img.shields.io/badge/fair--software.eu-%E2%97%8F%20%20%E2%97%8F%20%20%E2%97%8F%20%20%E2%97%8F%20%20%E2%97%8F-green)](https://fair-software.eu) [![OpenSSF Best Practices](https://bestpractices.coreinfrastructure.org/projects/8083/badge)](https://www.bestpractices.dev/projects/8083) |
Expand Down
Loading