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
Interactive use + Pydantic models for plots #2442
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
vladsavelyev
force-pushed
the
interactive-use-2
branch
2 times, most recently
from
March 19, 2024 16:38
467c43b
to
0a13d36
Compare
vladsavelyev
force-pushed
the
interactive-use-2
branch
from
March 19, 2024 17:11
0a13d36
to
852319a
Compare
vladsavelyev
force-pushed
the
split-up-main
branch
from
March 19, 2024 18:23
7cd5838
to
00e29bf
Compare
vladsavelyev
force-pushed
the
interactive-use-2
branch
from
March 19, 2024 18:24
852319a
to
7ec4962
Compare
vladsavelyev
force-pushed
the
split-up-main
branch
from
March 19, 2024 19:04
00e29bf
to
adfcf4a
Compare
vladsavelyev
force-pushed
the
interactive-use-2
branch
from
March 19, 2024 19:06
7ec4962
to
cc3242c
Compare
vladsavelyev
force-pushed
the
split-up-main
branch
from
March 19, 2024 21:18
adfcf4a
to
732aac3
Compare
vladsavelyev
force-pushed
the
interactive-use-2
branch
from
March 19, 2024 21:18
cc3242c
to
7f31d3c
Compare
vladsavelyev
changed the title
Functions for interactive use
Pydantic + interactive use
Mar 20, 2024
This was referenced May 3, 2024
vladsavelyev
force-pushed
the
interactive-use-2
branch
from
May 4, 2024 11:53
a63ae73
to
a15effe
Compare
vladsavelyev
changed the title
Pydantic + interactive use
Interactive use + Pydantic models for plots
May 4, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Use Pydantic
Plot
,DataTable
,Dataset
, and derived classes). Helps validate dumps for JavaScript internally.ClConfig
). Validates run parameters.Future improvements would include validating custom content with Pydantic.
Partially addresses #1790
Support interactive usage
Support interactive usage of MultiQC, i.e. in notebooks. Partly addresses #1051
Split the
multiqc.py
into submodules with better separated stages: parse logs, render plots and tables, write data to disk. That allowed to add functions likemultiqc.parse_logs()
, that parses more logs and appends them into the same report without rendering HTML or writing stuff to disk;multiqc.list_plots()
multiqc.show_plot()
without rendering all plots;multiqc.write_results()
to only render and write results to disk.Config parameters can be passed individually to any interactive method (like
verbose
,modules_order
, etc).Can also add custom sections into the report with
multiqc.add_custom_content_section()
.The
write_report()
function triggers HTML rendering, module ordering, adds special-case software versions and runs performance modules, and writes data and report. Though all those things are also separated internally and can be exposed more granuarly if needed.Example notebook
Check this notebook for example usage:
https://github.com/MultiQC/example-notebook/blob/master/multiqc_example.ipynb
Performance benchmark
Tested the branch against
main
(with all recent performance improvements merged into both). Getting consistent speed up just from the refactoring:main
Run took 103.14 seconds
3628933760 peak memory footprint
interactive-use-2
Run took 77.98 seconds
3638501952 peak memory footprint
Before performance PRs (196c9738)
Run took 115.36 seconds
5196197376 peak memory footprint