-
Notifications
You must be signed in to change notification settings - Fork 60
add docstrings to GPS class attrs #96
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
tagging @tannewt for potential review |
also @tekktrik if you want to take a quick look at this |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One pylint request. Good otherwise. Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
sat = self.sats[i] | ||
for sat in self.sats.items(): | ||
if (timestamp - sat[4]) > 30: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a bug! .items()
always returns a tuple[k, v]
(length 2) so sat[4]
will always raise an IndexError, no matter what!
The tests would have caught this, if they were run. 2f6015e for some reason decided to not run them in CI anymore, so regressions like this are likely and will make it into the next release.
(venv) PS C:\Users\jonas\Downloads\Adafruit_CircuitPython_GPS> pytest
================================================= test session starts =================================================
platform win32 -- Python 3.11.1, pytest-7.3.1, pluggy-1.0.0
rootdir: C:\Users\jonas\Downloads\Adafruit_CircuitPython_GPS
collected 48 items
tests\adafruit_gps_test.py ...............................................F [100%]
====================================================== FAILURES =======================================================
________________________________ test_GPS_update_from_GSV_both_parts_sats_are_removed _________________________________
def test_GPS_update_from_GSV_both_parts_sats_are_removed():
gps = GPS(uart=UartMock())
with mock.patch.object(GPS, "readline") as m:
with freeze_time("2021-10-20 19:00:00"):
# first part of the request
m.return_value = b"$GPGSV,2,1,04,01,40,083,46,02,17,308,41*78\r\n"
assert gps.update()
assert gps.total_mess_num == 2
assert gps.mess_num == 1
assert gps.satellites == 4
# first time we received satellites, so this must be None
assert gps.sats is None
# some time has passed so the first two satellites will be too old, but
# this one not
with freeze_time("2021-10-20 19:00:20"):
# second part of the request
m.return_value = b"$GPGSV,2,2,04,12,07,344,39,14,22,228,45*7c\r\n"
assert gps.update()
assert gps.total_mess_num == 2
assert gps.mess_num == 2
assert gps.satellites == 4
# we should now have 4 satellites from the two part request
assert set(gps.sats.keys()) == {"GP1", "GP2", "GP12", "GP14"}
# time passed (more than 30 seconds) and the next request does not
# contain the previously seen satellites but two new ones
with freeze_time("2021-10-20 19:00:31"):
# a third, one part request
m.return_value = b"$GPGSV,1,1,02,13,07,344,39,15,22,228,45*7a\r\n"
> assert gps.update()
tests\adafruit_gps_test.py:467:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
adafruit_gps.py:354: in update
result = self._parse_gsv(talker, args)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <adafruit_gps.GPS object at 0x0000014E020ECB90>, talker = 'GP', data = [1, 1, 2, 13, 7, 344, ...]
def _parse_gsv(self, talker: bytes, data: List[str]) -> bool:
# GSV - Satellites in view
# pylint: disable=too-many-branches
if data is None or len(data) not in (7, 11, 15, 19):
return False # Unexpected number of params.
data = _parse_data(
{7: _GSV7, 11: _GSV11, 15: _GSV15, 19: _GSV19}[len(data)],
data,
)
if data is None:
return False # Params didn't parse
talker = str(talker, "ascii")
# Number of messages
self.total_mess_num = data[0]
# Message number
self.mess_num = data[1]
# Number of satellites in view
self.satellites = data[2]
sat_tup = data[3:]
satlist = []
timestamp = time.monotonic()
for i in range(len(sat_tup) // 4):
j = i * 4
value = (
# Satellite number
"{}{}".format(talker, sat_tup[0 + j]),
# Elevation in degrees
sat_tup[1 + j],
# Azimuth in degrees
sat_tup[2 + j],
# signal-to-noise ratio in dB
sat_tup[3 + j],
# Timestamp
timestamp,
)
satlist.append(value)
if self._sats is None:
self._sats = []
for value in satlist:
self._sats.append(value)
if self.mess_num == self.total_mess_num:
# Last part of GSV message
if len(self._sats) == self.satellites:
# Transfer received satellites to self.sats
if self.sats is None:
self.sats = {}
else:
# Remove all satellites which haven't
# been seen for 30 seconds
timestamp = time.monotonic()
old = []
for sat in self.sats.items():
> if (timestamp - sat[4]) > 30:
E IndexError: tuple index out of range
adafruit_gps.py:703: IndexError
=============================================== short test summary info ===============================================
FAILED tests/adafruit_gps_test.py::test_GPS_update_from_GSV_both_parts_sats_are_removed - IndexError: tuple index out of range
============================================ 1 failed, 47 passed in 0.26s =============================================
(venv) PS C:\Users\jonas\Downloads\Adafruit_CircuitPython_GPS>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Weird, pre-commit
claims to have run the tests according to the printout from the composite action... it says "Passed" and not "Skipped".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do remember running precommit before merging this, but I don't recall what jobs it ran. Let me dig back in...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nvm, it was actually removed in: cca0f0f.
pre-commit
has nothing to do with running unit tests! if mypy
was setup via pre-commit
, it would have caught it.
error: Tuple index out of range [misc]
This part or something similar is needed to run the tests.
Adafruit_CircuitPython_GPS/.github/workflows/build.yml
Lines 53 to 56 in 3e41e44
- name: run tests | |
run: | | |
pip install --upgrade tox | |
tox -e py |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm big dumb, I'm thinking of pylint
. Yeah, currently pytest
isn't run though it didn't look like it was set to run before, for what it's worth. Either way, an oversight on the part of the CI, whoopsies!
I'll create an issue for fixing the libraries in general. Good catch!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah ok. I just pushed a new PR, but it's tiny and I don't mind if you ignore it in favor of yours
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, no, let's just add it to yours! Just take all the packages listed in requirements-dev.txt
and move them to optional_requirements.txt
. Then we can delete the unnecessary requirements-dev.txt
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok. do I need to maintain the attribution from requirements-dev.txt
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A good point! You can add another SPDX line for that author in the merged file so both are retained.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cool, pushed an update with those changes as well
Updating https://github.com/adafruit/Adafruit_CircuitPython_ACeP7In to 0.8.2 from 0.8.1: > Run pre-commit > Update pre-commit hooks Updating https://github.com/adafruit/Adafruit_CircuitPython_BME280 to 2.6.21 from 2.6.20: > Run pre-commit > Update pre-commit hooks Updating https://github.com/adafruit/Adafruit_CircuitPython_BNO08X to 1.2.1 from 1.2.0: > Run pre-commit > Update pre-commit hooks Updating https://github.com/adafruit/Adafruit_CircuitPython_DotStar to 2.2.8 from 2.2.7: > Run pre-commit > Update pre-commit hooks Updating https://github.com/adafruit/Adafruit_CircuitPython_ENS160 to 1.0.3 from 1.0.2: > Run pre-commit > Update pre-commit hooks Updating https://github.com/adafruit/Adafruit_CircuitPython_EPD to 2.11.1 from 2.11.0: > Update pre-commit hooks > Merge pull request adafruit/Adafruit_CircuitPython_EPD#63 from sdomoszlai13/patch-1 Updating https://github.com/adafruit/Adafruit_CircuitPython_floppy to 1.0.8 from 1.0.7: > Run pre-commit > Update pre-commit hooks Updating https://github.com/adafruit/Adafruit_CircuitPython_GPS to 3.10.8 from 3.10.7: > Merge pull request adafruit/Adafruit_CircuitPython_GPS#97 from awordforthat/issue82/update-gps-docs-amend > Run pre-commit > Update pre-commit hooks > Merge pull request adafruit/Adafruit_CircuitPython_GPS#96 from awordforthat/issue82/update-gps-docs > Add upload url to release action > Add .venv to .gitignore Updating https://github.com/adafruit/Adafruit_CircuitPython_HT16K33 to 4.6.4 from 4.6.3: > Run pre-commit > Update pre-commit hooks Updating https://github.com/adafruit/Adafruit_CircuitPython_IS31FL3731 to 3.3.8 from 3.3.7: > Run pre-commit > Update pre-commit hooks Updating https://github.com/adafruit/Adafruit_CircuitPython_LSM6DS to 4.5.9 from 4.5.8: > Run pre-commit > Update pre-commit hooks Updating https://github.com/adafruit/Adafruit_CircuitPython_MCP230xx to 2.5.10 from 2.5.9: > Run pre-commit > Update pre-commit hooks Updating https://github.com/adafruit/Adafruit_CircuitPython_MCP4728 to 1.3.6 from 1.3.5: > Run pre-commit > Update pre-commit hooks > Add upload url to release action > Add .venv to .gitignore Updating https://github.com/adafruit/Adafruit_CircuitPython_MLX90395 to 1.0.10 from 1.0.9: > Run pre-commit > Update pre-commit hooks > Add upload url to release action > Add .venv to .gitignore > Update .pylintrc for v2.15.5 > Fix release CI files > Update pylint to 2.15.5 > Updated pylint version to 2.13.0 > Switching to composite actions Updating https://github.com/adafruit/Adafruit_CircuitPython_MLX90640 to 1.2.15 from 1.2.14: > Run pre-commit > Update pre-commit hooks > Add upload url to release action Updating https://github.com/adafruit/Adafruit_CircuitPython_MS8607 to 1.0.17 from 1.0.16: > Run pre-commit > Update pre-commit hooks > Add upload url to release action > Add .venv to .gitignore Updating https://github.com/adafruit/Adafruit_CircuitPython_NeoTre to 1.3.3 from 1.3.2: > Run pre-commit > Update pre-commit hooks > Add upload url to release action Updating https://github.com/adafruit/Adafruit_CircuitPython_OV to 1.0.12 from 1.0.11: > Run pre-commit > Update pre-commit hooks Updating https://github.com/adafruit/Adafruit_CircuitPython_PCA9685 to 3.4.9 from 3.4.8: > Run pre-commit > Update pre-commit hooks Updating https://github.com/adafruit/Adafruit_CircuitPython_PCF8591 to 1.0.15 from 1.0.14: > Run pre-commit > Update pre-commit hooks Updating https://github.com/adafruit/Adafruit_CircuitPython_PyPortal to 6.2.9 from 6.2.8: > Run pre-commit > Update pre-commit hooks > Add upload url to release action > Add .venv to .gitignore > Update .pylintrc for v2.15.5 > Fix release CI files > Update pylint to 2.15.5 > Updated pylint version to 2.13.0 > Switching to composite actions Updating https://github.com/adafruit/Adafruit_CircuitPython_RA8875 to 3.1.17 from 3.1.16: > Run pre-commit > Update pre-commit hooks > Add upload url to release action > Add .venv to .gitignore > Update .pylintrc for v2.15.5 > Fix release CI files > Update pylint to 2.15.5 > Updated pylint version to 2.13.0 > Switching to composite actions Updating https://github.com/adafruit/Adafruit_CircuitPython_RFM69 to 2.1.15 from 2.1.14: > Run pre-commit > Update pre-commit hooks Updating https://github.com/adafruit/Adafruit_CircuitPython_RPLIDAR to 1.2.11 from 1.2.10: > Run pre-commit > Update pre-commit hooks > Add upload url to release action > Add .venv to .gitignore > Update .pylintrc for v2.15.5 > Fix release CI files > Update pylint to 2.15.5 > Updated pylint version to 2.13.0 > Switching to composite actions Updating https://github.com/adafruit/Adafruit_CircuitPython_SD to 3.3.19 from 3.3.18: > Run pre-commit > Update pre-commit hooks Updating https://github.com/adafruit/Adafruit_CircuitPython_Seesaw to 1.12.1 from 1.12.0: > Run pre-commit > Update pre-commit hooks Updating https://github.com/adafruit/Adafruit_CircuitPython_SGP40 to 1.3.12 from 1.3.11: > Run pre-commit > Update pre-commit hooks > Add upload url to release action Updating https://github.com/adafruit/Adafruit_CircuitPython_SharpMemoryDisplay to 1.4.8 from 1.4.7: > Run pre-commit > Update pre-commit hooks Updating https://github.com/adafruit/Adafruit_CircuitPython_SHT4x to 1.0.16 from 1.0.15: > Run pre-commit > Update pre-commit hooks > Add upload url to release action > Add .venv to .gitignore Updating https://github.com/adafruit/Adafruit_CircuitPython_SI7021 to 4.1.8 from 4.1.7: > Run pre-commit > Update pre-commit hooks Updating https://github.com/adafruit/Adafruit_CircuitPython_SPD1656 to 0.8.3 from 0.8.2: > Run pre-commit > Update pre-commit hooks Updating https://github.com/adafruit/Adafruit_CircuitPython_SSD1305 to 1.3.16 from 1.3.15: > Run pre-commit > Update pre-commit hooks > Add upload url to release action > Add .venv to .gitignore Updating https://github.com/adafruit/Adafruit_CircuitPython_SSD1306 to 2.12.13 from 2.12.12: > Run pre-commit > Update pre-commit hooks > Add upload url to release action > Add .venv to .gitignore Updating https://github.com/adafruit/Adafruit_CircuitPython_SSD1322 to 1.3.7 from 1.3.6: > Run pre-commit > Update pre-commit hooks > Add upload url to release action > Add .venv to .gitignore > Update .pylintrc for v2.15.5 > Fix release CI files > Update pylint to 2.15.5 > Updated pylint version to 2.13.0 > Switching to composite actions Updating https://github.com/adafruit/Adafruit_CircuitPython_SSD1325 to 1.4.9 from 1.4.8: > Run pre-commit > Update pre-commit hooks > Add upload url to release action > Add .venv to .gitignore Updating https://github.com/adafruit/Adafruit_CircuitPython_SSD1331 to 1.3.8 from 1.3.7: > Run pre-commit > Update pre-commit hooks > Add upload url to release action > Add .venv to .gitignore > Update .pylintrc for v2.15.5 > Fix release CI files > Update pylint to 2.15.5 > Updated pylint version to 2.13.0 > Switching to composite actions Updating https://github.com/adafruit/Adafruit_CircuitPython_SSD1351 to 1.3.8 from 1.3.7: > Run pre-commit > Update pre-commit hooks > Add upload url to release action > Add .venv to .gitignore > Update .pylintrc for v2.15.5 > Fix release CI files > Update pylint to 2.15.5 > Updated pylint version to 2.13.0 > Switching to composite actions Updating https://github.com/adafruit/Adafruit_CircuitPython_SSD1608 to 1.2.18 from 1.2.17: > Run pre-commit > Update pre-commit hooks > Add upload url to release action > Add .venv to .gitignore > Update .pylintrc for v2.15.5 > Fix release CI files > Update pylint to 2.15.5 > Updated pylint version to 2.13.0 > Switching to composite actions Updating https://github.com/adafruit/Adafruit_CircuitPython_SSD1675 to 1.2.1 from 1.2.0: > Run pre-commit > Update pre-commit hooks Updating https://github.com/adafruit/Adafruit_CircuitPython_SSD1680 to 1.1.1 from 1.1.0: > Run pre-commit > Update pre-commit hooks Updating https://github.com/adafruit/Adafruit_CircuitPython_SSD1681 to 1.1.1 from 1.1.0: > Run pre-commit > Update pre-commit hooks Updating https://github.com/adafruit/Adafruit_CircuitPython_ST7735 to 1.2.9 from 1.2.8: > Run pre-commit > Update pre-commit hooks > Add upload url to release action > Add .venv to .gitignore > Update .pylintrc for v2.15.5 > Fix release CI files > Update pylint to 2.15.5 > Updated pylint version to 2.13.0 > Switching to composite actions Updating https://github.com/adafruit/Adafruit_CircuitPython_ST7735R to 1.5.11 from 1.5.10: > Run pre-commit > Update pre-commit hooks Updating https://github.com/adafruit/Adafruit_CircuitPython_ST7789 to 1.5.16 from 1.5.15: > Run pre-commit > Update pre-commit hooks Updating https://github.com/adafruit/Adafruit_CircuitPython_STMPE610 to 1.3.10 from 1.3.9: > Run pre-commit > Update pre-commit hooks > Add upload url to release action > Add .venv to .gitignore > Update .pylintrc for v2.15.5 > Fix release CI files > Update pylint to 2.15.5 > Updated pylint version to 2.13.0 > Switching to composite actions Updating https://github.com/adafruit/Adafruit_CircuitPython_TLA202X to 1.0.13 from 1.0.12: > Run pre-commit > Update pre-commit hooks > Add upload url to release action > Add .venv to .gitignore Updating https://github.com/adafruit/Adafruit_CircuitPython_TLC5947 to 1.3.13 from 1.3.12: > Run pre-commit > Update pre-commit hooks > Add upload url to release action > Add .venv to .gitignore > Update .pylintrc for v2.15.5 > Fix release CI files > Update pylint to 2.15.5 > Updated pylint version to 2.13.0 > Switching to composite actions Updating https://github.com/adafruit/Adafruit_CircuitPython_TLC59711 to 2.0.10 from 2.0.9: > Run pre-commit > Update pre-commit hooks > Add upload url to release action Updating https://github.com/adafruit/Adafruit_CircuitPython_TMP006 to 2.1.15 from 2.1.14: > Run pre-commit > Update pre-commit hooks > Add upload url to release action > Add .venv to .gitignore > Update .pylintrc for v2.15.5 > Fix release CI files > Update pylint to 2.15.5 > Updated pylint version to 2.13.0 > Switching to composite actions Updating https://github.com/adafruit/Adafruit_CircuitPython_TM to 1.1.9 from 1.1.8: > Run pre-commit > Update pre-commit hooks Updating https://github.com/adafruit/Adafruit_CircuitPython_Trellis to 1.3.16 from 1.3.15: > Run pre-commit > Update pre-commit hooks > Add upload url to release action > Add .venv to .gitignore > Update .pylintrc for v2.15.5 > Fix release CI files > Update pylint to 2.15.5 > Updated pylint version to 2.13.0 > Switching to composite actions Updating https://github.com/adafruit/Adafruit_CircuitPython_UC8151D to 1.2.1 from 1.2.0: > Run pre-commit > Update pre-commit hooks > Add upload url to release action > Add .venv to .gitignore Updating https://github.com/adafruit/Adafruit_CircuitPython_WS2801 to 0.10.15 from 0.10.14: > Run pre-commit > Update pre-commit hooks > Add upload url to release action > Add .venv to .gitignore > Update .pylintrc for v2.15.5 > Fix release CI files > Update pylint to 2.15.5 > Updated pylint version to 2.13.0 > Switching to composite actions Updating https://github.com/adafruit/Adafruit_CircuitPython_AirLift to 1.0.10 from 1.0.9: > Run pre-commit > Update pre-commit hooks Updating https://github.com/adafruit/Adafruit_CircuitPython_AzureIoT to 2.5.14 from 2.5.13: > Run pre-commit > Update pre-commit hooks Updating https://github.com/adafruit/Adafruit_CircuitPython_BLE to 10.0.2 from 10.0.1: > Run pre-commit > Update pre-commit hooks Updating https://github.com/adafruit/Adafruit_CircuitPython_BluefruitConnect to 1.2.10 from 1.2.9: > Run pre-commit > Update pre-commit hooks Updating https://github.com/adafruit/Adafruit_CircuitPython_BusDevice to 5.2.5 from 5.2.4: > Run pre-commit > Update pre-commit hooks Updating https://github.com/adafruit/Adafruit_CircuitPython_Display_Text to 2.28.2 from 2.28.1: > Run pre-commit > Update pre-commit hooks Updating https://github.com/adafruit/Adafruit_CircuitPython_DisplayIO_Layout to 1.19.16 from 1.19.15: > Run pre-commit > Update pre-commit hooks Updating https://github.com/adafruit/Adafruit_CircuitPython_FancyLED to 1.4.16 from 1.4.15: > Run pre-commit > Update pre-commit hooks Updating https://github.com/adafruit/Adafruit_CircuitPython_framebuf to 1.6.2 from 1.6.1: > Merge pull request adafruit/Adafruit_CircuitPython_framebuf#55 from tekktrik/precommit-update Updating https://github.com/adafruit/Adafruit_CircuitPython_hashlib to 1.4.12 from 1.4.11: > Run pre-commit > Update pre-commit hooks Updating https://github.com/adafruit/Adafruit_CircuitPython_HID to 5.3.5 from 5.3.4: > Run pre-commit > Update pre-commit hooks Updating https://github.com/adafruit/Adafruit_CircuitPython_LED_Animation to 2.7.1 from 2.7.0: > Run pre-commit > Update pre-commit hooks Updating https://github.com/adafruit/Adafruit_CircuitPython_MagTag to 2.2.5 from 2.2.4: > Run pre-commit > Update pre-commit hooks Updating https://github.com/adafruit/Adafruit_CircuitPython_MatrixPortal to 3.0.12 from 3.0.11: > Run pre-commit > Update pre-commit hooks Updating https://github.com/adafruit/Adafruit_CircuitPython_MIDI to 1.4.15 from 1.4.14: > Run pre-commit > Update pre-commit hooks > Add upload url to release action > Add .venv to .gitignore Updating https://github.com/adafruit/Adafruit_CircuitPython_Motor to 3.4.10 from 3.4.9: > Run pre-commit > Update pre-commit hooks Updating https://github.com/adafruit/Adafruit_CircuitPython_Pixelbuf to 2.0.1 from 2.0.0: > Run pre-commit > Update pre-commit hooks > Add upload url to release action Updating https://github.com/adafruit/Adafruit_CircuitPython_PortalBase to 1.14.7 from 1.14.6: > Merge pull request adafruit/Adafruit_CircuitPython_PortalBase#90 from tekktrik/main > Run pre-commit > Update pre-commit hooks > Add upload url to release action Updating https://github.com/adafruit/Adafruit_CircuitPython_ProgressBar to 2.3.10 from 2.3.9: > Run pre-commit > Update pre-commit hooks > Add upload url to release action > Merge pull request adafruit/Adafruit_CircuitPython_ProgressBar#38 from tekktrik/fix/gitginore-venv Updating https://github.com/adafruit/Adafruit_CircuitPython_PyBadger to 3.7.11 from 3.7.10: > Run pre-commit > Update pre-commit hooks > Add upload url to release action Updating https://github.com/adafruit/Adafruit_CircuitPython_Requests to 1.13.3 from 1.13.2: > Run pre-commit > Update pre-commit hooks Updating https://github.com/adafruit/Adafruit_CircuitPython_SimpleMath to 2.0.9 from 2.0.8: > Run pre-commit > Update pre-commit hooks > Add upload url to release action > Add .venv to .gitignore > Update .pylintrc for v2.15.5 > Fix release CI files > Update pylint to 2.15.5 > Updated pylint version to 2.13.0 > Switching to composite actions Updating https://github.com/adafruit/Adafruit_CircuitPython_TinyLoRa to 2.2.14 from 2.2.13: > Run pre-commit > Update pre-commit hooks Updating https://github.com/adafruit/Adafruit_CircuitPython_turtle to 2.2.13 from 2.2.12: > Run pre-commit > Update pre-commit hooks > Add upload url to release action > Add .venv to .gitignore Updating https://github.com/adafruit/Adafruit_CircuitPython_Bundle/circuitpython_library_list.md to NA from NA: > Updated download stats for the libraries
Addresses issue #82. Added docstrings and built locally with sphinx to check formatting, etc. Some pylint errors addressed while I'm here.
Open question: unused vars and missing parsers
There are two unused attributes on the
GPS
class,true_track
andmag_track
. These come from the GPGTV sentence type (if you really want the gory details, see these docs for more). As of right now, the class does not handle this message type. It used to, but it was removed with a few others in this commit. I believe that this was unintentional or incomplete, since the other removed sentence types did not have their parsers removed. However, sometime between that commit and the date of this PR, the other parsers did get removed.I'll propose that in this PR, we remove the two lingering variables, and raise a new issue/question around whether the old sentence types should come back (or just find out why they were removed). This is already done, just calling attention to it.
Other notes:
Some attributes have multiple options that need to be explained. The additional pipe characters you see are to force sphinx to preserve newlines so that what appears on Read The Docs is nicely formatted, e.g.: