Skip to content

Support Windows and test it in CI - #12

Merged
vpcarlos merged 2 commits into
mainfrom
main-c7hbqw
Oct 5, 2026
Merged

vpcarlos merged 2 commits into
mainfrom
main-c7hbqw

Conversation

@vpcarlos

@vpcarlos vpcarlos commented Oct 5, 2026

Copy link
Copy Markdown
Owner

Summary

Makes Profyle work on Windows and makes the windows-latest CI job block merges (it was experimental in #9).

  • profyle doctor killed the app it checked on Windows: there, os.kill(pid, 0) terminates the process. On Windows it now uses OpenProcess + GetExitCodeProcess through ctypes, and "access denied" counts as running.
  • profyle init / uninstall always write LF line endings, so the files they write don't change line endings depending on who ran them.
  • Tests:
    • read files as UTF-8, where they used the cp1252 default;
    • the ASCII-fallback console test builds its stream with newline="\n";
    • profyle run is tested on the Windows path, which runs the command as a child process because Windows has no exec;
    • the os.kill process-state cases are POSIX-only, and a Windows-only test covers the new check.
  • CI: windows-latest (py3.12) is no longer continue-on-error. macOS and 3.14 stay experimental.

Type of change

  • Bug fix
  • New feature
  • Documentation
  • Refactor / maintenance

How was it tested?

  • Linux:
    • full suite on Python 3.10, 3.11, 3.12 and 3.13;
    • 100% coverage on 3.11.
  • Windows: the code only runs on Windows, so this PR's windows-latest CI job is what verifies it.

Checklist

  • uv run pytest passes
  • uv run ruff check profyle tests passes
  • Tests cover the change
  • README.md / CHANGELOG.md updated if users will notice the change
  • If the change touches the Claude Code plugin or MCP tools, the skill in
    claude-plugin/skills/ still describes the tools correctly (n/a)

🤖 Generated with Claude Code

https://claude.ai/code/session_01XW9SRqVFwcAobWhkRBmHq5


Generated by Claude Code

claude added 2 commits October 5, 2026 07:33
- doctor: check whether the app process runs with OpenProcess/GetExitCodeProcess
  on Windows; os.kill(pid, 0) terminates the process there.
- init/uninstall write files with LF line endings on every platform.
- Tests read files as UTF-8 and handle `profyle run` running the command as a
  child on Windows.
- CI: the windows-latest job now blocks merges.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XW9SRqVFwcAobWhkRBmHq5
subprocess.run returns a CompletedProcess, which has no pid.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XW9SRqVFwcAobWhkRBmHq5
@vpcarlos
vpcarlos merged commit 09dccd0 into main Oct 5, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants