pimoroni / ioe-python

Python library for the Nuvoton MS51 Pimoroni IO Expander Breakout
https://shop.pimoroni.com/products/io-expander
MIT License
8 stars 13 forks source link

Bookworm/Pi5 Compatibility: Upgrade to latest boilerplate #26

Closed Gadgetoid closed 6 months ago

Gadgetoid commented 1 year ago

This should fix the issue with ruff reporting:

qa: commands[4]> ruff --format=github .
error: unexpected argument '--format' found

And bring a few other things - including the virtual environment helpers - up to date.

:warning: Note: the master branch will need renaming to main for badges and actions to function correctly.

The changes to io_regs.py look scary, but I used black to reformat the file and avoid any mistakes, then lined up all the comments again because I will die on that hill.

Testing

If you're a Bookworm / Pi 5 user running into virtual environment issues, you can try this library like so:

git clone https://github.com/pimoroni/ioe-python -b boilerplate-update
cd ioe-python
./install.sh --unstable

The ./install.sh script will create a pimoroni virtual environment that's shared between our products. (or use your existing venv if you've already activated one.)

For the reasons behind these changes and other information, see:

thirdr commented 8 months ago

⚠ WARNING: Error: Failed to generate documentation.

Warn: Cannot find spec for pimoroni-ioexpander (from pimoroni-ioexpander):
Traceback (most recent call last):
  File "/home/ryan/.virtualenvs/pimoroni/lib/python3.11/site-packages/pdoc/extract.py", line 62, in walk_specs
    raise ModuleNotFoundError(modname)
ModuleNotFoundError: pimoroni-ioexpander
 (/home/ryan/.virtualenvs/pimoroni/lib/python3.11/site-packages/pdoc/__init__.py:509)
Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "/home/ryan/.virtualenvs/pimoroni/lib/python3.11/site-packages/pdoc/__main__.py", line 286, in <module>
    cli()
  File "/home/ryan/.virtualenvs/pimoroni/lib/python3.11/site-packages/pdoc/__main__.py", line 199, in cli
    pdoc.pdoc(
  File "/home/ryan/.virtualenvs/pimoroni/lib/python3.11/site-packages/pdoc/__init__.py", line 509, in pdoc
    for module_name in extract.walk_specs(modules):
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/ryan/.virtualenvs/pimoroni/lib/python3.11/site-packages/pdoc/extract.py", line 85, in walk_specs
    raise ValueError(
ValueError: No modules found matching spec: pimoroni-ioexpander