cron expression parser #127

Merged
Jef Roosens merged 20 commits from cron into dev 2022-04-12 21:37:03 +02:00

This PR implements a parser for a subset of the cron expression syntax. I want to merge this separately from the actual cron implementation itself because I'd like the testing workflow to be added to dev first. It's also already a rather big PR, so making it any bigger would not be a good idea.

The syntax for the cron expressions are of the form a b c d, where c & d are optional & will be replaced by * if absent. Each of the four parts can be one or multiple (divided using ,) of *, n, n-m, */n, n/m or n-m/o, with n, m & o being positive whole numbers.

I'm keeping this PR in WIP until I've written an adequate amount of tests for both the parser & the 'next occurence' calculation function.

This PR implements a parser for a subset of the cron expression syntax. I want to merge this separately from the actual cron implementation itself because I'd like the testing workflow to be added to dev first. It's also already a rather big PR, so making it any bigger would not be a good idea. The syntax for the cron expressions are of the form `a b c d`, where c & d are optional & will be replaced by `*` if absent. Each of the four parts can be one or multiple (divided using `,`) of `*`, `n`, `n-m`, `*/n`, `n/m` or `n-m/o`, with n, m & o being positive whole numbers. I'm keeping this PR in WIP until I've written an adequate amount of tests for both the parser & the 'next occurence' calculation function.
Jef Roosens added this to the 0.3.0 milestone 2022-04-12 11:15:22 +02:00
Jef Roosens added the
enhancement
label 2022-04-12 11:15:22 +02:00
Jef Roosens added 13 commits 2022-04-12 11:15:23 +02:00
ci/woodpecker/push/arch unknown status Details
ci/woodpecker/push/docker unknown status Details
ci/woodpecker/push/lint Pipeline failed Details
ci/woodpecker/push/build Pipeline failed Details
41ee08045b
Start of cron implementation
ci/woodpecker/push/arch unknown status Details
ci/woodpecker/push/docker unknown status Details
ci/woodpecker/push/lint Pipeline failed Details
ci/woodpecker/push/build Pipeline failed Details
e890128bda
Ran formatter
ci/woodpecker/push/arch unknown status Details
ci/woodpecker/push/docker unknown status Details
ci/woodpecker/push/lint Pipeline failed Details
ci/woodpecker/push/build Pipeline was successful Details
ci/woodpecker/push/test Pipeline was successful Details
f92a20fcf8
Gave all modules own directory; added test CI pipeline
ci/woodpecker/push/arch unknown status Details
ci/woodpecker/push/docker unknown status Details
ci/woodpecker/push/build Pipeline failed Details
ci/woodpecker/push/lint Pipeline failed Details
ci/woodpecker/push/test Pipeline was successful Details
135b6c3d7f
Alpha version cron 'next' function
ci/woodpecker/push/arch unknown status Details
ci/woodpecker/push/docker unknown status Details
ci/woodpecker/push/lint Pipeline failed Details
ci/woodpecker/push/build Pipeline was successful Details
ci/woodpecker/push/test Pipeline was successful Details
0e5f31e649
Added some much-needed documentation
ci/woodpecker/push/arch unknown status Details
ci/woodpecker/push/docker unknown status Details
ci/woodpecker/push/build Pipeline was successful Details
ci/woodpecker/push/test Pipeline failed Details
ci/woodpecker/push/lint Pipeline failed Details
f4bb03f488
Tests n bug fixes
Jef Roosens added 14 commits 2022-04-12 11:30:25 +02:00
ci/woodpecker/push/builder unknown status Details
ci/woodpecker/push/deploy unknown status Details
ci/woodpecker/push/lint unknown status Details
ci/woodpecker/push/build Pipeline was successful Details
ci/woodpecker/push/docker Pipeline was successful Details
ci/woodpecker/tag/builder Pipeline was successful Details
ci/woodpecker/tag/build Pipeline was successful Details
ci/woodpecker/tag/lint Pipeline was successful Details
ci/woodpecker/tag/gitea Pipeline was successful Details
ci/woodpecker/tag/docker Pipeline was successful Details
ci/woodpecker/tag/deploy Pipeline failed Details
dec2e9d759
Merge pull request 'Release 0.1.0' (#65) from dev into main
Reviewed-on: Chewing_Bever/vieter#65
ci/woodpecker/push/arch unknown status Details
ci/woodpecker/push/docker unknown status Details
ci/woodpecker/push/lint Pipeline failed Details
ci/woodpecker/push/build Pipeline was successful Details
ebe01c2d44
Added route to request desc file; updated builder for new route (fixes #118)
ci/woodpecker/push/arch unknown status Details
ci/woodpecker/push/docker unknown status Details
ci/woodpecker/push/lint Pipeline was successful Details
ci/woodpecker/push/build Pipeline was successful Details
a65207f961
Solved the "removing old packages" problem (I think)
ci/woodpecker/push/arch unknown status Details
ci/woodpecker/push/docker unknown status Details
ci/woodpecker/push/lint Pipeline was successful Details
ci/woodpecker/push/build Pipeline was successful Details
62bee78955
Updated changelog
ci/woodpecker/push/lint unknown status Details
ci/woodpecker/push/arch Pipeline was successful Details
ci/woodpecker/push/build Pipeline was successful Details
ci/woodpecker/push/docker Pipeline was successful Details
8e7d3508d2
Merge pull request 'Old packages are now removed properly' (#120) from remove-old-packages into dev
Reviewed-on: Chewing_Bever/vieter#120
ci/woodpecker/push/arch unknown status Details
ci/woodpecker/push/docker unknown status Details
ci/woodpecker/push/lint Pipeline was successful Details
ci/woodpecker/push/build Pipeline was successful Details
aacadca7a8
Bumped version in cli
ci/woodpecker/push/arch unknown status Details
ci/woodpecker/push/docker unknown status Details
ci/woodpecker/push/lint Pipeline was successful Details
ci/woodpecker/push/build Pipeline was successful Details
207344a99d
Merge branch 'main' into release-0.2.0
ci/woodpecker/push/arch unknown status Details
ci/woodpecker/push/docker unknown status Details
ci/woodpecker/push/lint Pipeline was successful Details
ci/woodpecker/push/build Pipeline was successful Details
3b15066329
Removed unnecessary log output
ci/woodpecker/tag/lint Pipeline was successful Details
ci/woodpecker/tag/arch Pipeline was successful Details
ci/woodpecker/tag/build Pipeline was successful Details
ci/woodpecker/tag/gitea Pipeline was successful Details
ci/woodpecker/tag/docker Pipeline was successful Details
ci/woodpecker/push/lint unknown status Details
ci/woodpecker/push/arch Pipeline was successful Details
ci/woodpecker/push/build Pipeline was successful Details
ci/woodpecker/push/docker Pipeline was successful Details
4b6a661d71
Merge pull request 'Release 0.2.0' (#121) from release-0.2.0 into main
Reviewed-on: Chewing_Bever/vieter#121
Jef Roosens added 1 commit 2022-04-12 11:37:51 +02:00
Jef Roosens added 1 commit 2022-04-12 14:22:54 +02:00
Jef Roosens added 1 commit 2022-04-12 20:53:32 +02:00
ci/woodpecker/push/arch unknown status Details
ci/woodpecker/push/docker unknown status Details
ci/woodpecker/pr/arch Pipeline is pending Details
ci/woodpecker/pr/build Pipeline is pending Details
ci/woodpecker/pr/lint unknown status Details
ci/woodpecker/pr/test Pipeline is pending Details
ci/woodpecker/push/lint Pipeline failed Details
ci/woodpecker/pr/docker unknown status Details
ci/woodpecker/push/build Pipeline failed Details
ci/woodpecker/push/test Pipeline failed Details
e6033f9ab4
Ran vfmt
Jef Roosens added 1 commit 2022-04-12 21:16:29 +02:00
ci/woodpecker/push/arch unknown status Details
ci/woodpecker/push/docker unknown status Details
ci/woodpecker/push/lint Pipeline failed Details
ci/woodpecker/push/build Pipeline was successful Details
ci/woodpecker/push/test Pipeline was successful Details
1116fee3fc
Actually possibly kinda decent cron next func
Jef Roosens added 1 commit 2022-04-12 21:23:55 +02:00
ci/woodpecker/push/arch unknown status Details
ci/woodpecker/push/docker unknown status Details
ci/woodpecker/push/lint Pipeline was successful Details
ci/woodpecker/push/build Pipeline was successful Details
ci/woodpecker/push/test Pipeline was successful Details
5ce431aa4a
Added two more test dates; pleased v vet

I'm tempted to merge this PR prematurely. It's a critical part for developing all other parts of the improved builder system, & testing it will take a long time anyways so it might be useful to just do this throughout development of the 0.3.0 release.

I'm tempted to merge this PR prematurely. It's a critical part for developing all other parts of the improved builder system, & testing it will take a long time anyways so it might be useful to just do this throughout development of the 0.3.0 release.
Jef Roosens changed title from WIP: cron expression parser to cron expression parser 2022-04-12 21:24:45 +02:00
Jef Roosens added 1 commit 2022-04-12 21:28:58 +02:00
ci/woodpecker/push/arch unknown status Details
ci/woodpecker/push/docker unknown status Details
ci/woodpecker/push/lint Pipeline was successful Details
ci/woodpecker/push/build Pipeline was successful Details
ci/woodpecker/push/test Pipeline was successful Details
bd0c276fd8
Added 'WIP' notice for cron cli
Jef Roosens merged commit 05b34d3ffd into dev 2022-04-12 21:37:03 +02:00
Sign in to join this conversation.
There is no content yet.