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

Refactor Frontend Code and Fix Cryo-EM issue #90

Merged
merged 6 commits into from
Feb 29, 2024
Merged

Conversation

Dialpuri
Copy link
Collaborator

Description

This PR changes the location of files in the frontend to make more sense with the current scope of the project. In addition, the necessary backend changes to allow the web app to work with cryo-em data has been made.

Changes

  • Changed backend to inflate unit cell
  • Changed frontend component locations
  • Better error handling with missing map information

Reorganized the code structure by renaming and relocating several components to their appropriate directories for better code readability and maintainability. Furthermore, the visualization tool, Moorhen, was enhanced by appending the pdbCode to its URL, improving its functionality by directly visualizing specific structures.
The fetch_from_pdb function now returns an explicit Promise rejection when an error occurs. Before, the function was catching errors but not handling them. This change leads to more meaningful error message and overall improved error handling.
The useState for tableData in Home.tsx has been changed from TableDataEntry[] to ResultsEntry[]. This change is based on the modification of the data being stored in the state. It will ensure the correct type is used for easier future development and reduce runtime type errors.
The structure reading function now provides more detailed output for improved debug clarity. In addition, cell size is verified before gemmi molecule creation. Specifically, if the cell size is 1x1x1 units, it is inflated to 300x300x300 units.
This commit is focused around proper error handling. In fetch_from_pdb.ts, the catch block of the Promise has been modified to return a rejected Promise with the actual error object instead of a static string. This provides more detailed and dynamic error information.
@Dialpuri Dialpuri added this to In progress in Privateer Webapp via automation Feb 29, 2024
@Dialpuri Dialpuri self-assigned this Feb 29, 2024
@Dialpuri Dialpuri requested a review from GABRAH February 29, 2024 09:50
@Dialpuri Dialpuri merged commit 4f048d4 into webapp Feb 29, 2024
3 checks passed
Privateer Webapp automation moved this from In progress to Done Feb 29, 2024
@Dialpuri Dialpuri deleted the refactor-frontend branch March 13, 2024 11:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

None yet

1 participant