ivmfnal / metacat

Metadata Catalog
BSD 3-Clause "New" or "Revised" License
4 stars 5 forks source link

-n option doesn't work for metacat file add -i does. #10

Closed hschellman closed 2 years ago

hschellman commented 2 years ago
metacat file add -n protodune-sp:np04_raw_run007700_0028_dl11.root hms:test Traceback (most recent call last): File "/nashome/s/schellma/.local/bin/metacat", line 33, in sys.exit(load_entry_point('metacat==3.15.8', 'console_scripts', 'metacat')()) File "/nashome/s/schellma/.local/lib/python3.9/site-packages/metacat-3.15.8-py3.9.egg/metacat/ui/metacat_ui.py", line 91, in main cli.run(sys.argv, argv0="metacat") File "/nashome/s/schellma/.local/lib/python3.9/site-packages/metacat-3.15.8-py3.9.egg/metacat/ui/cli/cli.py", line 216, in run self._run(command, context, argv, usage_on_error) File "/nashome/s/schellma/.local/lib/python3.9/site-packages/metacat-3.15.8-py3.9.egg/metacat/ui/cli/cli.py", line 211, in _run return interp._run(pre_command + word, context, rest, usage_on_error = usage_on_error) File "/nashome/s/schellma/.local/lib/python3.9/site-packages/metacat-3.15.8-py3.9.egg/metacat/ui/cli/cli.py", line 211, in _run return interp._run(pre_command + word, context, rest, usage_on_error = usage_on_error) File "/nashome/s/schellma/.local/lib/python3.9/site-packages/metacat-3.15.8-py3.9.egg/metacat/ui/cli/cli.py", line 112, in _run return self(command, context, opts, args) File "/nashome/s/schellma/.local/lib/python3.9/site-packages/metacat-3.15.8-py3.9.egg/metacat/ui/metacat_file.py", line 513, in __call__ out = client.add_files(dataset, file_list, namespace=namespace) File "/nashome/s/schellma/.local/lib/python3.9/site-packages/metacat-3.15.8-py3.9.egg/metacat/webapi/webapi.py", line 388, in add_files raise ValueError("Namespace not specified for file with name=" + f["name"]) ValueError: Namespace not specified for file with name=protodune-sp:np04_raw_run007700_0028_dl11.root metacat file add -n 'protodune-sp':np04_raw_run007700_0028_dl11.root hms:test Traceback (most recent call last): File "/nashome/s/schellma/.local/bin/metacat", line 33, in sys.exit(load_entry_point('metacat==3.15.8', 'console_scripts', 'metacat')()) File "/nashome/s/schellma/.local/lib/python3.9/site-packages/metacat-3.15.8-py3.9.egg/metacat/ui/metacat_ui.py", line 91, in main cli.run(sys.argv, argv0="metacat") File "/nashome/s/schellma/.local/lib/python3.9/site-packages/metacat-3.15.8-py3.9.egg/metacat/ui/cli/cli.py", line 216, in run self._run(command, context, argv, usage_on_error) File "/nashome/s/schellma/.local/lib/python3.9/site-packages/metacat-3.15.8-py3.9.egg/metacat/ui/cli/cli.py", line 211, in _run return interp._run(pre_command + word, context, rest, usage_on_error = usage_on_error) File "/nashome/s/schellma/.local/lib/python3.9/site-packages/metacat-3.15.8-py3.9.egg/metacat/ui/cli/cli.py", line 211, in _run return interp._run(pre_command + word, context, rest, usage_on_error = usage_on_error) File "/nashome/s/schellma/.local/lib/python3.9/site-packages/metacat-3.15.8-py3.9.egg/metacat/ui/cli/cli.py", line 112, in _run return self(command, context, opts, args) File "/nashome/s/schellma/.local/lib/python3.9/site-packages/metacat-3.15.8-py3.9.egg/metacat/ui/metacat_file.py", line 513, in __call__ out = client.add_files(dataset, file_list, namespace=namespace) File "/nashome/s/schellma/.local/lib/python3.9/site-packages/metacat-3.15.8-py3.9.egg/metacat/webapi/webapi.py", line 388, in add_files raise ValueError("Namespace not specified for file with name=" + f["name"]) ValueError: Namespace not specified for file with name=protodune-sp:np04_raw_run007700_0028_dl11.root
ivmfnal commented 2 years ago

looks like done, but needs more testing

hschellman commented 2 years ago

Confirm that it works for -n namespace:name and for -n @names.txt

ivmfnal commented 2 years ago

adding files to a new or existing dataset has been revamped.

-n is no longer an option. Use -d instead: https://metacat.readthedocs.io/en/latest/ui.html#datasets