{"action":"created","issue":{"url":"https://api.github.com/repos/conda/conda-env/issues/200","labels_url":"https://api.github.com/repos/conda/conda-env/issues/200/labels{/name}","comments_url":"https://api.github.com/repos/conda/conda-env/issues/200/comments","events_url":"https://api.github.com/repos/conda/conda-env/issues/200/events","html_url":"https://github.com/conda/conda-env/issues/200","id":116058392,"number":200,"title":"Separate development, build and test dependencies from runtime dependencies","user":{"login":"Korijn","id":1882046,"avatar_url":"https://avatars.githubusercontent.com/u/1882046?v=3","gravatar_id":"","url":"https://api.github.com/users/Korijn","html_url":"https://github.com/Korijn","followers_url":"https://api.github.com/users/Korijn/followers","following_url":"https://api.github.com/users/Korijn/following{/other_user}","gists_url":"https://api.github.com/users/Korijn/gists{/gist_id}","starred_url":"https://api.github.com/users/Korijn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Korijn/subscriptions","organizations_url":"https://api.github.com/users/Korijn/orgs","repos_url":"https://api.github.com/users/Korijn/repos","events_url":"https://api.github.com/users/Korijn/events{/privacy}","received_events_url":"https://api.github.com/users/Korijn/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/conda/conda-env/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":{"login":"malev","id":55977,"avatar_url":"https://avatars.githubusercontent.com/u/55977?v=3","gravatar_id":"","url":"https://api.github.com/users/malev","html_url":"https://github.com/malev","followers_url":"https://api.github.com/users/malev/followers","following_url":"https://api.github.com/users/malev/following{/other_user}","gists_url":"https://api.github.com/users/malev/gists{/gist_id}","starred_url":"https://api.github.com/users/malev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/malev/subscriptions","organizations_url":"https://api.github.com/users/malev/orgs","repos_url":"https://api.github.com/users/malev/repos","events_url":"https://api.github.com/users/malev/events{/privacy}","received_events_url":"https://api.github.com/users/malev/received_events","type":"User","site_admin":false},"milestone":null,"comments":18,"created_at":"2015-11-10T08:10:08Z","updated_at":"2015-11-18T09:12:45Z","closed_at":null,"body":"**Introduction**\r\nSimilar to how `npm`'s `package.json` has a `dependencies` and `devDependencies` node, it would be interesting to make such a distinction in `environment.yaml`.\r\n\r\nThis would be useful to have tools such as `pyinvoke`, `flake8` and `sphinx` listed in `devDependencies`, since they are not required for an environment where you will only run the package code (for example, when deploying).\r\n\r\nAlso see the dicussion here: http://stackoverflow.com/questions/18875674/whats-the-difference-between-dependencies-devdependencies-and-peerdependencies\r\n\r\nOn a related note, I use some command line automation (accomplished with `pyinvoke`) to keep my `environment.yaml` and my conda recipe's `meta.yaml`'s requirement lists (run/build/test) in sync, but since we can't separate development dependencies from runtime dependencies yet, that complicates things. This inconvenience could also be solved with this feature.\r\n\r\n**Plan**\r\nHere's the plan after a few iterations and some discussion:\r\n\r\nThe \"root\" runtime dependencies list will correspond to the `requirements\\run` list in `meta.yaml`. Other sublists extend the runtime dependencies (see https://github.com/conda/conda-env/issues/200#issuecomment-155728552) to avoid duplication of items. That would lead to the following to-do list for this feature:\r\n\r\n- [ ] parse subsections in the `dependencies` node (e.g., for `dev`elopment, `test`ing and `build`ing)\r\n- [ ] add optional argument `-e subsection` to CLI to install dependencies from the root plus the specified subsection; install everything if the optional argument is left out.\r\n- [ ] then there are two options to install only root dependencies:\r\n    - add optional argument `--production` to CLI. This obviously cannot be used in conjunction with the `-e` parameter.\r\n    - specify `-e run` or `-e production` (any suggestions?).\r\n\r\nExample of such a file:\r\n\r\n```yaml\r\nname: myproject\r\ndependencies:\r\n  - python\r\n  - boltons\r\n  - dev:\r\n    - flake8\r\n    - sphinx\r\n    - pip:\r\n      - invoke\r\n  - test:\r\n    - pytest\r\n    - pytest-mock\r\n    - pytest-flakes\r\n  - build:\r\n    - boost\r\n    - gcc\r\n```\r\n\r\nThe big benefit of this format is that you maintain backwards compatibility (in the sense that existing `environment.yaml` files don't need to change to continue to work as expected).\r\n\r\nThere is one additional work item that should be completed in order to let `environment.yaml` grab its contents from `meta.yaml` dynamically, so that the requirements lists don't need to be duplicated across both files. De-duplication of the `meta.yaml` lists can be handled there as well.\r\n\r\n- [ ] merge PR #88 and add pyyaml to the available modules in the templates so that `environment.yaml` can retrieve its contents from `meta.yaml`\r\n\r\nAnd as noted by @nicoddemus in https://github.com/conda/conda-env/issues/200#issuecomment-155736887, perhaps aliasing `dependencies` as `requirements` will improve user experience when working with `meta.yaml` and `environment.yaml` files.\r\n\r\n- [ ] `dependencies` in `environment.yaml` gets an alias `requirements`"},"comment":{"url":"https://api.github.com/repos/conda/conda-env/issues/comments/157651401","html_url":"https://github.com/conda/conda-env/issues/200#issuecomment-157651401","issue_url":"https://api.github.com/repos/conda/conda-env/issues/200","id":157651401,"user":{"login":"nicoddemus","id":1085180,"avatar_url":"https://avatars.githubusercontent.com/u/1085180?v=3","gravatar_id":"","url":"https://api.github.com/users/nicoddemus","html_url":"https://github.com/nicoddemus","followers_url":"https://api.github.com/users/nicoddemus/followers","following_url":"https://api.github.com/users/nicoddemus/following{/other_user}","gists_url":"https://api.github.com/users/nicoddemus/gists{/gist_id}","starred_url":"https://api.github.com/users/nicoddemus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nicoddemus/subscriptions","organizations_url":"https://api.github.com/users/nicoddemus/orgs","repos_url":"https://api.github.com/users/nicoddemus/repos","events_url":"https://api.github.com/users/nicoddemus/events{/privacy}","received_events_url":"https://api.github.com/users/nicoddemus/received_events","type":"User","site_admin":false},"created_at":"2015-11-18T09:12:45Z","updated_at":"2015-11-18T09:12:45Z","body":":+1: for groups :smile:"}}