Skip to content

Support and audit the C# + Python repo shape (first case: PlexCleaner) #339

Description

@ptr727

Summary

PlexCleaner is now the fleet's first repo that is both C# and Python: a .NET console app plus a
self-contained, stdlib-only Python regression-tooling subtree under RegressionTests/ (ruff + mypy,
no runtime deps). See ptr727/PlexCleaner#855. This is a repo shape the template has never had to
audit, and I hit several cross-cutting decisions that aren't codified anywhere yet.

Because spec/project-types.json composes types as an array, a C#+Python repo does not need a
new type id — it is expressed as types: ["csharp", "console", "docker", "python"], and the audit
runs the union of the per-type checks. So the ask is not a new polyglot type; it is: (1)
register the shape, (2) codify how the csharp and python baselines coexist when stacked in one
repo, and (3) add a conformance-matrix row. I expect a few convergence iterations.

What the shape looks like (PlexCleaner)

  • C# app at the root (types currently ["csharp","console","docker"]); should add "python".
  • RegressionTests/ — a standalone Python subtree: 5 stdlib-only scripts + a Bash harness,
    pyproject.toml carrying only ruff + mypy config (no build/runtime metadata, no uv.lock).
  • CI: a uvx-based ruff / ruff-format / mypy step in the existing validate workflow.
  • No media/secrets; the subtree is utility tooling, not a shipped package and not test-covered code.

Cross-cutting decisions I had to make (candidates to codify)

  1. Line endings. .editorconfig's C# governance is CRLF-by-default; Python has no [*.py]
    override, so .py inherits CRLF — matching Financial-Modeling's audited choice to keep Python on
    the repo default rather than pinning LF. Shebang-less scripts (invoked via python3/uvx) make
    CRLF safe. Worth stating explicitly for a mixed repo so nobody "fixes" .py to LF.
  2. uvx-scripts vs uv-project. Financial-Modeling is a source-only python repo: uv project +
    uv.lock + prek. PlexCleaner's Python is a handful of stdlib-only scripts, so I used uvx with
    no lockfile and no uv project. The template needs a rule for when a Python subtree is
    "source-only python" (uv project, locked) vs "scripts embedded in another repo" (uvx, unlocked).
  3. Tool-version pinning. I pin ruff/mypy only in CI (bumpable there) and run latest in the
    VSCode tasks / README examples, accepting a small visible local-vs-CI gap so local tooling never
    silently falls behind. Should this be the fleet default for uvx tooling?
  4. Coverage. spec/files.json applies codecov.yml to ["csharp","python"], but this Python
    is lint/type-checked only — no pytest, no coverage. A mixed repo shouldn't be forced to add
    Python coverage for utility scripts; the python type's coverage expectation may need a
    "source-only" vs "scripts" distinction (overlaps with Template gaps found adapting to a source-only Python repo (Financial-Modeling) #306).
  5. .vscode/tasks.json. files.json already has separate csharp and python references; a mixed
    repo must satisfy both. I added Ruff / Ruff-Format / Mypy tasks alongside the C# ones — please
    confirm the appliesTo union is the intended audit behavior here.
  6. Docs. README ## Rules has ### If a C# Project / ### If a Python Project as alternatives;
    CODESTYLE.md has per-language sections. A repo that is both needs a "both apply" story.

Proposal

  • Register PlexCleaner in registry/repos.json with types += "python".
  • Codify the csharp+python coexistence rules above (line endings, uvx-vs-uv-project, CI-only pinning,
    coverage-optional for utility subtrees, tasks.json union) — in crossCutting and/or the README
    ## Rules.
  • Add a csharp + python shape row to reports/conformance-matrix.md.

Related: #306 (Python source-only adaptation gaps), #310 (per-type cold-start self-test). Reference
implementation: ptr727/PlexCleaner#855.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions