diff --git a/.github/CODE_OF_CONDUCT.md b/.github/CODE_OF_CONDUCT.md new file mode 100644 index 0000000..b549d4b --- /dev/null +++ b/.github/CODE_OF_CONDUCT.md @@ -0,0 +1,127 @@ +# Contributor Covenant Code of Conduct + +## Our Pledge + +We as members, contributors, and leaders pledge to make participation in our +community a harassment-free experience for everyone, regardless of age, body +size, visible or invisible disability, ethnicity, sex characteristics, gender +identity and expression, level of experience, education, socio-economic status, +nationality, personal appearance, race, religion, or sexual identity and +orientation. + +We pledge to act and interact in ways that contribute to an open, welcoming, +diverse, inclusive, and healthy community. + +## Our Standards + +Examples of behavior that contributes to a positive environment for our +community include: + +* Demonstrating empathy and kindness toward other people +* Being respectful of differing opinions, viewpoints, and experiences +* Giving and gracefully accepting constructive feedback +* Accepting responsibility and apologizing to those affected by our mistakes, + and learning from the experience +* Focusing on what is best not just for us as individuals, but for the overall + community + +Examples of unacceptable behavior include: + +* The use of sexualized language or imagery, and sexual attention or advances + of any kind +* Trolling, insulting or derogatory comments, and personal or political attacks +* Public or private harassment +* Publishing others' private information, such as a physical or email +* Other conduct which could reasonably be considered inappropriate in + a professional setting + +## Enforcement Responsibilities + +Community leaders are responsible for clarifying and enforcing our standards of +acceptable behavior and will take appropriate and fair corrective action in +response to any behavior that they deem inappropriate, threatening, offensive, +or harmful. + +Community leaders 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, and will communicate reasons for +moderation decisions when appropriate. + +## Scope + +This Code of Conduct applies within all community spaces, and also applies when +an individual is officially representing the community in public spaces. +Examples of representing our community include using an official e-mail +address, posting via an official social media account, or acting as an +appointed representative at an online or offline event. + +## Enforcement + +Instances of abusive, harassing, or otherwise unacceptable behavior may be +reported to the community leaders responsible for enforcement using any of the +[reporting services][github-reporting-services] provided by GitHub. All +complaints will be reviewed and investigated promptly and fairly. + +All community leaders are obligated to respect the privacy and security of the +reporter of any incident. + +## Enforcement Guidelines + +Community leaders will follow these Community Impact Guidelines in determining +the consequences for any action they deem in violation of this Code of Conduct: + +### 1. Correction + +**Community Impact**: Use of inappropriate language or other behavior deemed +unprofessional or unwelcome in the community. + +**Consequence**: A private, written warning from community leaders, providing +clarity around the nature of the violation and an explanation of why the +behavior was inappropriate. A public apology may be requested. + +### 2. Warning + +**Community Impact**: A violation through a single incident or series of +actions. + +**Consequence**: A warning with consequences for continued behavior. No +interaction with the people involved, including unsolicited interaction with +those enforcing the Code of Conduct, for a specified period of time. This +includes avoiding interactions in community spaces as well as external channels +like social media. Violating these terms may lead to a temporary or permanent +ban. + +### 3. Temporary Ban + +**Community Impact**: A serious violation of community standards, including +sustained inappropriate behavior. + +**Consequence**: A temporary ban from any sort of interaction or public +communication with the community for a specified period of time. No public or +private interaction with the people involved, including unsolicited interaction +with those enforcing the Code of Conduct, is allowed during this period. +Violating these terms may lead to a permanent ban. + +### 4. Permanent Ban + +**Community Impact**: Demonstrating a pattern of violation of community +standards, including sustained inappropriate behavior, harassment of an +individual, or aggression toward or disparagement of classes of individuals. + +**Consequence**: A permanent ban from any sort of public interaction within the +community. + +## Attribution + +This Code of Conduct is adapted from the [Contributor Covenant][covenant], +version 2.0, available [here][covenant-cc]. Community Impact Guidelines were +inspired by [Mozilla's code of conduct enforcement ladder][mozilla-cc]. For +answers to common questions about this code of conduct, see the +[FAQ][covenant-faq]. Translations are available [here][covenant-translations]. + +[covenant]: https://www.contributor-covenant.org +[covenant-cc]: https://www.contributor-covenant.org/version/2/0/code_of_conduct.html +[covenant-faq]: https://www.contributor-covenant.org/faq +[covenant-translations]: https://www.contributor-covenant.org/translations +[github-reporting-services]: https://docs.github.com/en/communities/maintaining-your-safety-on-github/reporting-abuse-or-spam +[mozilla-cc]: https://github.com/mozilla/diversity diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md new file mode 100644 index 0000000..2d0e73f --- /dev/null +++ b/.github/CONTRIBUTING.md @@ -0,0 +1,139 @@ +# Contributing Guide + +First of all, thank you for your interest in the project! 💚 + +You are welcome to contribute by: + +* opening an issue to report bugs or request features; +* creating a pull request to fix a bug or implement a new feature; +* participating in discussions on the existing issues and PRs. + +Whether you're opening an issue or creating a pull request, make sure to apply +our forms and templates as well as to follow the instructions and checklists +you'll find therein. + +> If you are unfamiliar with contributing to open-source projects, consider +> taking a look at the official [GitHub docs][github-docs] or other related +> guides and assets, e.g., [First Contribution][first-contribution]. + +## Issues + +There are several types of issues one can [open][open-issue] to contribute to +the project: + +* 🐛 [Bug report][open-bug-report] +* ✨ [Feature request][open-feature-request] +* 🍻 [Discussions][open-discussion] + +An issue of each type can be created using a specific form. Irrespective of the +issue type, contributors are requested to confirm that they are familiar with +this guide and the project's [Code of Conduct][code-of-conduct], as well as +that the issue they open is not a duplicate. + +## Pull Requests + +If you're looking to make small tweaks, especially in the docs or similar, feel +free to jump straight to creating a pull request. But if it's something more +substantial, like reporting a bug or suggesting a new feature, it's better to +start off by opening an issue. This gives everyone in the community a chance to +chime in and make sure we're all on the same page. Once there's a general +agreement, you can go ahead and submit your pull request. + +When creating each pull request, it is crucial to adhere to the provided +instructions: + +01. [Fork][fork] the repo and clone it to your machine. +02. Go to the project's root directory to create the virtual environment and + activate it: + + ```console + $ python -m venv .venv && . .venv/bin/activate + ``` + + > In order to precisely reproduce the development environment, it is + > recommended to use the Python version specified in + > [`.python-version`][python-version]. The version given therein is checked + > out by default in all the CI environments. + +03. Install the package in editable (development) mode, along with all the + optional dependencies: + + ```console + $ pip install -e ".[dev,docs,lint,test]" + ``` + +04. Install [Pre-commit][pre-commit] hooks: + + ```console + $ pre-commit install + ``` + +05. Run linters and tests using [Nox][nox]: + + ```console + $ nox + ``` + + This will check your fork's setup, the code quality with linters, run the + existing tests in different Python environments, and measure the coverage. + + > Note that you should have all the versions of Python installed on your + > machine. Consider using [`pyenv`][pyenv] to work with multiple Python + > interpreters. + + If you want to be more specific, you can only run the linting or testing + suites via the respective Nox sessions. All the available sessions can be + listed using the command: + + ```console + $ nox -l + ``` + + For more details, see [`noxfile.py`][noxfile] and [Nox docs][nox-docs]. + Besides, note that all the linters and testing tools are installed in the + virtual environment anyway. Therefore, feel absolutely free to use them + independently of Nox as well. + +06. Check out a new feature branch and introduce changes. + + > All the changes affecting the codebase must be accompanied by relevant + > unit tests and documentation updates. We always attempt to maintain 100% + > test coverage, and we require that from all pull requests as well. Those + > with tests missing (if they are needed, of course) have exactly zero + > chance of being merged! + +07. Run Nox. + + If all the Nox sessions are successful and the changes are covered by tests, + commit your changes and push them to remote. + + > Keep in mind that when you create a pull request, the CI will run all the + > Nox sessions anyway. Nevertheless, it is still strongly recommended to + > test everything locally before pushing to remote and opening a pull + > request. + +08. [Create a pull request][create-pull-request] from the feature branch of your + fork to the `main` branch of the original repository. + + > Don't forget to mark the pull request with an appropriate Gitmoji! 😜 + +That's it! 🎉 + +As soon as your pull request passes all CI checks, it will be reviewed by the +project's maintainers as soon as possible. 🧐 + +[code-of-conduct]: https://github.com/paduszyk/python-gitmojis/blob/main/.github/CODE_OF_CONDUCT.md +[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 +[first-contribution]: https://github.com/firstcontributions/first-contributions +[fork]: https://docs.github.com/en/get-started/quickstart/fork-a-repo +[github-docs]: https://docs.github.com/en/get-started/quickstart/contributing-to-projects +[nox]: https://github.com/wntrblm/nox +[nox-docs]: https://nox.thea.codes/en/stable/usage.html#command-line-usage +[noxfile]: https://github.com/paduszyk/python-gitmojis/blob/main/noxfile.py +[open-bug-report]: https://github.com/paduszyk/python-gitmojis/issues/new?template=bug-report.yml +[open-discussion]: https://github.com/paduszyk/python-gitmojis/issues/new?template=discussion.yml +[open-feature-request]: https://github.com/paduszyk/python-gitmojis/issues/new?template=feature-request.yml +[open-issue]: https://github.com/paduszyk/python-gitmojis/issues/new/choose +[pre-commit]: https://pre-commit.com +[pyenv]: https://github.com/pyenv/pyenv +[python-version]: https://github.com/paduszyk/python-gitmojis/blob/main/.python-version diff --git a/.github/ISSUE_TEMPLATE/bug-report.yml b/.github/ISSUE_TEMPLATE/bug-report.yml new file mode 100644 index 0000000..27a55e9 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug-report.yml @@ -0,0 +1,90 @@ +name: 🐛 Bug report +description: + File a bug report. +labels: + - bug +assignees: + - paduszyk +body: + - type: markdown + attributes: + value: >- + Thank you for reporting a bug! ♥️ + Tell us more about by filling in the form below. + - type: input + id: package-version + attributes: + label: Package version + description: + What is the exact semantic version of the package displaying the bug? + validations: + required: true + - type: dropdown + id: python-version + attributes: + label: Python version + description: | + In which version of the Python interpreter does the issue arise? + options: + - "3.12" + - "3.11" + - "3.10" + default: 0 + validations: + required: true + - type: dropdown + id: os + attributes: + label: Platform + description: | + What is the platform on which you are using the package? + options: + - "Windows" + - "Linux" + - "MacOS" + default: 0 + validations: + required: true + - type: textarea + id: description + attributes: + label: Description + description: | + Describe the unexpected behavior being a matter of the issue. + validations: + required: true + - type: textarea + id: reproduction + attributes: + label: Reproduction + description: | + Provide a [minimal reproducible example](https://stackoverflow.com/help/minimal-reproducible-example) demonstrating the issue. + validations: + required: true + - type: dropdown + id: pull-request + attributes: + label: Are you capable of creating a pull request to resolve this issue on your own? + description: | + Just let us know. If you agree, it doesn't mean you will have to. + options: + - "I'm not sure" + - "Yes" + - "No" + default: 0 + - type: checkboxes + id: terms + attributes: + label: Terms + description: | + Before submitting the issue, confirm the following: + options: + - label: >- + I read and followed the project's + [Code of Conduct](https://github.com/paduszyk/python-gitmojis/blob/main/.github/CODE_OF_CONDUCT.md) and + [Contributing Guide](https://github.com/paduszyk/python-gitmojis/blob/main/.github/CONTRIBUTING.md). + required: true + - label: >- + This issue isn't a duplicate. + I checked that the same or very similar bug hadn't been reported before. + required: true diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 0000000..4bbbf0f --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1,15 @@ +blank_issues_enabled: false + +contact_links: + - name: 🎉 Contributing Guide + url: https://github.com/paduszyk/python-gitmojis/blob/main/.github/CONTRIBUTING.md + about: | + Please read through before making any contribution. + - name: 🤝 Code of Conduct + url: https://github.com/paduszyk/python-gitmojis/blob/main/.github/CODE_OF_CONDUCT.md + about: | + All contributors must agree to follow our code of conduct. + - name: 👥 GitHub Community Guidelines + url: https://docs.github.com/en/site-policy/github-terms/github-community-guidelines + about: | + The article discussing GitHub's rules for user behavior and community conduct. diff --git a/.github/ISSUE_TEMPLATE/discussion.yml b/.github/ISSUE_TEMPLATE/discussion.yml new file mode 100644 index 0000000..68c67b8 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/discussion.yml @@ -0,0 +1,35 @@ +name: 💬 Discussion +description: + Ask questions and discuss diverse ideas regarding the package. +assignees: + - paduszyk +body: + - type: markdown + attributes: + value: >- + Thank you for your interest in our project! ♥️ + Share your thoughts by filling in the form below. + - type: textarea + id: question-or-discussion-topic + attributes: + label: Question or discussion topic + description: | + Ask a question or present the topic you'd like to discuss. + validations: + required: true + - type: checkboxes + id: terms + attributes: + label: Terms + description: | + Before submitting the issue, confirm the following: + options: + - label: >- + I read and followed the project's + [Code of Conduct](https://github.com/paduszyk/python-gitmojis/blob/main/.github/CODE_OF_CONDUCT.md) and + [Contributing Guide](https://github.com/paduszyk/python-gitmojis/blob/main/.github/CONTRIBUTING.md). + required: true + - label: >- + This issue isn't a duplicate. + I checked that a similar discussion hadn't been started before. + required: true diff --git a/.github/ISSUE_TEMPLATE/feature-request.yml b/.github/ISSUE_TEMPLATE/feature-request.yml new file mode 100644 index 0000000..e56dc2f --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature-request.yml @@ -0,0 +1,56 @@ +name: ✨ Feature request +description: + Propose a new functionality or enhance the existing one. +labels: + - feature +assignees: + - paduszyk +body: + - type: markdown + attributes: + value: >- + Thank you for sharing your idea with us! ♥️ + Tell us more about it by filling in the form below. + - type: textarea + id: description + attributes: + label: Description + description: | + Describe the feature you would like you add or update. + validations: + required: true + - type: textarea + id: solution + attributes: + label: Suggested solution + description: | + If you know how to implement your idea, present it to us briefly. + validations: + required: true + - type: dropdown + id: pull-request + attributes: + label: Are you capable of creating a pull request to resolve this issue on your own? + description: | + Just let us know. If you agree, it doesn't mean you will have to. + options: + - "I'm not sure" + - "Yes" + - "No" + default: 0 + - type: checkboxes + id: terms + attributes: + label: Terms + description: | + Before submitting the issue, confirm the following: + options: + - label: >- + I read and followed the project's + [Code of Conduct](https://github.com/paduszyk/python-gitmojis/blob/main/.github/CODE_OF_CONDUCT.md) and + [Contributing Guide](https://github.com/paduszyk/python-gitmojis/blob/main/.github/CONTRIBUTING.md). + required: true + - label: >- + This issue isn't a duplicate. + I checked that the same or similar feature proposal hadn't been submitted before. + required: true