Skip to content

Commit

Permalink
addressed cli defect, work for #40, #47
Browse files Browse the repository at this point in the history
  • Loading branch information
shawnmjones committed Sep 8, 2021
1 parent 8d82984 commit 6cd046b
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 8 deletions.
13 changes: 12 additions & 1 deletion bin/hc
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

import sys
import os
import errno
import hypercane.cli.sample, hypercane.cli.identify, \
hypercane.cli.order, hypercane.cli.cluster, \
hypercane.cli.score, hypercane.cli.synthesize, \
Expand Down Expand Up @@ -37,6 +38,8 @@ This is the list of supported actions:
print("""
For each of these actions, you can view additional help by typing --help after the action name, for example:
hc sample --help
Please read Hypercane's documentation at https://hypercane.readthedocs.io/en/latest/
""")

if __name__ == '__main__':
Expand All @@ -56,7 +59,14 @@ if __name__ == '__main__':

args = sys.argv[2:]

scriptname = os.path.abspath(supported_actions[action])
try:
scriptname = os.path.abspath(supported_actions[action])
except KeyError:
print("hc: error: unknown action {}\n".format(action))
print_overall_usage()
sys.exit(errno.EINVAL)

print("scriptname: {}".format(scriptname))

arglist = ""
for arg in args:
Expand All @@ -70,3 +80,4 @@ if __name__ == '__main__':
else:
print("hc: error: no action supplied\n")
print_overall_usage()
sys.exit(errno.EINVAL)
2 changes: 1 addition & 1 deletion docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
# The short X.Y version
version = u''
# The full version, including alpha/beta/rc tags
release = u'0.2021.07.20.233812'
release = u'0.2021.09.08.205939'

# -- General configuration ---------------------------------------------------

Expand Down
2 changes: 2 additions & 0 deletions hypercane-gui/install-gui.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ JUST_TEMPLATES=1
OVERRIDE_VIRTUALENV_CHECK=0
WOOEY_DIR=${SCRIPT_DIR}/../hypercane_with_wooey

echo "using script directory '${SCRIPT_DIR}'"

while test $# -gt 0; do

case "$1" in
Expand Down
6 changes: 4 additions & 2 deletions hypercane-gui/scripts/filter exclude.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
formatter_class=RawTextHelpFormatter
)

args = parser.parse_args()
if __name__ == '__main__':

print("Not implemented yet.")
args = parser.parse_args()

print("Not implemented yet.")
6 changes: 4 additions & 2 deletions hypercane-gui/scripts/filter include-only.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
formatter_class=RawTextHelpFormatter
)

args = parser.parse_args()
if __name__ == '__main__':

print("Not implemented yet.")
args = parser.parse_args()

print("Not implemented yet.")
1 change: 0 additions & 1 deletion hypercane/args/synthesize.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@

raintalestory_parser.add_argument('--termdata', dest='termdata_filename',
help='A file containing term data, as produced by hc report terms',
output_extension='.tsv',
required=False, default=None
)

Expand Down
2 changes: 1 addition & 1 deletion hypercane/version.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
__appname__ = "hypercane"
__appversion__ = '0.2021.07.20.233812'
__appversion__ = '0.2021.09.08.205939'
__useragent__ = "{}/{}".format(__appname__, __appversion__)

0 comments on commit 6cd046b

Please sign in to comment.