Skip to content

Commit dee3191

Browse files
authored
πŸ“ Add contributing guide and issue forms (#16)
1 parent 89a40d6 commit dee3191

File tree

6 files changed

+462
-0
lines changed

6 files changed

+462
-0
lines changed

β€Ž.github/CODE_OF_CONDUCT.mdβ€Ž

Lines changed: 127 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,127 @@
1+
# Contributor Covenant Code of Conduct
2+
3+
## Our Pledge
4+
5+
We as members, contributors, and leaders pledge to make participation in our
6+
community a harassment-free experience for everyone, regardless of age, body
7+
size, visible or invisible disability, ethnicity, sex characteristics, gender
8+
identity and expression, level of experience, education, socio-economic status,
9+
nationality, personal appearance, race, religion, or sexual identity and
10+
orientation.
11+
12+
We pledge to act and interact in ways that contribute to an open, welcoming,
13+
diverse, inclusive, and healthy community.
14+
15+
## Our Standards
16+
17+
Examples of behavior that contributes to a positive environment for our
18+
community include:
19+
20+
* Demonstrating empathy and kindness toward other people
21+
* Being respectful of differing opinions, viewpoints, and experiences
22+
* Giving and gracefully accepting constructive feedback
23+
* Accepting responsibility and apologizing to those affected by our mistakes,
24+
and learning from the experience
25+
* Focusing on what is best not just for us as individuals, but for the overall
26+
community
27+
28+
Examples of unacceptable behavior include:
29+
30+
* The use of sexualized language or imagery, and sexual attention or advances
31+
of any kind
32+
* Trolling, insulting or derogatory comments, and personal or political attacks
33+
* Public or private harassment
34+
* Publishing others' private information, such as a physical or email
35+
* Other conduct which could reasonably be considered inappropriate in
36+
a professional setting
37+
38+
## Enforcement Responsibilities
39+
40+
Community leaders are responsible for clarifying and enforcing our standards of
41+
acceptable behavior and will take appropriate and fair corrective action in
42+
response to any behavior that they deem inappropriate, threatening, offensive,
43+
or harmful.
44+
45+
Community leaders have the right and responsibility to remove, edit, or reject
46+
comments, commits, code, wiki edits, issues, and other contributions that are
47+
not aligned to this Code of Conduct, and will communicate reasons for
48+
moderation decisions when appropriate.
49+
50+
## Scope
51+
52+
This Code of Conduct applies within all community spaces, and also applies when
53+
an individual is officially representing the community in public spaces.
54+
Examples of representing our community include using an official e-mail
55+
address, posting via an official social media account, or acting as an
56+
appointed representative at an online or offline event.
57+
58+
## Enforcement
59+
60+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
61+
reported to the community leaders responsible for enforcement using any of the
62+
[reporting services][github-reporting-services] provided by GitHub. All
63+
complaints will be reviewed and investigated promptly and fairly.
64+
65+
All community leaders are obligated to respect the privacy and security of the
66+
reporter of any incident.
67+
68+
## Enforcement Guidelines
69+
70+
Community leaders will follow these Community Impact Guidelines in determining
71+
the consequences for any action they deem in violation of this Code of Conduct:
72+
73+
### 1. Correction
74+
75+
**Community Impact**: Use of inappropriate language or other behavior deemed
76+
unprofessional or unwelcome in the community.
77+
78+
**Consequence**: A private, written warning from community leaders, providing
79+
clarity around the nature of the violation and an explanation of why the
80+
behavior was inappropriate. A public apology may be requested.
81+
82+
### 2. Warning
83+
84+
**Community Impact**: A violation through a single incident or series of
85+
actions.
86+
87+
**Consequence**: A warning with consequences for continued behavior. No
88+
interaction with the people involved, including unsolicited interaction with
89+
those enforcing the Code of Conduct, for a specified period of time. This
90+
includes avoiding interactions in community spaces as well as external channels
91+
like social media. Violating these terms may lead to a temporary or permanent
92+
ban.
93+
94+
### 3. Temporary Ban
95+
96+
**Community Impact**: A serious violation of community standards, including
97+
sustained inappropriate behavior.
98+
99+
**Consequence**: A temporary ban from any sort of interaction or public
100+
communication with the community for a specified period of time. No public or
101+
private interaction with the people involved, including unsolicited interaction
102+
with those enforcing the Code of Conduct, is allowed during this period.
103+
Violating these terms may lead to a permanent ban.
104+
105+
### 4. Permanent Ban
106+
107+
**Community Impact**: Demonstrating a pattern of violation of community
108+
standards, including sustained inappropriate behavior, harassment of an
109+
individual, or aggression toward or disparagement of classes of individuals.
110+
111+
**Consequence**: A permanent ban from any sort of public interaction within the
112+
community.
113+
114+
## Attribution
115+
116+
This Code of Conduct is adapted from the [Contributor Covenant][covenant],
117+
version 2.0, available [here][covenant-cc]. Community Impact Guidelines were
118+
inspired by [Mozilla's code of conduct enforcement ladder][mozilla-cc]. For
119+
answers to common questions about this code of conduct, see the
120+
[FAQ][covenant-faq]. Translations are available [here][covenant-translations].
121+
122+
[covenant]: https://www.contributor-covenant.org
123+
[covenant-cc]: https://www.contributor-covenant.org/version/2/0/code_of_conduct.html
124+
[covenant-faq]: https://www.contributor-covenant.org/faq
125+
[covenant-translations]: https://www.contributor-covenant.org/translations
126+
[github-reporting-services]: https://docs.github.com/en/communities/maintaining-your-safety-on-github/reporting-abuse-or-spam
127+
[mozilla-cc]: https://github.com/mozilla/diversity

β€Ž.github/CONTRIBUTING.mdβ€Ž

Lines changed: 139 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,139 @@
1+
# Contributing Guide
2+
3+
First of all, thank you for your interest in the project! πŸ’š
4+
5+
You are welcome to contribute by:
6+
7+
* opening an issue to report bugs or request features;
8+
* creating a pull request to fix a bug or implement a new feature;
9+
* participating in discussions on the existing issues and PRs.
10+
11+
Whether you're opening an issue or creating a pull request, make sure to apply
12+
our forms and templates as well as to follow the instructions and checklists
13+
you'll find therein.
14+
15+
> If you are unfamiliar with contributing to open-source projects, consider
16+
> taking a look at the official [GitHub docs][github-docs] or other related
17+
> guides and assets, e.g., [First Contribution][first-contribution].
18+
19+
## Issues
20+
21+
There are several types of issues one can [open][open-issue] to contribute to
22+
the project:
23+
24+
* πŸ› [Bug report][open-bug-report]
25+
* ✨ [Feature request][open-feature-request]
26+
* 🍻 [Discussions][open-discussion]
27+
28+
An issue of each type can be created using a specific form. Irrespective of the
29+
issue type, contributors are requested to confirm that they are familiar with
30+
this guide and the project's [Code of Conduct][code-of-conduct], as well as
31+
that the issue they open is not a duplicate.
32+
33+
## Pull Requests
34+
35+
If you're looking to make small tweaks, especially in the docs or similar, feel
36+
free to jump straight to creating a pull request. But if it's something more
37+
substantial, like reporting a bug or suggesting a new feature, it's better to
38+
start off by opening an issue. This gives everyone in the community a chance to
39+
chime in and make sure we're all on the same page. Once there's a general
40+
agreement, you can go ahead and submit your pull request.
41+
42+
When creating each pull request, it is crucial to adhere to the provided
43+
instructions:
44+
45+
01. [Fork][fork] the repo and clone it to your machine.
46+
02. Go to the project's root directory to create the virtual environment and
47+
activate it:
48+
49+
```console
50+
$ python -m venv .venv && . .venv/bin/activate
51+
```
52+
53+
> In order to precisely reproduce the development environment, it is
54+
> recommended to use the Python version specified in
55+
> [`.python-version`][python-version]. The version given therein is checked
56+
> out by default in all the CI environments.
57+
58+
03. Install the package in editable (development) mode, along with all the
59+
optional dependencies:
60+
61+
```console
62+
$ pip install -e ".[dev,docs,lint,test]"
63+
```
64+
65+
04. Install [Pre-commit][pre-commit] hooks:
66+
67+
```console
68+
$ pre-commit install
69+
```
70+
71+
05. Run linters and tests using [Nox][nox]:
72+
73+
```console
74+
$ nox
75+
```
76+
77+
This will check your fork's setup, the code quality with linters, run the
78+
existing tests in different Python environments, and measure the coverage.
79+
80+
> Note that you should have all the versions of Python installed on your
81+
> machine. Consider using [`pyenv`][pyenv] to work with multiple Python
82+
> interpreters.
83+
84+
If you want to be more specific, you can only run the linting or testing
85+
suites via the respective Nox sessions. All the available sessions can be
86+
listed using the command:
87+
88+
```console
89+
$ nox -l
90+
```
91+
92+
For more details, see [`noxfile.py`][noxfile] and [Nox docs][nox-docs].
93+
Besides, note that all the linters and testing tools are installed in the
94+
virtual environment anyway. Therefore, feel absolutely free to use them
95+
independently of Nox as well.
96+
97+
06. Check out a new feature branch and introduce changes.
98+
99+
> All the changes affecting the codebase must be accompanied by relevant
100+
> unit tests and documentation updates. We always attempt to maintain 100%
101+
> test coverage, and we require that from all pull requests as well. Those
102+
> with tests missing (if they are needed, of course) have exactly zero
103+
> chance of being merged!
104+
105+
07. Run Nox.
106+
107+
If all the Nox sessions are successful and the changes are covered by tests,
108+
commit your changes and push them to remote.
109+
110+
> Keep in mind that when you create a pull request, the CI will run all the
111+
> Nox sessions anyway. Nevertheless, it is still strongly recommended to
112+
> test everything locally before pushing to remote and opening a pull
113+
> request.
114+
115+
08. [Create a pull request][create-pull-request] from the feature branch of your
116+
fork to the `main` branch of the original repository.
117+
118+
> Don't forget to mark the pull request with an appropriate Gitmoji! 😜
119+
120+
That's it! πŸŽ‰
121+
122+
As soon as your pull request passes all CI checks, it will be reviewed by the
123+
project's maintainers as soon as possible. 🧐
124+
125+
[code-of-conduct]: https://github.com/paduszyk/python-gitmojis/blob/main/.github/CODE_OF_CONDUCT.md
126+
[create-pull-request]: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request
127+
[first-contribution]: https://github.com/firstcontributions/first-contributions
128+
[fork]: https://docs.github.com/en/get-started/quickstart/fork-a-repo
129+
[github-docs]: https://docs.github.com/en/get-started/quickstart/contributing-to-projects
130+
[nox]: https://github.com/wntrblm/nox
131+
[nox-docs]: https://nox.thea.codes/en/stable/usage.html#command-line-usage
132+
[noxfile]: https://github.com/paduszyk/python-gitmojis/blob/main/noxfile.py
133+
[open-bug-report]: https://github.com/paduszyk/python-gitmojis/issues/new?template=bug-report.yml
134+
[open-discussion]: https://github.com/paduszyk/python-gitmojis/issues/new?template=discussion.yml
135+
[open-feature-request]: https://github.com/paduszyk/python-gitmojis/issues/new?template=feature-request.yml
136+
[open-issue]: https://github.com/paduszyk/python-gitmojis/issues/new/choose
137+
[pre-commit]: https://pre-commit.com
138+
[pyenv]: https://github.com/pyenv/pyenv
139+
[python-version]: https://github.com/paduszyk/python-gitmojis/blob/main/.python-version
Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
name: πŸ› Bug report
2+
description:
3+
File a bug report.
4+
labels:
5+
- bug
6+
assignees:
7+
- paduszyk
8+
body:
9+
- type: markdown
10+
attributes:
11+
value: >-
12+
Thank you for reporting a bug! β™₯️
13+
Tell us more about by filling in the form below.
14+
- type: input
15+
id: package-version
16+
attributes:
17+
label: Package version
18+
description:
19+
What is the exact semantic version of the package displaying the bug?
20+
validations:
21+
required: true
22+
- type: dropdown
23+
id: python-version
24+
attributes:
25+
label: Python version
26+
description: |
27+
In which version of the Python interpreter does the issue arise?
28+
options:
29+
- "3.12"
30+
- "3.11"
31+
- "3.10"
32+
default: 0
33+
validations:
34+
required: true
35+
- type: dropdown
36+
id: os
37+
attributes:
38+
label: Platform
39+
description: |
40+
What is the platform on which you are using the package?
41+
options:
42+
- "Windows"
43+
- "Linux"
44+
- "MacOS"
45+
default: 0
46+
validations:
47+
required: true
48+
- type: textarea
49+
id: description
50+
attributes:
51+
label: Description
52+
description: |
53+
Describe the unexpected behavior being a matter of the issue.
54+
validations:
55+
required: true
56+
- type: textarea
57+
id: reproduction
58+
attributes:
59+
label: Reproduction
60+
description: |
61+
Provide a [minimal reproducible example](https://stackoverflow.com/help/minimal-reproducible-example) demonstrating the issue.
62+
validations:
63+
required: true
64+
- type: dropdown
65+
id: pull-request
66+
attributes:
67+
label: Are you capable of creating a pull request to resolve this issue on your own?
68+
description: |
69+
Just let us know. If you agree, it doesn't mean you will have to.
70+
options:
71+
- "I'm not sure"
72+
- "Yes"
73+
- "No"
74+
default: 0
75+
- type: checkboxes
76+
id: terms
77+
attributes:
78+
label: Terms
79+
description: |
80+
Before submitting the issue, confirm the following:
81+
options:
82+
- label: >-
83+
I read and followed the project's
84+
[Code of Conduct](https://github.com/paduszyk/python-gitmojis/blob/main/.github/CODE_OF_CONDUCT.md) and
85+
[Contributing Guide](https://github.com/paduszyk/python-gitmojis/blob/main/.github/CONTRIBUTING.md).
86+
required: true
87+
- label: >-
88+
This issue isn't a duplicate.
89+
I checked that the same or very similar bug hadn't been reported before.
90+
required: true
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
blank_issues_enabled: false
2+
3+
contact_links:
4+
- name: πŸŽ‰ Contributing Guide
5+
url: https://github.com/paduszyk/python-gitmojis/blob/main/.github/CONTRIBUTING.md
6+
about: |
7+
Please read through before making any contribution.
8+
- name: 🀝 Code of Conduct
9+
url: https://github.com/paduszyk/python-gitmojis/blob/main/.github/CODE_OF_CONDUCT.md
10+
about: |
11+
All contributors must agree to follow our code of conduct.
12+
- name: πŸ‘₯ GitHub Community Guidelines
13+
url: https://docs.github.com/en/site-policy/github-terms/github-community-guidelines
14+
about: |
15+
The article discussing GitHub's rules for user behavior and community conduct.

0 commit comments

Comments
Β (0)