Skip to content

Commit

Permalink
Update python for tests/pages and add poetry lockfile
Browse files Browse the repository at this point in the history
  • Loading branch information
jameshilliard committed Nov 26, 2024
1 parent 93be755 commit e27d034
Show file tree
Hide file tree
Showing 9 changed files with 2,522 additions and 56 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
- name: Install Python
uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0
with:
python-version: 3.12
python-version: 3.13

- name: Install Poetry
run: pip install poetry
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pr-run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0
with:
python-version: "3.12"
python-version: "3.13"
cache: pip
- name: Install poetry
uses: abatilo/actions-poetry@e78f54a89cb052fff327414dd9ff010b5d2b4dbd # v3.0.1
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -165,4 +165,3 @@ cython_debug/
# application files
/artifacts
/db.sqlite3*
/poetry.lock
9 changes: 8 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
ci:
skip:
- poetry-lock
- pytest
repos:
- repo: https://github.com/python-poetry/poetry
rev: 1.8.4
hooks:
- id: poetry-check
- id: poetry-lock
- id: poetry-install
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
Expand Down Expand Up @@ -49,7 +56,7 @@ repos:
- id: biome-check
additional_dependencies: ["@biomejs/biome@1.8.3"]
- repo: https://github.com/rbubley/mirrors-prettier
rev: "v3.3.3"
rev: "v3.4.0"
hooks:
- id: prettier
files: \.(html|md|yml|yaml)$
Expand Down
50 changes: 25 additions & 25 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,21 +33,21 @@ A simplistic, opinionated remote update server implementing hawkBit™'s [DDI AP

Before running gooseBit for the first time, update the default credentials in `settings.yaml`. The default login for testing purposes is:

- **Username:** `admin@goosebit.local`
- **Password:** `admin`
- **Username:** `admin@goosebit.local`
- **Password:** `admin`

## Assumptions

