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

Make CLI commands available as cubids <command> #268

Merged
merged 19 commits into from
Jan 17, 2024
Merged

Conversation

tsalo
Copy link
Member

@tsalo tsalo commented Sep 7, 2023

This builds off of #266, so that should be addressed first.

Changes proposed:

  • Reorganize the command-line interfaces so taht there is a central cubids command (which we can call --version and --help on), with each of the regular commands as subcommands.
  • Deprecate the original commands.
    • For example, you can call cubids apply and cubids-apply, but cubids-apply will raise a deprecation warning.
  • Use the sphinx-argparse extension to autodoc the command line interfaces in the documentation.

@tsalo
Copy link
Member Author

tsalo commented Sep 7, 2023

Here's what the CLI documentation looks like: https://cubids--268.org.readthedocs.build/en/268/usage.html#command-line-tools

@tsalo tsalo changed the title Update the command-line interface Make CLI commands available as cubids <command> Sep 21, 2023
@tsalo tsalo requested a review from mattcieslak January 12, 2024 17:04
@tsalo
Copy link
Member Author

tsalo commented Jan 12, 2024

I'm not sure that the PyPi deployment job will succeed, but I can address that in a followup PR.

@tsalo tsalo marked this pull request as ready for review January 12, 2024 17:09
Copy link
Contributor

@mattcieslak mattcieslak left a comment

Choose a reason for hiding this comment

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

This is fantastic, thank you!!

cubids-datalad-save = "cubids.cli:cubids_datalad_save"
cubids-print-metadata-fields = "cubids.cli:cubids_print_metadata_fields"
cubids-remove-metadata-fields = "cubids.cli:cubids_remove_metadata_fields"
cubids = "cubids.cli:_main"
Copy link
Contributor

Choose a reason for hiding this comment

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

I like this new configuration


This will print the instructions for using the command line interface in your command line.

.. argparse::
Copy link
Contributor

Choose a reason for hiding this comment

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

Also a great idea

@tsalo
Copy link
Member Author

tsalo commented Jan 17, 2024

Thanks @mattcieslak!

@tsalo tsalo merged commit 8e90140 into PennLINC:main Jan 17, 2024
5 checks passed
@tsalo tsalo deleted the update-cli branch January 17, 2024 14:13
@tsalo tsalo added the enhancement New feature or request label Apr 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants