-
Notifications
You must be signed in to change notification settings - Fork 12
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
Conversation
Codecov Report
@@ 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
Continue to review full report at Codecov.
|
There was a problem hiding this 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.
doc/example/example_Fujita/visuSpecs/.~lock.Fujita_visuSpec_2.tsv#
Outdated
Show resolved
Hide resolved
petab/visualize/helper_functions.py
Outdated
# DATASET_ID in vis_spec.columns: | ||
# vis_spec[LEGEND_ENTRY] = vis_spec[DATASET_ID] | ||
# else: | ||
# vis_spec[LEGEND_ENTRY] = 'condition' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove dead code
petab/visualize/helper_functions.py
Outdated
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? |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes and #190
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
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 |
There was a problem hiding this comment.
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
Personally I would put todos in an issue and remove them from example but maybe that is just a matter of taste |
minor typos in example notebooks remove temporary notebook file group import of warnings in helper_functions.py (codacy)
…into pl_visualization
…into pl_visualization
Now visualization should work with
In addition to that, two visualization examples are added: about plotting without vis_spec and with vis spec (closes Add commented example for creation of visualization files #272)