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

Add jsonschema entrypoint to CLI #154

Merged
merged 5 commits into from
Aug 24, 2023
Merged

Add jsonschema entrypoint to CLI #154

merged 5 commits into from
Aug 24, 2023

Conversation

vankesteren
Copy link
Member

@vankesteren vankesteren commented Aug 17, 2023

  • Overhauled argument parsing for CLI
  • Better error message for top-level CLI call
  • Automatic dispatch to different entrypoints in __main__.py file

- Overhauled argument parsing for CLI
- Better error message for top-level CLI call
- Automatic dispatch to different entrypoints in __main__.py file
@vankesteren
Copy link
Member Author

Part of #151

@vankesteren vankesteren requested a review from qubixes August 17, 2023 15:05
ruff is pretty nice, super fast, and configurable with pyproject.toml! I think we should consider replacing pylint, pydocstyle, and flake8 with ruff, also in our CI.
Copy link
Member

@qubixes qubixes left a comment

Choose a reason for hiding this comment

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

That's a very nice addition! I'm still debating whether it should be metasynth jsonschema, or metasynth schema, maybe the second also covers it? I didn't know myself about the sub parsers, but I think it would fit well in our project to use them!

metasynth/__main__.py Outdated Show resolved Hide resolved
metasynth/__main__.py Show resolved Hide resolved
metasynth/__main__.py Outdated Show resolved Hide resolved
metasynth/__main__.py Outdated Show resolved Hide resolved
metasynth/__main__.py Outdated Show resolved Hide resolved
metasynth/__main__.py Outdated Show resolved Hide resolved
Copy link
Member

@qubixes qubixes 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!!

# deduplicated list of plugins for schema
plugins_avail = {entry.name for entry in entry_points(group="metasynth.distribution_provider")}

if args.list:
Copy link
Member

Choose a reason for hiding this comment

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

I think for now it's okay to make "builtin" special, but I think if other packages are coming up, we might want to not make it special.

@qubixes qubixes merged commit be45ca1 into main Aug 24, 2023
@qubixes qubixes deleted the cli-improvements branch September 27, 2023 12:12
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