Skip to content

Commit 4edfa4e

Browse files
tbitcsoz-agent
andcommitted
chore: CHANGELOG v0.1.0, __version__, west env version, module.yml update
- CHANGELOG.md: full keepachangelog 1.1.0 format, all changes since inception, v0.1.0 dated 2026-05-13. Includes Added/Changed/Removed/Fixed/Security sections. Comparison links point to GitHub releases and HEAD. - west_env/__init__.py: add __version__ via importlib.metadata with '0.1.0' fallback. Readable without installing the package. - west_commands/env.py: - 'version' added to action choices: 'west env version' prints 'west-env v0.1.0' - doctor header now shows version: 'west-env doctor (v0.1.0)' - module.yml: updated description with version, platform summary, and security advisory URL. Zephyr-compatible (cmake: false, kconfig: false). Co-Authored-By: Oz <oz-agent@warp.dev>
1 parent dc7a1d7 commit 4edfa4e

4 files changed

Lines changed: 172 additions & 4 deletions

File tree

CHANGELOG.md

Lines changed: 147 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,147 @@
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+
## [Unreleased]
9+
10+
## [0.1.0] - 2026-05-13
11+
12+
Initial release of `west-env` — a cross-platform Zephyr RTOS developer
13+
environment manager. Builds run in Linux containers or VMs; developers edit,
14+
flash, and debug from their host OS without WSL, Remote SSH, or slow bind-mount
15+
builds.
16+
17+
### Added
18+
19+
#### Core infrastructure
20+
- `west env` west extension command with actions: `init`, `build`, `shell`,
21+
`doctor`, `sync`, `flash`, `debug`, `cache`, `benchmark`, `generate-tasks`,
22+
`version`
23+
- `west-env.yml` manifest-local configuration (resolves from manifest directory,
24+
not CWD). Supports both legacy (`env.type`/`env.container.*`) and new
25+
(`env.backend`, `env.workspace_mode`, `cache.*`, `git.*`, `jlink.*`) formats
26+
- `__version__` attribute in `west_env` package (readable via
27+
`importlib.metadata` and `west env version`)
28+
29+
#### Platform support (Windows / Linux / macOS)
30+
- Six-backend auto-detector (`west_env.backend`):
31+
`podman-machine-hyperv`, `docker-desktop`, `podman-native`,
32+
`docker-native`, `podman-machine`, `docker-machine`
33+
- Platform-aware fallback chain: Podman Hyper-V → Docker Desktop (Windows);
34+
Podman native → Docker native (Linux); Podman machine → Docker Desktop
35+
(macOS)
36+
- Hyper-V availability check via PowerShell on Windows
37+
- Platform-native wrapper script generator (`west_env.platform`): `.ps1`
38+
on Windows (no Bash, no WSL), `.sh` on Linux/macOS
39+
- `west env generate-tasks` writes `.vscode/tasks.json` with no Remote WSL
40+
dependency (`west_env.vscode`)
41+
42+
#### Workspace synchronisation (`west_env.sync`)
43+
- Four workspace modes: `sync` (rsync to VM ext4 — Windows default), `copy`,
44+
`tmpfs`, `bind`
45+
- Bind mount on Windows emits `SyncWarning` (NTFS→Linux overhead)
46+
- Source-only sync with configurable exclusion patterns (`build/`, `.cache/`,
47+
`twister-out/`, `.west/`, `*.egg-info`)
48+
- `west env sync --back` syncs build artifacts (`.elf`, `.bin`, `.hex`, `.map`)
49+
back to host
50+
51+
#### Build safety (`west_env.buildcheck`)
52+
- Stale build directory detection via `CMakeCache.txt` `CMAKE_SOURCE_DIR`
53+
- `west env build` warns with `[WARN]` and exits 1 if mode switched (native
54+
↔ container) without cleaning
55+
- `--clean` flag auto-removes stale `build/` before proceeding
56+
57+
#### Cache management (`west_env.cache`)
58+
- Persistent named volumes for ccache, west modules, Zephyr SDK, pip
59+
- `west env cache stats` — volume sizes and ccache hit rate
60+
- `west env cache reset [--ccache | --modules]` — targeted volume pruning
61+
- `CCACHE_DIR` environment variable forwarded into container
62+
63+
#### Git credential forwarding (`west_env.credentials`)
64+
- Windows OpenSSH agent socket forwarded via `SSH_AUTH_SOCK`
65+
- HTTPS Git Credential Manager fallback detection
66+
- `west env doctor` reports active credential strategy
67+
- No tokens, keys, or credential files copied into container images
68+
- `PYTHONDONTWRITEBYTECODE=1` set in all container invocations, preventing
69+
root-owned `__pycache__` in mounted workspace volumes
70+
71+
#### Flash and debug (`west_env.flash`)
72+
- Windows-native J-Link host flash (`jlink.mode: host`): build artifacts
73+
synced to Windows path, flashed with Windows J-Link tools — no USB
74+
passthrough required
75+
- Optional TCP J-Link/GDB server mode (`jlink.mode: tcp-server`) for
76+
container-side GDB sessions
77+
- J-Link search paths: Windows `C:\Program Files\SEGGER\JLink`, Linux
78+
`/opt/SEGGER/JLink`, macOS `/Applications/SEGGER/JLink`
79+
- `west env doctor` reports J-Link availability
80+
81+
#### Benchmarking
82+
- `west env benchmark`: timed build with JSON output to `docs/benchmarks/`
83+
recording machine, OS, Python version, backend, workspace mode, and
84+
elapsed seconds
85+
86+
#### CI / testing
87+
- CI matrix: lint (ruff), unit tests (Windows / Linux / macOS ×
88+
Python 3.10 / 3.11 / 3.12), Docker integration, Podman integration,
89+
native-sim Zephyr build, pip-audit security scan
90+
- 141 unit tests across all platforms
91+
- `tests/test_backend.py` — 6-backend detector unit tests
92+
- `tests/test_sync.py` — workspace sync and exclusion tests
93+
- `tests/test_new_modules.py` — cache, credentials, VSCode, platform, flash
94+
- `tests/test_buildcheck.py` — 18 stale build detection tests
95+
- `tests/test_podman_integration.py` — Podman rootless integration tests
96+
(ubuntu CI)
97+
- macOS backend detection smoke test in unit-tests matrix
98+
- Dependabot: pip and GitHub Actions weekly updates
99+
- `pip-audit` security scan on every push
100+
101+
#### Documentation
102+
- `docs/ARCHITECTURE.md` — 8-layer architecture, 3 platforms, 6 backends,
103+
4 workspace modes
104+
- `docs/REQUIREMENTS.md` — 47+ active requirements across 15 groups
105+
- `docs/TESTS.md` — full test matrix with requirement traceability
106+
- `docs/FEATURE-PLAN.md` — 12 vertical implementation slices
107+
- `docs/REALIGNMENT-REPORT.md` — requirement migration history
108+
- `docs/quickstart-windows.md`, `docs/quickstart-linux.md`,
109+
`docs/quickstart-macos.md`
110+
- `docs/git-credentials.md`, `docs/flashing.md`, `docs/troubleshooting.md`
111+
- `CONTRIBUTING.md`, `SECURITY.md` (expanded)
112+
113+
### Changed
114+
115+
- `west env doctor` extended: backend detection report, credential strategy,
116+
J-Link status, version header
117+
- `west env build` now checks for stale CMake build directories (mode
118+
mismatch) before running
119+
- Configuration schema extended with `backend`, `workspace_mode`, `cache`,
120+
`git`, `jlink` top-level sections; fully backward-compatible with legacy
121+
`env.type` / `env.container.*` format
122+
- README rewritten: Windows-first framing, accurate platform table, no stale
123+
WSL build claims, all current commands documented
124+
125+
### Removed
126+
127+
- EDSSharp / CANopenEditor bind-mount from container invocation (was
128+
project-specific; not appropriate for a general-purpose tool)
129+
130+
### Fixed
131+
132+
- Container invocations set `PYTHONDONTWRITEBYTECODE=1` preventing root-owned
133+
`__pycache__` files in the workspace volume (caused `PermissionError` on
134+
Docker CI test cleanup)
135+
- `dev-release.yml` broken `sed` version extraction replaced with Python
136+
`tomllib` parsing
137+
- Docker/Podman e2e tests use `ignore_cleanup_errors=True` on
138+
`TemporaryDirectory` for robustness against root-owned cleanup remnants
139+
140+
### Security
141+
142+
- No tokens, SSH keys, or credential files are ever written into container
143+
images or volume mounts
144+
- `pip-audit` runs on every push; Dependabot monitors PyPI and Actions weekly
145+
146+
[Unreleased]: https://github.com/BitConcepts/west-env/compare/v0.1.0...HEAD
147+
[0.1.0]: https://github.com/BitConcepts/west-env/releases/tag/v0.1.0

