-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* (chore): create configuration for pre-commit * (docs): create CONTRIBUTING.md, update README.md * (chore): update dev dependencies
- Loading branch information
1 parent
da4dbca
commit 345a78d
Showing
5 changed files
with
471 additions
and
82 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.4.0 | ||
hooks: | ||
- id: trailing-whitespace | ||
- id: end-of-file-fixer | ||
- id: check-yaml | ||
- id: check-added-large-files | ||
- repo: https://github.com/psf/black | ||
rev: 23.9.1 | ||
hooks: | ||
- id: black | ||
args: [--line-length=79, --check] | ||
- repo: https://github.com/PyCQA/flake8 | ||
rev: 4.0.1 | ||
hooks: | ||
- id: flake8 | ||
args: [--max-line-length=79, --max-doc-length=72] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
## Contributing | ||
|
||
Pull requests are always welcome. For major changes, please open an issue first | ||
to discuss what you would like to implement/change. | ||
|
||
### Set up the development environment | ||
|
||
1. _(Preferred)_ Install [poetry](https://python-poetry.org/docs/#installation). | ||
2. Install development dependencies: | ||
```bash | ||
$ poetry install --with dev | ||
``` | ||
|
||
### Running tests | ||
```bash | ||
$ poetry run pytest | ||
``` | ||
|
||
### Running pre-commit | ||
|
||
To install pre-commit hooks: | ||
|
||
```bash | ||
$ pre-commit install | ||
``` | ||
|
||
Then you can run it manually: | ||
|
||
```bash | ||
$ pre-commit | ||
``` | ||
|
||
### Linting and formatting | ||
|
||
Formatting your code with black: | ||
```bash | ||
$ black . --line-length 79 | ||
``` | ||
Linting with flake8: | ||
```bash | ||
$ poetry run flake8 . --max-doc-length 72 --show-source | ||
``` | ||
|
||
## Roadmap | ||
|
||
Here's a table which illustrates current progress of endpoints implementation: | ||
|
||
| Endpoint | Implementation | Tests | Documentation | | ||
|:---------------------------------------------------------------------------------------------------|:---------------|:------------|:--------------| | ||
| [Account](https://api.imgur.com/endpoints/account) | In progress | In progress | In progress | | ||
| [Album](https://api.imgur.com/endpoints/album) | Done ✓ | Not impl. | Not impl. | | ||
| [Comment](https://api.imgur.com/endpoints/comment) | Done ✓ | Done ✓ | In progress | | ||
| Feed | Not impl. | Not impl. | Not impl. | | ||
| [Gallery](https://api.imgur.com/endpoints/gallery) | Not impl. | Not impl. | Not impl. | | ||
| [Image](https://api.imgur.com/endpoints/image) | Done ✓ | Done ✓ | Done ✓ | | ||
| [Memegen](https://api.imgur.com/endpoints/memegen) | Not impl. | Not impl. | Not impl. | | ||
| [Notification](https://api.imgur.com/endpoints/notification) | Not impl. | Not impl. | Not impl. | | ||
|
||
Additionally, there are some preferable features that would be great to implement in the package: | ||
* Method for bulk uploading images (e.g. from directory). | ||
* Pagination with `__next__()` in some methods of `Account` endpoint. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.