Skip to content

Commit

Permalink
✨ initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
davnn committed Oct 4, 2023
0 parents commit 08375ca
Show file tree
Hide file tree
Showing 27 changed files with 4,864 additions and 0 deletions.
17 changes: 17 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Check http://editorconfig.org for more information
# This is the main config file for this project:
root = true

[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
indent_style = space
trim_trailing_whitespace = true
indent_size = 4

[*.md]
trim_trailing_whitespace = false

[*.{diff,patch}]
trim_trailing_whitespace = false
17 changes: 17 additions & 0 deletions .github/.stale.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Number of days of inactivity before an issue becomes stale
daysUntilStale: 60
# Number of days of inactivity before a stale issue is closed
daysUntilClose: 7
# Issues with these labels will never be considered stale
exemptLabels:
- pinned
- security
# Label to use when marking an issue as stale
staleLabel: wontfix
# Comment to post when marking an issue as stale. Set to `false` to disable
markComment: >
This issue has been automatically marked as stale because it has not had
recent activity. It will be closed if no further activity occurs. Thank you
for your contributions.
# Comment to post when closing a stale issue. Set to `false` to disable
closeComment: false
132 changes: 132 additions & 0 deletions .github/CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,132 @@
# 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, caste, color, 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 address,
without their explicit permission
* 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 at
[INSERT CONTACT METHOD].
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][homepage],
version 2.1, available at
[https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].

