Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions renku/cli/dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,26 @@
new-dir/
new-filename
Updating a dataset:
After adding files from a remote Git repository, you can check for updates in
those files by using ``renku dataset update`` command. This command checks all
remote files and copies over new content if there are any. It also deletes
files from the local dataset if they are deleted from the remote Git
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm I hadn't thought of that before but I guess this will lead to some unexpected behavior. Is there an issue already for updating to a specific commit?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not yet. It was supposed to be part of this one but I decided to do it later. I'll create on when we close this one. I don't see though how that would help; if a file is deleted from the latest update eventually we need a way to deal with it.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes sure, but right now I can imagine someone could do an update that deleted a file with no way to get back other than doing a git reset. If they were able to go to a previous commit it would be a non-issue.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

anyway, this is not the right place for this discussion I realize :) We should add support for updating to a specific commit reasonably soon to avoid having users that get stuck in some strange state.

Copy link
Contributor Author

@mohammad-alisafaee mohammad-alisafaee Oct 25, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As we discussed, I'll ask the user to provide an explicit flag for deletion.

repository.
You can limit the scope of updated files by specifying dataset names, using
``--include`` and ``--exclude`` to filter based on file names, or using
``--creators`` to filter based on creators. For example, the following command
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

creators - as determined by the email?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, it is the full name of the creator. This is like some other dataset subcommands (e.g. ls-files)

updates only CSV files from ``my-dataset``:
.. code-block:: console
$ renku dataset update -I '*.csv' my-dataset
Note that putting glob patterns in quotation is needed to tell Unix shell not
to expand them.
Tagging a dataset:
A dataset can be tagged with an arbitrary tag to refer to the dataset at that
Expand Down