Skip to content

Secrets cleanup #105

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

Merged
merged 3 commits into from
Feb 23, 2025
Merged

Secrets cleanup #105

merged 3 commits into from
Feb 23, 2025

Conversation

justmobilize
Copy link
Contributor

@justmobilize justmobilize commented Feb 22, 2025

Minor updates to remove secrets usage and update keys:

  1. Remove secrets_data
  2. Update secrets.py comments to settings.toml
  3. Update AIO keys from AIO_* to ADAFRUIT_AIO_*
  4. Update learn links to point to correct page for settings.toml
  5. Update adafruit_portalbase.network.NetworkBase._get_setting to handle newer ADAFRUIT_AIO_* key names and show a warning when using secrets (tests added to make sure it's working as expected)

Tested on a PyPortal running 9.2.4

@justmobilize
Copy link
Contributor Author

@dhalbert I will make the ready for review after adafruit/Adafruit_CircuitPython_PyPortal#137 is merged and released (because of the secrets_data removal)

@dhalbert
Copy link
Contributor

@justmobilize There are other libraries that use PortalBase: FunHouse, MagTag, ESP32S2TFT, Qualia, MatrixPortal (using the short names). I grep'd for PortalBase in the bundle to find all the mentions.

@justmobilize
Copy link
Contributor Author

@dhalbert doing a search, PyPortal was the only one that used secrets_data: https://github.com/search?q=org%3Aadafruit%20secrets_data&type=code

@dhalbert
Copy link
Contributor

@justmobilize 😄 ok, great!

@justmobilize
Copy link
Contributor Author

Ahhh, didn't catch one. It's also used in the Adafruit_Blinka_PyPortal. Text truncation hid it from me. Will open that PR next.

@dhalbert
Copy link
Contributor

I often search in a local clone of https://github.com/adafruit/Adafruit_CircuitPython_Bundle instead of using the GitHub search.

@justmobilize
Copy link
Contributor Author

I did that originally. The blinka one isn't in there (since it's for CPythpn) and then when I sent you the GitHub search, I just saw PyPortal.

@justmobilize
Copy link
Contributor Author

Issue opened adafruit/Adafruit_Blinka_PyPortal#23

@justmobilize justmobilize marked this pull request as ready for review February 23, 2025 03:38
@justmobilize
Copy link
Contributor Author

@dhalbert this is ready for review

Copy link
Contributor

@dhalbert dhalbert left a comment

Choose a reason for hiding this comment

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

Looks good. I cleaned up the error messages a bit.

@dhalbert dhalbert merged commit 094257f into adafruit:main Feb 23, 2025
1 check passed
@justmobilize justmobilize deleted the secrets-cleanup branch February 23, 2025 15:30
adafruit-adabot added a commit to adafruit/Adafruit_CircuitPython_Bundle that referenced this pull request Feb 24, 2025
Updating https://github.com/adafruit/Adafruit_CircuitPython_Hue to 2.0.0 from 1.2.8:
  > Merge pull request adafruit/Adafruit_CircuitPython_Hue#24 from justmobilize/remove-secrets-and-more

Updating https://github.com/adafruit/Adafruit_CircuitPython_LIFX to 3.0.0 from 2.0.5:
  > Merge pull request adafruit/Adafruit_CircuitPython_LIFX#25 from justmobilize/remove-secrets-and-more

Updating https://github.com/adafruit/Adafruit_CircuitPython_PortalBase to 3.0.0 from 2.1.3:
  > Merge pull request adafruit/Adafruit_CircuitPython_PortalBase#105 from justmobilize/secrets-cleanup
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