anaconda-project icon indicating copy to clipboard operation
anaconda-project copied to clipboard

yml format in docs

Open lukereding opened this issue 7 years ago • 2 comments

The format for anaconda-project.yml as shown in the docs (here on github) is different from the format when I create an anaconda project on my machine. Format in the docs looks like

packages:
  - redis-py

vs

packages: [redis-py]

when created locally. One consequence of this is that the comments in the anaconda-project.yml file for adding a new channel

# For example,
#
# channels:
#    - https://conda.anaconda.org/asmeurer

may be outdated. @cio-docs

lukereding avatar Apr 18 '17 14:04 lukereding

@lukereding thank you for pointing this out! And also for linking to the docs page and github source page, which makes it much quicker and easier to see what you mean.

@havocp what do you think? I think before docs takes this over we may need someone on the dev side to draft a PR that we can review. I'm not sure what the syntax should be or which other code blocks would be affected by these changes.

electronwill avatar Apr 18 '17 20:04 electronwill

Both should work afaik. YAML is a json superset, so you can do the full JSON:

"packages" : [ "redis-py" ]

Or the YAML style:

packages:
  - redis-py

Or a sort of hybrid (leave out quotation marks):

packages: [redis-py]

I have been meaning to make anaconda-project generate the prettier format whenever it generates YAML, but I didn't find all the places that generate ugly stuff, yet.

havocp avatar Apr 18 '17 21:04 havocp