Skip to content

Function to get unique number of users in a certain time period#5

Open
ateucher wants to merge 14 commits into
mainfrom
workshop-users-query
Open

Function to get unique number of users in a certain time period#5
ateucher wants to merge 14 commits into
mainfrom
workshop-users-query

Conversation

@ateucher

Copy link
Copy Markdown
Contributor

Default is for the workshop hub, can be "prod" or all.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new exported helper to count distinct workshop users (or list users) over a time window via Prometheus/Grafana queries, along with supporting utilities, docs, and tests.

Changes:

  • Add get_workshop_users() (summary mode and per-user mode with first/last seen estimates).
  • Refactor unsanitize_dir_names() to decode patterns atomically and vectorize behavior; add glue_promql() helper for PromQL-safe templating.
  • Extend test coverage for the new functionality and update generated docs/metadata.

Reviewed changes

Copilot reviewed 6 out of 9 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
tests/testthat/test-utils.R Adds regression tests for vectorized + atomic decoding in unsanitize_dir_names().
tests/testthat/test-prometheus-usage-summaries.R Adds tests for get_workshop_users() (live + mocked) and minor mock readability change.
R/utils.R Refactors unsanitize_dir_names() and introduces glue_promql() helper.
R/prometheus-usage-summaries.R Uses glue_promql() in existing queries and adds get_workshop_users().
NAMESPACE Exports get_workshop_users().
man/unsanitize_dir_names.Rd Regenerated doc reflecting punctuation change.
man/jupycost-package.Rd Regenerated package Rd with author section changes.
man/get_workshop_users.Rd New generated Rd for get_workshop_users().
DESCRIPTION Updates roxygen metadata fields.
Files not reviewed (3)
  • man/get_workshop_users.Rd: Generated file
  • man/jupycost-package.Rd: Generated file
  • man/unsanitize_dir_names.Rd: Generated file

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread R/prometheus-usage-summaries.R Outdated
Comment thread R/prometheus-usage-summaries.R Outdated
Comment thread R/prometheus-usage-summaries.R Outdated
Comment thread R/prometheus-usage-summaries.R Outdated
Comment thread DESCRIPTION

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 7 out of 10 changed files in this pull request and generated 4 comments.

Files not reviewed (3)
  • man/get_workshop_users.Rd: Generated file
  • man/jupycost-package.Rd: Generated file
  • man/unsanitize_dir_names.Rd: Generated file

Comment thread R/prometheus-usage-summaries.R
Comment thread R/prometheus-usage-summaries.R
Comment thread DESCRIPTION
Comment thread R/prometheus-usage-summaries.R
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.

2 participants