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.
@@ -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,15 @@
1
+ # builds
2
+ /dist
3
+ /build
4
+
5
+ __pycache__
6
+
7
+ # test results
8
+ /.pytest_cache
9
+
10
+ # coverage files
11
+ .coverage*
12
+
13
+ # style and linting
14
+ /.mypy_cache
15
+ /.ruff_cache
@@ -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`