Skip to content

Commit

Permalink
add pre-commit install
Browse files Browse the repository at this point in the history
  • Loading branch information
felipengeletrica committed May 9, 2024
1 parent 45ffbdf commit 1c6527e
Show file tree
Hide file tree
Showing 3 changed files with 56 additions and 3 deletions.
32 changes: 32 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
repos:
- repo: https://github.com/pre-commit/mirrors-flake8
rev: v4.0.1
hooks:
- id: flake8
additional_dependencies: [flake8==4.0.1]

- repo: https://github.com/psf/black
rev: 22.1.0
hooks:
- id: black
additional_dependencies: [black==22.1.0]

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.910
hooks:
- id: mypy
additional_dependencies: [mypy==0.910]

- repo: https://github.com/PyCQA/pydocstyle
rev: 8.1.1
hooks:
- id: pydocstyle
additional_dependencies: [pydocstyle==8.1.1]

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.0.1
hooks:
- id: check-yaml
- id: check-json
- id: check-xml
- id: check-markdown
26 changes: 23 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,7 @@ To install the app as a service, just run:
```bash
cd services && sudo ./install.sh
```

## ⚙️ Configuring

***
To find the tty port associated with your microcontroller using the `ls /dev/serial/by-path` command, follow these steps:

1. Connect your microcontroller to the computer via the serial port;
Expand Down Expand Up @@ -123,6 +121,28 @@ Example two serial ports:
> Note: The capacity of the data logger depends only on the CPU and disk IO speeds!
##

## 👷 Development

Install pre-commit for automatic code verifications

```bash
pip install pre-commit
```

```bash
pre-commit --version
```

Install the git hook scripts

```bash
pre-commit install
```


***
## 🧪 Testing

If you're looking to run a program to send data via serial to your microcontroller, check out the [`example/arduino`](example/arduino) directory in this repository. You'll find a simple **PlatformIO** project that provides tests for sending data over serial communication with an Arduino microcontroller. Simply navigate to the [`example/arduino`](example/arduino) directory in this repository and run the project with **PlatformIO** to get started.
Expand Down
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,5 @@ pygobject
dbus-python
bleak
paho-mqtt==1.6.1
pre-commit==3.7.0

0 comments on commit 1c6527e

Please sign in to comment.