Skip to content

V2 Move pin components to digitalio and analogio - #343

Merged
lorennorman merged 6 commits into
v2from
pin-to-digital-and-analog
Sep 24, 2026
Merged

lorennorman merged 6 commits into
v2from
pin-to-digital-and-analog

Conversation

@lorennorman

@lorennorman lorennorman commented Sep 22, 2026 •

Copy link
Copy Markdown
Member

V1 "pin components" get broken out into digital and analog components for V2.

This PR:

  • copies every component from pin/* into:
    • digitalio/* when mode: "DIGITAL"
    • analogio/* when mode: "ANALOG"
  • copies pin/schema.json to digitalio/ and analogio/
  • digital schema:
    • drops mode (implicit by directory)
    • drops analog-related properties: selectReadMode & analogReadMode
  • analog schema:
    • drop mode
    • drops digital-related properties: selectPullUp & pull
  • adds digitalio and analogio checks to gh:a validate.yml

@lorennorman lorennorman changed the title copy pin/* to (digital/analog)io/*, prune schemas, extend validator V2 Move pin components to digitalio and analogio Sep 23, 2026
@lorennorman lorennorman added the v2 label Sep 23, 2026

@tyeth tyeth left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

would make a bit more sense with a git mv to show the renamed / moved files, then amend them, as not easy to compare with v1 in this diff.

Comment thread .github/workflows/validate.yml Outdated
strategy:
matrix:
componentType: [pin, i2c, i2c_output, servo, ds18x20, pwm, pixel, uart, display, expanders]
componentType: [pin, digitalio, analogio, i2c, i2c_output, servo, ds18x20, pwm, pixel, uart, display, expanders]

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

why still a pin type in v2?

Comment thread .github/workflows/validate.yml Outdated

# folks with write access to the repo (Adafruit team) can change more sensitive files
INTERNAL_REGEX="^(\.github\/.*|components\/(sensors.json|(pin|i2c|servo|ds18x20|pwm|pixel|uart|i2c_output|display|expanders)\/(schema.json|.*\/(definition\.json|image\.(png|jpe?g|gif)))))$"
INTERNAL_REGEX="^(\.github\/.*|components\/(sensors.json|(pin|digitalio|analogio|i2c|servo|ds18x20|pwm|pixel|uart|i2c_output|display|expanders)\/(schema.json|.*\/(definition\.json|image\.(png|jpe?g|gif)))))$"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@lorennorman drop pin here too?

@brentru brentru left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

@lorennorman

Copy link
Copy Markdown
Member Author

@tyeth @brentru you both asked why keeping the pin type:

  • idea is to make non-destructive/additive changes only
  • v1 and v2 will both be live for some period
  • easiest thing is to have redundant component types

Honestly that might not be true as I think about it... just sorta working publicly while i get backend imports and multi-version usage on the frontend working. I bet you end up being correct and we actually do remove pins before this hits prod. Stay tuned.

@lorennorman

Copy link
Copy Markdown
Member Author

i ended up deleting /pin directory after all, the diff is 🤩 now if either of you want to look it over again. i'm

@lorennorman
lorennorman merged commit 5ab591c into v2 Sep 24, 2026
13 checks passed
@lorennorman
lorennorman deleted the pin-to-digital-and-analog branch September 24, 2026 21:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants