Skip to content
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

update wifi_simpletest with Connection Manager #177

Merged
merged 2 commits into from
Apr 10, 2024

Conversation

DJDevon3
Copy link
Contributor

@DJDevon3 DJDevon3 commented Mar 25, 2024

Updating wifi_simpletest to 9.0 with Connection Manager

Added

  • uses f-strings for formatting
  • pretty serial hierarchy view with emojis (for IDE's that support them)
  • general code cleanup and improvements
  • shouty constants to make Pylint happy.
  • imports sorted
  • uses settings.toml by default
  • using Connection Manager by default

Serial output example:

Connecting to WiFi...
Signal Strength: -58
✅ Wifi!
 | GET Text Test: http://wifitest.adafruit.com/testwifi/index.html
 | ✅ GET Response: This is a test of Adafruit WiFi!
If you can read this, its working :)
 | ✂️ Disconnected from http://wifitest.adafruit.com/testwifi/index.html
--------------------------------------------------------------------------------
 | GET Full Response Test: https://httpbin.org/get
 | ✅ Unparsed Full JSON Response: {'url': 'https://httpbin.org/get', 'headers': {'User-Agent': 'Adafruit CircuitPython', 'Host': 'httpbin.org', 'X-Amzn-Trace-Id': 'Root=1-62613a2a-1106178859bf4e2318675309'}, 'args': {}, 'origin': 'xxx.xxx.xxx.xxx'}
 | ✂️ Disconnected from https://httpbin.org/get
--------------------------------------------------------------------------------
 | ✅ JSON 'value' POST Test: https://httpbin.org/post This is an example of a JSON value
 | ✅ JSON 'value' Response: This is an example of a JSON value
 | ✂️ Disconnected from https://httpbin.org/post
--------------------------------------------------------------------------------
 | ✅ JSON 'key':'value' POST Test: https://httpbin.org/post {'Date': 'January 1, 1970'}
 | ✅ JSON 'Key':'Value' Response: {'Date': 'January 1, 1970'}
 | ✂️ Disconnected from https://httpbin.org/post
--------------------------------------------------------------------------------
Finished!

Copy link
Contributor

@FoamyGuy FoamyGuy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can get rid of the pylint disable. I ran pre-commit on this branch locally and it succeeded with that line removed.

examples/wifi/requests_wifi_simpletest.py Outdated Show resolved Hide resolved
This passes on adafruit actions but not my local pylint.  Cleaning up the discrepancy.
Copy link
Contributor

@FoamyGuy FoamyGuy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Tested successfully on Feather S3 TFT. Thank you.

@FoamyGuy FoamyGuy merged commit cbf4142 into adafruit:main Apr 10, 2024
1 check passed
@DJDevon3 DJDevon3 deleted the DJDevon3-WifiSimpleTest branch April 10, 2024 23:57
adafruit-adabot added a commit to adafruit/Adafruit_CircuitPython_Bundle that referenced this pull request Apr 11, 2024
Updating https://github.com/adafruit/Adafruit_CircuitPython_Requests to 3.2.4 from 3.2.3:
  > Merge pull request adafruit/Adafruit_CircuitPython_Requests#184 from DJDevon3/GithubAPI
  > Merge pull request adafruit/Adafruit_CircuitPython_Requests#177 from DJDevon3/DJDevon3-WifiSimpleTest
  > Merge pull request adafruit/Adafruit_CircuitPython_Requests#176 from DJDevon3/DJDevon3-MultipleCookies
  > Merge pull request adafruit/Adafruit_CircuitPython_Requests#167 from DJDevon3/DJDevon3-openskynetwork_private
  > Merge pull request adafruit/Adafruit_CircuitPython_Requests#168 from DJDevon3/DJDevon3-openskynetwork_private_area

Updating https://github.com/adafruit/Adafruit_CircuitPython_Bundle/circuitpython_library_list.md to NA from NA:
  > Updated download stats for the libraries
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