-
-
Notifications
You must be signed in to change notification settings - Fork 523
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
feat: adding a json schema command #3446
base: main
Are you sure you want to change the base?
Conversation
7cdc185
to
075b7ff
Compare
Adding a commit that would support plugins setup like tox-gh. To actually fix that one, though, it needs to be modified a bit something like this: bail_reason = None
if state.conf.options.command == "schema":
pass
elif not core_conf["is_on_gh_action"]:
bail_reason = "tox is not running in GitHub Actions"
elif getattr(getattr(state.conf.options, "env", None), "is_default_list", False) is False:
bail_reason = f"envlist is explicitly given via {'TOXENV' if os.environ.get('TOXENV') else '-e flag'}"
else:
logging.warning("running tox-gh") |
e535caf
to
d736d50
Compare
Now running this passes: uvx check-jsonschema --schemafile src/tox/tox.schema.json tox.toml Signed-off-by: Henry Schreiner <[email protected]>
Signed-off-by: Henry Schreiner <[email protected]>
7de32ca
to
b8f138a
Compare
Signed-off-by: Henry Schreiner <[email protected]>
536931f
to
602de5b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would want to ensure that the generated schema is valid, you can make use of https://python-jsonschema.readthedocs.io/en/latest/validate/ for validating it. We already do this in ansible-lint with ~20 schemas if you want to take a look.
I've been using |
Started on a
schema
command that produces a JSONSchema. Includes a--strict
mode that doesn't allow extra unknown commands. Mostly respects and supports plugins (tox-gh and tox-uv tested locally).tox -e fix
)docs/changelog
folderMaking a draft PR to store progress.
Current schema can be seen rendered into the PR at the moment.