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

Y24-138 - As developers we want to move over all requests from Axios to fetch to remove a dependency and make the codebase easier to maintain #1767

Closed
4 tasks
stevieing opened this issue Jun 19, 2024 · 3 comments · Fixed by #1791 or #1807
Assignees
Labels
Friday That thing we do on Friday Research Investigate how to do it Size: M Medium - medium effort & risk Technical Debt Technical debt Value: 3 Value to the insitute is average

Comments

@stevieing
Copy link
Collaborator

User story
As developers we want to move over all requests from Axios to fetch to remove a dependency and make the codebase easier to maintain

Who are the primary contacts for this story
Steve / Dasun / Seena

Who is the nominated tester for UAT
e.g. John S (don't include surnames in public repos)

Acceptance criteria
To be considered successful the solution must allow:

  • Define a strategy to move each store /library to fetch
  • Create a list of all of the places where Axios is used
  • Create sub stories for each refactor
  • Create a clean up story to remove any redundant code and dependencies

Dependencies
This story is blocked by the following dependencies:

  • #<issue_no.>
  • sanger/#<issue_no.>

References
This story has a non-blocking relationship with:

  • #<issue_no.>
  • sanger/#<issue_no.>

Additional context
Add any other context or screenshots about the feature request here.

@stevieing stevieing added Friday That thing we do on Friday Research Investigate how to do it Size: M Medium - medium effort & risk Value: 3 Value to the insitute is average Technical Debt Technical debt labels Jun 19, 2024
@psd-issuer psd-issuer bot changed the title As developers we want to move over all requests from Axios to fetch to remove a dependency and make the codebase easier to maintain Y24-138 - As developers we want to move over all requests from Axios to fetch to remove a dependency and make the codebase easier to maintain Jun 19, 2024
@stevieing
Copy link
Collaborator Author

stevieing commented Jun 19, 2024

Proposed strategy (to be discussed):

  • Create a factory (example: https://github.com/sanger/traction-ui/pull/1756/files#diff-c5d273e6d7069f315f8d62842f5753d1599be7c0799f26fb6199392203007f2c)
  • plug factory into tests ( doing this first will ensure that when we change the code we kow what the failures are related to)
  • rationalise any use of test data e.g. reduce places where it is used. Standardise where possible
  • Change handleResponse from v1 to v2 in store or library
  • some stores use the old response type with deserialize - so you would need to move over to the new response type and use side loading
  • make sure you only use relative namespacing for imports because Cypress does not have access to @.
  • make sure you use file extensions e.g. .js at the end of the import name as this improves performance.
  • Change request from v1 to v2
  • Fix unit tests
  • Run tests for any components where store or library is used and make any changes and fix
  • Run tests for any views where store or library is used and make any changes and fix
  • Fixe e2e tests
  • Remove use of fixtures where store or library is used and use factory
  • Remove data file and fixture

@stevieing
Copy link
Collaborator Author

Things we are not doing:

  • Moving to Pinia
  • Moving to composition API
  • Code refactoring in components and views unless necessary

@stevieing
Copy link
Collaborator Author

stevieing commented Jun 21, 2024

List of stores/libraries to change:

vuex:

  • printMyBarcode - move this over to Pinia because it already exists.
  • ont/pools [Steve]
  • root/tags - move over to existing Pinia store [Steve]
  • pacbio/plates [Seena]
  • pacbio/requests [Dasun]
  • saphyr/runs - minimal [Stephen]
  • saphyr/requests - minimal [Seena]
  • saphyr/tubes - minimal [Dasun]

Pinia:

  • index
  • ontRoot - Seena
  • ontRuns - Seena
  • pacbioLibraries
  • pacbioPoolCreate
  • pacbioPools
  • pacbioRoot
  • pacbioRunCreate.js
  • pacbioRuns.js

printing is done so can serve as a reference.

Libraries:

  • lib/receptions/SamplesExtraction
  • lib/receptions/sequencescapeUtils
  • services/traction/Reception
  • services/traction/QcResultsUpload

@stevieing stevieing linked a pull request Jul 17, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Friday That thing we do on Friday Research Investigate how to do it Size: M Medium - medium effort & risk Technical Debt Technical debt Value: 3 Value to the insitute is average
Projects
None yet
4 participants