Skip to content
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

Add support for conda env create -f environment.json #13745

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

swaldhoer
Copy link

Description

Add support for

conda env create -f environment.json

The whole environment thing was very yaml specific (I mean obviously, it was the only supported format 😅) and for sure it will be staying like that, so tried to implement everything in a backwards compatible manner.

I add documentation (again the whole docs are very yaml centric), so I just added it a few points, so that one is able to create an environment.json file and create the environment from that environment.json file.

I added some basic tests, however, frankly speaking I am not sure whether these are sufficient.

Fix #12942

Checklist - did you ...

  • Add a file to the news directory (using the template) for the next release's release notes?
  • Add / update necessary tests?
  • Add / update outdated documentation?

@swaldhoer swaldhoer requested a review from a team as a code owner March 29, 2024 22:16
@conda-bot
Copy link
Contributor

We require contributors to sign our Contributor License Agreement and we don't have one on file for @swaldhoer.

In order for us to review and merge your code, please e-sign the Contributor License Agreement PDF. We then need to manually verify your signature, merge the PR (conda/infrastructure#901), and ping the bot to refresh the PR.

def test_http_json():
e = get_simple_environment_json()
f = from_file(
"https://raw.githubusercontent.com/swaldhoer/conda/gh-12942/tests/env/support/simple.json"
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs to be updated before merging.

conda_cli(
*("env", "create"),
f"--prefix={tmp_path}",
"--file=https://raw.githubusercontent.com/swaldhoer/conda/gh-12942/tests/env/support/simple.json",
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs to be updated before merging.

@swaldhoer
Copy link
Author

pre-commit.ci autofix

Copy link

codspeed-hq bot commented Mar 29, 2024

CodSpeed Performance Report

Merging #13745 will degrade performances by 66.64%

Comparing swaldhoer:gh-12942 (75a893d) with main (11c21d5)

Summary

❌ 2 regressions
✅ 19 untouched benchmarks

⚠️ Please fix the performance issues or acknowledge them on CodSpeed.

Benchmarks breakdown

Benchmark main swaldhoer:gh-12942 Change
test_jlap_fetch_ssl[False] 359.9 ms 936 ms -61.55%
test_jlap_fetch_ssl[True] 619.1 ms 1,856 ms -66.64%

@travishathaway
Copy link
Contributor

Hi @swaldhoer,

Thank you very much for this contribution. Before we can move forward with this pull request review, we need you to have signed our Contributor License Agreement. Have you already done this? I double checked our current list of signatories and was unable to find your name.

@swaldhoer
Copy link
Author

Hi @swaldhoer,

Thank you very much for this contribution. Before we can move forward with this pull request review, we need you to have signed our Contributor License Agreement. Have you already done this? I double checked our current list of signatories and was unable to find your name.

I'll have a look.

@swaldhoer
Copy link
Author

CodSpeed Performance Report

Merging #13745 will degrade performances by 66.64%

Comparing swaldhoer:gh-12942 (75a893d) with main (11c21d5)

Summary

❌ 2 regressions ✅ 19 untouched benchmarks

⚠️ Please fix the performance issues or acknowledge them on CodSpeed.

Benchmarks breakdown

Benchmark main swaldhoer:gh-12942 Change
test_jlap_fetch_ssl[False] 359.9 ms 936 ms -61.55%
test_jlap_fetch_ssl[True] 619.1 ms 1,856 ms -66.64%

I think this regression comes from the additional https request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 🆕 New
Development

Successfully merging this pull request may close these issues.

conda env create -n ENVNAME --file should support json files
3 participants