Closed aalmanza1998 closed 4 years ago
If I run python3 ngshare_management.py
, I get
Traceback (most recent call last):
File "ngshare_management.py", line 395, in <module>
sys.exit(main())
File "ngshare_management.py", line 389, in main
command, optlist = parse_input(argv)
File "ngshare_management.py", line 325, in parse_input
command = (argv[1]).lower()
IndexError: list index out of range
Line 321 should probably be if len(argv) <= 1:
@aalmanza1998 I will review more later. Should I be running it in a JupyterHub account?
Do you want to use something like argparse
to parse arguments?
If I run
python3 ngshare_management.py
, I getTraceback (most recent call last): File "ngshare_management.py", line 395, in <module> sys.exit(main()) File "ngshare_management.py", line 389, in main command, optlist = parse_input(argv) File "ngshare_management.py", line 325, in parse_input command = (argv[1]).lower() IndexError: list index out of range
Line 321 should probably be
if len(argv) <= 1:
Yes, I added the --help
flag forgot to modify to modify that line. I've fixed it now, thank you! Yes, please test in JupyterHub.
Do you want to use something like
argparse
to parse arguments?
I used getopt.getopt
but I can switch to argparse
if ya'll would like me to.
If we change to argparse:
@aalmanza1998 I think I will take over the changing job. You can worry more about other aspects & JupyterLab.
Are you using some coding style standard?
If we change to argparse:
- For some reason argparse seems to be more popular:
- Consistent with ngshare
- Personally I think argparse is more robost
@aalmanza1998 I think I will take over the changing job. You can worry more about other aspects & JupyterLab.
Are you using some coding style standard?
It's ok, I'll make the switch to argparse.
I need to test after these changes.
Merging #77 into master will not change coverage. The diff coverage is
n/a
.
@@ Coverage Diff @@
## master #77 +/- ##
=======================================
Coverage 98.58% 98.58%
=======================================
Files 14 14
Lines 1629 1629
=======================================
Hits 1606 1606
Misses 23 23
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update 10f9f84...10f9f84. Read the comment docs.
Closing this because we are moving this script to the ngshare_exchange repo.
Use python commands to manage a course. See README for details