Repository navigation
DependencyTable: read stopwatch durations as float or timedelta - #58
Conversation
….0.0rc3 and rc4 answer.
pyTooling #595 (planned for rc4) makes Stopwatch.Duration/Activity/Inactivity a timedelta. pyTooling's own
documentation build installs this package from PyPI and failed on it: f"{stopwatch.Duration:.2f}" and
DependencyCollector.Seconds (Stopwatch.Activity, formatted with :.2f) raise a TypeError with a timedelta.
- The table's log line uses DurationInNanoseconds / 1e9 (exists since rc2).
- DependencyCollector.Seconds converts Activity with total_seconds() when it's a timedelta.
- Both marked '# WORKAROUND: pyTooling <10.0.0rc4' with the final form (DurationInSeconds, ActivityInSeconds) as a
comment below, to replace once the floor is >= 10.0.0rc4.
Co-Authored-By: Patrick Lehmann <Paebbels@gmail.com>
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 0 |
| Duplication | 0 |
🟢 Coverage 16.67% diff coverage · -0.07% coverage variation
Metric Results Coverage variation ✅ -0.07% coverage variation (-1.00%) Diff coverage ✅ 16.67% diff coverage Coverage variation details
Coverable lines Covered lines Coverage Common ancestor commit (00ac132) 4882 4285 87.77% Head commit (4fe514c) 4887 (+5) 4286 (+1) 87.70% (-0.07%) 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 (#58) 6 1 16.67% 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.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## dev #58 +/- ##
==========================================
- Coverage 85.47% 85.41% -0.07%
==========================================
Files 24 24
Lines 4882 4887 +5
Branches 786 787 +1
==========================================
+ Hits 4173 4174 +1
- Misses 597 601 +4
Partials 112 112
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:
|
pyTooling #595 (planned for v10.0.0-rc4) makes
Stopwatch.Duration,ActivityandInactivityatimedelta; the floats move toDurationInSeconds,ActivityInSeconds,InactivityInSeconds. pyTooling's documentation build installs this package from PyPI, and itsdependency-tabledirective formats two stopwatch values with:.2f- aTypeErrorwith atimedelta. This makes the directive read both forms, so a release of this package can unblock pyTooling #595.Changes
pyTooling.Sphinx.DependencyTable:dependency-tableusesStopwatch.DurationInNanoseconds / 1e9(available since pyTooling 10.0.0rc2) instead ofStopwatch.Duration.DependencyCollector.SecondsconvertsStopwatch.Activitywithtotal_seconds()when it's atimedelta; it stays afloat.# WORKAROUND: pyTooling <10.0.0rc4and the final form (DurationInSeconds,ActivityInSeconds) as a comment, to replace once the floor is>= 10.0.0rc4. pyEDAA.Reports uses the same marker.Unit Tests
dev(float durations). With #595's checkout first on the path, the failures left are the doc-coverage tests (pyEDAA.Reports, fixed in its own pull-request) and the requirements-file tests (DependencyTable: requirements files are read by 'RequirementsFile.Parse' #53).Related Issues and Pull-Requests