Community Impact Guidelines were inspired by
[Mozilla's code of conduct enforcement ladder][Mozilla CoC].

For answers to common questions about this code of conduct, see the FAQ at
[https://www.contributor-covenant.org/faq][FAQ]. Translations are available at
[https://www.contributor-covenant.org/translations][translations].

[homepage]: https://www.contributor-covenant.org
[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
[Mozilla CoC]: https://github.com/mozilla/diversity
[FAQ]: https://www.contributor-covenant.org/faq
[translations]: https://www.contributor-covenant.org/translations
52 changes: 52 additions & 0 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# Contributing to `safecheck`

Thanks for contributing! Before implementing features and changes, please submit an issue to discuss the proposed
changes.

## How to submit a pull request

1. [Fork this repository](https://github.com/davnn/safecheck/fork).
2. Clone the forked repository and add a new branch with the feature name.

Before submitting your code as a pull request please do the following steps:

1. Add any changes you want
2. Add tests for the new changes
3. Edit documentation if you have changed something significant
4. Run `task format` to format your changes.
5. Run `task lint` to ensure code style checks.
6. Run `task typing` to ensure type checks.
7. Run `task safety` to ensure safety checks.
8. Run `task test` to verify that all tests are passing.

Conveniently, you can run `task submit`, to combine all the mentioned commands. We use [gitmoji](https://gitmoji.dev/)
to categorize different kinds of commits.

## Contributing without `task`

We use [task](https://taskfile.dev/) to provide pre-configured CLI commands for the project, but `task` is
not required, you can also run the commands directly from the CLI. Have a look at `Taskfile.yml` for a reference of
commands.

## Set up a poetry environment

We use [micromamba](https://github.com/mamba-org/mamba) to set up a Python environment
for [poetry](https://python-poetry.org/). Make sure that ``micromamba`` is installed and available. Run
`task env-create` to create an empty Python 3.9 environment named `safecheck`. After you have successfully created the
conda environment activate it with `micromamba activate safecheck`. If `poetry` is not already installed, run
`task poetry-install`. Using the activated `safecheck` environment check if poetry is using the right environment with
`poetry env info`. Once the poetry setup is complete, you are ready to install the dependencies.

Note that Conda is not necessary, you can use a tool of your choice to manage your Python environment. One benefit of
using Conda is that we can override packages that are not easy to install with `pip`.

## Install dependencies

We use [`poetry`](https://github.com/python-poetry/poetry) to manage the dependencies. With an active poetry env,
run `task install` to install all dependencies into environment. After the dependencies are installed, run
`task pre-commit-install` to add the [pre-commit](https://pre-commit.com/) hooks.

## Other help

You can contribute by spreading a word about this library. It would also be a huge contribution to write a short article
on how you are using this project. You can also share your best practices with us.
45 changes: 45 additions & 0 deletions .github/ISSUE_TEMPLATE/bug.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: 🐛 Bug report
description: Report an issue
title: "🐛 <Please write a comprehensive title and keep the 🐛 prefix>"
labels: [ bug ]

body:
- type: markdown
attributes:
value: |
Thanks for taking the time to fill out this bug report!
- type: textarea
id: bug-description
attributes:
label: Describe the bug
description: A clear description the bug. If you want to contribute to fix this issue, tell us in the description.
placeholder: Description
validations:
required: true
- type: textarea
id: reproduction
attributes:
label: Reproduction
description: A [minimal reproduction](https://stackoverflow.com/help/minimal-reproducible-example) is **required**, otherwise the issue might be closed without further notice.
placeholder: Reproduction
validations:
required: true
- type: textarea
id: system-info
attributes:
label: System Info
description: Output of `task sysinfo`
render: Shell
placeholder: Paste the output of the following command
validations:
required: true
- type: checkboxes
id: validations
attributes:
label: Validations
description: Before submitting the issue, please make sure you do the following
options:
- label: Read the [Contributing Guide](https://github.com/davnn/safecheck/blob/main/.github/CONTRIBUTING.md).
required: true
- label: Check that there isn't already an issue that reports the same bug to avoid creating duplicates.
required: true
9 changes: 9 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Configuration: https://help.github.com/en/github/building-a-strong-community/configuring-issue-templates-for-your-repository
blank_issues_enabled: false
contact_links:
- name: ⁉ Questions and Discussions
url: https://github.com/davnn/safecheck/discussions
about: Please do not use issues for question and discussion.
- name: 😍 Contribution Guide
url: https://github.com/davnn/safecheck/blob/main/.github/CONTRIBUTING.md
about: Please read through before making a contribution.
27 changes: 27 additions & 0 deletions .github/ISSUE_TEMPLATE/documentation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: 📝 Documentation improvement
description: Something is erroneous, unclear or missing in the docs.
title: "📝 <Please write a comprehensive title and keep the 📝 prefix>"
labels: [ documentation ]

body:
- type: markdown
attributes:
value: |
Thanks for taking the time to help us improve the documentation!
- type: textarea
id: documentation-description
attributes:
label: Description
description: 'Explain how you would like to improve the docs here!'
validations:
required: true
- type: checkboxes
id: checkboxes
attributes:
label: Validations
description: Before submitting the issue, please make sure you do the following
options:
- label: Read the [Contributing Guide](https://github.com/davnn/safecheck/blob/main/.github/CONTRIBUTING.md).
required: true
- label: Check that there isn't already an issue requesting the same.
required: true
34 changes: 34 additions & 0 deletions .github/ISSUE_TEMPLATE/feature.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: 🚀 Feature proposal or enhancement
description: Propose a new feature or enhancement
title: "🚀 <Please write a comprehensive title and keep the 🚀 prefix>"
labels: [ feature ]

body:
- type: markdown
attributes:
value: |
Thanks for your interest in the project and taking the time to fill out this feature report!
- type: textarea
id: feature-description
attributes:
label: Description of the problem
description: 'As a user I want [goal] so that [benefit]. If you want to contribute with a PR, tell us in the description. Thanks!'
validations:
required: true
- type: textarea
id: suggested-solution
attributes:
label: Solution
description: 'We could provide following implementation...'
validations:
required: true
- type: checkboxes
id: checkboxes
attributes:
label: Validations
description: Before submitting the issue, please make sure you do the following
options:
- label: Read the [Contributing Guide](https://github.com/davnn/safecheck/blob/main/.github/CONTRIBUTING.md).
required: true
- label: Check that there isn't already an issue requesting the same feature.
required: true
24 changes: 24 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
## Description

<!-- Add a more detailed description of the changes if needed. -->

## Related Issue

<!-- If your PR refers to a related issue, link it here. -->

## Type of Change

<!-- Mark with an `x` all the checkboxes that apply (like `[x]`) -->

- [ ] 🔧 Bug fix
- [ ] 🔐 Security fix
- [ ] 🚀 Improvement / New feature
- [ ] 📚 Examples / Docs / Tutorials

## Checklist

<!-- Mark with an `x` all the checkboxes that apply (like `[x]`) -->

- [ ] I've read the [`CONTRIBUTING.md`](https://github.com/davnn/safecheck/blob/main/.github/CONTRIBUTING.md) guide.
- [ ] I've checked the code using `task submit`.
- [ ] I've written tests for all new methods and classes that I created.
28 changes: 28 additions & 0 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Release drafter configuration https://github.com/release-drafter/release-drafter#configuration
# Emojis were chosen to match the https://gitmoji.carloscuesta.me/

name-template: "v$NEXT_PATCH_VERSION"
tag-template: "v$NEXT_PATCH_VERSION"

categories:
- title: ":rocket: Features"
labels: [ feature, enhancement ]
- title: ":wrench: Fixes & Refactoring"
labels: [ bug, fix, refactoring ]
- title: ":package: Build System & CI/CD"
labels: [ build ]
- title: ":boom: Breaking Changes"
labels: [ breaking ]
- title: ":pencil: Documentation"
labels: [ documentation ]
- title: ":arrow_up: Dependencies updates"
labels: [ dependencies ]

template: |
## What’s Changed
$CHANGES
## :busts_in_silhouette: List of contributors
$CONTRIBUTORS
Loading

0 comments on commit 08375ca

Please sign in to comment.