-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add tracking of model RDF downloads #504
base: main
Are you sure you want to change the base?
Conversation
bioimageio/spec/shared/tracking.py
Outdated
if __name__ == "__main__": | ||
model_doi = "10.5281/zenodo.7614645" | ||
report_resource_download(model_doi) | ||
print( | ||
f"https://bioimage.matomo.cloud/?module=API&method=Actions.getDownload&downloadUrl=https://doi.org/{model_doi}&idSite=1&period=day&date=yesterday&format=JSON&token_auth=anonymous" | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I could not yet see the tracking working...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@oeway any idea what I'm doing wrong?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are two things we need to set here:
- we need to configure the
date
properly, it was configured to start fromyesterday
and the period is aday
, so there won't be any traffic for that model. I would changeperiod
toyear
anddate
to2023-03-01
(see here: https://developer.matomo.org/api-reference/Piwik/Period) - the report will only be generated every 15 minutes: https://matomo.org/faq/general/faq_41/ so we won't see the report immediately.
You can see an example here (I triggered the report yesterday so it shows up today):
https://bioimage.matomo.cloud/?module=API&method=Actions.getDownload&downloadUrl=https://doi.org/test&idSite=1&idCustomReport=1&period=year&date=2023-03-01&format=JSON&token_auth=anonymous
before merging this PR we should set the "BIOIMAGEIO_COUNT_RDF_DOWNLOADS" env var to "false" in bioimageio.core tests and the collection CI... |
Hi @FynnBe Thanks for implementing this, please hold on and let me check what's going on with the reporting. I thought it's because the delay (they mentioned the reporting is not in realtime), but it seems not. EDIT: it should work now, check my comment above. I also updated the notes in the docs. |
ok, looks promising...
(I immediately got a report for 'test2', so I'm thinking that was you before... ): |
It is hard to test if I successfully disabled tracking in
|
FYI, in case you're interested in Plausible.io for analytics. stardist/stardist-napari#12 |
Thanks for the suggestion! I will check it out. With matomo we need to either pay or host our own instance. @FynnBe The analytics service stopped currently because I didn't pay. Will need to decide whether we run our server, pay, or switch to another option. |
Same with Plausible.io. |
@carlosuc3m this PR adds tracking to bioimageio.spec |
No description provided.