rapidsai / dependency-file-generator

https://pypi.org/project/rapids-dependency-file-generator/
Apache License 2.0
15 stars 13 forks source link

fix: support rendering nested pyproject.toml outputs to stdout #86

Closed jameslamb closed 3 months ago

jameslamb commented 4 months ago

Fixes #85.

Contributes to https://github.com/rapidsai/build-planning/issues/31 (via making debugging those changes easier).

85 contains a reproducible example and details of the problem this solves. In short:

This proposes the following:

Notes for Reviewers

How I tested this

Installed the version from main on this branch.

git checkout main -- src/rapids_dependency_file_generator/_rapids_dependency_file_generator.py
pip install --ignore-installed .

Confirmed that this new unit test fails on main, and is reading in the root-level pyproject.toml instead of the nested one.

pytest tests/test_rapids_dependency_file_generator.py

Confirmed that it fails with the same error as #85 on the new test project added here.

cd ./tests/examples/nested-pyproject
rapids-dependency-file-generator \
   --output pyproject \
   --file-key sparkly_unicorn \
   --matrix "cuda=100.1"

# tomlkit.exceptions.NonExistentKey: 'Key "project" does not exist.'

Tested on cudf's actual dependencies.yaml on branch-24.06.

rapids-dependency-file-generator \
  --output pyproject \
  --file-key py_run_cudf \
  --matrix "cuda=12.2"
GPUtester commented 3 months ago

:tada: This PR is included in version 1.13.5 :tada:

The release is available on:

Your semantic-release bot :package::rocket: