Skip to content

Commit

Permalink
Merge pull request #203 from kyocum/fix/new-lib-versions
Browse files Browse the repository at this point in the history
Update library dependencies
  • Loading branch information
kyocum authored Mar 9, 2024
2 parents b4eb584 + 63183d1 commit caaee36
Show file tree
Hide file tree
Showing 31 changed files with 4,490 additions and 2,644 deletions.
5 changes: 1 addition & 4 deletions disdat/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,4 @@
try:
from disdat.version import __version__
except ImportError: # pragma: no cover
__version__ = 'dev'



__version__ = "dev"
41 changes: 29 additions & 12 deletions disdat/add.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@

from __future__ import print_function

import disdat.common as common
import disdat.api as api
import disdat.common as common
import disdat.fs
from disdat import logger as _logger

Expand All @@ -34,13 +34,15 @@ def _add(args):
fs = disdat.fs.DisdatFS()

if not fs.in_context():
_logger.warning('Not in a data context')
_logger.warning("Not in a data context")
return

_ = api.add(fs._curr_context.get_local_name(),
args.bundle,
args.path_name,
tags=common.parse_args_tags(args.tag))
_ = api.add(
fs._curr_context.get_local_name(),
args.bundle,
args.path_name,
tags=common.parse_args_tags(args.tag),
)

return

Expand All @@ -52,9 +54,24 @@ def add_arg_parser(subparsers):
subparsers: A collection of subparsers as defined by `argsparse`.
"""
# add
add_p = subparsers.add_parser('add', description='Create a bundle from a .csv, .tsv, or a directory of files.')
add_p.add_argument('-t', '--tag', nargs=1, type=str, action='append',
help="Set one or more tags: 'dsdt add -t authoritative:True -t version:0.7.1'")
add_p.add_argument('bundle', type=str, help='The destination bundle in the current context')
add_p.add_argument('path_name', type=str, help='File or directory of files to add to the bundle', action='store')
add_p.set_defaults(func=lambda args: _add(args))
add_p = subparsers.add_parser(
"add", description="Create a bundle from a .csv, .tsv, or a directory of files."
)
add_p.add_argument(
"-t",
"--tag",
nargs=1,
type=str,
action="append",
help="Set one or more tags: 'dsdt add -t authoritative:True -t version:0.7.1'",
)
add_p.add_argument(
"bundle", type=str, help="The destination bundle in the current context"
)
add_p.add_argument(
"path_name",
type=str,
help="File or directory of files to add to the bundle",
action="store",
)
add_p.set_defaults(func=lambda args: _add(args))
Loading

0 comments on commit caaee36

Please sign in to comment.