Support for date-based matching during archive listing - #7272
Conversation
--- - Added arguments --older --newer --newest --oldest to argparser - Added parser to detect relative time markers i.e. 1d/1m - Added an in-house month-offseter - Edited manifest to initially filter by date if markers are present - Added test cases to test date matching arguments
|
@ThomasWaldmann Made my first pass of changes and added a test case for it. The output seems to reflect the specified archives, which are the only ones being analyzed. However, I keep getting an "{num} orphaned objects found!". Not sure if this is a problem with how I created the archives in my test. All other test cases seem to work fine. Any thoughts? |
|
Also:
You can ignore the windows CI failures for now, we are still working on fixing the windows tests. |
|
About the orphaned objects: interesting, guess I will need to locally run this. Usually borg should not create orphans. |
--- - Added validators for argparse to reject unrecognized relative time markers - Calculate relative offset now raises exception on invalid markers - Match-archives now preceeds date-based filtering - Cleaned up regex references in time helper
|
@ThomasWaldmann I've gone through the requests and resolved them except for the |
--- - Fixed inefficient regex for relative time marker matching - Fixed import formatting - Renamed 'dates' to 'ts' in calculate_relative_offset - Modified relative time marker validator to match using single regex
|
Applied changes requested above. Please review when possible. |
- Modified create_src_archive to branch when timestamp flag is present
|
Renamed vars and refactored the offset calculation to remove code duplication. Modified the create_src_archive as well. Please review when you can |
|
The linters are unhappy, see my previous comments about black/flake8. |
|
@Michael-Girma btw, would you like to earn a bounty for this? we don't have much funds, but I guess I could put a USD 50 bounty on solving this ticket (we use bountysource.com). |
That would be awesome. : )) |
|
Ahh forgot to run the linters before committing. What are your thoughts on utilizing the pre-commit hook for linting? |
--- - Updated check/list functions to have same order of older/newer ... - Updated archive docstring to reflect parameters - Updated manifest docstring to reflect order of exec of parameters - Updated argparser group help description
|
@Michael-Girma bounty added (see ticket). about pre-commit: open a ticket about it, so we can discuss there. |
|
Test fails: |
--- - Revisited argparser group for newer / older - Revisited docstring for archives list method
BTW, you can run the tests also locally before pushing: |
|
Keep getting a when trying to run tests locally. |
|
Still draft (anything left to do?) oder "ready for review"? |
|
@Michael-Girma before running the tests: (and before that, follow the docs and have all OS level packages installed, like libs and header files.) |
Codecov Report
@@ Coverage Diff @@
## master #7272 +/- ##
==========================================
- Coverage 83.49% 83.37% -0.12%
==========================================
Files 67 67
Lines 11551 11651 +100
Branches 2095 2123 +28
==========================================
+ Hits 9644 9714 +70
- Misses 1355 1367 +12
- Partials 552 570 +18
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
|
how can i reproduce these? did you still get that after fixing the full/partial check ( |
Resetting my env, will test in a few |
|
Working on a more condensed commit comment for the squash commit. How about: |
|
OK, CI looks good (windows CI failures are expected and not due to this PR). |
|
Tests are all green locally as well. Thanks for the help with setting up my env. The squash-commit comment looks good to me. |
|
Merged, thanks! Now claim the bounty... |
Support for date-matching during archive listing (fix for #7062)