Skip to content

Conversation

@mrtopsyt
Copy link
Contributor

Ticket

Closes #4393 .

Reviewers

@hunterckx .

Changes

  • Added example code to the analytics package
  • Added a table with package structure to the readme

QA steps (optional)

Known Issues

  • The example code is dependent upon code that is currently in open PRs (see chore: support request created analytics #4397). The commit hash in requirements.txt should be updated once these are merged
  • With the addition of new events to the analytics package, the google sheets api limit of 60 calls per user per minute is met quickly. This should be pretty easy to resolve, and I added a comment with pointers to the relevant section of example code:
# Currently this example makes too many api queries, so it will fail. 
# This can be resolved by updating the package to use batch updating wherever possible for gspread-formatting
# and to add exception handling to other gspread calls so they retry after a certain amount of time.
# Ideally, it would be possible to reduce the number of api calls by batching all updates to the spreadsheet in one
# api call, but this does not appear to be possible with gspread
# See https://gspread-formatting.readthedocs.io/en/latest/#batch-mode-for-api-call-efficiency
# and https://developers.google.com/sheets/api/limits#exponential

@mrtopsyt mrtopsyt requested a review from hunterckx February 24, 2025 19:59
@mrtopsyt mrtopsyt linked an issue Feb 24, 2025 that may be closed by this pull request
@hunterckx hunterckx marked this pull request as ready for review February 24, 2025 22:19
@hunterckx hunterckx merged commit 33c8a68 into main Feb 24, 2025
4 checks passed
@MillenniumFalconMechanic MillenniumFalconMechanic deleted the jonah/4393-analytics-package-documentation branch February 28, 2025 21:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Analytics Package documentation

3 participants