Skip to content

Commit

Permalink
hxl-processing-specs (#14): hdpcli --export-to-hxl-json-processing-sp…
Browse files Browse the repository at this point in the history
…ec added (draft)
  • Loading branch information
fititnt committed Mar 13, 2021
1 parent 314c0e3 commit 819196d
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 6 deletions.
24 changes: 19 additions & 5 deletions hxlm/core/bin/hdpcli.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,7 @@ def prompt_confirmation(message: str) -> bool:

class HDPCLI:
"""
Uurnresolver uses hxlm.core to resolve Uniform Resource Name (URI) to
Uniform Resource Identifier (URI)
HDP Declarative Programming Command Line Interface
"""

def __init__(self):
Expand Down Expand Up @@ -342,9 +341,9 @@ def make_args_urnresolver(self):

self.hxlhelper = HXLUtils()
parser = self.hxlhelper.make_args(
description=("urnresolver uses hxlm.core to resolve Uniform " +
"Resource Name (URI) to Uniform Resource " +
"Identifier (URI)"))
description=(
"HDP Declarative Programming Command Line Interface.")
)

parser.add_argument(
'--debug',
Expand All @@ -354,6 +353,21 @@ def make_args_urnresolver(self):
default=False
)

parser.add_argument(
'--export-to-hxl-json-processing-specs',
help='Export JSON processing specs for HXL data. Use with ' +
'"hxlspec myspec.json > data.hxl.csv" or HXL-proxy.' +
'(https://proxy.hxlstandard.org/api/from-spec.html)',
action='store',
# const=True,
default=None,
# nargs='?'
# # default=HXLM_CONFIG_BASE,
# default=HXLM_CONFIG_BASE,
# # default=False,
# nargs='?'
)

parser.add_argument(
'--hdp-init',
help='Initialize local to work with hxlm.core cli tools. ' +
Expand Down
1 change: 0 additions & 1 deletion tests/hxl-recipe/recipe-test-01.hdp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
# TODO: better validate HERE https://jsonschemalint.com/#!/version/draft-07/markup/json

- hsilo: "test1"
hdataset:
hrecipe:
# https://proxy.hxlstandard.org/data/edit?dest=data_edit&filter01=cut&filter-label01=with_columns&cut-include-tags01=%23vocab%2Bid%2Bv_iso6393_3letter%2C%23vocab%2Bcode%2Bv_6391%2C%23vocab%2Bname&filter02=select&filter-label02=without_rows&select-query02-01=%23vocab%2Bcode%2Bv_6391%3D&select-reverse02=on&url=https%3A%2F%2Fdocs.google.com%2Fspreadsheets%2Fd%2F12k4BWqq5c3mV9ihQscPIwtuDa_QRB-iFohO7dXSSptI%2Fedit%23gid%3D0
# https://proxy.hxlstandard.org/data.csv?dest=data_edit&filter01=cut&filter-label01=with_columns&cut-include-tags01=%23vocab%2Bid%2Bv_iso6393_3letter%2C%23vocab%2Bcode%2Bv_6391%2C%23vocab%2Bname&filter02=select&filter-label02=without_rows&select-query02-01=%23vocab%2Bcode%2Bv_6391%3D&select-reverse02=on&url=https%3A%2F%2Fdocs.google.com%2Fspreadsheets%2Fd%2F12k4BWqq5c3mV9ihQscPIwtuDa_QRB-iFohO7dXSSptI%2Fedit%23gid%3D0
Expand Down

0 comments on commit 819196d

Please sign in to comment.