module.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,16 @@
11
# SPDX-License-Identifier: Apache-2.0
2+
# west-env Zephyr module descriptor
3+
# version: 0.1.0 (tracks pyproject.toml and git tag v0.1.0)
24

35
name: west-env
46
build:
57
cmake: false
68
kconfig: false
79
description: >
8-
Workspace-first west extension providing reproducible build
9-
environments for Zephyr, supporting native and container-backed
10-
workflows without modifying Zephyr core.
10+
Cross-platform Zephyr RTOS developer environment manager (v0.1.0).
11+
Provides reproducible container or VM-backed builds on Windows, Linux,
12+
and macOS via the `west env` command without modifying Zephyr core.
13+
Supports native and container execution, workspace sync, ccache,
14+
Git credential forwarding, J-Link host flashing, and VSCode integration.
15+
security:
16+
url: https://github.com/BitConcepts/west-env/security/advisories

west_commands/env.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ def do_add_parser(self, parser_adder):
9898
"cache",
9999
"benchmark",
100100
"generate-tasks",
101+
"version",
101102
],
102103
help="Environment action to perform",
103104
)
@@ -214,6 +215,11 @@ def do_run(self, args, unknown_args):
214215
elif action == "generate-tasks":
215216
self._generate_tasks(cfg)
216217

218+
elif action == "version":
219+
from west_env import __version__
220+
221+
print(f"west-env v{__version__}")
222+
217223
@staticmethod
218224
def _run_container(cfg, cmd, interactive=False):
219225
try:
@@ -226,7 +232,9 @@ def _run_container(cfg, cmd, interactive=False):
226232
return run_container(cfg, cmd, interactive=interactive)
227233

228234
def _doctor(self, cfg, use_container):
229-
print("west-env doctor\n")
235+
from west_env import __version__
236+
237+
print(f"west-env doctor (v{__version__})\n")
230238

231239
ok = True
232240
ok &= check_python()

west_env/__init__.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,8 @@
11
# SPDX-License-Identifier: Apache-2.0
2+
3+
try:
4+
from importlib.metadata import version as _pkg_version
5+
6+
__version__ = _pkg_version("west-env")
7+
except Exception: # noqa
8+
__version__ = "0.1.0"

0 commit comments

Comments
 (0)