Skip to content
This repository has been archived by the owner on Mar 9, 2024. It is now read-only.

[BUG] Fixed team feedback bugs #100

Merged
merged 6 commits into from
Jun 7, 2023
Merged

[BUG] Fixed team feedback bugs #100

merged 6 commits into from
Jun 7, 2023

Conversation

rmanaem
Copy link
Collaborator

@rmanaem rmanaem commented Jun 6, 2023

Fixes #95
Fixes #96
See also neurobagel/query-tool#70

Changes proposed in this pull request:

Checklist

  • PR has an interpretable title with a prefix ([ENH], [BUG], [DOC], [INFRA], [MAINT])
  • PR links to Github issue with mention Closes #XXXX
  • Tests pass
  • Code is properly formatted

For new features:

  • Tests have been added

For bug fixes:

  • There is at least one test that would fail under the original bug conditions.

rmanaem added 4 commits June 2, 2023 14:01
…method

- The value for `min_num_sessions` must be greater than 0
- Updated the toast message for validation age fields
Added test case for Minimum number of sessions error toast
…tring` method

- Used optional chaining for `image_modals`
- Fixed the MIME type for tsv files
The test uses a mock response to make sure `\n` escape character
present in dataset names doesn't make it to the dataset results
tsv file
@surchs surchs self-requested a review June 6, 2023 20:32
Copy link
Contributor

@surchs surchs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot for the PR @rmanaem! All looks very good, thanks for figuring out how to test these bugs! I requested changes mostly because I think we should disallow bad session-numbers (i.e. 0) to be entered in the query-form in the first place - and because I think the test assertions should be looked over again.

@@ -92,9 +92,9 @@ export default {
tsvRows.push([
res.dataset_portal_uri,
res.dataset_file_path,
res.dataset_name,
res.dataset_name.replace('\n', ' '),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

like we said today: I think this is an appropriate fix for the specific problem. I also think that we should find a more generic way of addressing the problem without changing data that we pass to the user. E.g. by encapsulating everything in a string. Maybe we can add a TODO here with a link to the issue / PR to revisit this problem in the near future?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you create an issue with a short description of what you had in mind? I prefer not to have TODOs in code as they tend to go unnoticed.

rmanaem added 2 commits June 7, 2023 13:02
- Set `min` to 1 for minimum number of sessions field
- Removed validation for minimum number of sessions field in `validateQueryForm` method
- Updated `QueryForm` component test
- Updated test name
- Modified test to assert if `some name` exists in the downloaded results file
@rmanaem rmanaem requested a review from surchs June 7, 2023 17:16
@surchs
Copy link
Contributor

surchs commented Jun 7, 2023

@rmanaem I don't think you commited any changes. Did you mean to push them still or do you want me to review just based on your comments?

@rmanaem
Copy link
Collaborator Author

rmanaem commented Jun 7, 2023

This is weird, see branch history

@rmanaem
Copy link
Collaborator Author

rmanaem commented Jun 7, 2023

There we go

Copy link
Contributor

@surchs surchs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good @rmanaem. Noticed that we now have no test for number-session field. I think that'd be good to add. Otherwise good to go 🧑‍🍳

@rmanaem rmanaem merged commit 032c9db into main Jun 7, 2023
@rmanaem rmanaem deleted the bug-95-96 branch June 7, 2023 18:45
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
2 participants