David Cupp10/11/2022, 9:44 PM
only takes a "rrule string". It seems easy to convert a single rrule to a string, but as far as I can tell there is no standard implementation to convert an rrule set into an rrule string . Any ideas?  https://docs.prefect.io/api-ref/orion/schemas/schedules/#prefect.orion.schemas.schedules.RRuleSchedule  https://github.com/PrefectHQ/prefect/blob/main/src/prefect/orion/schemas/schedules.py#L322  https://github.com/dateutil/dateutil/issues/856
Mason Menges10/11/2022, 9:50 PM
David Cupp10/11/2022, 9:52 PM
converts from an "rrule string" to an
(as necessary). I need the reverse of that operation. As far as I can tell, there is nothing here that can convert from the rruleset python object to an rrule string.
Hedgar10/11/2022, 10:48 PM
David Cupp10/11/2022, 10:51 PM
library: https://dateutil.readthedocs.io/en/stable/rrule.html#rruleset-examples I'm confident I know what do to once I have an rrule string, but getting to the string from the rrule set (without writing code that is too hacky) is the challenge.
Anna Geller10/11/2022, 11:26 PM
David Cupp10/11/2022, 11:39 PM
objects. So this is not a case where I personally have a schedule in mind, and need help manually writing an rrule string for it. This is about writing a robust, stable conversion. We already have code that maps from
(our existing scheduler uses the rruleset object directly) so Prefect's
seems like the best fit. But
takes a "rrule string", so as far as I know my options are (from best to worst): 1. find some code that can convert
--> "rrule string" 2. find some code that can convert
--> "rrule string" 3. implement
--> "rrule string" 4. find out that we can use multiple
objects or something else that I'm missing. Any of these solutions is possible, but of course I would prefer to avoid doing anything that involves relying on private fields of a python class, or creating our own rrule implmentation.
Anna Geller10/12/2022, 12:10 AM
David Cupp10/12/2022, 12:12 AM
Anna Geller10/12/2022, 12:12 AM
David Cupp10/12/2022, 12:15 AM
could you give me examples of schedules that you cannot generate using the current RRuleSchedule objectI'm not trying to claim that Prefect is in any way inadequate, and I think that by supporting an rrule string it technically can handle any type of schedule that we have. My problem is simply an impedance mismatch with the data types (one that I blame python's
library for). I'm feeling around for answers because, just like you don't want to roll your own crypto, I don't want to roll my own calendar logic/RFC implementations (unless I have to).
Anna Geller10/12/2022, 12:16 AM
David Cupp10/12/2022, 12:19 AM
since each one could break our implementation.
but I am sort of locked into a list of rule objects
Anna Geller10/12/2022, 12:23 AM
David Cupp10/12/2022, 12:26 AM