Skip to content

Commit

Permalink
fix conda env names
Browse files Browse the repository at this point in the history
  • Loading branch information
ajschmidt8 committed Aug 16, 2022
1 parent 04f8346 commit 2d22f5c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def make_dependency_file(
if file_type == str(GeneratorTypes.CONDA):
file_contents += yaml.dump(
{
"name": name,
"name": os.path.splitext(name)[0],
"channels": conda_channels,
"dependencies": dependencies,
}
Expand Down
14 changes: 8 additions & 6 deletions tests/test_rapids_dependency_file_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,19 @@ def test_dedupe():
assert deduped == ["dep1", {"pip": ["pip_dep1", "pip_dep2"]}]


@mock.patch("rapids_dependency_file_generator.rapids_dependency_file_generator.os.path")
def test_make_dependency_file(mock_path):
relpath = "../../dependencies.yaml"
mock_path.relpath.return_value = relpath
@mock.patch(
"rapids_dependency_file_generator.rapids_dependency_file_generator.os.path.relpath"
)
def test_make_dependency_file(mock_relpath):
relpath = "../../config_file.yaml"
mock_relpath.return_value = relpath
header = f"""\
# This file was automatically generated by `{cli_name}`. Changes should not be made directly to this file.
# Instead, edit {relpath} and rerun `{cli_name}`.
"""
env = make_dependency_file(
"conda",
"tmp_env",
"tmp_env.yaml",
"config_file",
"output_path",
["rapidsai", "nvidia"],
Expand All @@ -50,7 +52,7 @@ def test_make_dependency_file(mock_path):

env = make_dependency_file(
"requirements",
"tmp_env",
"tmp_env.txt",
"config_file",
"output_path",
["rapidsai", "nvidia"],
Expand Down

0 comments on commit 2d22f5c

Please sign in to comment.