Skip to content

Commit 6048196

Browse files
authored
1 parent ae00b38 commit 6048196

38 files changed

Lines changed: 201 additions & 1155 deletions

.github/workflows/build-hardware-controller.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ jobs:
3939
- name: Set up Python
4040
uses: actions/setup-python@v5
4141
with:
42-
python-version: '3.10'
42+
python-version: '3.11'
4343
cache: 'poetry'
4444
cache-dependency-path: |
4545
device-backend/control/poetry.lock
@@ -48,7 +48,7 @@ jobs:
4848
working-directory: ./device-backend/control
4949
run: |
5050
sudo apt-get install -y libcap-dev
51-
poetry install --with dev --no-root
51+
poetry install --with dev
5252
5353
- name: Run checks
5454
working-directory: ./device-backend/control

.github/workflows/documentation-build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ jobs:
6060
6161
- name: Install build dependencies
6262
run: |
63-
poetry -C ./documentation/ install --no-root
63+
poetry -C ./documentation/ install
6464
6565
- name: Make documentation ${{ matrix.variant }}
6666
if: matrix.variant != 'default'

.github/workflows/documentation-deploy-beta.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@ on:
1010
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest
1111
# queued. But do not cancel in-progress runs - we want these deploymeents to complete.
1212
concurrency:
13-
group: "docs-beta-deploy"
13+
group: 'docs-beta-deploy'
1414
cancel-in-progress: false
1515

1616
env:
17-
DESTINATION_OWNER: ${{ github.repository_owner }}
17+
DESTINATION_OWNER: ${{ github.repository_owner }}
1818

1919
defaults:
2020
run:
@@ -50,7 +50,7 @@ jobs:
5050
- name: Install build dependencies
5151
run: |
5252
sudo apt install libjpeg-dev
53-
poetry -C ./documentation/ install --with imaging --no-root
53+
poetry -C ./documentation/ install --with imaging
5454
5555
- name: Set release channel
5656
working-directory: documentation

.github/workflows/documentation-deploy-edge.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ permissions:
2020
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest
2121
# queued. But do not cancel in-progress runs - we want these deploymeents to complete.
2222
concurrency:
23-
group: "docs-edge-deploy"
23+
group: 'docs-edge-deploy'
2424
cancel-in-progress: false
2525

2626
defaults:
@@ -55,7 +55,7 @@ jobs:
5555
- name: Install build dependencies
5656
run: |
5757
sudo apt install libjpeg-dev
58-
poetry -C ./documentation/ install --with imaging --no-root
58+
poetry -C ./documentation/ install --with imaging
5959
6060
- name: Set release channel
6161
working-directory: documentation

.github/workflows/documentation-deploy-stable.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@ on:
1010
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest
1111
# queued. But do not cancel in-progress runs - we want these deploymeents to complete.
1212
concurrency:
13-
group: "docs-stable-deploy"
13+
group: 'docs-stable-deploy'
1414
cancel-in-progress: false
1515

1616
env:
17-
DESTINATION_OWNER: ${{ github.repository_owner }}
17+
DESTINATION_OWNER: ${{ github.repository_owner }}
1818

1919
defaults:
2020
run:
@@ -51,7 +51,7 @@ jobs:
5151
working-directory: documentation
5252
run: |
5353
sudo apt install libjpeg-dev
54-
poetry install --with imaging --no-root
54+
poetry install --with imaging
5555
5656
- name: Build documentation
5757
env:

device-backend/control/.flake8

Lines changed: 0 additions & 30 deletions
This file was deleted.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.9.2
1+
3.11.2

device-backend/control/README.md

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Each feature of the hardware is controlled by a separate process. Processes comm
88

99
Please note the following particularity of Python processes
1010

11-
> Bear in mind that each spawned process is initialized with a copy of the memory footprint of the master process. And that the constructor code (i.e. stuff inside __init__()) is executed in the master process -- only code inside run() executes in separate processes.
11+
> Bear in mind that each spawned process is initialized with a copy of the memory footprint of the master process. And that the constructor code (i.e. stuff inside **init**()) is executed in the master process -- only code inside run() executes in separate processes.
1212
1313
https://stackoverflow.com/a/17220739
1414

@@ -23,17 +23,20 @@ Please note that for camera we rely on the Raspberry OS packages `python3-picame
2323
### Development
2424

2525
To install all dependencies including development tooling, run:
26-
```
27-
poetry install --with dev --no-root
26+
27+
```sh
28+
poetry install --with dev
2829
```
2930

3031
Then you can run the code auto-formatter on the project by running:
31-
```
32+
33+
```sh
3234
poetry run poe fmt
3335
```
3436

3537
And you can run all checks (including code formatting and linting) by running:
36-
```
38+
39+
```sh
3740
poetry run poe check
3841
```
3942

@@ -43,7 +46,7 @@ We recommand using [https://code.visualstudio.com/docs/remote/ssh](https://code.
4346

4447
To use this project, you'll need:
4548

46-
- Python >= 3.9
49+
- Python >= 3.11.2
4750
- Poetry 2.1.2
4851

4952
## Licensing

device-backend/control/adafruithat/main.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@
2323

2424
from loguru import logger # for logging with multiprocessing
2525

26-
from adafruithat.planktoscope import stepper, light, identity, display
26+
from adafruithat.planktoscope import stepper, light, identity
27+
from adafruit.planktoscope.display import Display
2728
from adafruithat.planktoscope.imager import mqtt as imager
2829

2930
logger.info("Starting the PlanktoScope hardware controller!")
@@ -40,9 +41,7 @@ def handler_stop_signals(signum, _):
4041

4142
def main():
4243
logger.info("Welcome!")
43-
logger.info(
44-
"Initialising signals handling and sanitizing the directories (step 1/4)"
45-
)
44+
logger.info("Initialising signals handling and sanitizing the directories (step 1/4)")
4645
signal.signal(signal.SIGINT, handler_stop_signals)
4746
signal.signal(signal.SIGTERM, handler_stop_signals)
4847

@@ -90,7 +89,7 @@ def main():
9089
imager_thread.start()
9190

9291
logger.info("Starting the display module (step 4/4)")
93-
display = display.Display()
92+
display = Display()
9493

9594
logger.success("Looks like the controller is set up and running, have fun!")
9695
light.ready()
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
# Copyright (C) 2021 Romain Bazile
2-
#
2+
#
33
# This file is part of the PlanktoScope software.
4-
#
4+
#
55
# PlanktoScope is free software: you can redistribute it and/or modify
66
# it under the terms of the GNU General Public License as published by
77
# the Free Software Foundation, either version 3 of the License, or
88
# (at your option) any later version.
9-
#
9+
#
1010
# PlanktoScope is distributed in the hope that it will be useful,
1111
# but WITHOUT ANY WARRANTY; without even the implied warranty of
1212
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1313
# GNU General Public License for more details.
14-
#
14+
#
1515
# You should have received a copy of the GNU General Public License
1616
# along with PlanktoScope. If not, see <http://www.gnu.org/licenses/>.
1717

0 commit comments

Comments
 (0)