Skip to content

Commit

Permalink
Merge pull request #2656 from bramstroker/feat/tests
Browse files Browse the repository at this point in the history
Measure tool tests
  • Loading branch information
bramstroker authored Nov 30, 2024
2 parents e235d28 + 8dacba3 commit 740ccf0
Show file tree
Hide file tree
Showing 77 changed files with 1,017 additions and 526 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/test-measure.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Test measure util

on:
workflow_dispatch:
push:
paths:
- 'utils/measure/**'
pull_request:
paths:
- 'utils/measure/**'

jobs:
tests:
runs-on: "ubuntu-latest"
name: Run tests
steps:
- name: Check out code
uses: actions/checkout@v4
- uses: ./.github/workflows/poetry-composite-action
with:
directory: './utils/measure'
- name: Run tests
run: |
cd ./utils/measure && poetry run pytest \
-qq \
--durations=10 \
-o console_output_style=count \
-p no:sugar \
tests
2 changes: 0 additions & 2 deletions utils/measure/.gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
.env
export/
measure
light_controller/.python_hue
measure.log
.persistent
!/**/.gitkeep
2 changes: 1 addition & 1 deletion utils/measure/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ WORKDIR /app
COPY --from=builder ${VIRTUAL_ENV} ${VIRTUAL_ENV}
COPY . .

ENTRYPOINT ["python", "measure.py"]
ENTRYPOINT ["python", "-m", "measure.measure"]
2 changes: 1 addition & 1 deletion utils/measure/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ poetry install
#### Start measurements

```
poetry run python measure.py
poetry run python -m measure.measure
```

The script will ask you a few questions, than proceed taking measurements.
Expand Down
122 changes: 0 additions & 122 deletions utils/measure/config.py

This file was deleted.

6 changes: 0 additions & 6 deletions utils/measure/const.py

This file was deleted.

34 changes: 0 additions & 34 deletions utils/measure/controller/charging/factory.py

This file was deleted.

40 changes: 0 additions & 40 deletions utils/measure/controller/light/factory.py

This file was deleted.

5 changes: 0 additions & 5 deletions utils/measure/controller/media/errors.py

This file was deleted.

34 changes: 0 additions & 34 deletions utils/measure/controller/media/factory.py

This file was deleted.

1 change: 1 addition & 0 deletions utils/measure/measure/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
light_controller/.python_hue
File renamed without changes.
Loading

0 comments on commit 740ccf0

Please sign in to comment.