Skip to content

Commit d63b262

Browse files
authored
Reorganize paths (#639)
`PlanktoScope/PlanktoScope` is a monorepo Let's keep components at the root and reduce tree depth. * remove `/software/eepromutils` (unused) * move `/software/distro/setup` to `/os` * move `/software/CHANGELOG.md` to `/CHANGELOG.md` * move `/device-backend/processing` to `/processing` * move `/device-backend/control` to `/controller` * only build OS if `/os` changed * move `/device-backend/default-configs/*` to `/default-configs` * move `/node-red/default-configs/*` to `/default-configs` * remove `/device-backend` * rename segmener docker image * rename `planktoscope-org.device-backend.controller.service` to `planktoscope-org.controller.service`
1 parent eab6f75 commit d63b262

File tree

164 files changed

+66
-5448
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

164 files changed

+66
-5448
lines changed

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

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,23 +10,19 @@ on:
1010
tags:
1111
- 'v*'
1212
paths:
13-
- 'device-backend/control/**'
14-
- '.github/workflows/control-*.yml'
13+
- 'controler/**'
14+
- '.github/workflows/build-controller.yml'
1515
pull_request:
1616
paths:
17-
- 'device-backend/control/**'
18-
- '.github/workflows/control-*.yml'
17+
- 'controler/**'
18+
- '.github/workflows/build-controller.yml'
1919
merge_group:
2020
workflow_dispatch:
2121
inputs:
2222
git-ref:
2323
description: 'Git ref (optional)'
2424
required: false
2525

26-
env:
27-
IMAGE_REGISTRY: ghcr.io/${{ github.repository_owner }}
28-
IMAGE_NAME: device-backend-control
29-
3026
jobs:
3127
ci-checks:
3228
runs-on: ubuntu-24.04-arm
@@ -42,14 +38,14 @@ jobs:
4238
python-version: '3.11'
4339
cache: 'poetry'
4440
cache-dependency-path: |
45-
device-backend/control/poetry.lock
41+
controller/poetry.lock
4642
4743
- name: Install build dependencies
48-
working-directory: ./device-backend/control
44+
working-directory: ./controller
4945
run: |
5046
sudo apt-get install -y libcap-dev
5147
poetry install --with dev
5248
5349
- name: Run checks
54-
working-directory: ./device-backend/control
50+
working-directory: ./controller
5551
run: poetry run poe check

.github/workflows/build-os-bookworm.yml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,13 @@ on:
99
tags:
1010
- 'software/v*'
1111
paths:
12-
- 'software/**'
13-
- 'device-backend/**'
14-
- 'node-red/**'
15-
- '!software/CHANGELOG.md'
12+
- 'os/**'
13+
- '!CHANGELOG.md'
1614
- '.github/workflows/build-os*.yml'
1715
pull_request:
1816
paths:
19-
- 'software/**'
20-
- '!software/CHANGELOG.md'
17+
- 'os/**'
18+
- '!CHANGELOG.md'
2119
- '.github/workflows/build-os*.yml'
2220
merge_group:
2321
workflow_dispatch:

.github/workflows/build-os.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ jobs:
151151
152152
set -x
153153
ACTUAL_SHA="$(printf "%.7s" "${{ env.ACTUAL_SHA }}")"
154-
/run/os-setup/software/distro/setup/ci-record-version.sh \
154+
/run/os-setup/os/ci-record-version.sh \
155155
"github.com/${{ env.REPO }}" "$ACTUAL_SHA" "hash" \
156156
"${{ inputs.variant }}" "/run/os-setup"
157157
echo "installer-config.yml:"
@@ -175,12 +175,12 @@ jobs:
175175
- name: Set up container image pre-caching
176176
id: setup-precaching
177177
run: |
178-
forklift_setup_root="./software/distro/setup/base-os/forklift"
178+
forklift_setup_root="./os/base-os/forklift"
179179
"$forklift_setup_root/download-forklift.sh" "/usr/bin"
180180
181-
pallet="$(cat software/distro/setup/base-os/forklift/forklift-pallet)"
181+
pallet="$(cat os/base-os/forklift/forklift-pallet)"
182182
echo "pallet=$pallet" >> $GITHUB_OUTPUT
183-
pallet_version="$(cat software/distro/setup/base-os/forklift/forklift-pallet-version)"
183+
pallet_version="$(cat os/base-os/forklift/forklift-pallet-version)"
184184
echo "pallet_version=$pallet_version" >> $GITHUB_OUTPUT
185185
echo "Pallet query: ${pallet}@${pallet_version}"
186186
@@ -211,7 +211,7 @@ jobs:
211211
exit 0
212212
fi
213213
forklift plt ls-img > "$PRECACHE_PATH/images-list"
214-
forklift_setup_root="./software/distro/setup/base-os/forklift"
214+
forklift_setup_root="./os/base-os/forklift"
215215
216216
echo "Downloading temporary tools to pre-download container images..."
217217
tmp_bin="$(mktemp -d --tmpdir=/tmp bin.XXXXXXX)"
@@ -276,7 +276,7 @@ jobs:
276276
run: |
277277
echo "Running setup scripts..."
278278
export DEBIAN_FRONTEND=noninteractive
279-
/run/os-setup/software/distro/setup/setup.sh ${{ inputs.variant }}
279+
/run/os-setup/os/setup.sh ${{ inputs.variant }}
280280
echo "Done!"
281281
282282
- name: Prepare for a headless first boot on bare metal

.github/workflows/build-segmenter.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@ on:
1010
tags:
1111
- 'segmenter/v*'
1212
paths:
13-
- 'device-backend/processing/segmenter/**'
13+
- 'segmenter/**'
1414
- '.github/workflows/build-segmenter.yml'
1515
pull_request:
1616
paths:
17-
- 'device-backend/processing/segmenter/**'
17+
- 'segmenter/**'
1818
- '.github/workflows/build-segmenter.yml'
1919
merge_group:
2020
workflow_dispatch:
@@ -25,7 +25,7 @@ on:
2525

2626
env:
2727
IMAGE_REGISTRY: ghcr.io/${{ github.repository_owner }}
28-
IMAGE_NAME: 'device-backend-processing-segmenter'
28+
IMAGE_NAME: 'segmenter'
2929
MAIN_BRANCH: 'master' # pushing to this branch will update the "edge" tag on the image
3030
BETA_BRANCH: 'software/beta' # pushing to this branch will update the "beta" tag on the image
3131
STABLE_BRANCH: 'software/stable' # pushing to this branch will update the "stable" tag on the image
@@ -81,12 +81,12 @@ jobs:
8181
id: build
8282
uses: docker/build-push-action@v6
8383
with:
84-
context: ./device-backend/processing/segmenter
84+
context: ./segmenter
8585
pull: true
8686
platforms: ${{ matrix.docker-platform }}
8787
labels: ${{ steps.meta.outputs.labels }}
88-
cache-from: type=gha,scope=processing-segmenter-build-${{ matrix.docker-platform }}
89-
cache-to: type=gha,mode=max,scope=processing-segmenter-build-${{ matrix.docker-platform }}
88+
cache-from: type=gha,scope=segmenter-build-${{ matrix.docker-platform }}
89+
cache-to: type=gha,mode=max,scope=segmenter-build-${{ matrix.docker-platform }}
9090
outputs: type=image,name=${{ steps.image_registry_case.outputs.lowercase }},push-by-digest=true,name-canonical=true,push=${{ env.PUSH_IMAGE }}
9191

9292
- name: Export digest

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77
paths:
88
- 'documentation/**'
99
- 'hardware/**'
10-
- 'software/CHANGELOG.md'
10+
- 'CHANGELOG.md'
1111
- '.github/workflows/documentation-deploy-edge.yml'
1212
workflow_dispatch:
1313

README.md

Lines changed: 2 additions & 1 deletion
Lines changed: 2 additions & 2 deletions
File renamed without changes.

0 commit comments

Comments
 (0)