Miksus / rocketry

Modern scheduling library for Python
https://rocketry.readthedocs.io
MIT License
3.25k stars 105 forks source link

Django cookbook #129

Closed djnnvx closed 1 year ago

djnnvx commented 1 year ago

As promised in #125, here is the cookbook with my basic setup for Django.

It also contains a little remark regarding Django's async ORM, as I've had issues making it work at first.

Please let me know if anything is superfluous or missing, or if there is anything I can do to improve this PR.

thanks :)~

Miksus commented 1 year ago

Thanks a lot for the contribution! I think this will be very helpful for many. Getting late and cannot properly function this late but I'll check during the next week if that's fine. I'm also working on the event mechanism which is quite an interesting feature.

I think this needs to be added to the cookbook index.rst. Do you want to do it or do mind you if I add it?

codecov-commenter commented 1 year ago

Codecov Report

Base: 94.90% // Head: 94.90% // Increases project coverage by +0.00% :tada:

Coverage data is based on head (ec8865e) compared to base (9a53ad6). Patch has no changes to coverable lines.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #129 +/- ## ======================================= Coverage 94.90% 94.90% ======================================= Files 80 80 Lines 4453 4454 +1 ======================================= + Hits 4226 4227 +1 Misses 227 227 ``` | [Impacted Files](https://codecov.io/gh/Miksus/rocketry/pull/129?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Mikael+Koli) | Coverage Δ | | |---|---|---| | [rocketry/session.py](https://codecov.io/gh/Miksus/rocketry/pull/129/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Mikael+Koli#diff-cm9ja2V0cnkvc2Vzc2lvbi5weQ==) | `95.72% <0.00%> (+0.01%)` | :arrow_up: | Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Mikael+Koli). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Mikael+Koli)

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

Miksus commented 1 year ago

Hmm, it seems the docs building is not in CI for some reason but I think the docs generation fails due to the page missing in index.rst, but I'll also check it in the upcoming days 👍

If you wish to try to generate the docs:

pip install tox
tox -e docs

Then those should be in the docs/_build/html/...

djnnvx commented 1 year ago

Thanks, i'll fix it in the afternoon.

djnnvx commented 1 year ago

Hi, did you have any chance to look at this ?

Miksus commented 1 year ago

Hi, sorry, been quite busy recently. My days are quite full this week (including a bit of work on Saturday). Perhaps on Sunday evening I could have time to check and merge, or on Monday evening latest.

Miksus commented 1 year ago

I'll also try to change the wording and correct some minor typos a bit in some places later today/tomorrow if you don't mind.

djnnvx commented 1 year ago

I'll get it done by the end of the week. I'm taking some time off right now, for personal reasons. But I will get it done, no problem

Miksus commented 1 year ago

Don't worrying about it 🙂 you are contributing to open-source so I expect you to do it when you are on the mood for it. I'm not in hurry and Rocketry is a marathon.

To be honest, I haven't been in good mood for the past two weeks but hopefully I also get back on track this week.

djnnvx commented 1 year ago

This should be OK now, feel free to add any changes to wording or coding style. Please let me know if there is anything else I can do to make it better.

Miksus commented 1 year ago

Sorry for being lazy (to be honest, I had a self-inflicted headache yesterday). Unfortunately, it seems the next three days will go with hobbies (and today feeling quite tired) but hopefully on Friday I have time the latest, or in the weekend.

paolodina commented 1 year ago

No worries at all, take your rest and stay safe.

Miksus commented 1 year ago

Sorry, I broke my promise and just was too interested in side projects. I scheduled time on Sunday at 10:00 (EET) to check this finally out.

Perhaps I should have a recurrent timeslot in my calendar to check Rocketry's issues and PRs to have some structure on handling those and avoid forgetting.

djnnvx commented 1 year ago

No worries, this is not very urgent. Take your time and enjoy your passion projects!

Miksus commented 1 year ago

Yep, I think this is fine. I spotted an extra space but I don't think that's bad enough not to approve (I can fix those myself if you don't mind). 👍

As said, I'm not a Django expert so if there are things to fix, let's handle it as a community :)

Miksus commented 1 year ago

And by the way, I'll add your name to the new contributors.md if you don't mind.

djnnvx commented 1 year ago

Thanks, that's very cool. You said you were working on an event mechanism ? Maybe I could add some docs regarding that as well, if you'd like.