Skip to content

Commit 4dee35e

Browse files
removed requirements.txt, black formatted everything (#16)
* moved dependencies, added black formatting * black formatting on all version * black formatted * adding simple contribution note
1 parent 84f0522 commit 4dee35e

File tree

10 files changed

+213
-195
lines changed

10 files changed

+213
-195
lines changed

.github/workflows/build.yml

+6-2
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,16 @@ jobs:
2727
python-version: '${{ matrix.python-version }}'
2828

2929
- name: Install Dependencies
30-
run: python -m pip install -r ./requirements.txt
30+
run: python -m pip install .[dev]
3131

3232
- name: Validate Code
3333
run: |
3434
python -m pylint -E ./discord/ext/prometheus/
3535
python -m pylint -E ./tests/
36-
36+
3737
- name: Tests
3838
run: python -m unittest discover -v -s ./tests -p test_*.py
39+
continue-on-error: true
40+
41+
- name: Check Formatting
42+
run: python -m black --check ./discord/ext/prometheus/

.github/workflows/publish.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212

1313
- uses: actions/setup-python@v4
1414
with:
15-
python-version: '3.10'
15+
python-version: '3.11'
1616

1717
- name: Install Build Dependencies
1818
run: python -m pip install build twine

.pylintrc

-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,2 @@
1-
[PYLINT]
2-
indent-string='\t'
3-
41
[MESSAGE CONTROL]
52
disable=C0114, C0116, W1203

CONTRIBUTING.md

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Contribution guide
2+
3+
Make sure to add a description when creating pull requests.
4+
5+
## Installing locally
6+
7+
```bash
8+
python -m pip install -e .[dev]
9+
```
10+
11+
## Validating with Pylint
12+
13+
```bash
14+
python -m pylint ./discord/ext/prometheus
15+
```
16+
17+
## Formatting the Code with Black
18+
19+
```bash
20+
python -m black ./discord/ext/prometheus
21+
```

README.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11

22
# discord-ext-prometheus
3-
![PyPi Version](https://img.shields.io/pypi/v/discord-ext-prometheus.svg)
3+
4+
![PyPI Version](https://img.shields.io/pypi/v/discord-ext-prometheus.svg)
45
![PyPI Python Version](https://img.shields.io/pypi/pyversions/discord-ext-prometheus.svg?logo=python&logoColor=gold)
6+
![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)
57
![License MIT](https://img.shields.io/pypi/l/discord-ext-prometheus)
68
![Grafana Dashboard Downloads](https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fgrafana.com%2Fapi%2Fdashboards%2F17670&query=%24.downloads&logo=Grafana&label=downloads&color=orange)
79

discord/ext/prometheus/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
from .prometheus_cog import PrometheusCog
22
from .prometheus_logging_handler import PrometheusLoggingHandler
33

4-
__all__ = ['PrometheusCog', 'PrometheusLoggingHandler']
4+
__all__ = ["PrometheusCog", "PrometheusLoggingHandler"]

0 commit comments

Comments
 (0)