-
Notifications
You must be signed in to change notification settings - Fork 12
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
Colonnes APDF #2401
Colonnes APDF #2401
Conversation
Warning Rate Limit Exceeded@jonathanfallon has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 9 minutes and 35 seconds before requesting another review. How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. WalkthroughThe overall change enhances the APDF service by refining its functionality and data handling. It introduces a unified incentive field, adds new fields for better data representation, and incorporates logic to distinguish between normal and booster periods. Additionally, it modifies the handling and generation of Excel reports, making the data more accessible and comprehensible for users. Changes
Related issues
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Review Status
Actionable comments generated: 7
Configuration used: CodeRabbit UI
Files selected for processing (9)
- api/services/apdf/README.md (1 hunks)
- api/services/apdf/src/actions/ExportAction.spec.ts (2 hunks)
- api/services/apdf/src/helpers/normalizeAPDFData.helper.ts (1 hunks)
- api/services/apdf/src/interfaces/APDFTripInterface.ts (1 hunks)
- api/services/apdf/src/providers/APDFRepositoryProvider.ts (2 hunks)
- api/services/apdf/src/providers/excel/BuildExcel.spec.ts (3 hunks)
- api/services/apdf/src/providers/excel/BuildExcel.ts (4 hunks)
- api/services/apdf/src/providers/excel/TripsWorksheetWriter.integration.spec.ts (3 hunks)
- api/services/apdf/src/providers/excel/TripsWorksheetWriter.ts (1 hunks)
Additional comments: 8
api/services/apdf/src/interfaces/APDFTripInterface.ts (1)
- 12-24: The addition of
operator
,incentive_type
,start_epci_name
,start_epci
,end_epci_name
, andend_epci
fields enhances the interface's data representation. Confirm these fields are utilized consistently across the application.api/services/apdf/src/providers/excel/TripsWorksheetWriter.ts (2)
- 17-36: The addition of new fields to the
WORKSHEET_COLUMN_HEADERS
is correctly implemented. Verify that these fields align with the updatedAPDFTripInterface
and are correctly populated in the Excel export.- 39-49: The inclusion of
booster_dates
in thecall
method and its usage in thenormalize
function call is correctly implemented. Ensure that thebooster_dates
parameter is consistently used across all relevant parts of the application.Verification successful
The search results confirm the consistent usage of
booster_dates
across various parts of the application, including policy interfaces, policy engine implementations, helper functions, and Excel report generation functionalities. This demonstrates an integrated approach to handling this parameter throughout the application, from policy calculations and data normalization to report generation.Scripts Executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Verify consistent usage of booster_dates across the application rg 'booster_dates'Length of output: 1621
api/services/apdf/src/providers/excel/BuildExcel.ts (2)
- 15-15: The injection of
KernelInterfaceResolver
is correctly implemented. Ensure that it is used appropriately throughout the class.- 66-68: The usage of
listBoosterDates
in thewriteTrips
method is correctly implemented. Verify that the method correctly retrieves and formats booster dates for the given campaign.Verification successful
The
listBoosterDates
method implementation in thewriteTrips
method correctly retrieves and formats booster dates for the given campaign, as it fetches the campaign data using the providedcampaign_id
and returns thebooster_dates
as aSet<string>
. This matches the expected functionality described in the review comment.Scripts Executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Verify the correct retrieval and formatting of booster dates rg 'listBoosterDates'Length of output: 280
Script:
#!/bin/bash # Inspect the implementation of listBoosterDates fd BuildExcel.ts --exec cat {} | grep -A 20 'private async listBoosterDates'Length of output: 428
api/services/apdf/src/providers/APDFRepositoryProvider.ts (1)
- 166-202: > 📝 NOTE
This review was outside the diff hunks and was mapped to the diff hunk with the greatest overlap. Original lines [150-187]
The query adjustments and the addition of new fields, including
operator
,incentive_type
,start_epci_name
,start_epci
,end_epci_name
, andend_epci
, are correctly implemented. Verify that these changes align with the updated data model and are used consistently across the application.api/services/apdf/src/actions/ExportAction.spec.ts (2)
- 4-4: The update to the import statement for
uuid
is correctly implemented. Ensure that it aligns with the project's module resolution and import conventions.- 57-57: The instantiation of
BuildExcel
with an extra argument is correctly implemented. Confirm that all required dependencies are correctly provided and used withinBuildExcel
.
#2350 Modification des colonnes de l'export APDF
Les modifs seront reprises avec le travail sur le refacto de l'export pour rationaliser et dédoublonner le code.
Summary by CodeRabbit
New Features
Refactor
driver_rpc_incentive
andpassenger_rpc_incentive
into a singlerpc_incentive
field.Documentation
Tests