Skip to content

Formatting the argparse CLIs #908

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 1 commit into from
Apr 3, 2025
Merged

Formatting the argparse CLIs #908

merged 1 commit into from
Apr 3, 2025

Conversation

pfebrer
Copy link
Contributor

@pfebrer pfebrer commented Apr 2, 2025

This PR adds the possibility to use formatting from rich-argparse if the package is installed.

It formats all of the CLIs in sisl.

I think this is a very good compromise that could unblock some nice features (#801, basis optimization CLI) that haven't gone in due to discrepancies on what the CLI should look like :) (see #608, #735).

The formatting could be gradually made nicer and nicer by extending the formatter, and nothing about the implementation of the CLIs needs to change.

I don't know whether rich-argparse should be a dependency, optional dependency or what. But if it is not a dependency it should be advertised, because it makes things look nicer ✨

@zerothi
Copy link
Owner

zerothi commented Apr 3, 2025

Thanks! Looks good! I think this is a nice step forward!

@zerothi zerothi merged commit 806c78e into zerothi:main Apr 3, 2025
4 of 15 checks passed
@pfebrer
Copy link
Contributor Author

pfebrer commented Apr 3, 2025

Thanks! Have you seen that tests are failing because of debug_info? 😅

@zerothi
Copy link
Owner

zerothi commented Apr 3, 2025

Thanks! Have you seen that tests are failing because of debug_info? 😅

yeah, but why? I don't see how your gitignore thing should trigger this... Ideas?

@pfebrer
Copy link
Contributor Author

pfebrer commented Apr 3, 2025

No :(

@zerothi
Copy link
Owner

zerothi commented Apr 3, 2025

Damn, I am bit at a loss, can't replicate this locally... :(

@zerothi
Copy link
Owner

zerothi commented Apr 4, 2025

Fixed it, got no clue why this turned up just now... I couldn't find information on whether scikit-build-core should omit gitignore files (or setuptools for that matter). So I am a bit puzzled. But, now its inclusion is hardcoded in the pyproject.toml file, as it apparently should have been done! :)

@pfebrer pfebrer deleted the rich_cli branch April 4, 2025 10:04
@pfebrer
Copy link
Contributor Author

pfebrer commented Apr 4, 2025

Nice!

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