neurobagel / old-query-tool Goto Github PK
View Code? Open in Web Editor NEWUser interface for searching across Neurobagel graph
Home Page: https://query.neurobagel.org/
License: MIT License
User interface for searching across Neurobagel graph
Home Page: https://query.neurobagel.org/
License: MIT License
Clarify what the API_QUERY_URL
env var does and mention that the content of the file should be changed based on whether you want the app to contact a local or remote api
Refer to this comment.
categoricalOptions
in index.vue
CategoricalField.vue
componentupdateCategoricalField
in QueryForm.vue
submitQuery
function in QueryForm.vue
QueryForm.cy.js
The README should have information on how one can:
Set up a workflow to run end to end tests on PRs and dispatch.
A user should be able to check out some basic instructions and screenshots to get a sense of:
This could live in our docs https://www.neurobagel.org/documentation/ or in a README
We want to be as consistent with our tooling as we can. So far, there is only one other frontend tool, and that is built with Vue2 using Nuxt. We should have a quick chat on the choices for the implementation.
Decided:
To be decided:
If we go with vue3/Nuxt3, then I believe the only widely adopted and ready to go component library would be vuetify - and so far we have been using vue-bootstrap.
A test that uses all existing query fields and response checks out.
This tool will have to translate the selections a user makes on the UI into a (single) HTTP request that is sent to the bagelAPI, so that the bagelAPI can in turn make the corresponding SPARQL query to the graph and return the results to this tool. This tool then needs to be able to display the results it has received from bagelAPI in some way that is interesting to the user.
To implement the functionality for specs outlined here:
.csv
filesgenerateCSVString
to return new subject-level results (the two .csv
files).DownloadResultsButton
component testAs part of this, we need to make sure that we return the human-readable labels to the users, not the IRI for diagnosis levels and sex. See https://github.com/neurobagel/project/issues/47
For the moment, we will use the hard-coded mapping of controlled term IRI to human-readable label that already exists in the query tool
Brought up here
As far as I can tell that field does nothing, hide it until there's a use?
No response
npm
badge with a badge for e2e-test workflowTo reproduce the bug:
Select a diagnosis other than All
, check healthy control
checkbox and you'll have a 422 error which is coming from the API validation, see here
The test should only check that the request goes out, not if there is a response.
The code snippet sending the request:
https://github.com/neurobagel/query-tool/blob/156902e5105db12f31032f314d05429f92abb004/components/QueryForm.vue#L178-L184
Adding some build-id to the UI to show which commit the live tool is currently running off of.
When a query with the value 0 for minimum number of session is submitted, the query tool throws a generic error. The error is generated by API see here.
Input fields in the query form need to be validated before the form is submitted.
Cases to keep in mind for validation:
minAge
< maxAge
minAge
and maxAge
must be non-negativemin
property of the input
element enforces this but this can't be tested inside the AgeField.cy.js testShould the validations fail, the user shouldn't be able to submit the form, Perhaps the button becomes disabled
and the field with the issue is highlighted and an informative message is given to the user.
Implementation
displayToast
method to be called from inside the validateQueryForm
validateQueryForm
method
submitQuery
button Is clickeddisplayToast
method if there is an error otherwise call submitQuery
methodQueryForm.cy.js
to test the above functionalitiesEvery time the workflow is run, the domain is reset back to GitHub pages default and to set it to a specific domain a CNAME
file including the domain needs to be added to the build.
ContinuousField.vue
componentupdateField
method in QueryForm.vue
submitQuery
method in QueryForm.vue
QueryForm.cy.js
Set up and configure husky or some other package for running pre-commit checks
The UI should expose the same variables with UI elements (sliders, dropdowns, etc) that the API is exposing (see here).
Each of these should:
age: select the minimal and/or maximal age (in years) of a participant that should still be included in the results
categoricalOptions
in index.vue
CategoricalField.vue
componentupdateCategoricalField
in QueryForm.vue
submitQuery
function in QueryForm.vue
CategoricalField.cy.js
Implement ContinuousField.vue
to be used as a generic component for continuous fields similar to CategoricalField.vue
ContinuousField.vue
will replace AgeFields.vue
component and will be used to implement minimum number of sessions field (#19)
Update the generateCSVString
function to reflect the changes made to the API in this PR.
slots
in CategoricalField.vue
slot
for the diagnosis field in QueryForm.vue
QueryForm.vue
submitQuery
method in QueryForm.vue
control
slot in CategoricalField.cy.js
Hi folks, the query tool is up and running https://query.neurobagel.org/.
We would like for you to give us feedback on the tool from the perspective
of a user, who would use it to search for sample-level cohorts of openneuro data.
In its current state the query tool:
We'd love to get your feedback on:
Please add your feedback as comments on this issue or if it is very extensive, a GDoc/Hackpad could also work.
Set up a workflow to run eslint on PRs to catch any issues in case eslint wasn't run before committing.
The dataset name contains the \n
escape character, it is parsed by JavaScript in code and interpreted as a new line when constructing the tsv file.
Update the options in CategoricalOptions
in index.vue
once the data has been added to graph.
The dropdown options will look nice for all items, regardless of how long the option is
No response
Use iPhone SE in browser dev tools then toggle the dropdown for diagnosis
No response
Right now eslint doesn't understand the difference between the git staging area and the working directory. The consequence is that if I make a partial commit (i.e. I have more changes in my working dir than I include in the next commit), eslint will not limit itself to the files that are included in the commit.
We should install https://github.com/okonet/lint-staged and configure it so it can run as part of our husky pre-commit hooks so we get more informative eslint errors.
Set up a workflow for tests to run on dispatch and PRs
Given the implementation submitQuery
function in QueryForm.vue
component, how should server-side errors thrown by our API e.g., min_age > max_age
be handled?
For this first release, we will hard-code the choices for categorical variables like diagnosis and imaging modality into the app. That is, in order to know what options a user should have in a UI element to select "diagnosis", we will rely on some internal, hardcoded variable. A good starting point could be to check what unique options are actually available in our graph (although that may change).
We need to code the options for:
Once the OpenNeuro data is updated (https://github.com/neurobagel/project/issues/143) and the API is updated to adhere to the new model and data (neurobagel/api#129):
DatasetFilePath
with DatasetID
in output filesgenerateTSVString
methodSet up cypress for testing
We want
a static version of the app deployed publicly
a https enabled neurobagel URL to reach the app at
an automatic process that deploys the public app based on the most recent version of the main branch
Enable static build process for deployment in nuxt.config.js
Add dotenv
nuxt module to buildmodules in nuxt.config.js
Add API_QUERY_URL
as an repository variable
Set up deploy workflow following nuxt documentation
Add neurobagel domain as the deployment domain
Update README.md
Create a sketch for the proposed design of the navbar of the query tool based on shortcuts mentioned in #103
See Bootstrap-vue as inspiration
See GitHub docs.
Given a query result list received from BagelAPI, we want a component that can display visually some basic information about each result dataset object.
When a non-empty query is returned display:
For each dataset in the response display a:
Test
download
correctlyupdate-download
event is emittedCohort Definition Tool
to Query Tool
in index.vue
Modality
to Imagin modality
updateCategoricalField
method in CategoricalField.vue
to updateField
Implement the following shortcuts in the tool for users to have easy access to
Currently setting the sex
query field doesn't update the results. This is due to the recent update in the graph and needs to be addressed first in the API.
categorical-options.js
CategoricalField.vue
componentupdateCategoricalField
in QueryForm.vue
submitQuery
function in QueryForm.vue
QueryForm.cy.js
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.