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

Swap getopt with argparse #19

Closed
iannesbitt opened this issue May 16, 2023 · 2 comments
Closed

Swap getopt with argparse #19

iannesbitt opened this issue May 16, 2023 · 2 comments
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@iannesbitt
Copy link
Contributor

          Consider swapping the more outdated `getopt` with the more powerful and easier to read `argparse` (which we're using in other `viz-*` packages). Usage example:
    parser = argparse.ArgumentParser(description='Process some files.')
    parser.add_argument('-v', '--verbose', action='store_true', help='Whether to log more messages')
    parser.add_argument('-c', '--copy_I_to_RGB', action='store_true', help='Whether to copy intensity values to RGB')
    parser.add_argument('-m', '--merge', action='store_true', help='Whether to use merge function')
    parser.add_argument('-a', '--archive', action='store_true', help='Whether to archive the input dataset')
    parser.add_argument('-s', '--rgb_scale', type=float, default=1.0, help='Scale multiplier for RGB values')
    parser.add_argument('-z', '--translate_z', type=float, default=0.0, help='Float translation for z values')
    parser.add_argument('-f', '--file', type=str, required=True, help='The file to process')

    args = parser.parse_args()

Originally posted by @robyngit in #12 (comment)

@iannesbitt iannesbitt self-assigned this May 16, 2023
@iannesbitt iannesbitt added the enhancement New feature or request label May 16, 2023
iannesbitt added a commit that referenced this issue May 16, 2023
@iannesbitt
Copy link
Contributor Author

Erroneously referenced and closed. Reopening.

@iannesbitt
Copy link
Contributor Author

Tested and working

@iannesbitt iannesbitt added this to the 0.0.2 milestone Jul 5, 2023
iannesbitt added a commit that referenced this issue Jul 6, 2023
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

No branches or pull requests

1 participant