Miksus / rocketry

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

DOCS: sessions - incomplete example #195

Closed zakkg3 closed 1 year ago

zakkg3 commented 1 year ago

incomplete example. does not run as it is.

codecov-commenter commented 1 year ago

Codecov Report

Base: 95.36% // Head: 95.60% // Increases project coverage by +0.23% :tada:

Coverage data is based on head (32b9982) compared to base (2c0e188). Patch has no changes to coverable lines.

:mega: This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #195 +/- ## ========================================== + Coverage 95.36% 95.60% +0.23% ========================================== Files 80 89 +9 Lines 4663 4914 +251 ========================================== + Hits 4447 4698 +251 Misses 216 216 ``` | [Impacted Files](https://codecov.io/gh/Miksus/rocketry/pull/195?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Mikael+Koli) | Coverage Δ | | |---|---|---| | [rocketry/time/\_\_init\_\_.py](https://codecov.io/gh/Miksus/rocketry/pull/195?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Mikael+Koli#diff-cm9ja2V0cnkvdGltZS9fX2luaXRfXy5weQ==) | `100.00% <0.00%> (ø)` | | | [rocketry/args/\_\_init\_\_.py](https://codecov.io/gh/Miksus/rocketry/pull/195?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Mikael+Koli#diff-cm9ja2V0cnkvYXJncy9fX2luaXRfXy5weQ==) | `100.00% <0.00%> (ø)` | | | [rocketry/parse/\_\_init\_\_.py](https://codecov.io/gh/Miksus/rocketry/pull/195?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Mikael+Koli#diff-cm9ja2V0cnkvcGFyc2UvX19pbml0X18ucHk=) | `100.00% <0.00%> (ø)` | | | [rocketry/utils/\_\_init\_\_.py](https://codecov.io/gh/Miksus/rocketry/pull/195?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Mikael+Koli#diff-cm9ja2V0cnkvdXRpbHMvX19pbml0X18ucHk=) | `100.00% <0.00%> (ø)` | | | [rocketry/pybox/query/\_\_init\_\_.py](https://codecov.io/gh/Miksus/rocketry/pull/195?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Mikael+Koli#diff-cm9ja2V0cnkvcHlib3gvcXVlcnkvX19pbml0X18ucHk=) | `100.00% <0.00%> (ø)` | | | [rocketry/parameters/\_\_init\_\_.py](https://codecov.io/gh/Miksus/rocketry/pull/195?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Mikael+Koli#diff-cm9ja2V0cnkvcGFyYW1ldGVycy9fX2luaXRfXy5weQ==) | `100.00% <0.00%> (ø)` | | | [rocketry/\_\_init\_\_.py](https://codecov.io/gh/Miksus/rocketry/pull/195?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Mikael+Koli#diff-cm9ja2V0cnkvX19pbml0X18ucHk=) | `100.00% <0.00%> (ø)` | | | [rocketry/time/interval.py](https://codecov.io/gh/Miksus/rocketry/pull/195?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Mikael+Koli#diff-cm9ja2V0cnkvdGltZS9pbnRlcnZhbC5weQ==) | `99.52% <0.00%> (ø)` | | | [rocketry/log/\_\_init\_\_.py](https://codecov.io/gh/Miksus/rocketry/pull/195?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Mikael+Koli#diff-cm9ja2V0cnkvbG9nL19faW5pdF9fLnB5) | `100.00% <0.00%> (ø)` | | | [rocketry/core/schedule.py](https://codecov.io/gh/Miksus/rocketry/pull/195?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Mikael+Koli#diff-cm9ja2V0cnkvY29yZS9zY2hlZHVsZS5weQ==) | `93.66% <0.00%> (+0.02%)` | :arrow_up: | | ... and [1 more](https://codecov.io/gh/Miksus/rocketry/pull/195?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Mikael+Koli) | | 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

Thanks for the fix!

Could you add one empty line after the code block? Sphinx has this weird thing that the first line after directive is reserved for parameters.

So like this:

.. code-block:: python

    >>> from rocketry import Rocketry
    >>> app = Rocketry()
    >>> from rocketry.conds import time_of_day
    >>> condition = time_of_day.between("10:00", "14:00")
    >>> condition.observe(session=app.session)
    True

Note the empty line.

zakkg3 commented 1 year ago

Thanks for the fix!

Could you add one empty line after the code block? Sphinx has this weird thing that the first line after directive is reserved for parameters.

So like this:

.. code-block:: python

    >>> from rocketry import Rocketry
    >>> app = Rocketry()
    >>> from rocketry.conds import time_of_day
    >>> condition = time_of_day.between("10:00", "14:00")
    >>> condition.observe(session=app.session)
    True

Note the empty line.

Done :)