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

Fix isempty bug for doc data download #496

Merged
merged 2 commits into from
Nov 22, 2023
Merged

Conversation

mathieuboudreau
Copy link
Member

I found this bug through the qsm_sb model.

Basically, when using the GUI, downloading the demo qsm_sb data results in the partial dataset being downloaded and not the full dataset.

This is because although getenv('ISDOC') is an empty char array, a str2double() of a char array results in a NaN, not an empty value, and thus ~isempty(str2double(getenv('ISDOC'))) is true even when not in a ISDOC env.

Copy link

codecov bot commented Nov 22, 2023

Codecov Report

Merging #496 (4eec289) into master (3a7ae10) will not change coverage.
The diff coverage is 100.00%.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #496   +/-   ##
=======================================
  Coverage   47.40%   47.40%           
=======================================
  Files         260      260           
  Lines        8654     8654           
=======================================
  Hits         4102     4102           
  Misses       4552     4552           
Flag Coverage Δ
matlab 46.57% <100.00%> (-0.04%) ⬇️
octave 37.15% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
src/Common/AbstractModel.m 66.25% <100.00%> (ø)

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3a7ae10...4eec289. Read the comment docs.

Copy link
Member

@agahkarakuzu agahkarakuzu left a comment

Choose a reason for hiding this comment

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

I've just tested this and the change fixes the issue, thank you for catching this!

@mathieuboudreau mathieuboudreau merged commit 98149d8 into master Nov 22, 2023
8 checks passed
@mathieuboudreau mathieuboudreau deleted the mb/download_bug branch November 22, 2023 23:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants