Smithsonian / Smithsonian/caas-aspace-scripts
[FEATURE] Add parseArguments as a Function to utilities.py
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 1
- Forks
- 0
- Avg merge
- 4d 5h
- Merged PRs (30d)
- 1
Description
Is your feature request related to a problem? Please describe.
Add parseArguments() as a function that we can call in utilities.py, specifically including the "-dR" and "--version" arguments as default. Option for the user to add their own arguments, like csvPath, -type, etc..
Describe the solution you'd like
def parseArguments():
parser = argparse.ArgumentParser()
parser.add_argument("csvPath", help="path to csv input file", type=str)
parser.add_argument("-dR", "--dry-run", help="dry run?", action='store_true')
parser.add_argument("-t", "--type", help="type of ArchivesSpace object", choices=func_dict.keys(), required='true')
parser.add_argument("--version", action="version", version='%(prog)s - Version 1.0')
return parser.parse_args()
Describe alternatives you've considered
None that I can think of.
Additional context
Original commentary here: Remove trailing whitespace from file_uris PR review
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading utilities.py and the linked PR review discussion about file_uris to understand how argument parsing is currently handled. Define parseArguments() with the requested default options and a way to supply project-specific arguments; done means callers can use the function for csvPath, archive type, dry-run, and version handling.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100