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

[chore] install for command #181

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

Conversation

AlbertDeFusco
Copy link
Contributor

install an env for a specified command (especially if it is not default)

> conda project install --for-command=<cmd-name>

Copy link

codecov bot commented Feb 5, 2025

Codecov Report

Attention: Patch coverage is 88.88889% with 1 line in your changes missing coverage. Please review.

Project coverage is 98.15%. Comparing base (f0bec15) to head (d1eed50).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/conda_project/cli/commands.py 83.33% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #181      +/-   ##
==========================================
- Coverage   98.23%   98.15%   -0.08%     
==========================================
  Files           9        9              
  Lines        1077     1086       +9     
==========================================
+ Hits         1058     1066       +8     
- Misses         19       20       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@mattkram mattkram left a comment

Choose a reason for hiding this comment

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

Looking good but looks like there's a schema validation error. Should be good once tests pass.

One small comment about testing strategy.

@pytest.mark.parametrize(
"install_args,expected_env", [("", "bbb"), ("--for-command=default", "default")]
)
def test_install_env_for_command(project_directory_factory, install_args, expected_env):
Copy link
Contributor

Choose a reason for hiding this comment

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

Looks good, but maybe we should isolate the "determine environment from args" logic into a function and just unit test to speed things up?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, I'll do that.

@AlbertDeFusco
Copy link
Contributor Author

The pydantic errors are limited to conda version 24.1 and 24.4. I'm looking into reproducing this locally.

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

Successfully merging this pull request may close these issues.

2 participants