Skip to content

Update the import of adafruit_dps310 to latest #28

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

Closed
wants to merge 1 commit into from

Conversation

Neradoc
Copy link
Contributor

@Neradoc Neradoc commented Jan 9, 2022

Fixes this after the latest DPS310 release. I assumed we want the advanced by default on the Fun House.

Traceback (most recent call last):
  File "code.py", line 13, in <module>
  File "adafruit_funhouse/__init__.py", line 110, in __init__
  File "adafruit_funhouse/peripherals.py", line 86, in __init__
AttributeError: 'module' object has no attribute 'DPS310'

https://github.com/adafruit/Adafruit_CircuitPython_DPS310/releases/tag/2.0.0

This fixes this after the latest DPS310 release. I assumed we want the advanced by default on the Fun House.
```py
Traceback (most recent call last):
  File "code.py", line 13, in <module>
  File "adafruit_funhouse/__init__.py", line 110, in __init__
  File "adafruit_funhouse/peripherals.py", line 86, in __init__
AttributeError: 'module' object has no attribute 'DPS310'
```
adafruit/Adafruit_CircuitPython_DPS310#15
@FoamyGuy
Copy link
Contributor

FoamyGuy commented Jan 9, 2022

I think the CI fails here ultimately due to adafruit_requests not having requirements for wiznet and perhaps some other libraries that are used for typing.

A larger discussion would be good to come up with a long term solution, maybe we could use separate requirements.txt files for installing / running vs. usage with sphinx for docs generation for cases where an external dependency is only needed for types.

For now though I've submitted a minimal fix here: adafruit/Adafruit_CircuitPython_Requests#95
It would allow this PR to pass I think.

@FoamyGuy
Copy link
Contributor

FoamyGuy commented Jan 9, 2022

It's odd that adafruit_requests can built it's own sphinx docs fine but the ones that are importing it like this one get hung up like this.

@FoamyGuy
Copy link
Contributor

FoamyGuy commented Jan 9, 2022

Thinking a bit further I think the best solution for this is to add the default import to init.py inside of the DPS310 library, like you mentioned on discord.

That should resolve this and provide better overall backwards compatibility for that driver.

@FoamyGuy
Copy link
Contributor

FoamyGuy commented Jan 9, 2022

Going to close this one. This should be resolved by #20 and it allows this library to need no change.

@FoamyGuy FoamyGuy closed this Jan 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants