Teach the pacboy mapping pyTooling's 'cli' extra - #267
Conversation
pyTooling gains a 'cli' extra installing what the 'pyTooling' program needs at runtime: colorama, because the program is a TerminalApplication, and matplotlib, because '--gantt' draws with it. A consumer writing 'pyTooling[cli]' in its requirements gets no MSYS2 rewrite today, so the MinGW64 and UCRT64 jobs would try to build matplotlib from source and fail. 'cli' rewrites to 'python-matplotlib:p' alone: it installs the dependencies of 'diagram' and 'terminal', and only the first of those has compiled code - which is the same reason 'terminal' needs no entry of its own. 'tests/pacman_packages.py' is left alone. It holds an older, partial copy of both dictionaries - no 'diagram', no 'pypi', no 'sphinx' under 'pytooling' - no workflow runs it, and bringing it into sync is a separate job. Co-Authored-By: Patrick Lehmann <Paebbels@gmail.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## dev #267 +/- ##
=======================================
Coverage 82.22% 82.22%
=======================================
Files 1 1
Lines 45 45
Branches 9 9
=======================================
Hits 37 37
Misses 4 4
Partials 4 4
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Coverage variation | ✅ +0.00% coverage variation |
| Diff coverage | ✅ ∅ diff coverage |
Coverage variation details
Coverable lines Covered lines Coverage Common ancestor commit (4b1ca13) 45 41 91.11% Head commit (68f54ed) 45 (+0) 41 (+0) 91.11% (+0.00%) Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch:
<coverage of head commit> - <coverage of common ancestor commit>
Diff coverage details
Coverable lines Covered lines Diff coverage Pull request (#267) 0 0 ∅ (not applicable) Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified:
<covered lines added or modified>/<coverable lines added or modified> * 100%
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
pyTooling gains a
cliextra (pyTooling#426) holding what thepyToolingprogram needs at runtime: colorama, because the program is aTerminalApplication, andmatplotlib, because
--ganttdraws with it. Without a rewrite rule here, a consumer writingpyTooling[cli]in its requirements sends the MinGW64 and UCRT64 jobs off to build matplotlib from source, which fails.
Changes
ComputePacboyPackages:subPackages["pytooling"]gains"cli": "python-matplotlib:p".Only matplotlib is rewritten.
cliinstalls the dependencies ofdiagramandterminal, and only the firstof those has compiled code — colorama is pure Python and installs from PyPI on MSYS2 unaided, which is why
terminalhas no entry of its own either. The comment below the dictionary says so.Checked by running the action's own dictionaries and regular expression against a few dependency lines, so the
test reads the file rather than a copy of it:
pyTooling[cli] >= 10.0python-matplotlib:ppyTooling[cli,yaml] >= 10.0python-matplotlib:p,python-ruamel-yaml:p python-ruamel.yaml.clib:ppyTooling[terminal] ~= 10.0matplotlib >= 3.10python-matplotlib:pKnown Issues
tests/pacman_packages.pyholds an older, partial copy of both dictionaries — underpytoolingit has onlyyaml, missingdiagram,pypiandsphinx. No workflow runs it, so it is left alone here; bringing it intosync, or deleting it in favour of a check that reads
action.yml, is a separate job.Related Issues and Pull-Requests
application tests that found the gap.