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 a keep_case flag which ensures that env variables are not uppercased #13904

Closed
wants to merge 17 commits into from

Conversation

ForgottenProgramme
Copy link
Contributor

@ForgottenProgramme ForgottenProgramme commented May 8, 2024

Description

resolves #13713

At present conda converts all environment variables into uppercase.
This PR adds a keep_case context variable, which allows users to store their environment variables as is.

When the --keep-case flag is used, environment variables are saved in "preserved case". When the flag is not used variables are saved in upper case (the original conda behavior).

Tasks

  • Add a new keep_case variable to context
  • store environment variables in preserved case when keep_case is True
  • write tests
  • write more tests
  • Parametrize the tests!

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?

@ForgottenProgramme ForgottenProgramme requested a review from a team as a code owner May 8, 2024 11:04
@conda-bot conda-bot added the cla-signed [bot] added once the contributor has signed the CLA label May 8, 2024
Copy link

codspeed-hq bot commented May 8, 2024

CodSpeed Performance Report

Merging #13904 will not alter performance

Comparing ForgottenProgramme:env-vars (a9d3dab) with main (eb45954)

Summary

✅ 21 untouched benchmarks

tests/test_activate.py Outdated Show resolved Hide resolved
tests/test_activate.py Outdated Show resolved Hide resolved
tests/test_activate.py Outdated Show resolved Hide resolved
tests/test_activate.py Outdated Show resolved Hide resolved
@ForgottenProgramme
Copy link
Contributor Author

pre-commit.ci autofix

tests/test_activate.py Outdated Show resolved Hide resolved
tests/test_activate.py Outdated Show resolved Hide resolved
conda/activate.py Show resolved Hide resolved
tests/test_activate.py Outdated Show resolved Hide resolved
tests/test_activate.py Outdated Show resolved Hide resolved
tests/test_activate.py Outdated Show resolved Hide resolved
tests/test_activate.py Outdated Show resolved Hide resolved
Copy link
Member

@jezdez jezdez left a comment

Choose a reason for hiding this comment

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

this would be even better with a more descriptive name for the config option, keep case of what?

@jezdez
Copy link
Member

jezdez commented Jun 7, 2024

Closed in favor of #13943.

@jezdez jezdez closed this Jun 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla-signed [bot] added once the contributor has signed the CLA
Projects
Status: 🏁 Done
Development

Successfully merging this pull request may close these issues.

lowercase environment variables not showing
4 participants