File: github_actions.rst

package info (click to toggle)
datalad 1.3.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 7,132 kB
  • sloc: python: 69,299; sh: 1,521; makefile: 220
file content (126 lines) | stat: -rw-r--r-- 2,644 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
.. -*- mode: rst -*-
.. vi: set ft=rst sts=4 ts=4 sw=4 et tw=79:

.. _chap_design_github_action:

*************
GitHub Action
*************

.. topic:: Specification scope and status

   This specification describes a proposed interface to a DataLad GitHub Action.
   https://github.com/datalad/datalad-action provides an implementation which loosely
   followed this specification.

The purpose of the DataLad GitHub Action is to support CI testing with DataLad datasets
by making it easy to install ``datalad`` and ``get`` data from the datasets.


Example Usage
=============

Dataset installed at ``${GITHUB_WORKSPACE}/studyforrest-data-phase2``,
``get``'s all the data::

    - uses: datalad/datalad-action@master
      with:
        datasets:
          - source: https://github.com/psychoinformatics-de/studyforrest-data-phase2
          - install_get_data: true

Specify advanced options::

    - name: Download testing data
      uses: datalad/datalad-action@master
      with:
        datalad_version: ^0.15.5
        add_datalad_to_path: false
        datasets:
          - source: https://github.com/psychoinformatics-de/studyforrest-data-phase2
          - branch: develop
          - install_path: test_data
          - install_jobs: 2
          - install_get_data: false
          - recursive: true
          - recursion_limit: 2
          - get_jobs: 2
          - get_paths:
              - sub-01
              - sub-02
              - stimuli

Options
=======

``datalad_version``
-------------------

``datalad`` version to install. Defaults to the latest release.

``add_datalad_to_path``
-----------------------

Add ``datalad`` to the ``PATH`` for manual invocation in subsequent steps.

Defaults to ``true``.

``source``
----------

URL for the dataset (mandatory).

``branch``
----------

Git branch to install (optional).

``install_path``
----------------

Path to install the dataset relative to `GITHUB_WORKSPACE`.

Defaults to the repository name.

``install_jobs``
----------------

Jobs to use for ``datalad install``.

Defaults to ``auto``.

``install_get_data``
--------------------

Get all the data in the dataset by passing ``--get-data`` to ``datalad install``.

Defaults to ``false``.

``recursive``
-------------

Boolean defining whether to clone subdatasets.

Defaults to ``true``.

``recursion_limit``
-------------------

Integer defining limits to recursion.

If not defined, there is no limit.

``get_jobs``
------------

Jobs to use for ``datalad get``.

Defaults to ``auto``.


``get_paths``
-------------

A list of paths in the dataset to download with ``datalad get``.

Defaults to everything.