Skip to content

feat: diamond specific FAP spreadsheet columns#1656

Open
GrantDLS wants to merge 8 commits into
developfrom
UAS-14554-fap-fields-spreadsheet
Open

feat: diamond specific FAP spreadsheet columns#1656
GrantDLS wants to merge 8 commits into
developfrom
UAS-14554-fap-fields-spreadsheet

Conversation

@GrantDLS

@GrantDLS GrantDLS commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Description

We want to include some different fields in the FAP spreadsheet download, so this change adds in the new fields and renames some others. It uses dependency injection to introduce this functionality so that existing configurations are unaffected.

Motivation and Context

The getDataRow function was changed from positional parameters to a single FapDataRowInput object because the function is selected through dependency injection and different facility implementations require different inputs.

The facility-specific implementations require different subsets of proposal data, and the positional API became fragile as new values such as the instrument ID were introduced. A named object prevents argument-order errors, provides a stable interface across implementations, and allows each facility to consume only the fields it requires.

The reason this worked before is because the function was being called with 14 parameters. The default implementation only needed 11 params and so would just ignore the additional 3. Following this same approach meant that the DLS implementation wasn't able to only accept 12 params - it needed to accept the extra three from the STFC implementation, plus the extra instrument ID that was needed.

How Has This Been Tested

Extra cypress fixtures have been added to test the inclusion of the new columns and the renamed ones.

Comment thread apps/backend/src/middlewares/factory/xlsx.ts Outdated
Comment thread apps/backend/src/factory/xlsx/fap.ts
@GrantDLS GrantDLS changed the title Uas 14554 fap fields spreadsheet feat: Uas 14554 fap fields spreadsheet Jul 21, 2026
@GrantDLS GrantDLS changed the title feat: Uas 14554 fap fields spreadsheet feat: Diamond specific FAP spreadsheet columns Jul 21, 2026
@GrantDLS GrantDLS changed the title feat: Diamond specific FAP spreadsheet columns feat: diamond specific FAP spreadsheet columns Jul 21, 2026
@GrantDLS
GrantDLS marked this pull request as ready for review July 21, 2026 13:12
@GrantDLS
GrantDLS requested a review from a team as a code owner July 21, 2026 13:12
@GrantDLS
GrantDLS requested review from Bhaswati1148 and removed request for a team July 21, 2026 13:12

@TCMeldrum TCMeldrum Jul 22, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Do you ever run the cypress tests in DEPENDENCY_CONFIG === 'dls'? if not i don't think we need this file?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants