summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* changeshashMathieu Le Marec - Pasquet2021-04-131-1/+4
|
* Make expanders use an utility patternMathieu Le Marec - Pasquet2021-04-131-70/+89
|
* Review #49Mathieu Le Marec - Pasquet2021-04-132-12/+16
| | | | rel #162
* Add support for hashed/random/keyword expressionsRyan Finnie2021-04-125-10/+372
| | | | Closes: taichino/croniter#162
* flake8: ignore C901 (Function is too complex)Ryan Finnie2021-04-121-1/+1
| | | | | | C901 is normally not checked because max-complexity is not set, but if the user has max-complexity set in their user-wide .config/flake8, this will prevent false positives.
* fixchangesMathieu Le Marec - Pasquet2021-04-081-1/+1
|
* Back to development: 1.0.12Mathieu Le Marec - Pasquet2021-04-072-1/+7
|
* Preparing release 1.0.111.0.11Mathieu Le Marec - Pasquet2021-04-072-2/+2
|
* changelogMathieu Le Marec - Pasquet2021-04-072-0/+4
|
* add ut to base case 0 6 30 3 *zed20152021-04-072-4/+15
|
* fix bug: bad case:0 6 30 3 *zed20152021-04-071-1/+3
| | | when crontab day only one day, but last month not has the day, example crontab expression: 0 6 30 3 *
* Minor docs tweakLowell Alleman2021-04-071-3/+4
|
* More consolidation of nth/last-wday functionalityLowell Alleman2021-04-072-32/+33
| | | | | | | | | | | | | - Remove _get_last_weekday_of_month and replaced it with _get_nth_weekday_of_month() and avoid making multiple calls to the calendar module when both '#' and 'L' syntax are used at the same time. - Updated unittests for get_last_weekday_of_month() to instead simply call _get_nth_weekday_of_month()[-1]. - Create unit test for new function. Note that _get_nth_weekday_of_month() is a good candidate for caching as repeated calls to calendar add up over time, especially when evaluating multiple cron expressions concurrently.
* Cleanup PR based on feedbackLowell Alleman2021-04-074-19/+49
| | | | | | | | | | - Optimize scenario where only 'L' modifier exists in the wday expression to reduce the number of invocations of the calendar module. - Cleanup and combined parsing logic for specialty wday syntax (d#n/ Ld) - Add new unit tests to confirm proper exception handling for out-of-range 'L' and '#' nth month for the wday expression. - Add examples of new syntax in README. - Update changelog to cover new syntax and new exception.
* Removed some unintentional deltasLowell Alleman2021-04-072-7/+4
|
* New CroniterUnsupportedSyntaxError exceptionLowell Alleman2021-04-073-15/+26
| | | | | | - Added new exception class and detection log for the currently known corner case where croniter is unlikely to return the correct results. - Updated unittests to look for this new exception.
* Collapsed last day support into nth day mechanismLowell Alleman2021-04-072-90/+65
| | | | | | | | | | | | | - Removed much of my new implementation logic, and merged it into the existing nth_weekday_of_momth data structure. The difference between 5th Saturday '6#5' and last Saturday of the month 'L6', in is simply `{'l'}` vs `{5}`. - Updated tests cases based on new capabilities (which were decently expanded, and several limitations and pain points in the code eliminated)! - Marked some test cases with 'expectedFailure' because apparently in the current implementation mixing literal dow values with nth dow isn't properly supported. At least there's no unittests showing that it should work. You get results, but they appear to be wrong to me. So I'm considering this to be a bug, rather than something my new code broke.
* Working L/non-L detection; updated unittestsLowell Alleman2021-04-072-37/+89
| | | | | | - Expanded several few unit tests to show combinations of dow mixing, separately and combined, so that if mixed dow mode becomes supported there are a few tests to start from. See tests `test_lwom_mixup_*()`
* Updated unit testsLowell Alleman2021-04-071-7/+50
| | | | | - Add new unit tests showing how dow L + other should work - Rename some unittests for consistency
* Integrate parsing logic into _expand()Lowell Alleman2021-04-071-37/+35
| | | | | - Commented out the dow_types checking (L + non-L) detection and explicit blocking due to mishandled corner cases.
* Integrate core logic into _calc()Lowell Alleman2021-04-072-38/+100
|
* RefactoringLowell Alleman2021-04-072-47/+46
|
* Support last day of the month syntaxLowell Alleman2021-04-072-2/+123
| | | | | | | | | | | - Add support for 'L' in the dow field. This is done by internally repurposing the nth_weekday_of_month logic. - Currently mixing 'L' with any other value in the dow field is not supported. NOTE: This is a first proof-of-concept level code. The code seems to work (all tests pass), but the code integration is abysmal. This is the first working snapshot. This code was imported directly from a wrapper class that I wrote and published here: https://github.com/taichino/croniter/issues/159
* Fix (my own) spelling mistakes in unittestsLowell Alleman2021-04-062-4/+4
|
* Split croniter_range() tests into separate fileLowell Alleman2021-04-062-1348/+3
| | | | | | | | | Cleanly divide unit tests to avoid confusion. (A number of croniter unit tests ended up under the CroniterRangeTest class.) Note that all the prior rename and merge commits were done to preserve file history so that 'git blame' and related commands will keep working correctly showing the correct commit/author when changes were made.
* Restore test_croniter.py file nameLowell Alleman2021-04-061-0/+0
|
* Move unitest fileLowell Alleman2021-04-061-0/+1350
|
* Move unitest fileLowell Alleman2021-04-061-0/+0
|
* Rename croniter argument to croniter_range() functionLowell Alleman2021-03-262-5/+6
|
* Enable croniter_range() to use derived classLowell Alleman2021-03-263-1/+29
| | | | | | | - Add new optional 'croniter' argument to croniter_range(), making it useable with an alternate or derived croniter class. - Add unittest demonstrating a simple subclass that accepts 5-part expression (no seconds) which can now be used with croniter_range().
* Back to development: 1.0.11Mathieu Le Marec - Pasquet2021-03-252-1/+7
|
* Preparing release 1.0.101.0.10Mathieu Le Marec - Pasquet2021-03-252-2/+2
|
* remove extra commentMathieu Le Marec - Pasquet2021-03-251-1/+0
|
* Merge branch 'master' into feat-ext-lib-reductionLowell Alleman2021-03-244-6/+28
|\
| * Back to development: 1.0.10Mathieu Le Marec - Pasquet2021-03-232-1/+7
| |
| * Preparing release 1.0.91.0.9Mathieu Le Marec - Pasquet2021-03-232-2/+2
| |
| * remove futurefutureMathieu Le Marec - Pasquet2021-03-233-4/+20
| |
* | Remove natsortLowell Alleman2021-03-234-5/+14
| | | | | | | | | | | | - Remove external requirement for 'natsort' and replace it with sorted() using a custom lambda as the 'key'. - Added unit test checking that 'expanded' values are sorted as expected.
* | Fix spacing in bad_length expressionLowell Alleman2021-03-231-2/+2
|/ | | | | - Fix spacing so 'iteratorexpression' become 'iterator expression' - Fix spelling in exception class docstring
* Back to development: 1.0.9Mathieu Le Marec - Pasquet2021-03-062-1/+7
|
* Preparing release 1.0.81.0.8Mathieu Le Marec - Pasquet2021-03-062-2/+2
|
* changelogMathieu Le Marec - Pasquet2021-03-061-1/+3
|
* Update _expand to lowercase each component of the expressionPēteris Caune2021-03-062-5/+15
| | | | | This is in relation to #157. With this change, croniter accepts and correctly handles "* * 10-L * *"
* github action changeMathieu Le Marec - Pasquet2021-03-061-1/+1
|
* mv to github actionsMathieu Le Marec - Pasquet2021-03-022-21/+26
|
* Back to development: 1.0.8Mathieu Le Marec - Pasquet2021-03-022-1/+7
|
* Preparing release 1.0.71.0.7Mathieu Le Marec - Pasquet2021-03-022-2/+2
|
* changelogMathieu Le Marec - Pasquet2021-03-021-2/+4
|
* Merge remote-tracking branch 'cuu508/reject_empty_step'Mathieu Le Marec - Pasquet2021-03-022-3/+8
|\
| * Fix _expand to reject expressions with an empty stepPēteris Caune2021-02-262-3/+8
| | | | | | | | | | | | | | | | | | | | Example: 0-10/ * * * * Removed search_re, as it is identical to step_search_re. Tightened step_search_re: the "/{step}" component is optional, but if it *is* present, {step} must consist of one or more digits.