Subcellular Localization Integration & Testing#36
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
This PR fully integrates the Subcellular Localization feature into the Protly application. It correctly positions the newly provided
SubcellularLocationcomponent within the frontend file hierarchy, wires it up in the mainApp.jsxAnalysis view, and introduces comprehensive unit tests for both the frontend rendering and the backing API endpoint.Changes Included
Frontend Updates 🎨
SubcellularLocation.jsxfrom the project root tofrontend/src/components/to align with the standard project hierarchy.frontend/src/App.jsxto import and render the<SubcellularLocation />component within the dashboard's right column (between ProteinBio and LabReadiness), passing the parsed localization data from the UniProt API.frontend/src/tests/SubcellularLocation.test.jsxcontaining 10 comprehensive Vitest tests:topology,orientation, and conditionalnoteblocks.Backend Updates ⚙️
backend/tests/conftest.pyto correctly append the parent directory tosys.path. This permanently resolves theimport mainvisibility issue across the test suite regardless of the execution directory.backend/tests/test_subcellular.pycontaining 8 robust Pytest tests specifically targeting the/api/uniprot/entry/{accession}endpoint:SUBCELLULAR LOCATIONcomment blocks from the UniProt REST API.502 Bad Gatewayhandling for upstream UniProt failures.Testing Instructions
backend/pytest tests/(16/16 tests should pass)frontend/npm run test(17/17 tests should pass)npm run devanduvicorn main:app).P53_HUMANorEGFR_HUMAN) and click "Analyze".Notes for Reviewer
The backend logic for parsing the UniProt
SUBCELLULAR LOCATIONblock was already perfectly implemented inmain.py. This PR solely focuses on integrating the frontend component, structuring the project professionally, and establishing a robust test net.