"Typical workflow" observations on Windows

Open
#50 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
anaconda, bash
Domain
cli, documentation

Research direction

Start with the README's “Typical Workflow” and the linked handbook section on Windows workarounds, then reproduce the commands in Git Bash and Anaconda Prompt. Compare the failing datalad run invocation with the bash containers/scripts/freeze_versions workaround; done means the Windows workflow behavior is reproduced and the required documentation or command handling is clearly recorded.

Written by the indexing model from the issue text.

Description

As I have a Win 10 Pro build 2004 box for testing, @yarikoptic asked me to test the "Typical Workflow" from the README on Windows.

I'm testing under two different terminals/shells: A Git Bash and an Anaconda Prompt (both installed using the most recent instructions from the handbook).

Unfortunately, testing required more time than I anticipated, so I'm posting the issue "as is", although I haven't finished the workflow. I will return to this at a later point.

Git Bash:

  • Pro: Copy-pasting the script directly into the terminal works because Git Bash supports multi-line commands
  • datalad run -m 'Downgrade/Freeze mriqc container version' containers/scripts/freeze_versions bids-mriqc=0.15.1 fails when copy-pasting and when executing in a script with:
> datalad run -m 'Downgrade/Freeze mriqc container version' containers/scripts/freeze_versions bids-mriqc=0.15.1
[INFO] == Command start (output follows) =====
'"containers/scripts/freeze_versions"' is not recognized as an internal or external command,
operable program or batch file.
[INFO] == Command exit (modification check follows) =====
[INFO] The command had a non-zero exit code. If this is expected, you can save the changes with 'datalad save -d . -r -F .git\COMMIT_EDITMSG'
CommandError: '"containers/scripts/freeze_versions" "bids-mriqc=0.15.1"' failed with exitcode 1 under C:/Users/datalad/AppData/Local/Temp/repro-x8Gb5J4/ds000003-qc

A fix for this would be to invoke datalad run with bash <script>:

datalad@latitude-e7440 MINGW64 /tmp/repro-Yo4XEyy/ds000003-qc (adjusted/master(unlocked))
$ datalad run -m "Downgrade/Freeze mriqc container version" bash containers/scripts/freeze_versions bids-mriqc=0.15.1
[INFO] == Command start (output follows) =====
I: bids-mriqc -> 0.15.1
[INFO] == Command exit (modification check follows) =====
[INFO] Total: starting
[INFO]
add(ok): .datalad\config (file)
[INFO] Total: processed result for C:\Users\datalad\AppData\Local\Temp\repro-Yo4XEyy\ds000003-qc\containers
save(ok): containers (dataset)
add(ok): containers (file)
[INFO] Total: processed result for C:\Users\datalad\AppData\Local\Temp\repro-Yo4XEyy\ds000003-qc
save(ok): . (dataset)
[INFO] Total: done
action summary:
  add (ok: 2)
  save (ok: 2)

Anaconda Prompt:

  • Fail: You can't copy paste the command into the terminal. I believe Windows needs ^ at each line ending in multi-line commands (see the last Windows-Workaround in this section
  • I can't currently say definite things about what happens when I execute the script via "bash " in Anaconda prompt, because I'm seeing a very weird interaction between Windows and WSL2, where a bash session from Windows ends up in WSL2:
(base) C:\Users\datalad\repos>echo "This is anaconda prompt on native Windows 10!"
"This is anaconda prompt on native Windows 10!"

(base) C:\Users\datalad\repos>echo %username%
datalad

(base) C:\Users\datalad\repos>bash
adina@latitude-e7440:/mnt/c/Users/datalad/repos$ groups
adina adm cdrom sudo dip plugdev
adina@latitude-e7440:/mnt/c/Users/datalad/repos$ echo "WTAF"
WTAF
adina@latitude-e7440:/mnt/c/Users/datalad/repos$

I need to redo this after wiping the machine again.

Dominant language
Python
Stars
32
Forks
17
Avg merge
12h 2m
Merged PRs (30d)
3

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from ReproNim/containers

All issues in ReproNim/containers

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.