Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(dataset): use posix mv semantics when adding with destination #2612

Merged
merged 4 commits into from
Feb 17, 2022
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 1 addition & 2 deletions renku/cli/dataset.py
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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