-
Notifications
You must be signed in to change notification settings - Fork 18
Open
Description
Motivation
Developers of installers are interested in usage statistics of their command line interfaces to help prioritize improvements to them. It would be helpful to understand:
- the relative popularity of two interfaces achieving similar things within the same installer, e.g.
uv syncvsuv pip install - in what contexts a certain command (e.g.
pip downloadorpip wheel) is typically used
Plan
- Add a new
subcommandcolumn of typeSTRINGin the public BigQuery table (I'll need help with this). - Extend
linehaul.ua.datastructures.Installerwith a newsubcommandfield of typeOptional[list[str]]with default value ofNone. This value would beshlex.join()ed when serializing using acattrsunstructuring hook. - Change
uvandpipto start attaching these fields to their user agent strings.
I believe these items can be done in any order.
Notes
Unfortunately Google BigQuery arrays have a weird interaction with NULL values:
When you write a
NULLarray to a table, it's converted to an empty array.
Because of this, using ARRAY<STRING> as the type of subcommand column would make it impossible to tell if the subcommand value was an empty list or missing. The next best thing is to store the subcommand as a single string, where this is not an issue.
The Installer field's type would still be kept as a list[str] to
- make sure the serialization to string is done consistently across installer implementations
- have a chance for other linehaul consumers (or a future bigquery update) access to the list-form data without changing all clients
zanieb and samypr100
Metadata
Metadata
Assignees
Labels
No labels