Skip to content

Commit

Permalink
Add pip_install to install any desired extra (e.g. datalad-osf)
Browse files Browse the repository at this point in the history
This is desired since otherwise we would not be easily extend datalad with
custom remotes which might be needed for some urls etc.

TODOs:
- [ ] also add to get if works

Signed-off-by: Yaroslav Halchenko <[email protected]>
  • Loading branch information
yarikoptic committed Feb 13, 2024
1 parent 44829a0 commit 7faa5c3
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 0 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/test-action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -170,3 +170,21 @@ jobs:
run: |
which datalad
datalad --version | grep 0.18.0
install-datalad-osf:
runs-on: ubuntu-latest
name: Install Datalad with some extensions
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install Datalad and some extensions
uses: ./install
with:
pip_install:
- datalad-osf
- datalad-next
- name: Check Installed
run: |
which datalad
which git-remote-osf
datalad wtf -S extensions | grep datalad_next
4 changes: 4 additions & 0 deletions install/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ inputs:
install_root:
description: If installed from a branch and full_clone, install to this root (defaults to /opt/datalad)
default: /opt/datalad
pip_install:
description: Extra pip installs to do
default: ""
release:
description: A datalad release to use (if defined, over-rides branch)
default: ""
Expand All @@ -35,5 +38,6 @@ runs:
full_clone: ${{ inputs.full_clone }}
repository: ${{ inputs.repository }}
install_root: ${{ inputs.install_root }}
pip_install: ${{ inputs.pip_install }}
run: ${{ github.action_path }}/scripts/install.sh
shell: bash
5 changes: 5 additions & 0 deletions install/scripts/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ echo "release: ${release}"
echo "branch: ${branch}"
echo "full_clone: ${full_clone}"
echo "install_root: ${install_root}"
echo "pip_install: ${pip_install[*]}"

# This is in the install instructions
git config --global --add user.name "${user}"
Expand Down Expand Up @@ -50,3 +51,7 @@ else
cd -
fi
fi

if [ -n "${pip_install}" ]; then
pip install "${pip_install[@]}"
fi

0 comments on commit 7faa5c3

Please sign in to comment.