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

Schema dump #1564

Merged
merged 2 commits into from Mar 8, 2021
Merged

Schema dump #1564

merged 2 commits into from Mar 8, 2021

Conversation

glmnet
Copy link
Member

@glmnet glmnet commented Feb 25, 2021

Description:

This adds a script that generates a schema.json from the voluptous validation, this thing also hijacks some ESPHome python side to be able to extract data.

Related issue (if applicable): fixes

Pull request in esphome-docs with documentation (if applicable): esphome/esphome-docs#

Checklist:

  • The code change is tested and works locally.
  • Tests have been added to verify that the new code works (under tests/ folder).

If user exposed functionality or configuration variables are added/changed:

@probot-esphome
Copy link

Hey there @danielschramm, @mvturnho, mind taking a look at this pull request as its been labeled with an integration (mcp2515) you are listed as a codeowner for? Thanks!
(message by CodeOwnersMention)

@glmnet glmnet mentioned this pull request Feb 25, 2021
2 tasks
Copy link
Member

@jesserockz jesserockz left a comment

Choose a reason for hiding this comment

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

Looks great!!

@jesserockz jesserockz added this to Reviewer Approved in ESPHome Dev Feb 26, 2021
@glmnet
Copy link
Member Author

glmnet commented Feb 26, 2021

Other than a few refactoring changes in some components to stick to some conventions (e.g. CANBUS rename config to CONFIG_SCHEMA) this PR should not change any behavior as all logic is inside the new script.

Also the added decorators should only collect data when the schema script is executing, and should be totally transparent when ESPHome runs as usual.

accept boolean or anything default

accept null also for full dicts

added some common validators

more simple validators

support multi_conf

better handle automations

updates

updates

handle lists

removed not needed class

move to own folder

generalized for automations lists, etc

updates

updates

clean up

clean up

fix automations

made comment optional

basic docs support

added more docs

fixes docs handling

updates

updates

fix components parent

updates

updates

updates

Fix inkplate 6 registration

updates

Disable logging for vscode add on

better handle buses

keep extended order as in CONFIGs

updates

updates

updates

disable comments

moved to scripts/build_jsonschema

added configurable decorators

path handling

fix handle list_schema

fixes and cleanup

add jschema_extractor to maybe

updates

lint

no schema in git

add generated loggers list
@glmnet glmnet merged commit 1e227e8 into esphome:dev Mar 8, 2021
taquitos pushed a commit to taquitos/esphome that referenced this pull request Mar 14, 2021
* schema dump idea

accept boolean or anything default

accept null also for full dicts

added some common validators

more simple validators

support multi_conf

better handle automations

updates

updates

handle lists

removed not needed class

move to own folder

generalized for automations lists, etc

updates

updates

clean up

clean up

fix automations

made comment optional

basic docs support

added more docs

fixes docs handling

updates

updates

fix components parent

updates

updates

updates

Fix inkplate 6 registration

updates

Disable logging for vscode add on

better handle buses

keep extended order as in CONFIGs

updates

updates

updates

disable comments

moved to scripts/build_jsonschema

added configurable decorators

path handling

fix handle list_schema

fixes and cleanup

add jschema_extractor to maybe

updates

lint

no schema in git

add generated loggers list

* lint
This was referenced Mar 22, 2021
@jesserockz jesserockz moved this from Reviewer Approved to Done in ESPHome Dev May 18, 2021
@github-actions github-actions bot locked and limited conversation to collaborators Sep 14, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
Development

Successfully merging this pull request may close these issues.

None yet

2 participants