Skip to content

Commit 1eb1736

Browse files
Updated CI versions (#38)
* Updated CI versions * Missing line return * Update for new version of linters and addition of RUFF * Switch back to versions * More linting clean up * On final fix
1 parent 2b52821 commit 1eb1736

File tree

13 files changed

+115
-54
lines changed

13 files changed

+115
-54
lines changed

.codespellrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
[codespell]
2-
skip = ./.git/*,Pipfile.lock
2+
skip = ./.git/*,uv.lock,.venv/*

.github/ISSUE_TEMPLATE/feature_request.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,8 @@
22
name: Feature request
33
about: Suggest an idea for this project
44
title: "[Feature]"
5-
labels: ''
6-
assignees: ''
7-
5+
labels: ""
6+
assignees: ""
87
---
98

109
**Is your feature request related to a problem? Please describe.**

.github/workflows/check-spelling.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,21 @@ on:
99
branches:
1010
- main
1111

12+
permissions:
13+
contents: read
14+
1215
jobs:
1316
build:
1417
name: Check Spelling
1518
runs-on: ubuntu-latest
1619

1720
steps:
1821
- name: Checkout Code
19-
uses: actions/checkout@v3
22+
uses: actions/checkout@v6
23+
with:
24+
persist-credentials: false
2025

2126
- name: Check Spelling
22-
uses: codespell-project/actions-codespell@master
27+
uses: codespell-project/actions-codespell@v2
2328
with:
2429
check_filenames: true

.github/workflows/linter.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,26 +9,33 @@ on:
99
branches:
1010
- main
1111

12+
permissions:
13+
contents: read
14+
statuses: write
15+
1216
jobs:
1317
build:
1418
name: Lint Code Base
1519
runs-on: ubuntu-latest
1620

1721
steps:
1822
- name: Checkout Code
19-
uses: actions/checkout@v2
23+
uses: actions/checkout@v6
2024
with:
2125
# Full git history is needed to get a proper
2226
# list of changed files within `super-linter`
2327
fetch-depth: 0
28+
persist-credentials: false
2429

2530
- name: Lint Code Base
26-
uses: docker://ghcr.io/github/super-linter:slim-v4
31+
uses: super-linter/super-linter/slim@v8.2.1
2732
env:
2833
LINTER_RULES_PATH: /
2934
VALIDATE_ALL_CODEBASE: true
3035
VALIDATE_JSCPD: false
3136
VALIDATE_GITLEAKS: false
37+
VALIDATE_GITHUB_ACTIONS_ZIZMOR: false
38+
VALIDATE_PYTHON_RUFF_FORMAT: false
3239
PYTHON_PYLINT_CONFIG_FILE: .pylintrc
3340
DEFAULT_BRANCH: main
3441
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/pytest.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ on:
66
branches:
77
- main
88

9+
permissions:
10+
contents: read
11+
912
jobs:
1013
build:
1114
runs-on: ubuntu-latest
@@ -14,13 +17,15 @@ jobs:
1417
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
1518

1619
steps:
17-
- uses: actions/checkout@v4
20+
- uses: actions/checkout@v6
21+
with:
22+
persist-credentials: false
1823
- name: Set up Python ${{ matrix.python-version }}
19-
uses: actions/setup-python@v4
24+
uses: actions/setup-python@v6
2025
with:
2126
python-version: ${{ matrix.python-version }}
2227
- name: Install uv
23-
uses: astral-sh/setup-uv@v3
28+
uses: astral-sh/setup-uv@v7
2429
- name: Install dependencies
2530
run: |
2631
uv venv

CODE_OF_CONDUCT.md

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
# Contributor Covenant Code of Conduct
32

43
## Our Pledge
@@ -18,23 +17,23 @@ diverse, inclusive, and healthy community.
1817
Examples of behavior that contributes to a positive environment for our
1918
community include:
2019

21-
* Demonstrating empathy and kindness toward other people
22-
* Being respectful of differing opinions, viewpoints, and experiences
23-
* Giving and gracefully accepting constructive feedback
24-
* Accepting responsibility and apologizing to those affected by our mistakes,
20+
- Demonstrating empathy and kindness toward other people
21+
- Being respectful of differing opinions, viewpoints, and experiences
22+
- Giving and gracefully accepting constructive feedback
23+
- Accepting responsibility and apologizing to those affected by our mistakes,
2524
and learning from the experience
26-
* Focusing on what is best not just for us as individuals, but for the
25+
- Focusing on what is best not just for us as individuals, but for the
2726
overall community
2827

2928
Examples of unacceptable behavior include:
3029

31-
* The use of sexualized language or imagery, and sexual attention or
30+
- The use of sexualized language or imagery, and sexual attention or
3231
advances of any kind
33-
* Trolling, insulting or derogatory comments, and personal or political attacks
34-
* Public or private harassment
35-
* Publishing others' private information, such as a physical or email
32+
- Trolling, insulting or derogatory comments, and personal or political attacks
33+
- Public or private harassment
34+
- Publishing others' private information, such as a physical or email
3635
address, without their explicit permission
37-
* Other conduct which could reasonably be considered inappropriate in a
36+
- Other conduct which could reasonably be considered inappropriate in a
3837
professional setting
3938

4039
## Enforcement Responsibilities
@@ -107,7 +106,7 @@ Violating these terms may lead to a permanent ban.
107106
### 4. Permanent Ban
108107

109108
**Community Impact**: Demonstrating a pattern of violation of community
110-
standards, including sustained inappropriate behavior, harassment of an
109+
standards, including sustained inappropriate behavior, harassment of an
111110
individual, or aggression toward or disparagement of classes of individuals.
112111

113112
**Consequence**: A permanent ban from any sort of public interaction within
@@ -127,4 +126,3 @@ enforcement ladder](https://github.com/mozilla/diversity).
127126
For answers to common questions about this code of conduct, see the FAQ at
128127
<https://www.contributor-covenant.org/faq>. Translations are available at
129128
<https://www.contributor-covenant.org/translations>.
130-

CONTRIBUTING.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,23 @@
11
# Contributing
2+
23
:wave: Hi there!
34
We're thrilled that you'd like to contribute to this project.
45
Your help is essential for making it great.
56

67
## Submitting a pull request
8+
79
[Pull Requests][pulls] are used for adding new code and documents to the repository, or editing the existing code or documentation.
810

911
**With write access**
12+
1013
1. Clone the repository (only if you have write access)
1114
1. Create a new branch: `git checkout -b my-branch-name`
1215
1. Make your change
1316
1. Push and [submit a pull request][pr]
1417
1. Pat yourself on the back and wait for your pull request to be reviewed and merged.
1518

1619
**Without write access**
20+
1721
1. [Fork][fork] and clone the repository
1822
1. Create a new branch: `git checkout -b my-branch-name`
1923
1. Make your change
@@ -31,12 +35,15 @@ Draft pull requests are also welcome to get feedback early on, or if there is so
3135
- Open a pull request
3236

3337
## Releasing
38+
3439
If you are the current maintainer of this code:
40+
3541
1. Update `README.md` to reflect new version number in the suggested workflow file section
3642
2. Draft [Release](https://help.github.com/en/github/administering-a-repository/managing-releases-in-a-repository) document explaining details of Release
3743
3. Look for approval from @prestoncarman or @KirtOnthank
3844

3945
## Resources
46+
4047
- [How to Contribute to Open Source](https://opensource.guide/how-to-contribute/)
4148
- [Using Pull Requests](https://help.github.com/articles/about-pull-requests/)
4249
- [GitHub Help](https://help.github.com)

README.md

Lines changed: 24 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
11
# Tank Controller in Python
22

33
<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
4+
45
[![All Contributors](https://img.shields.io/badge/all_contributors-9-orange.svg?style=flat-square)](#contributors-)
5-
<!-- ALL-CONTRIBUTORS-BADGE:END -->
66

7+
<!-- ALL-CONTRIBUTORS-BADGE:END -->
78

89
## Project Motivations
910

1011
Update the `TankController` code from C++ to Python and run on a Raspberry Pico.
1112

12-
1313
## Requirements
1414

1515
To set up and run this project, the system must meet the following requirements:
1616

1717
- **uv**: The python project package manager must be installed. Learn more at [https://docs.astral.sh/uv/](https://docs.astral.sh/uv/).
18-
Format contributions with `uv run black .`
18+
Format contributions with `uv run black .`
1919
- **tkinter**: The Python GUI to test locally. Often installed separately as `python3-tk`.
20-
Verify with `python -m tkinter`. A small GUI window should appear if Tkinter is installed correctly.
20+
Verify with `python -m tkinter`. A small GUI window should appear if Tkinter is installed correctly.
2121

2222
### Mac Requirements
2323

@@ -31,40 +31,39 @@ brew install python-tk@3.14
3131

3232
To run in a local environment with mocked devices (with the UI State Machine integrated)
3333

34-
``` sh
34+
```sh
3535
./run_gui.sh
3636
```
3737

3838
## Features
3939

40-
| View Commands | Set Commands |
41-
| ----------------------- | ------------------- |
42-
| View IP and MAC | pH calibration |
43-
| View free memory | Clear pH calibra |
44-
| View Google mins | Clear Temp calib |
45-
| View log file | Set chill/heat |
46-
| View pH slope | Set Google mins |
47-
| View PID | Set KD |
48-
| View tank ID | Set KI |
49-
| View temp cal | Set KP |
50-
| View time | Set pH target |
51-
| View version | Set pH w sine |
52-
| | Set Temp w sine |
53-
| | PID on/off |
54-
| | Set Tank ID |
55-
| | Temp calibration |
56-
| | Set temperature |
57-
| | Set date/time |
40+
| View Commands | Set Commands |
41+
| ---------------- | ---------------- |
42+
| View IP and MAC | pH calibration |
43+
| View free memory | Clear pH calibra |
44+
| View Google mins | Clear Temp calib |
45+
| View log file | Set chill/heat |
46+
| View pH slope | Set Google mins |
47+
| View PID | Set KD |
48+
| View tank ID | Set KI |
49+
| View temp cal | Set KP |
50+
| View time | Set pH target |
51+
| View version | Set pH w sine |
52+
| | Set Temp w sine |
53+
| | PID on/off |
54+
| | Set Tank ID |
55+
| | Temp calibration |
56+
| | Set temperature |
57+
| | Set date/time |
5858

5959
## Testing
6060

6161
To perform Pytest tests for the devices and UI states.
6262

63-
``` sh
63+
```sh
6464
./test.sh
6565
```
6666

67-
6867
## Contributors ✨
6968

7069
Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):

format.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ uv run black .
1212
uv run isort .
1313
uv run flake8 .
1414
uv run pylint main.py src/ tests/
15+
uv run ruff check --fix .
16+
uv run ruff format .
1517

1618
# Clean up
1719
find . -name ".pytest_cache" -type d -exec /bin/rm -rf {} +

pyproject.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,8 @@ dev = [
3434
"pytest",
3535
"pytest-cov",
3636
"pytest-mock",
37+
"ruff",
3738
]
39+
40+
[tool.ruff.lint]
41+
extend-select = ["B"]

0 commit comments

Comments
 (0)