- Devices use [SWUpdate](https://swupdate.org) for managing software updates.
- Devices use [SWUpdate](https://swupdate.org) for managing software updates.

## Features

### Device Registry

When a device connects to gooseBit for the first time, it is automatically added to the device registry. The server will then request the device's configuration data, including:
- `hw_model` and `hw_revision`: Used to match compatible software.
- `sw_version`: Indicates the currently installed software version.
- `hw_model` and `hw_revision`: Used to match compatible software.
- `sw_version`: Indicates the currently installed software version.
The registry tracks each device's status, including the last online timestamp, installed software version, update state, and more.

Expand Down Expand Up @@ -105,14 +105,14 @@ poetry run generate-sample-data

Code is formatted using different tools

- black and isort for `*.py`
- biomejs for `*.js`, `*.json`
- prettier for `*.html`, `*.md`, `*.yml`, `*.yaml`
- black and isort for `*.py`
- biomejs for `*.js`, `*.json`
- prettier for `*.html`, `*.md`, `*.yml`, `*.yaml`

Code is linted using different tools as well

- flake8 for `*.py`
- biomejs for `*.js`
- flake8 for `*.py`
- biomejs for `*.js`

Best to have pre-commit install git hooks that run all those tools before a commit:

Expand All @@ -138,18 +138,18 @@ poetry run pytest

The structure of gooseBit is as follows:

- `api`: Files for the API.
- `ui`: Files for the UI.
- `bff`: Backend for frontend API.
- `static`: Static files.
- `templates`: Jinja2 formatted templates.
- `nav`: Navbar handler.
- `updater`: DDI API handler and device update manager.
- `updates`: SWUpdate file parsing.
- `auth`: Authentication functions and permission handling.
- `models`: Database models.
- `db`: Database config and initialization.
- `schema`: Pydantic models used for API type hinting.
- `settings`: Settings loader and handler.
- `telemetry`: Telemetry data handlers.
- `routes`: Routes for a giving endpoint, including the router.
- `api`: Files for the API.
- `ui`: Files for the UI.
- `bff`: Backend for frontend API.
- `static`: Static files.
- `templates`: Jinja2 formatted templates.
- `nav`: Navbar handler.
- `updater`: DDI API handler and device update manager.
- `updates`: SWUpdate file parsing.
- `auth`: Authentication functions and permission handling.
- `models`: Database models.
- `db`: Database config and initialization.
- `schema`: Pydantic models used for API type hinting.
- `settings`: Settings loader and handler.
- `telemetry`: Telemetry data handlers.
- `routes`: Routes for a giving endpoint, including the router.
44 changes: 22 additions & 22 deletions docs/development.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,16 @@ poetry install --all-extras

Code is formatted using different tools

- black and isort for `*.py`
- biomejs for `*.js`, `*.json`
- prettier for `*.html`, `*.md`, `*.yml`, `*.yaml`
- djlint for `*.html.jinja`
- black and isort for `*.py`
- biomejs for `*.js`, `*.json`
- prettier for `*.html`, `*.md`, `*.yml`, `*.yaml`
- djlint for `*.html.jinja`

Code is linted using different tools as well

- flake8 for `*.py`
- biomejs for `*.js`
- djlint for `*.html.jinja`
- flake8 for `*.py`
- biomejs for `*.js`
- djlint for `*.html.jinja`

Best to have pre-commit install git hooks that run all those tools before a commit:

Expand All @@ -63,18 +63,18 @@ poetry run pytest

The structure of gooseBit is as follows:

- `api`: Files for the API.
- `ui`: Files for the UI.
- `bff`: Backend for frontend API.
- `static`: Static files.
- `templates`: Jinja2 formatted templates.
- `nav`: Navbar handler.
- `updater`: DDI API handler and device update manager.
- `updates`: SWUpdate file parsing.
- `auth`: Authentication functions and permission handling.
- `models`: Database models.
- `db`: Database config and initialization.
- `schema`: Pydantic models used for API type hinting.
- `settings`: Settings loader and handler.
- `telemetry`: Telemetry data handlers.
- `routes`: Routes for a giving endpoint, including the router.
- `api`: Files for the API.
- `ui`: Files for the UI.
- `bff`: Backend for frontend API.
- `static`: Static files.
- `templates`: Jinja2 formatted templates.
- `nav`: Navbar handler.
- `updater`: DDI API handler and device update manager.
- `updates`: SWUpdate file parsing.
- `auth`: Authentication functions and permission handling.
- `models`: Database models.
- `db`: Database config and initialization.
- `schema`: Pydantic models used for API type hinting.
- `settings`: Settings loader and handler.
- `telemetry`: Telemetry data handlers.
- `routes`: Routes for a giving endpoint, including the router.
6 changes: 3 additions & 3 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,16 @@ designed to make remote updates of embedded devices easier.

## Assumptions

- Devices use [SWUpdate](https://swupdate.org) for managing software updates.
- Devices use [SWUpdate](https://swupdate.org) for managing software updates.

## Features

### Device Registry

When a device connects to gooseBit for the first time, it is automatically added to the device registry. The server will then request the device's configuration data, including:

- `hw_model` and `hw_revision`: Used to match compatible software.
- `sw_version`: Indicates the currently installed software version.
- `hw_model` and `hw_revision`: Used to match compatible software.
- `sw_version`: Indicates the currently installed software version.

The registry tracks each device's status, including the last online timestamp, installed software version, update state, and more.

Expand Down
4 changes: 2 additions & 2 deletions docs/quick_start.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@ python main.py

Before running gooseBit for the first time, update the default credentials in `settings.yaml`. The default login for testing purposes is:

- **Username:** `admin@goosebit.local`
- **Password:** `admin`
- **Username:** `admin@goosebit.local`
- **Password:** `admin`
Loading

0 comments on commit e27d034

Please sign in to comment.