[SRAM Refactor]: Refactor all functionality used by CO member #2492

Open
opened 2026-07-10 12:15:11 +00:00 by EricvanSchaik · 1 comment
EricvanSchaik commented 2026-07-10 12:15:11 +00:00 (Migrated from github.com)

Description

The SRAM refactor milestone is prioritised per role (https://github.com/SURFnet/SRAM-Projects/issues/89). In this issue, the CO member functionality will be refactored, that is Python typing will be defined for the flask endpoints, typescript for the frontend components using the API data, and regression tests will be added in Playwright.

Task Overview

  • Make sure you login as the correct role (urn:betty) by changing client/src/api/index.js:94
  • Write a Playwright test for all the functionality that you are able to use now (up to dev to estimate what functionality is crucial enough to be included)
  • Record all the endpoints that are called when using that functionality
  • Type the Python endpoints in mypy / Pydantic, to record the data that is returned by the API
  • Remove all unnecessary properties from the Python DTO

Acceptance Criteria

  • Playwright test still work after refactoring
  • Used endpoints return a Python type
  • No unnecessary data is returned by the API

Definition of Done

  • Mypy succeeds on new code -- not applicable
  • Linting succeeds on new code

Notes

If this turns out to be too much work for one issue, focus on the endpoints that return user data, and frontend components that consume it

### Description The SRAM refactor milestone is prioritised per role (https://github.com/SURFnet/SRAM-Projects/issues/89). In this issue, the CO member functionality will be refactored, that is Python typing will be defined for the flask endpoints, typescript for the frontend components using the API data, and regression tests will be added in Playwright. ### Task Overview - [x] Make sure you login as the correct role (urn:betty) by changing client/src/api/index.js:94 - [x] Write a Playwright test for all the functionality that you are able to use now (up to dev to estimate what functionality is crucial enough to be included) - [x] Record all the endpoints that are called when using that functionality - [x] Type the Python endpoints in mypy / Pydantic, to record the data that is returned by the API - [x] Remove all unnecessary properties from the Python DTO ### Acceptance Criteria - [x] Playwright test still work after refactoring - [x] Used endpoints return a Python type - [x] No unnecessary data is returned by the API ### Definition of Done - [ ] Mypy succeeds on new code -- not applicable - [x] Linting succeeds on new code ### Notes If this turns out to be too much work for one issue, focus on the endpoints that return user data, and frontend components that consume it
EricvanSchaik commented 2026-08-25 12:29:11 +00:00 (Migrated from github.com)

Converting the used React component to a functional component and to Typescript is so much work that it will be given a separate issue.

https://github.com/SURFscz/SBS/issues/2536

Converting the used React component to a functional component and to Typescript is so much work that it will be given a separate issue. https://github.com/SURFscz/SBS/issues/2536
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
eric/SBS#2492
No description provided.