8000 Conda env create dry-run by AlbertDeFusco · Pull Request #10635 · conda/conda · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Conda env create dry-run #10635

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 24, 2021
Merged

Conda env create dry-run #10635

merged 2 commits into from
May 24, 2021

Conversation

AlbertDeFusco
Copy link
Contributor
@AlbertDeFusco AlbertDeFusco commented Apr 25, 2021

This adds a --dry-run flag to conda env create that creates YAML or JSON output of the solved environment without installing it.

Question: Without --json but with --quiet this will still display the spinner. Would another PR to more easily quiet the spinner be appreciated just by using --quiet?

By using the CONDA_SUBDIR environment variable this flag can also be used to check environment solves cross platform.

YAML

Here's an example

conda env create --dry-run defusco/py376
Collecting package metadata (repodata.json): done
Solving environment: done
name: py376
channels:
  - defaults
dependencies:
  - defaults/osx-64::ca-certificates==2021.1.19=hecd8cb5_1
  - defaults/osx-64::libcxx==10.0.0=1
  - defaults/osx-64::xz==5.2.5=h1de35cc_0
  - defaults/osx-64::yaml==0.1.7=hc338f04_2
  - defaults/osx-64::zlib==1.2.11=h1de35cc_3
  - defaults/osx-64::libffi==3.2.1=h0a44026_1007
  - defaults/osx-64::ncurses==6.2=h0a44026_1
  - defaults/osx-64::openssl==1.1.1g=h1de35cc_0
  - defaults/osx-64::tk==8.6.10=hb0a8c7a_0
  - defaults/osx-64::libedit==3.1.20191231=h1de35cc_1
  - defaults/osx-64::readline==7.0=h1de35cc_5
  - defaults/osx-64::sqlite==3.33.0=hffcf06c_0
  - defaults/osx-64::python==3.7.6=h359304d_2
  - defaults/osx-64::certifi==2020.12.5=py37hecd8cb5_0
  - defaults/osx-64::pyyaml==5.3.1=py37h1de35cc_0
  - defaults/osx-64::rope==0.10.7=py37_0
  - defaults/noarch::wheel==0.36.2=pyhd3eb1b0_0
  - defaults/osx-64::setuptools==52.0.0=py37hecd8cb5_0
  - defaults/osx-64::pip==20.3.3=py37hecd8cb5_0

JSON

>conda env create --dry-run --json defusco/py376
{
  "name": "py376",
  "channels": [
    "defaults"
  ],
  "dependencies": [
    "defaults/osx-64::ca-certificates==2021.1.19=hecd8cb5_1",
    "defaults/osx-64::libcxx==10.0.0=1",
    "defaults/osx-64::xz==5.2.5=h1de35cc_0",
    "defaults/osx-64::yaml==0.1.7=hc338f04_2",
    "defaults/osx-64::zlib==1.2.11=h1de35cc_3",
    "defaults/osx-64::libffi==3.2.1=h0a44026_1007",
    "defaults/osx-64::ncurses==6.2=h0a44026_1",
    "defaults/osx-64::openssl==1.1.1g=h1de35cc_0",
    "defaults/osx-64::tk==8.6.10=hb0a8c7a_0",
    "defaults/osx-64::libedit==3.1.20191231=h1de35cc_1",
    "defaults/osx-64::readline==7.0=h1de35cc_5",
    "defaults/osx-64::sqlite==3.33.0=hffcf06c_0",
    "defaults/osx-64::python==3.7.6=h359304d_2",
    "defaults/osx-64::certifi==2020.12.5=py37hecd8cb5_0",
    "defaults/osx-64::pyyaml==5.3.1=py37h1de35cc_0",
    "defaults/osx-64::rope==0.10.7=py37_0",
    "defaults/noarch::wheel==0.36.2=pyhd3eb1b0_0",
    "defaults/osx-64::setuptools==52.0.0=py37hecd8cb5_0",
    "defaults/osx-64::pip==20.3.3=py37hecd8cb5_0"
  ]
}

with the --dry-run flag a solved
environment is printed in YAML
format or JSON with the --json
flag
@AlbertDeFusco AlbertDeFusco requested a review from a team as a code owner April 25, 2021 23:27
@anaconda-issue-bot anaconda-issue-bot added the cla-signed [bot] added once the contributor has signed the CLA label Apr 25, 2021
@chenghlee chenghlee added this to the 4.10.2 milestone Apr 26, 2021
@chenghlee chenghlee merged commit f47dc5e into conda:master May 24, 2021
@github-actions github-actions bot added the locked [bot] locked due to inactivity label Jun 29, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 29, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
cla-signed [bot] added once the contributor has signed the CLA locked [bot] locked due to inactivity
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0