canonical / surl

Ubuntu Store API thin wrapper
GNU General Public License v3.0
9 stars 11 forks source link

convenience commands broken in surl 1.0 #42

Open Roadmaster opened 1 year ago

Roadmaster commented 1 year ago
$ surl.metrics -a production -s production --web-login
Traceback (most recent call last):
  File "/snap/surl/419/bin/surl_metrics.py", line 159, in <module>
    sys.exit(main())
  File "/snap/surl/419/bin/surl_metrics.py", line 107, in main
    config, remainder = surl.get_config_from_cli(parser, auth_dir)
ValueError: too many values to unpack (expected 2)

These probably just need adapting to the changes introduced in surl 1.0.

The three convenience scripts are surl_metrics, surl_storeops and surl_month_in_snaps.

Roadmaster commented 1 year ago

Example runs:

$ surl.metrics -a production -s production -p package_metrics --web-login --force watson weekly_installed_base_by_channel
Opening an authorization web page in your browser.
If it does not open, please open this URL:
 https://api.jujucharms.com/identity/login?did=<elided> 

Resolving snap_id for watson ...
Collecting publisher metrics for 1GPXiHsyVe9qoGgyljOMTpZHERBJitFD ...
Terms      Values
-------  --------
stable        115
edge            1

another:

$ surl.monthinsnaps -a production -s production -p package_metrics --web-login 
getting snaps
getting metrics

(the above didn't complete because given my permissions I think it's trying to get metrics for all snaps or something :)

surl.storeops -a production -s production -p package_metrics --web-login

the above just spewed a list of snaps, not sure what it does.