Skip to content
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

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open

Add tracking of model RDF downloads #504

wants to merge 8 commits into from

Conversation

FynnBe
Copy link
Member

@FynnBe FynnBe commented Mar 2, 2023

No description provided.

@github-actions github-actions bot added documentation Improvements or additions to documentation enhancement New feature or request labels Mar 2, 2023
Comment on lines 14 to 19
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"
)
Copy link
Member Author

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...

Copy link
Member Author

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?

Copy link
Contributor

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:

  1. we need to configure the date properly, it was configured to start from yesterday and the period is a day, so there won't be any traffic for that model. I would change period to year and date to 2023-03-01 (see here: https://developer.matomo.org/api-reference/Piwik/Period)
  2. 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

@FynnBe
Copy link
Member Author

FynnBe commented Mar 2, 2023

before merging this PR we should set the "BIOIMAGEIO_COUNT_RDF_DOWNLOADS" env var to "false" in bioimageio.core tests and the collection CI...

@oeway
Copy link
Contributor

oeway commented Mar 2, 2023

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.

@FynnBe
Copy link
Member Author

FynnBe commented Mar 3, 2023

ok, looks promising...
I submitted a report for 'test3':
https://bioimage.matomo.cloud/matomo.php?download=https://doi.org/test3&idsite=1&rec=1&r=646242&h=13&m=35&s=20&url=http://bioimage.io/#/?id=test3&uadata={"brands":[{"brand":"python","version":"3.10"}]}

but also after 15 min I don't get the report back
and after some more time the report is updated: 👍
https://bioimage.matomo.cloud/?module=API&method=Actions.getDownload&downloadUrl=https://doi.org/test3&idSite=1&idCustomReport=1&period=year&date=2023-03-01&format=JSON&token_auth=anonymous

(I immediately got a report for 'test2', so I'm thinking that was you before... ):

@FynnBe
Copy link
Member Author

FynnBe commented Mar 3, 2023

It is hard to test if I successfully disabled tracking in

@uschmidt83
Copy link

FYI, in case you're interested in Plausible.io for analytics. stardist/stardist-napari#12

@oeway
Copy link
Contributor

oeway commented Mar 29, 2023

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.

@uschmidt83
Copy link

With matomo we need to either pay or host our own instance.

Same with Plausible.io.

@FynnBe
Copy link
Member Author

FynnBe commented Mar 29, 2023

@carlosuc3m this PR adds tracking to bioimageio.spec

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants