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

DataLad containers-run (and a bit on DataLad extensions) #242

Merged
merged 39 commits into from
Dec 5, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
b05f647
add initial outline for section on datalad extensions, with a focus o…
adswa Oct 29, 2019
29ebc5c
add pip to glossary
adswa Oct 29, 2019
ffc7209
Merge branch 'master' of github.com:datalad-handbook/book into extens…
adswa Oct 30, 2019
2d46e39
draft outline on datalad containers-run
adswa Nov 5, 2019
7256523
draft outline on datalad containers-run
adswa Nov 5, 2019
ebf6a32
add container information
adswa Nov 11, 2019
7c3da4d
fix command calls
adswa Nov 11, 2019
68e1f9a
add examples
adswa Nov 11, 2019
344702e
Merge branch 'extensions' of github.com:datalad-handbook/book into ex…
adswa Nov 11, 2019
65e7559
a few language tweaks
adswa Nov 12, 2019
7c374ac
Merge branch 'master' of github.com:datalad-handbook/book into extens…
adswa Nov 12, 2019
8edf5bb
Merge branch 'master' of github.com:datalad-handbook/book into extens…
adswa Nov 26, 2019
f88b555
restructure toc tree, put containers-run closer to yoda project
adswa Nov 26, 2019
10c8ecc
provide ref to yoda project section
adswa Nov 26, 2019
c6e0a8a
some language tweaks
adswa Nov 26, 2019
59b6145
define proper containers-run command
adswa Nov 26, 2019
d175414
update runrecord numbering
adswa Nov 26, 2019
cb6a0ba
save subds state to superds
adswa Nov 26, 2019
7320171
rebuild all examples
adswa Nov 26, 2019
f21e65e
add new examples
adswa Nov 26, 2019
18edcfc
add missing word
adswa Nov 26, 2019
ab9f697
add index entries
adswa Nov 26, 2019
11f9348
add short summary
adswa Nov 27, 2019
d38577b
link usecase, remove todos
adswa Nov 27, 2019
1c2e57d
remove standalone git -C, instead integrate into exisiting findoutmore
adswa Nov 27, 2019
6041795
reference relevant sections in extension overview
adswa Nov 27, 2019
5dff8b6
add -d option to save when saving subds updates, also add hidden sect…
adswa Nov 28, 2019
d3b78e8
update save examples
adswa Nov 28, 2019
d16edc5
Merge branch 'master' of github.com:datalad-handbook/book into extens…
adswa Nov 28, 2019
750c8c1
Merge branch 'master' of github.com:datalad-handbook/book into extens…
adswa Dec 3, 2019
3285e6e
tweak extensions intro
adswa Dec 4, 2019
885ea9d
strip unmentioned extensions from overview, link PyPi search for over…
adswa Dec 4, 2019
5a321aa
first bunch of tweaks based on mihs comments
adswa Dec 4, 2019
7a118c9
clarify/fix definitions
adswa Dec 4, 2019
9157817
change container name, disclose recipe source
adswa Dec 4, 2019
9cdb72b
mention Docker support
adswa Dec 4, 2019
7323854
image -> Image
adswa Dec 4, 2019
8955f23
rebuild all examples
adswa Dec 4, 2019
df90742
typo
adswa Dec 4, 2019
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
10 changes: 8 additions & 2 deletions docs/basics/101-106-nesting.rst
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,14 @@ we can set subdatasets to previous states, or *update* them.

Previously, we used :command:`cd` to navigate into the subdataset, and
subsequently opened the Git log. This is necessary, because a :command:`git log`
in the superdataset would only return the superdatasets history. There is one
trick, though: ``git -C`` lets you perform any Git command in a provided path.
in the superdataset would only return the superdatasets history.
While moving around with ``cd`` is straightforward, you also found it
slightly annoying from time to time to use the ``cd`` command so often and also
to remember in which directory you currently are in. There is one
trick, though: ``git -C`` (note that it is a capital C) lets you perform any
Git command in a provided path. Providing this option together with a path to
a Git command let's you run the command as if Git was started in this path
instead of the current working directory.
Thus, from the root of ``DataLad-101``, this command would have given you the
subdatasets history as well::

Expand Down
2 changes: 2 additions & 0 deletions docs/basics/101-130-yodaproject.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
.. _yoda_project:

YODA-compliant data analysis projects
-------------------------------------

Expand Down
40 changes: 36 additions & 4 deletions docs/basics/101-132-advancednesting.rst
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,11 @@ evolved. Let's query the superdataset what it thinks about this.
$ datalad status

From the superdataset's perspective, the subdataset appears as being
"modified". Note that these modifications of the subdataset are not
automatically recorded to the superdataset! This makes sense -- after all it
"modified". Note how it is not individual files that show up as "modified", but
indeed the complete subdataset as a single entity.

What this shows you is that the modifications of the subdataset you performed are not
automatically recorded to the superdataset. This makes sense -- after all it
should be up to you to decide whether you want record something or not --,
but it is worth repeating: If you modify a subdataset, you will need to save
this *in the superdataset* in order to have a clean superdataset status.
Expand Down Expand Up @@ -163,13 +166,42 @@ interested in this, checkout the hidden section below.
$ datalad status --recursive

Let's save the modification of the subdataset into the history of the
superdataset:
superdataset. For this, to avoid confusion, you can specify explicitly to
which dataset you want to save a modification. ``-d .`` specifies the current
dataset, i.e., ``DataLad-101``, as the dataset to save to:

.. runrecord:: _examples/DL-101-132-110
:language: console
:workdir: dl-101/DataLad-101/

$ datalad save -m "finished my midterm project"
$ datalad save -d . -m "finished my midterm project!" midterm_project

.. findoutmore:: More on how save can operate on nested datasets

In a superdataset with subdatasets, :command:`datalad save` by default
tries to figure out on its own which dataset's history of all available
datasets a :command:`save` should be written to. However, it can reduce
confusion or allow specific operations to be very explicit in the command
call and tell DataLad where to save what kind of modifications to.

If you want to save the current state of the subdataset into the superdataset
(as necessary here), start a ``save`` from the superdataset and have the
``-d/--dataset`` option point to its root::

# in the root of the superds
$ datalad save -d . -m "update subdataset"

If you are in the superdataset, and you want to save an unsaved modification
in a subdataset to the *subdatasets* history, let ``-d/--dataset`` point to
the subdataset::

# in the superds
$ datalad save -d path/to/subds -m "modified XY"

The recursive option allows you to save any content underneath the specified
directory, and recurse into any potential subdatasets::

$ datalad save . --recursive

Let's check which subproject commit is now recorded in the superdataset:

Expand Down
15 changes: 0 additions & 15 deletions docs/basics/101-132-gitC.rst

This file was deleted.

Loading