File tree Expand file tree Collapse file tree 4 files changed +20
-7
lines changed
Expand file tree Collapse file tree 4 files changed +20
-7
lines changed Original file line number Diff line number Diff line change 33import os
44import os .path as op
55import subprocess
6+ import tempfile
67from pathlib import Path
78
89import datalad .api as dlapi
@@ -77,8 +78,11 @@ def babs_bootstrap(
7778 f"The parent folder '{ parent_dir } ' does not exist! `babs init` won't proceed."
7879 )
7980
80- # check if parent directory is writable:
81- if not os .access (parent_dir , os .W_OK ):
81+ # check if parent directory is writable (os.access unreliable on NFS/ACL):
82+ try :
83+ with tempfile .TemporaryFile (dir = parent_dir ):
84+ pass
85+ except OSError :
8286 raise ValueError (
8387 f"The parent folder '{ parent_dir } ' is not writable! `babs init` won't proceed."
8488 )
Original file line number Diff line number Diff line change @@ -164,6 +164,6 @@ datalad push --to output-storage
164164echo '# Push the branch with provenance records:'
165165# DSLOCKFILE set by sbatch --export= in container.py
166166# shellcheck disable=SC2154
167- flock "${DSLOCKFILE}" git push outputstore
167+ flock "${DSLOCKFILE}" git push outputstore "${BRANCH}"
168168
169169echo SUCCESS
Original file line number Diff line number Diff line change @@ -648,10 +648,12 @@ def update_results_status(
648648 & ~ updated_results_df ['state' ].isin (['PD' , 'R' ])
649649 )
650650
651- # Drop the completion columns
652- updated_results_df = updated_results_df .drop (
653- columns = ['job_id_completion' , 'task_id_completion' ]
654- )
651+ # Drop all completion columns (job_id, task_id, and any other overlapping
652+ # columns like ses_id_completion when use_sesid was False in a prior run)
653+ completion_suffix_columns = [
654+ col for col in updated_results_df .columns if col .endswith ('_completion' )
655+ ]
656+ updated_results_df = updated_results_df .drop (columns = completion_suffix_columns )
655657
656658 return updated_results_df
657659
Original file line number Diff line number Diff line change @@ -354,6 +354,13 @@ and results and provenance are saved. An example command of ``babs init`` is as
354354 --queue slurm \
355355 "${HOME}/babs_demo/my_BABS_project"
356356
357+ Retrieve the container:
358+
359+ .. code-block :: console
360+
361+ $ cd "${HOME}/babs_demo/my_BABS_project/analysis"
362+ $ datalad get -r containers
363+
357364 .. note ::
358365 **Optional: Throttling array jobs **: If you have many jobs and want to limit how many
359366 run simultaneously, you can add ``--throttle <number> `` to the command above.
You can’t perform that action at this time.
0 commit comments