Skip to content

Commit

Permalink
Add metrics for the existence of a uv lockfile
Browse files Browse the repository at this point in the history
To help gauge how often a uv lockfile exists. (Either from
someone trying to use uv and the build failing, or when a
third-party buildpack is used to export the uv lockfile to a
requirements file etc).

Towards #1616.
GUS-W-17431743.
  • Loading branch information
edmorley committed Dec 13, 2024
1 parent dfd025b commit b4c9c35
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
## [Unreleased]

- Fixed Dev Center links to reflect recent article URL changes. ([#1723](https://github.com/heroku/heroku-buildpack-python/pull/1723))
- Added metrics for the existence of a uv lockfile. ([#1725](https://github.com/heroku/heroku-buildpack-python/pull/1725))

## [v271] - 2024-12-12

Expand Down
1 change: 1 addition & 0 deletions bin/report
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ ALL_OTHER_FIELDS=(
setup_py_only
sqlite_install_duration
total_duration
uv_lockfile
)

for field in "${STRING_FIELDS[@]}"; do
Expand Down
9 changes: 9 additions & 0 deletions lib/package_manager.sh
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,10 @@ function package_manager::determine_package_manager() {
meta_set "setup_py_only" "false"
fi

if [[ -f "${build_dir}/uv.lock" ]]; then
meta_set "uv_lockfile" "true"
fi

local num_package_managers_found=${#package_managers_found[@]}

case "${num_package_managers_found}" in
Expand Down Expand Up @@ -87,6 +91,11 @@ function package_manager::determine_package_manager() {
Otherwise, add a package manager file to your app. If your app has
no dependencies, then create an empty 'requirements.txt' file.
If you would like to see support for the package manager uv,
please vote and comment on these GitHub issues:
https://github.com/heroku/heroku-buildpack-python/issues/1616
https://github.com/heroku/roadmap/issues/323
For help with using Python on Heroku, see:
https://devcenter.heroku.com/articles/getting-started-with-python
https://devcenter.heroku.com/articles/python-support
Expand Down
5 changes: 5 additions & 0 deletions spec/hatchet/package_manager_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,11 @@
remote: ! Otherwise, add a package manager file to your app. If your app has
remote: ! no dependencies, then create an empty 'requirements.txt' file.
remote: !
remote: ! If you would like to see support for the package manager uv,
remote: ! please vote and comment on these GitHub issues:
remote: ! https://github.com/heroku/heroku-buildpack-python/issues/1616
remote: ! https://github.com/heroku/roadmap/issues/323
remote: !
remote: ! For help with using Python on Heroku, see:
remote: ! https://devcenter.heroku.com/articles/getting-started-with-python
remote: ! https://devcenter.heroku.com/articles/python-support
Expand Down

0 comments on commit b4c9c35

Please sign in to comment.