feat(performance): add Performance family read-only resources#108
Open
sgerrand wants to merge 3 commits into
Open
feat(performance): add Performance family read-only resources#108sgerrand wants to merge 3 commits into
sgerrand wants to merge 3 commits into
Conversation
…ces list/retrieve Adds the four read-only Performance API resources that support both list and retrieve: - Humaans.PerformanceCycles - Humaans.PerformanceTemplates - Humaans.PerformanceReviews - Humaans.PerformanceInstances Each declares actions [:list, :retrieve] and a guard test asserts the write actions are not exported.
…ns retrieve Adds the three retrieve-only Performance API resources: - Humaans.PerformanceRatings - Humaans.PerformanceSummaries - Humaans.PerformanceCyclePeerNominations Each declares actions [:retrieve] and a guard test asserts list/create/ update/delete are not exported.
Coverage Report for CI Build 25329943118Coverage decreased (-3.1%) to 96.903%Details
Uncovered Changes
Coverage RegressionsNo coverage regressions found. Coverage Stats
💛 - Coveralls |
There was a problem hiding this comment.
Pull request overview
Adds the missing “Performance” API surface area to the Humaans Elixir client by introducing seven new read-only resource modules/structs, wiring them into the top-level Humaans module, and documenting/testing the new endpoints.
Changes:
- Added 7 new read-only resource modules (
Humaans.Performance*) backed by newHumaans.Resources.Performance*structs. - Added top-level accessors in
Humaansand documented the new resources in the README. - Added ExUnit tests for list/retrieve behaviors and to guard that unsupported write actions are not exported.
Reviewed changes
Copilot reviewed 23 out of 23 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| test/humaans/performance_templates_test.exs | Tests list/retrieve for performance templates + export-guard checks |
| test/humaans/performance_summaries_test.exs | Tests retrieve-only behavior for performance summaries + export-guard checks |
| test/humaans/performance_reviews_test.exs | Tests list/retrieve for performance reviews + export-guard checks |
| test/humaans/performance_ratings_test.exs | Tests retrieve-only behavior for performance ratings + export-guard checks |
| test/humaans/performance_instances_test.exs | Tests list/retrieve for performance instances + export-guard checks |
| test/humaans/performance_cycles_test.exs | Tests list/retrieve for performance cycles + export-guard checks |
| test/humaans/performance_cycle_peer_nominations_test.exs | Tests retrieve-only behavior for peer nominations + export-guard checks |
| README.md | Documents the new Performance resource modules |
| lib/humaans/resources/performance_template.ex | Adds struct + timestamp parsing for PerformanceTemplate |
| lib/humaans/resources/performance_summary.ex | Adds struct + timestamp parsing for PerformanceSummary |
| lib/humaans/resources/performance_review.ex | Adds struct + timestamp parsing for PerformanceReview |
| lib/humaans/resources/performance_rating.ex | Adds struct + timestamp parsing for PerformanceRating |
| lib/humaans/resources/performance_instance.ex | Adds struct + timestamp parsing for PerformanceInstance |
| lib/humaans/resources/performance_cycle.ex | Adds struct + date/timestamp parsing for PerformanceCycle |
| lib/humaans/resources/performance_cycle_peer_nomination.ex | Adds struct + timestamp parsing for PerformanceCyclePeerNomination |
| lib/humaans/performance_templates.ex | Adds read-only PerformanceTemplates resource module (list/retrieve) |
| lib/humaans/performance_summaries.ex | Adds read-only PerformanceSummaries resource module (retrieve-only) |
| lib/humaans/performance_reviews.ex | Adds read-only PerformanceReviews resource module (list/retrieve) |
| lib/humaans/performance_ratings.ex | Adds read-only PerformanceRatings resource module (retrieve-only) |
| lib/humaans/performance_instances.ex | Adds read-only PerformanceInstances resource module (list/retrieve) |
| lib/humaans/performance_cycles.ex | Adds read-only PerformanceCycles resource module (list/retrieve) |
| lib/humaans/performance_cycle_peer_nominations.ex | Adds read-only PerformanceCyclePeerNominations resource module (retrieve-only) |
| lib/humaans.ex | Exposes the new Performance modules via top-level accessor functions |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+17
to
+21
| expect(Humaans.MockHTTPClient, :request, fn _, opts -> | ||
| assert Keyword.fetch!(opts, :url) == "https://app.humaans.io/api/performance-templates" | ||
|
|
||
| {:ok, | ||
| %{ |
Comment on lines
+17
to
+24
| expect(Humaans.MockHTTPClient, :request, fn _, opts -> | ||
| assert Keyword.fetch!(opts, :url) == | ||
| "https://app.humaans.io/api/performance-summaries/ps_abc" | ||
|
|
||
| {:ok, | ||
| %{ | ||
| status: 200, | ||
| body: %{ |
Comment on lines
+17
to
+23
| expect(Humaans.MockHTTPClient, :request, fn _, opts -> | ||
| assert Keyword.fetch!(opts, :url) == "https://app.humaans.io/api/performance-reviews" | ||
|
|
||
| {:ok, | ||
| %{ | ||
| status: 200, | ||
| body: %{ |
Comment on lines
+17
to
+24
| expect(Humaans.MockHTTPClient, :request, fn _, opts -> | ||
| assert Keyword.fetch!(opts, :url) == | ||
| "https://app.humaans.io/api/performance-ratings/prt_abc" | ||
|
|
||
| {:ok, | ||
| %{ | ||
| status: 200, | ||
| body: %{ |
Comment on lines
+17
to
+23
| expect(Humaans.MockHTTPClient, :request, fn _, opts -> | ||
| assert Keyword.fetch!(opts, :url) == "https://app.humaans.io/api/performance-instances" | ||
|
|
||
| {:ok, | ||
| %{ | ||
| status: 200, | ||
| body: %{ |
Comment on lines
+17
to
+23
| expect(Humaans.MockHTTPClient, :request, fn _, opts -> | ||
| assert Keyword.fetch!(opts, :url) == "https://app.humaans.io/api/performance-cycles" | ||
|
|
||
| {:ok, | ||
| %{ | ||
| status: 200, | ||
| body: %{ |
Comment on lines
+17
to
+24
| expect(Humaans.MockHTTPClient, :request, fn _, opts -> | ||
| assert Keyword.fetch!(opts, :url) == | ||
| "https://app.humaans.io/api/performance-cycle-peer-nominations/pcpn_abc" | ||
|
|
||
| {:ok, | ||
| %{ | ||
| status: 200, | ||
| body: %{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
💁 Adds 7 read-only Performance resources to the library, completing the Performance API surface.
Summary
List + retrieve:
Retrieve only:
Each declares its supported `actions: [...]` explicitly with a guard test confirming non-exported functions stay unexported. Helpers and README updated.
The struct fields cover the documented top-level shape (`id`, `companyId`, links, status, timestamps); the deeper schema for some Performance objects (e.g. nested template content, summary body shape) is sparsely documented in the public API reference and can be added additively if required.
Test plan