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

visualization incomplete vis_spec #419

Merged
merged 24 commits into from
Mar 31, 2020
Merged

visualization incomplete vis_spec #419

merged 24 commits into from
Mar 31, 2020

Conversation

plakrisenko
Copy link
Member

Now visualization should work with

@codecov
Copy link

codecov bot commented Mar 28, 2020

Codecov Report

Merging #419 into develop will increase coverage by 0.10%.
The diff coverage is 84.61%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop     #419      +/-   ##
===========================================
+ Coverage    77.95%   78.05%   +0.10%     
===========================================
  Files           22       22              
  Lines         2141     2183      +42     
  Branches       506      517      +11     
===========================================
+ Hits          1669     1704      +35     
- Misses         345      355      +10     
+ Partials       127      124       -3     
Impacted Files Coverage Δ
petab/visualize/helper_functions.py 85.01% <81.53%> (-3.14%) ⬇️
petab/core.py 82.91% <100.00%> (+0.55%) ⬆️
petab/visualize/plot_data_and_simulation.py 78.12% <100.00%> (+0.85%) ⬆️
petab/visualize/plotting_config.py 56.32% <0.00%> (+5.74%) ⬆️

Continue to review full report at Codecov.

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

@plakrisenko plakrisenko requested a review from MerktSimon March 28, 2020 19:02
Copy link
Member

@MerktSimon MerktSimon 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. Just some dead code left and minor comments.

# DATASET_ID in vis_spec.columns:
# vis_spec[LEGEND_ENTRY] = vis_spec[DATASET_ID]
# else:
# vis_spec[LEGEND_ENTRY] = 'condition'
Copy link
Member

Choose a reason for hiding this comment

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

Remove dead code

vis_spec[X_LABEL] = 'time'
if X_SCALE not in vis_spec.columns:
vis_spec[X_SCALE] = LIN
# TODO: Y_VALUES column will already be there?
Copy link
Member

Choose a reason for hiding this comment

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

what do you mean by this?
if it is not there it will be created right here

Copy link
Member Author

Choose a reason for hiding this comment

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

I meant that maybe the code was reorganized in such a way that Y_VALUES will always be in vis_spec when check_ex_visu_columns is called. But now i think, that lines 575, 576 are still needed for the case when DATASET_ID is in vis_spec file but not Y_VALUES.

vis_spec = pd.DataFrame(columns_dict)
else:
# TODO: do validation
# so, plotid is definitely there
Copy link
Member

Choose a reason for hiding this comment

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

validation meaning something like PLOT_ID in vis_spec.columns?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes and #190

Copy link
Member

Choose a reason for hiding this comment

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

ah I see. you could link this issue in the comment

else:
# PLOT_ID is there, but NOT DATASET_ID and not Y_VALUES,
# but potentially some settings.
# TODO: multiple plotids with diff settings
Copy link
Member

Choose a reason for hiding this comment

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

this does not work with multiple plotIDs right now?
If it does not raise warning. If it does remove comment

Copy link
Member Author

Choose a reason for hiding this comment

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

vis_spec like this won't work right now

plotId xOffset yScale
plot1 100 log
plot2 50 log
plot3 0 lin

I don't know if anyone would want to use such vis_spec. Potentially could be tried to plot everything with different settings.

@MerktSimon
Copy link
Member

and documentation_data_format.md is has still the old mandatory columns

vis_spec = pd.read_csv(visualization_file, sep="\t", index_col=None)
except pd.errors.EmptyDataError:
vis_spec = pd.DataFrame()
return vis_spec
Copy link
Member

Choose a reason for hiding this comment

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

maybe include warning? Usually users probably do not intend to have empty visu files

@MerktSimon
Copy link
Member

Personally I would put todos in an issue and remove them from example but maybe that is just a matter of taste

@plakrisenko plakrisenko merged commit 9d553bb into develop Mar 31, 2020
@yannikschaelte yannikschaelte mentioned this pull request Mar 31, 2020
@dweindl dweindl deleted the pl_visualization branch July 15, 2020 14:33
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.

3 participants