Added uschedule library#62
Conversation
|
hihi is uschedule a 'direct subset' of |
It is! The API is fully compatible with |
|
woohoo thats great, we recommend naming it cognitivegears_schedule so folks can |
Thanks @ladyada, will do. One question if you don't mind first though. Is the name "circuitpython_schedule" acceptable, or do we need to use our own names (like "cognitivegears_schedule"?) I feel like "circuitpython_schedule" might better reflect what the module does/intended audience when searching on pypi especially, but I'm happy to use your suggestion if that isn't appropriate. |
|
thats ok too, we like to have the authorname in just in case someone else decides to make a library with a similar name (or, say forks yours...) |
|
You may be able to save a little memory by using data descriptors for the weekday properties. data descriptors are handy for factoring out repeated property code. This primer is pretty good: https://docs.python.org/3/howto/descriptor.html |
|
@tannewt I tried changing this out to data descriptors, but was not able to save any significant memory (the code size offset was larger than the savings.) I did find some other areas I could likely save however, but I'm saving this for a future release as I'd like to get this out there in the meantime. I've tested on the RPi pico, Adafruit RP2040 featherwing and the S2 featherwing so far successfully, so this is likely useful in the meantime, at least on bigger/more capable circuitpython boards. |
|
All, I'm closing this and will open up a new PR with the updated module name. Thanks for all your help on this. |
Adding the CircuitPython_uschedule (https://github.com/cognitivegears/CircuitPython_uschedule) library, which is a version of schedule (https://pypi.org/project/schedule/) updated to work with CircuitPython. This library allows for the scheduling of functions in a flexible functional style. This is useful to avoid having to hand-code scheduling into a circuitpython project, especially in conjunction with RTCs and long-scheduled jobs. More information is available in the repo and readthedocs (https://circuitpython-uschedule.readthedocs.io).