| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
|
|
|
| |
rel #162
|
|
|
|
| |
Closes: taichino/croniter#162
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
| |
when crontab day only one day, but last month not has the day, example crontab expression: 0 6 30 3 *
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- 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.
|
|
|
|
|
|
|
|
|
|
| |
- 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.
|
| |
|
|
|
|
|
|
| |
- 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.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- 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.
|
|
|
|
|
|
| |
- 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_*()`
|
|
|
|
|
| |
- Add new unit tests showing how dow L + other should work
- Rename some unittests for consistency
|
|
|
|
|
| |
- Commented out the dow_types checking (L + non-L) detection and explicit
blocking due to mishandled corner cases.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
- 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
|
| |
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
- 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().
|
| |
|
| |
|
| |
|
|\ |
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| | |
- 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 so 'iteratorexpression' become 'iterator expression'
- Fix spelling in exception class docstring
|
| |
|
| |
|
| |
|
|
|
|
|
| |
This is in relation to #157. With this change, croniter
accepts and correctly handles "* * 10-L * *"
|
| |
|
| |
|
| |
|
| |
|
| |
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|