anaconda-project
anaconda-project copied to clipboard
[ENH] Escaping to shell for commands inside `anaconda-project.yml`
Background
anaconda-project
can potentially serve as a replacement for simple Makefile
s. However, make
allows for arbitrary shell commands to be embedded within Makefile
, which is often used for extracting information such as git tag and branch information.
Example
image := some-image-name
git_hash ?= $(shell git log -1 --pretty=format:%h)
.PHONY: build
build:
docker build -f Dockerfile -t $(image):$(git_hash)
Suggestion
Develop some mechanism to embed similar shell commands within anaconda-project.yml
, similar to the following:
commands:
build:
unix: docker build -f Dockerfile -t $(image):$(shell git log -1 --pretty=format:%h
Potentially, instead of directly embedding within the commands
section , this functionality could be moved into the variables
section as a new variable type.