Fix CI + add blank-line spacing between top-level groups#12
Merged
Conversation
CI was failing on tests/test_fix_parents_base.R, a top-level
R CMD check test that used the legacy "[X] - text" syntax in
its status_of regex. The new markdown writer emits "- [X] text"
so the regex never matched. Deleted the file: it duplicates
inst/tinytest/test_fix_parents.R, which already covers the same
cases against the new format.
Spacing: .df_to_lines was emitting all rows tightly packed.
Hand-written daily files typically have blank lines between
flat top-level recurring items (Email, todo, ...) and project
containers (cornball.ai, House). The migrator and run_monday
output should reproduce that.
Heuristic: insert a blank line before any depth-0 row that
either heads a subtree (next row is deeper) or follows a
deeper descendant. Result for a typical Daily:
- [ ] Email # flat, clustered
- [ ] todo
<blank>
- [ ] cornball.ai # heads a subtree -> blank before
- [ ] Lil Casey
- [ ] Countdown
<blank> # follows a deeper descendant -> blank before
- [ ] House
Regression test in test_recurring.R covers both rules and
verifies flat siblings stay tight.
Bump to 0.2.2.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
CI fix.
tests/test_fix_parents_base.Rwas a top-level R CMD check test using the legacy[X] - textsyntax in itsstatus_ofregex. The 0.2.0 markdown writer emits- [X] textso the regex never matched. Deleted the file — it duplicatesinst/tinytest/test_fix_parents.R, which already covers the same cases against the new format.Spacing.
.df_to_lineswas emitting all rows tightly packed. Hand-written daily files typically have blank lines between flat top-level recurring items and project containers. The migrator andrun_mondayoutput should reproduce that.Heuristic: insert a blank line before any depth-0 row that either heads a subtree (next row is deeper) or follows a deeper descendant. Flat siblings stay clustered.
Test plan
tests/test_fix_parents_base.R— coverage stays viainst/tinytest/test_fix_parents.Rtest_recurring.Rfor the spacing rules (heads-a-subtree, follows-a-descendant, flat-siblings-stay-tight)fix_parents(preview = TRUE)on a real Daily inserts the blank lines at the expected positions