firmware-lifter 0.1.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- firmware_lifter-0.1.1/.bumpversion.toml +15 -0
- firmware_lifter-0.1.1/.gitignore +15 -0
- firmware_lifter-0.1.1/.gitlab-ci.yml +26 -0
- firmware_lifter-0.1.1/AGENTS.md +47 -0
- firmware_lifter-0.1.1/CHANGELOG.md +13 -0
- firmware_lifter-0.1.1/CONTRIBUTING.md +22 -0
- firmware_lifter-0.1.1/LICENSE +674 -0
- firmware_lifter-0.1.1/PKG-INFO +65 -0
- firmware_lifter-0.1.1/README.md +49 -0
- firmware_lifter-0.1.1/VERSION +1 -0
- firmware_lifter-0.1.1/examples/.firmware-lifter-profiles.yaml +11 -0
- firmware_lifter-0.1.1/examples/README.md +14 -0
- firmware_lifter-0.1.1/examples/custom/.firmware-lifter-transport.yaml +7 -0
- firmware_lifter-0.1.1/examples/gdb/.firmware-lifter-transport.yaml +5 -0
- firmware_lifter-0.1.1/examples/openocd/.firmware-lifter-transport.yaml +7 -0
- firmware_lifter-0.1.1/examples/stm32flash/.firmware-lifter-transport.yaml +6 -0
- firmware_lifter-0.1.1/firmware_lifter/__init__.py +1 -0
- firmware_lifter-0.1.1/firmware_lifter/__main__.py +5 -0
- firmware_lifter-0.1.1/firmware_lifter/cli.py +56 -0
- firmware_lifter-0.1.1/firmware_lifter/config.py +143 -0
- firmware_lifter-0.1.1/firmware_lifter/transports.py +159 -0
- firmware_lifter-0.1.1/justfile +31 -0
- firmware_lifter-0.1.1/pyproject.toml +75 -0
- firmware_lifter-0.1.1/tests/__init__.py +0 -0
- firmware_lifter-0.1.1/tests/test_cli.py +62 -0
- firmware_lifter-0.1.1/tests/test_config.py +123 -0
- firmware_lifter-0.1.1/tests/test_transports.py +117 -0
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
[tool.bumpversion]
|
|
2
|
+
current_version = "0.1.1"
|
|
3
|
+
commit = true
|
|
4
|
+
tag = true
|
|
5
|
+
|
|
6
|
+
[[tool.bumpversion.files]]
|
|
7
|
+
filename = "VERSION"
|
|
8
|
+
|
|
9
|
+
[[tool.bumpversion.files]]
|
|
10
|
+
filename = "pyproject.toml"
|
|
11
|
+
|
|
12
|
+
[[tool.bumpversion.files]]
|
|
13
|
+
filename = "firmware_lifter/__init__.py"
|
|
14
|
+
search = 'VERSION = "{current_version}"'
|
|
15
|
+
replace = 'VERSION = "{new_version}"'
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
default:
|
|
2
|
+
image: debian:trixie-slim
|
|
3
|
+
|
|
4
|
+
before_script:
|
|
5
|
+
- apt-get update --yes
|
|
6
|
+
- apt-get install --yes just pipx
|
|
7
|
+
- PIPX_BIN_DIR=/usr/local/bin PIPX_HOME=/opt/pipx pipx install hatch
|
|
8
|
+
|
|
9
|
+
stages:
|
|
10
|
+
- build
|
|
11
|
+
- test
|
|
12
|
+
|
|
13
|
+
build:
|
|
14
|
+
stage: build
|
|
15
|
+
script:
|
|
16
|
+
- hatch build
|
|
17
|
+
|
|
18
|
+
test:pytest:
|
|
19
|
+
stage: test
|
|
20
|
+
script:
|
|
21
|
+
- hatch test
|
|
22
|
+
|
|
23
|
+
lint:
|
|
24
|
+
stage: test
|
|
25
|
+
script:
|
|
26
|
+
- just lint
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# AGENTS.md
|
|
2
|
+
|
|
3
|
+
## Project
|
|
4
|
+
`firmware-lifter` is a small CLI for project-local firmware transfer operations.
|
|
5
|
+
|
|
6
|
+
## Working Rules
|
|
7
|
+
- Keep changes minimal and focused.
|
|
8
|
+
- Prefer `apply_patch` for edits.
|
|
9
|
+
- Do not use destructive git commands.
|
|
10
|
+
- Preserve existing repo conventions unless a change is required.
|
|
11
|
+
- Keep ASCII unless the file already uses Unicode.
|
|
12
|
+
|
|
13
|
+
## Architecture Notes
|
|
14
|
+
- YAML config is split into:
|
|
15
|
+
- `.firmware-lifter-profiles.yaml` for project-shared profile data
|
|
16
|
+
- `.firmware-lifter-transport.yaml` for local transport data
|
|
17
|
+
- YAML parsing uses `ruamel.yaml`.
|
|
18
|
+
- Validation uses strict `pydantic v2` models.
|
|
19
|
+
- One local transport applies to all profiles.
|
|
20
|
+
- Supported transports:
|
|
21
|
+
- `gdb`
|
|
22
|
+
- `openocd`
|
|
23
|
+
- `stm32flash`
|
|
24
|
+
- `custom`
|
|
25
|
+
|
|
26
|
+
## Execution Behavior
|
|
27
|
+
- `pre_transfer` runs before transport execution.
|
|
28
|
+
- Execution failures should not show Python tracebacks.
|
|
29
|
+
- Backend stderr must remain visible.
|
|
30
|
+
- Distinguish `pre_transfer` failures from transfer failures in CLI output.
|
|
31
|
+
|
|
32
|
+
## Examples
|
|
33
|
+
- Example configs live in `examples/`.
|
|
34
|
+
- The shared profile example file is `examples/.firmware-lifter-profiles.yaml`.
|
|
35
|
+
- Transport-specific examples live in transport subdirectories.
|
|
36
|
+
|
|
37
|
+
## Testing
|
|
38
|
+
- Prefer updating existing tests in place.
|
|
39
|
+
- Run tests with `hatch test` when available.
|
|
40
|
+
- If hatch is unavailable, use the local venv pytest path when present.
|
|
41
|
+
- A quick syntax check can be done with:
|
|
42
|
+
- `python3 -m compileall firmware_lifter tests`
|
|
43
|
+
|
|
44
|
+
## Code Quality
|
|
45
|
+
- Keep command construction explicit and readable.
|
|
46
|
+
- Validate config early and fail with clear messages.
|
|
47
|
+
- Avoid adding compatibility layers unless there is a concrete need.
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
## [0.1.0] - 2026-07-23
|
|
9
|
+
|
|
10
|
+
### Changed
|
|
11
|
+
|
|
12
|
+
- Support multiple transfer profiles.
|
|
13
|
+
- Assume `gdb-multiarch`, if `gdb_binary` is not specified.
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# Development
|
|
2
|
+
|
|
3
|
+
firmware-lifter uses [`hatch`](https://hatch.pypa.io/) and the `pyproject.toml` to organise the project.
|
|
4
|
+
|
|
5
|
+
Dependencies are listed in the `pyproject.toml` and will be installed upon running python commands within the virtual environment created by `hatch`.
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
# Linting, formatting & testing
|
|
9
|
+
|
|
10
|
+
- formatting: `just apply-style`
|
|
11
|
+
- linting: `just lint`
|
|
12
|
+
- test: `just test`
|
|
13
|
+
- with coverage check: `just test --cover`
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
# Release workflow
|
|
17
|
+
|
|
18
|
+
1. Update `CHANGELOG.md` by moving relevant entries from `Unreleased` into a
|
|
19
|
+
new version section.
|
|
20
|
+
1. Run the *just* target "release" with a version part, e.g. `just release minor`
|
|
21
|
+
1. Push commit and tags manually: `git push && git push --tags`
|
|
22
|
+
1. Upload to [pypi](https://pypi.org/): `just publish`
|