Skip to content

Commit

Permalink
add docs
Browse files Browse the repository at this point in the history
  • Loading branch information
jameslamb committed Oct 17, 2024
1 parent e504a80 commit cb00f33
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
12 changes: 11 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion tests/test_rapids_dependency_file_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"):
Expand Down

0 comments on commit cb00f33

Please sign in to comment.