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

Contributing Guide, Code of Conduct, and Issues Template #746

Merged
merged 15 commits into from
May 24, 2022
Merged
61 changes: 61 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
---
name: "\U0001F41B Bug report"
about: Create a report to help us repair something that is currently broken
labels: bug

---
<!-- Thank you for contributing. These HTML comments will not render in the issue, but you can delete them once you've read them if you prefer! -->

### Bug description
<!-- Use this section to clearly and concisely describe the bug. -->

#### Expected behaviour
<!-- Tell us what you thought would happen. -->

#### Actual behaviour
<!-- Tell us what actually happens. -->

### Your personal set up
<!--
Tell us a little about the system you're using.
Please include information about how you installed.
-->

- OS:
<!-- [e.g. ubuntu 20.04, macOS 11.0] -->
- Version(s):
<!-- e.g. [SLEAP v1.2.3, python 3.8] --->
- SLEAP installation method (listed [here](https://sleap.ai/installation.html#)):
* [ ] [Conda from package](https://sleap.ai/installation.html#conda-package)
* [ ] [Conda from source](https://sleap.ai/installation.html#conda-from-source)
* [ ] [pip package](https://sleap.ai/installation.html#pip-package)
* [ ] [M1 Macs](https://sleap.ai/installation.html#m1-macs)

- <details><summary>Environment packages</summary>
<!-- For reproduction, it's useful to have the full environment. For example, the output of `pip freeze` or `conda list` --->

```
# paste output of `pip freeze` or `conda list` here
```
</details>

- <details><summary>Logs</summary>
<!--
Please share any applicable terminal logs. optionally share output from sleap-diagnostic
-->

```
# paste relevant logs here, if any
```
</details>

### Screenshots
<!-- Provide any relevant screenshots -->

### How to reproduce
<!-- Use this section to describe the steps that a user would take to experience this bug. eg:-->

1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error
10 changes: 10 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
contact_links:
- name: "\U0001F914 Ask any general questions relating to SLEAP"
url: https://github.com/talmolab/sleap/discussions/categories/help
about: Ask general questions or get help.
- name: "\U0001F4A1 Propose new features or enhancements for SLEAP"
url: https://github.com/talmolab/sleap/discussions/categories/ideas
about: Propose new features or enhancements.
- name: "\U0001F4DD See the SLEAP documentation"
url: https://sleap.ai
about: See the documentation
46 changes: 46 additions & 0 deletions docs/CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# Contributor Covenant Code of Conduct

## Our Pledge

In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to make 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.

## Our Standards

Examples of behavior that contributes to creating a positive environment include:

* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

* The use of sexualized language or imagery and unwelcome sexual attention or advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a professional setting

## Our Responsibilities

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.

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.

## Scope

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.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at [email protected]. All complaints will be reviewed and investigated and will result in a response that is deemed necessary and 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.

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.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [https://contributor-covenant.org/version/1/4][version]

[homepage]: https://contributor-covenant.org
[version]: https://contributor-covenant.org/version/1/4/
63 changes: 63 additions & 0 deletions docs/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# Contributing to SLEAP

As our community grows it is important to adhere to a set of contribution guidelines. These guidelines may change as needed. Please feel free to propose changes in a pull request!

#### Table Of Contents

1) [Code of Conduct](#code-of-conduct)
2) [Contributing](#contributing)
* [Issues](#issues)
* [Discussions](#discussions)
* [Pull Requests](#pull-requests)
3) [Style Guides](#style-guides)

## Code of Conduct

Everyone contributing to SLEAP is governed by the [SLEAP Code of Conduct](CODE_OF_CONDUCT.md). As such, all are expected to abide by this code. Please report any unacceptable behavior to [email protected].

## Contributing

Github has made it easy to separate issues from discussions. Generally speaking, if something warrants a pull request (e.g. bug fixes, TODOs) it should be submitted as an issue. Conversely, general questions about usage and improvement ideas should go into discussions. These both act as staging areas before adding the items to the SLEAP Roadmap. Once added to the Roadmap, items can be given priority, status, assignee(s), etc.

### Issues

* Check [open/closed issues](https://github.com/talmolab/sleap/issues), [ideas](https://github.com/talmolab/sleap/discussions/categories/ideas), and [the help page](https://github.com/talmolab/sleap/discussions/categories/help) to make sure issue doesn't already exist / has been solved.
* Create new issue using the [issue template](https://github.com/talmolab/sleap/blob/arlo/contributing_guide/.github/ISSUE_TEMPLATE/bug_report.md).

### Discussions

* This is a place to go to ask questions and propose new ideas.
* 3 categories: Help, Ideas, General
* **Help** - Having trouble with software, user experience issue, etc.
* **Ideas** - Enhancements, things that would make the user experience nicer but not necessarily a problem with the code.
* **General** - If it doesn't fall into help/ideas it goes here as long as it isn't bug fix (issue).

### Pull Requests

1) Install source code [develop branch](https://sleap.ai/installation.html#conda-from-source) and follow instructions to create conda env, etc.
2) Create fork.
* Either work on develop branch in own fork or can create branch on either github or cli.
* If creating a branch, use your name followed by a relevant keyword for your changes, eg: `git checkout -b john/some_issue`
3) Make some changes to source code or additions that tackle the issue(s).
4) Write [tests](https://github.com/talmolab/sleap/tree/develop/tests).
* Can either write before PR or submit draft PR and then write tests to narrow down error prone lines.
* The test(s) should go into relevant subtest folders to the proposed change(s).
* Test(s) should aim to hit every point in the proposed change(s) - cover edge cases to best of your ability.
* Try to hit code coverage points.
5) Add files and commit (make sure to correct branch!).
6) Create Draft PR (on github - follow instructions in template).
* Make sure tests pass and code coverage is good.
* If tests fail, repeat steps 4-7.
7) Once draft pr looks good, submit a PR (hit `ready for review` button).
roomrys marked this conversation as resolved.
Show resolved Hide resolved
* Optionally assign a reviewer on right of screen.
8) If reviewer requests changes, repeat steps 4-8.
9) Once reviewer signs off they will squash + merge.
roomrys marked this conversation as resolved.
Show resolved Hide resolved

## Style Guides

* **Linting** - [black](https://black.readthedocs.io/en/stable/) version 21.6b0 (see [dev_requirements](https://github.com/talmolab/sleap/blob/develop/dev_requirements.txt) for any changes).
* **Coding** - generally follow pep8, type hinting is encouraged.
* Use Google style [docstrings](https://google.github.io/styleguide/pyguide.html#38-comments-and-docstrings) to document code.
roomrys marked this conversation as resolved.
Show resolved Hide resolved

#### Thank you for contributing to SLEAP!
sheridana marked this conversation as resolved.
Show resolved Hide resolved
:heart: