anaconda / anaconda-project

Tool for encapsulating, running, and reproducing data science projects
https://anaconda-project.readthedocs.io/en/latest/
Other
217 stars 88 forks source link

support default command alias with prepare #311

Closed AlbertDeFusco closed 3 years ago

AlbertDeFusco commented 3 years ago

this enables anaconda-project prepare --command default when 'default' is an alias for the first command in the anaconda-project.yml file (see #264 )

mcg1969 commented 3 years ago

Just curious: if there are three commands, and the second one is called "default", what does anaconda-project run default do?

AlbertDeFusco commented 3 years ago

It will run the second one. The name default takes precedence. If there is no command named default the first one in the file is aliased as default.

commands:
  first:
    unix: echo "I'm first"
  default:
    unix: echo "I'm default"
  last:
    unix: echo "I'm last"
> anaconda-project run
I'm default
> anaconda-project run default
I'm default