From cb00f3332f0601551baa1540ff8b6d71177c34a9 Mon Sep 17 00:00:00 2001 From: James Lamb Date: Thu, 17 Oct 2024 10:42:35 -0500 Subject: [PATCH] add docs --- README.md | 12 +++++++++++- tests/test_rapids_dependency_file_generator.py | 2 +- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 0c024df..41ecc66 100644 --- a/README.md +++ b/README.md @@ -322,7 +322,7 @@ ENV_NAME="cudf_test" rapids-dependency-file-generator \ --file-key "test" \ --output "conda" \ - --matrix "cuda=11.5;arch=$(arch)" > env.yaml + --matrix "cuda=12.5;arch=$(arch)" > env.yaml mamba env create --file env.yaml mamba activate "$ENV_NAME" @@ -335,6 +335,16 @@ The `--file-key`, `--output`, and `--matrix` flags must be used together. `--mat Where multiple values for the same key are passed to `--matrix`, e.g. `cuda_suffixed=true;cuda_suffixed=false`, only the last value will be used. +Where `--file-key` is supplied multiple times in the same invocation, the output printed to `stdout` will contain a union (without duplicates) of all of the corresponding dependencies. For example: + +```shell +rapids-dependency-file-generator \ + --file-key "test" \ + --file-key "test_notebooks" \ + --output "conda" \ + --matrix "cuda=12.5;arch=$(arch)" > env.yaml +``` + The `--prepend-channel` argument accepts additional channels to use, like `rapids-dependency-file-generator --prepend-channel my_channel --prepend-channel my_other_channel`. If both `--output` and `--prepend-channel` are provided, the output format must be conda. Prepending channels can be useful for adding local channels with packages to be tested in CI workflows. diff --git a/tests/test_rapids_dependency_file_generator.py b/tests/test_rapids_dependency_file_generator.py index 813e2e8..f9bcbb4 100644 --- a/tests/test_rapids_dependency_file_generator.py +++ b/tests/test_rapids_dependency_file_generator.py @@ -83,7 +83,7 @@ def test_make_dependency_file(mock_relpath): assert env == header + "dep1\ndep2\n" -def test_make_dependency_files_should_raise_informative_error_when_extras_is_missing_for_pyproj(): +def test_make_dependency_file_should_raise_informative_error_when_extras_is_missing_for_pyproj(): current_dir = pathlib.Path(__file__).parent with pytest.raises(ValueError, match=r"The 'extras' field must be provided for the 'pyproject' file type"):