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

chore: updates + formatting #298

Merged
merged 2 commits into from
Aug 12, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
29 changes: 23 additions & 6 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,11 @@ Please name your branch as follows:
### 3.3 Pull Requests

#### 3.3.1 Title

Your title should be short and concise. It should be in the format:
`<type>: <desc>`
where `<type>` is one of the following:

- `feat` (feature)
- `fix` (bug fix)
- `docs` (documentation)
Expand All @@ -45,35 +47,40 @@ where `<type>` is one of the following:
and `<desc>` is a short description of the changes made.

#### 3.3.2 Description

Your description is where you can go into more detail about your changes.
Please include _at least_ the following:

- What you changed
- Why you changed it

If your PR is related to an issue, please include the issue number in the description.
If it solves the issue, please include `Closes #<issue-number>` in the description. This will automatically close the issue when the PR is merged.

#### 3.3.3 Labels

Each PR MUST have at least one label. The following labels are available:

- `bugfix` (bug fix) => PR's with this label must have a corresponding issue
- `enhancement` (existing feature)
- `documentation` (documentation)
- `dependencies` (Updates a dependency)
- `feature` (new feature)
- `dependencies` (Updates a dependency)
- `feature` (new feature)
- `hotfix` (very small bugfix/typo fix)
- `refactor` (refactoring production code)

(PR's with no label will be rejected)

#### 3.3.4 Content

A PR may not contain code and commits not related to the issue it is solving or feature it is completing.
F.ex.
F.ex.

- a PR solving issue #1 may not contain code or commits related to issue #2.
- Do not include a commit that changes something in the docs when working on a discord command (unless the docs are related to the command)
- Do not refactor code in cog A when working on cog B
- ...


## 4. Code Guidelines

### 4.1 PEP8
Expand All @@ -84,15 +91,19 @@ Please follow the PEP8 style guide. To do so, please use the [black](https://pyp
### 4.2 Documentation

#### 4.2.1 Docstrings

Please include docstrings for all functions and classes. These do not have to be long,
but at least include the basic information (what the function does, what the parameters are, what the return value is, etc).

#### 4.2.2 Comments

Please include comments where necessary. This includes:

- Comments explaining complex code
- Comments explaining why you did something a certain way

#### 4.2.3 Type Hints

Please include type hints for all functions and classes.

### 4.3 Complexity
Expand All @@ -111,7 +122,6 @@ Please keep your imports as simple as possible. Avoid importing entire modules,
> [!WARNING]
> @sebastiaan-daniels must review external libraries for security vulnerabilities before they can be used.


## 5. Reviewing Guidelines

### 5.1 Code Reviews from contributors
Expand All @@ -122,14 +132,18 @@ However, requested changes or comments made by contributors do not have to be fo
### 5.2 Code Reviews from maintainers (Code Owners)

#### 5.2.1 General

Each PR, depending on its complexity, must be reviewed by at least n maintainers. (see 5.2.3 for the number of maintainers required for each type of PR)
No code may be merged without the approval of those code owners. All code owners must be requested to review the PR. (this should be done automatically by github)

#### 5.2.2 Code Owners

The project maintainers (owners), are the people listed under `.github/CODEOWNERS`.

#### 5.2.3 Reviewing

For each type of PR, the following amount of code owners must approve the PR before merging:

- `hotfix` => 1
- `documentation` => 1
- `dependencies` => 1 + @sebastiaan-daniels
Expand All @@ -139,20 +153,23 @@ For each type of PR, the following amount of code owners must approve the PR bef
- `feature` => 4

#### 5.2.4 Accepted code

If the required number of code owners have approved the PR, the PR may be merged by any code owner.

#### 5.2.5 Changes requested by a code owner

If any code owner requests changes, (regardless whether or not the required number of code owners have approved the PR), the PR may not be merged until those changes have been either made or discussed and agreed upon.

The code owner that requested changes must re-review the PR and approve it before it can be merged.

### 5.3 PR's from code owners

#### 5.3.1 General

If a code owner makes a PR, the same rules apply as for any other contributor. The PR must be reviewed by the required number of code owners, and may not be merged until the required number of code owners have approved the PR.

#### 5.3.2 Special cases

Since a user cannot review their own PR, there are some cases in which more code owners must review the PR than there are existing.
In these cases, if all code owners have approved the PR, the PR may be merged by any code owner.
I.e if a code owner creates a feature, only 3 code owners must add a review. (since there are only 4 owners.)
I.e if a code owner creates a feature, only 3 code owners must add a review. (since there are only 4 owners.)
28 changes: 19 additions & 9 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,15 @@
#
# pip-compile requirements.in
#
aiohttp==3.9.5
aiohappyeyeballs==2.3.5
# via aiohttp
aiohttp==3.10.2
# via
# -r requirements.in
# py-cord
aiosignal==1.3.1
# via aiohttp
attrs==23.2.0
attrs==24.2.0
# via
# aiohttp
# outcome
Expand All @@ -19,20 +21,26 @@ beautifulsoup4==4.12.3
# via
# -r requirements.in
# wikipedia
black==24.4.2
black==24.8.0
# via -r requirements.in
build==1.2.1
# via pip-tools
certifi==2024.7.4
# via
# requests
# selenium
cffi==1.17.0
# via trio
charset-normalizer==3.3.2
# via requests
click==8.1.7
# via
# black
# pip-tools
colorama==0.4.6
# via
# build
# click
deepl==1.18.0
# via -r requirements.in
file-read-backwards==3.1.0
Expand All @@ -43,7 +51,7 @@ frozenlist==1.4.1
# aiosignal
h11==0.14.0
# via wsproto
humanize==4.9.0
humanize==4.10.0
# via -r requirements.in
idna==3.7
# via
Expand Down Expand Up @@ -74,8 +82,10 @@ platformdirs==4.2.2
# via black
pubchempy==1.0.4
# via -r requirements.in
py-cord==2.5.0
py-cord==2.6.0
# via -r requirements.in
pycparser==2.22
# via cffi
pyproject-hooks==1.1.0
# via
# build
Expand All @@ -86,7 +96,7 @@ python-dotenv==1.0.1
# via -r requirements.in
python-levenshtein==0.25.1
# via -r requirements.in
rapidfuzz==3.9.3
rapidfuzz==3.9.6
# via
# levenshtein
# thefuzz
Expand All @@ -95,7 +105,7 @@ requests==2.32.3
# deepl
# undetected-chromedriver
# wikipedia
selenium==4.22.0
selenium==4.23.1
# via
# -r requirements.in
# undetected-chromedriver
Expand All @@ -107,7 +117,7 @@ soupsieve==2.5
# via beautifulsoup4
thefuzz==0.22.1
# via -r requirements.in
trio==0.25.1
trio==0.26.2
# via
# selenium
# trio-websocket
Expand All @@ -125,7 +135,7 @@ websocket-client==1.8.0
# via selenium
websockets==12.0
# via undetected-chromedriver
wheel==0.43.0
wheel==0.44.0
# via pip-tools
wikipedia==1.4.0
# via -r requirements.in
Expand Down