-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(commands): Add convenient names for read-data-subset n/m (#328)
This PR adds convenience names for the `-read-data-subset=n/m` option which allow for more easy regular check runs which cover the whole repository data over a given period. E.g. it allows to daily run `check --read-data --read-data-subset=daily/month` which covers the repository once run at every day of any month. Before, this requirement needed scripting to set `n` to the number of the current day within the month and `m` to the total count of days in the current month. For `n`, it is now allowed to use - `hourly` - `daily` - `weekly` - `monthly` - `yearly` which is replaced by an index corresponding to the date/time the `check` command is called. For `m`, it is now allowed to use - `day` - `week` - `month` - `year` which is depending on `n` replaced by the total count of hours/days/weeks/months within the current entity. Moreover `month_hours`, `month_days`, `year_hours`, `year_days` which work independent from `n`. Co-authored-by: simonsan <[email protected]>
- Loading branch information
Showing
19 changed files
with
182 additions
and
4 deletions.
There are no files selected for viewing
This file contains 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
5 changes: 5 additions & 0 deletions
5
.../core/src/commands/snapshots/rustic_core__commands__check__tests__n_m_15_month_hours.snap
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
source: crates/core/src/commands/check.rs | ||
expression: "(res, res_1h, res_1d, res_1w, res_1m, res_1y, res2)" | ||
--- | ||
((15, 744), (15, 744), (15, 744), (15, 744), (15, 720), (15, 744), (15, 696)) |
5 changes: 5 additions & 0 deletions
5
crates/core/src/commands/snapshots/rustic_core__commands__check__tests__n_m_29_28.snap
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
source: crates/core/src/commands/check.rs | ||
expression: "(res, res_1h, res_1d, res_1w, res_1m, res_1y, res2)" | ||
--- | ||
((1, 28), (1, 28), (1, 28), (1, 28), (1, 28), (1, 28), (1, 28)) |
5 changes: 5 additions & 0 deletions
5
...es/core/src/commands/snapshots/rustic_core__commands__check__tests__n_m_4_month_days.snap
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
source: crates/core/src/commands/check.rs | ||
expression: "(res, res_1h, res_1d, res_1w, res_1m, res_1y, res2)" | ||
--- | ||
((4, 31), (4, 31), (4, 31), (4, 31), (4, 30), (4, 31), (4, 29)) |
5 changes: 5 additions & 0 deletions
5
crates/core/src/commands/snapshots/rustic_core__commands__check__tests__n_m_5_12.snap
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
source: crates/core/src/commands/check.rs | ||
expression: "(res, res_1h, res_1d, res_1w, res_1m, res_1y, res2)" | ||
--- | ||
((5, 12), (5, 12), (5, 12), (5, 12), (5, 12), (5, 12), (5, 12)) |
5 changes: 5 additions & 0 deletions
5
crates/core/src/commands/snapshots/rustic_core__commands__check__tests__n_m_daily_15.snap
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
source: crates/core/src/commands/check.rs | ||
expression: "(res, res_1h, res_1d, res_1w, res_1m, res_1y, res2)" | ||
--- | ||
((14, 15), (14, 15), (0, 15), (6, 15), (0, 15), (13, 15), (2, 15)) |
5 changes: 5 additions & 0 deletions
5
crates/core/src/commands/snapshots/rustic_core__commands__check__tests__n_m_daily_month.snap
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
source: crates/core/src/commands/check.rs | ||
expression: "(res, res_1h, res_1d, res_1w, res_1m, res_1y, res2)" | ||
--- | ||
((5, 31), (5, 31), (6, 31), (12, 31), (15, 30), (4, 31), (3, 29)) |
5 changes: 5 additions & 0 deletions
5
crates/core/src/commands/snapshots/rustic_core__commands__check__tests__n_m_daily_week.snap
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
source: crates/core/src/commands/check.rs | ||
expression: "(res, res_1h, res_1d, res_1w, res_1m, res_1y, res2)" | ||
--- | ||
((4, 7), (4, 7), (5, 7), (4, 7), (0, 7), (3, 7), (4, 7)) |
5 changes: 5 additions & 0 deletions
5
crates/core/src/commands/snapshots/rustic_core__commands__check__tests__n_m_daily_year.snap
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
source: crates/core/src/commands/check.rs | ||
expression: "(res, res_1h, res_1d, res_1w, res_1m, res_1y, res2)" | ||
--- | ||
((284, 366), (284, 366), (285, 366), (291, 366), (315, 366), (283, 365), (32, 366)) |
5 changes: 5 additions & 0 deletions
5
crates/core/src/commands/snapshots/rustic_core__commands__check__tests__n_m_hourly_20.snap
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
source: crates/core/src/commands/check.rs | ||
expression: "(res, res_1h, res_1d, res_1w, res_1m, res_1y, res2)" | ||
--- | ||
((8, 20), (9, 20), (12, 20), (16, 20), (12, 20), (4, 20), (0, 20)) |
5 changes: 5 additions & 0 deletions
5
crates/core/src/commands/snapshots/rustic_core__commands__check__tests__n_m_hourly_day.snap
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
source: crates/core/src/commands/check.rs | ||
expression: "(res, res_1h, res_1d, res_1w, res_1m, res_1y, res2)" | ||
--- | ||
((12, 24), (13, 24), (12, 24), (12, 24), (12, 24), (12, 24), (12, 24)) |
5 changes: 5 additions & 0 deletions
5
...es/core/src/commands/snapshots/rustic_core__commands__check__tests__n_m_hourly_month.snap
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
source: crates/core/src/commands/check.rs | ||
expression: "(res, res_1h, res_1d, res_1w, res_1m, res_1y, res2)" | ||
--- | ||
((132, 744), (133, 744), (156, 744), (300, 744), (372, 720), (108, 744), (84, 696)) |
5 changes: 5 additions & 0 deletions
5
crates/core/src/commands/snapshots/rustic_core__commands__check__tests__n_m_hourly_week.snap
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
source: crates/core/src/commands/check.rs | ||
expression: "(res, res_1h, res_1d, res_1w, res_1m, res_1y, res2)" | ||
--- | ||
((108, 168), (109, 168), (132, 168), (108, 168), (12, 168), (84, 168), (108, 168)) |
5 changes: 5 additions & 0 deletions
5
crates/core/src/commands/snapshots/rustic_core__commands__check__tests__n_m_hourly_year.snap
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
source: crates/core/src/commands/check.rs | ||
expression: "(res, res_1h, res_1d, res_1w, res_1m, res_1y, res2)" | ||
--- | ||
((6828, 8784), (6829, 8784), (6852, 8784), (6996, 8784), (7572, 8784), (6804, 8760), (780, 8784)) |
5 changes: 5 additions & 0 deletions
5
crates/core/src/commands/snapshots/rustic_core__commands__check__tests__n_m_monthly_5.snap
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
source: crates/core/src/commands/check.rs | ||
expression: "(res, res_1h, res_1d, res_1w, res_1m, res_1y, res2)" | ||
--- | ||
((4, 5), (4, 5), (4, 5), (4, 5), (0, 5), (4, 5), (1, 5)) |
5 changes: 5 additions & 0 deletions
5
...es/core/src/commands/snapshots/rustic_core__commands__check__tests__n_m_monthly_year.snap
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
source: crates/core/src/commands/check.rs | ||
expression: "(res, res_1h, res_1d, res_1w, res_1m, res_1y, res2)" | ||
--- | ||
((9, 12), (9, 12), (9, 12), (9, 12), (10, 12), (9, 12), (1, 12)) |
5 changes: 5 additions & 0 deletions
5
crates/core/src/commands/snapshots/rustic_core__commands__check__tests__n_m_weekly_10.snap
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
source: crates/core/src/commands/check.rs | ||
expression: "(res, res_1h, res_1d, res_1w, res_1m, res_1y, res2)" | ||
--- | ||
((0, 10), (0, 10), (0, 10), (1, 10), (5, 10), (0, 10), (4, 10)) |
5 changes: 5 additions & 0 deletions
5
...es/core/src/commands/snapshots/rustic_core__commands__check__tests__n_m_weekly_month.snap
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
source: crates/core/src/commands/check.rs | ||
expression: "(res, res_1h, res_1d, res_1w, res_1m, res_1y, res2)" | ||
--- | ||
((0, 4), (0, 4), (0, 4), (1, 4), (1, 4), (0, 4), (0, 4)) |
5 changes: 5 additions & 0 deletions
5
crates/core/src/commands/snapshots/rustic_core__commands__check__tests__n_m_weekly_year.snap
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
source: crates/core/src/commands/check.rs | ||
expression: "(res, res_1h, res_1d, res_1w, res_1m, res_1y, res2)" | ||
--- | ||
((40, 52), (40, 52), (40, 52), (41, 52), (45, 52), (40, 52), (4, 52)) |