forked from datalad/datalad
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enhance
run()
placeholder substitutions to honor configuration defa…
…ults Previously, `run()` would not recognize configuration defaults for placeholder substitution. This means that any placeholders globally declared in `datalad.interface.common_cfg`, or via `register_config()` in DataLad extensions would not be effective. This changeset makes run's `format_command()` helper include such defaults explicitly, and thereby enable the global declaration of substitution defaults. Moreoever a `{python}` placeholder is now defined via this mechanism, and points to the value of `sys.executable` by default. This particular placeholder was found to be valueable for improving the portability of run-recording across (specific) Python versions, or across different (virtual) environments. See datalad/datalad-container#224 for an example use case. A corresponding test is included. The ability to keep run-records paramterizable, in particular, for interpreters can also aid longevity (think platform-specific choices to call a system Python executable `python3` for some years, and then switch back. Related datalad/datalad-container#250
- Loading branch information
Showing
3 changed files
with
35 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters