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

PDCT-451 Added summary endpoint to new analytics route. #15

Merged
merged 2 commits into from
Oct 4, 2023

Conversation

katybaulch
Copy link
Contributor

Description

  • Added new analytics router & updated AuthEndpoint and the AUTH_TABLE.
  • Added the 'analytics/summary' endpoint returning a dummy response (with the schema below).
{
  n_documents: int,
  n_families: int,
  n_collections: int,
  n_events: int,
}

Another PR to come to flesh this out with the correct data.

Type of change

Please select the option(s) below that are most relevant:

  • Bug fix
  • [x ] New feature
  • Breaking change

How Has This Been Tested?

Tested locally using HTTPie - tests to come in next PR.

Reviewer Checklist

  • The PR represents a single feature (small driveby fixes are also ok)
  • The PR includes tests that are sufficient for the level of risk
  • The code is sufficiently commented, particularly in hard-to-understand areas
  • Any required documentation updates have been made
  • Any TODOs added are captured in future tickets
  • No FIXMEs remain

@katybaulch katybaulch requested a review from diversemix October 4, 2023 16:15
@linear
Copy link

linear bot commented Oct 4, 2023

PDCT-451 Add summaries Endpoint

Return the count for DFCE - see peter - put this on GET /api/v1/analytics/summary

Response spec:

{
  n_documents: int,
  n_families: int,
  n_collections: int,
  n_events: int,
}

Suggested Approach

"Thin slices" … I suggest two PRs, this would be good to do - to form the habit of small slices of value:

  • First PR will add the endpoint returning a dummy response (same schema as above) - this will/could allow Patrick to start to use it for frontend development.
  • Second PR will add a "analytics" service with a summary() to query all the repos for their count - I suggest adding count() to all the repos - also add tests

Copy link
Contributor

@diversemix diversemix left a comment

Choose a reason for hiding this comment

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

Looks great! Assumed you've tested locally 😄

@katybaulch katybaulch merged commit 82b3f88 into main Oct 4, 2023
@katybaulch katybaulch deleted the feature/PDCT-451-add-summary-endpoint branch October 4, 2023 16:23
@katybaulch katybaulch restored the feature/PDCT-451-add-summary-endpoint branch October 4, 2023 16:24
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