Skip to content

Commit

Permalink
feat(dataset): use posix mv semantics when adding with destination (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
m-alisafaee committed Feb 17, 2022
1 parent e087198 commit 24f843a
Show file tree
Hide file tree
Showing 14 changed files with 310 additions and 215 deletions.
3 changes: 1 addition & 2 deletions renku/cli/dataset.py
Expand Up @@ -212,8 +212,7 @@
You can use ``--destination`` or ``-d`` flag to set the location where the new
data is copied to. This location be will under the dataset's data directory and
will be created if does not exists. You will get an error message if the
destination exists and is a file.
will be created if does not exists.
.. code-block:: console
Expand Down
2 changes: 1 addition & 1 deletion renku/core/commands/dataset.py
Expand Up @@ -567,7 +567,7 @@ def _import_dataset(
sources = []

if record.datadir_exists:
sources = [f"{dataset.data_dir}/**"]
sources = [f"{dataset.data_dir}/*"]

for file in dataset.files:
try:
Expand Down
5 changes: 3 additions & 2 deletions renku/core/errors.py
Expand Up @@ -18,7 +18,8 @@
"""Renku exceptions."""

import os
from typing import List
from pathlib import Path
from typing import List, Union

import click

Expand Down Expand Up @@ -106,7 +107,7 @@ def __init__(self, repository):
class ProtectedFiles(RenkuException):
"""Raise when trying to work with protected files."""

def __init__(self, ignored):
def __init__(self, ignored: List[Union[Path, str]]):
"""Build a custom message."""
super(ProtectedFiles, self).__init__(
"The following paths are protected as part of renku:"
Expand Down

0 comments on commit 24f843a

Please sign in to comment.