Repository navigation
v0.7.0
pysrim2 can now set up SRIM itself: uv tool install pysrim2 && pysrim2 install on Windows and Linux, or the ghcr.io/fsibt/pysrim2 container (Podman/Docker).
Added
- Documentation for the installer, the container, the command line and the agent skill (
docs/installation.rst,container.md,cli.md,agents.md); the README andAGENTS.mddescribe the 0.7.0 setup. Example scripts for the current API inexamples/scripts/(reference case, multilayer damage profile, stopping table) and an agent example inexamples/agents/. pysrim2 install [COMPONENT ...](with--dry-runand--yes) andpysrim2 doctor [--json]set up and check SRIM.srim.installer.install_srim()downloads SRIM-2013 from pinned sources and verifies its checksum.srim.installer.winesets up a private wine prefix with the VB5 runtime and OCX components for SRIM on Linux; it never touches~/.wineor$WINEPREFIX.pysrim2 install runtime|imageinstalls a container runtime (Podman preferred; Docker Desktop is never installed by pysrim2) and pulls theghcr.io/fsibt/pysrim2image;pysrim2 doctorchecks both.- Integration tests that run real TRIM/SR (
pytest -m srim). - SRIM location defaults to pysrim2's data directory (override with
PYSRIM2_SRIM_DIR); an existing/tmp/srimis still used. - Container image
ghcr.io/fsibt/pysrim2(linux/amd64: pysrim2, SRIM-2013 and wine, non-root) built and tested by CI. Run it as its default user (do not pass-u). - Agent skill
pysrim2(skills/pysrim2/SKILL.mdwith a runnable example, shipped inside the wheel):pysrim2 install skill [--agent claude|all] [--scope user|project]copies it to~/.claude/skills/,<project>/.claude/skills/(and~/.agents/skills/for--agent all); it never overwrites a differing skill it did not write unless--yes.skillis part of the defaultpysrim2 installset andpysrim2 doctorchecks an installed copy is current.
Changed
- Linux: pysrim2 always runs SRIM in its own private wine prefix. If you used pysrim with
/tmp/srimand~/.wine, runpysrim2 install wineonce (an existing/tmp/srimis still found). - The source distribution no longer includes
CLAUDE.md,docs/superpowers/,.github/ortests/. - The
srim.plotfunctions take aResultsobject and read its attributes; passing a dict no longer works.
Fixed
TRIM.run()/SR.run()no longer print Mesa/EGL ("MESA-EGL", "pci id for fd") warnings; xvfb/EGL noise is dropped from both stdout and stderr and EGL/Mesa logging is turned down in wine's environment.pysrim2 install runtimeshows the Windows "open a new terminal" hint only when no Podman machine exists;pysrim2 install --dry-runno longer names podman in the pull command when no runtime is installed.- Wine setup always runs its own pinned, checksum-verified winetricks instead of one found on
PATH(old copies do not know the OCX verbs). pysrim2 install wineno longer hangs when a wine driver host crashes (openSUSE, wine 11): the USB/controller/Bluetooth drivers and Mono/Gecko prompts are disabled throughWINEDLLOVERRIDES, wine's crash debugger is emptied, and a wineserver that does not exit within 60 s is stopped.pysrim2 install wineno longer hangs afterwinebootfinishes: wine output is captured in a temporary file, so the backgroundwineservercannot keep a pipe open (same forTRIM.run()/SR.run()stderr).TRIM.run()andSR.run()no longer print xvfb's "X connection to :N broken" line when SRIM exits under wine; other stderr output is kept and shown after the run. A failing run raisessrim.srim.SRIMProcessError(asubprocess.CalledProcessError) whose message includes that stderr.pysrim2 installprints[ok] <step>: installed(with the SRIM directory forsrim) after each step succeeds.- A failed or interrupted (Ctrl-C)
pysrim2 install winestops the private prefix's wineserver instead of leaving wine processes running. pysrim2 installprints a line as each long sub-step starts (wine prefix, winetricks, VB5 runtime, SRIM download/verify/unpack) instead of staying silent for minutes.pysrim2 doctorandpysrim2 installno longer suggest "pysrim2 install wine" on distributions without known package commands; they point to the WineHQ download page instead.pysrim2 install wineknows the package commands for openSUSE (zypper) and Arch (pacman, untested).- SRIM and the wine setup run under a 1024x768x24 virtual screen; the default 8-bit
xvfb-runscreen madewineboothang on wine 11. - Container image: Docker 29's built-in seccomp profile makes 32-bit wine fail ("socket: Function not implemented"); pysrim2 ships Docker's current default profile as
srim/data/seccomp-docker.json(pysrim2 install imagecopies it to the data directory and prints thedocker run --security-opt seccomp=...line). Podman is the default and needs no profile (its hint uses:Zon the/datamount). pysrim2 install vb5(Windows) puts the Visual Basic 5 runtime and OCX controls next to SRIM so TRIM starts on native Windows.- Wine setup finds
wineserverwhere Ubuntu installs it. TRIM.run()andSR.run()delete old output first and raiseSRIMRunErrorif SRIM wrote no result, so a crash never returns a previous run's data.- Winetricks downloads go to pysrim2's own cache instead of
~/.cache/winetricks. TRIM.runandSR.runread their results correctly whensrim_directoryis a relative path.- SR output ranges in
kmare parsed instead of raisingSRIMOutputParseError. - Parsing SRIM output no longer prints debug output to stdout.
Removed
- The obsolete
costrouc/pysrimDocker example (examples/docker/), the historical Docker benchmark page (docs/benchmarks.rst),examples/input/and unused generated files inexamples/images/.