pi-top / pi-top-Python-SDK

pi-top's Python SDK (pitop package)
Apache License 2.0
27 stars 4 forks source link

Add functions to manage sections in config files #559

Closed jcapona closed 1 year ago

jcapona commented 1 year ago
Status Ticket/Issue
Ready/Hold Ticket

Main changes

Add functions to add/remove sections from configuration files. The convention used for the blocks to add/remove from files is as follows:

# [<TITLE>] START
#
# <DESCRIPTION>
#
# Notes:
# <NOTES>
#
<CONTENT>
#
# [<TITLE>] END

Which is similar to what we already have in some configuration files in pi-topOS.

Screenshots (feature, test output, profiling, dev tools etc)

[insert screenshots here]

Other notes (e.g. implementation quirks, edge cases, questions / issues)

-

Manual testing tips

-

Tag anyone who definitely needs to review or help

-

codecov[bot] commented 1 year ago

Codecov Report

Base: 60.34% // Head: 61.93% // Increases project coverage by +1.59% :tada:

Coverage data is based on head (4c832e3) compared to base (bfbab65). Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #559 +/- ## ========================================== + Coverage 60.34% 61.93% +1.59% ========================================== Files 146 147 +1 Lines 7258 7288 +30 ========================================== + Hits 4380 4514 +134 + Misses 2878 2774 -104 ``` | Flag | Coverage Δ | | |---|---|---| | unittests | `61.93% <100.00%> (+1.59%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pi-top#carryforward-flags-in-the-pull-request-comment) to find out more. | [Impacted Files](https://codecov.io/gh/pi-top/pi-top-Python-SDK/pull/559?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pi-top) | Coverage Δ | | |---|---|---| | [packages/common/pitop/common/configuration\_file.py](https://codecov.io/gh/pi-top/pi-top-Python-SDK/pull/559/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pi-top#diff-cGFja2FnZXMvY29tbW9uL3BpdG9wL2NvbW1vbi9jb25maWd1cmF0aW9uX2ZpbGUucHk=) | `100.00% <100.00%> (ø)` | | | [...cs/pitop/robotics/navigation/core/goal\_criteria.py](https://codecov.io/gh/pi-top/pi-top-Python-SDK/pull/559/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pi-top#diff-cGFja2FnZXMvcm9ib3RpY3MvcGl0b3Avcm9ib3RpY3MvbmF2aWdhdGlvbi9jb3JlL2dvYWxfY3JpdGVyaWEucHk=) | `89.28% <0.00%> (-7.15%)` | :arrow_down: | | [...op/pitop/virtual\_hardware/simulation/simulation.py](https://codecov.io/gh/pi-top/pi-top-Python-SDK/pull/559/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pi-top#diff-cGFja2FnZXMvcGl0b3AvcGl0b3AvdmlydHVhbF9oYXJkd2FyZS9zaW11bGF0aW9uL3NpbXVsYXRpb24ucHk=) | `93.45% <0.00%> (+43.92%)` | :arrow_up: | | [...pitop/pitop/virtual\_hardware/simulation/sprites.py](https://codecov.io/gh/pi-top/pi-top-Python-SDK/pull/559/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pi-top#diff-cGFja2FnZXMvcGl0b3AvcGl0b3AvdmlydHVhbF9oYXJkd2FyZS9zaW11bGF0aW9uL3Nwcml0ZXMucHk=) | `95.65% <0.00%> (+47.82%)` | :arrow_up: | | [...top/pitop/virtual\_hardware/simulation/simsprite.py](https://codecov.io/gh/pi-top/pi-top-Python-SDK/pull/559/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pi-top#diff-cGFja2FnZXMvcGl0b3AvcGl0b3AvdmlydHVhbF9oYXJkd2FyZS9zaW11bGF0aW9uL3NpbXNwcml0ZS5weQ==) | `95.38% <0.00%> (+56.92%)` | :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=pi-top). 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=pi-top)

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