posit-dev / publisher

MIT License
3 stars 0 forks source link

Add dir parameter to config packages api #1905

Closed mmarchetti closed 17 hours ago

mmarchetti commented 3 days ago

Intent

This PR adds the dir parameter to the configuration-specific Packages APIs.

Type of Change

Approach

Same as the other APIs (#1860, #1873).

Automated Tests

Added unit tests to the Python packages suite. There isn't a suite for the R packages API yet.

Directions for Reviewers

Run the agent in a parent directory (one or more levels up from your deployable projects). Access the Pacakges API from subdirectories:

$publisher ui -vv --listen=localhost:9001 &
curl localhost:9001/api/configuration/$NAME/packages/python?dir=test/sample-content/quarto-proj-py | jq
curl localhost:9001/api/configuration/$NAME/packages/r?dir=test/sample-content/quarto-proj-py | jq
curl localhost:9001/api/configuration/$NAME/packages/python?dir=test/sample-content/rmd-static-1 | jq
curl localhost:9001/api/configuration/$NAME/packages/r?dir=test/sample-content/rmd-static-1 | jq