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

asv compare can create broken markdown tables when a parameter’s repr is multiple lines #1393

Open
flying-sheep opened this issue Apr 5, 2024 · 1 comment

Comments

@flying-sheep
Copy link

E.g. I currently see:

| Change   | Before [c68557c5] <main>   | After [055b5c56]    |   Ratio | Benchmark (Parameter)                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
|----------|----------------------------|---------------------|---------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| -        | 217M                       | 194M                |    0.89 | preprocessing.PreprocessingSuite.peakmem_calculate_qc_metrics(AnnData object with n_obs × n_vars = 700 × 765
    obs: 'bulk_labels', 'n_genes', 'percent_mito', 'n_counts', 'S_score', 'G2M_score', 'phase', 'louvain'
    var: 'n_counts', 'means', 'dispersions', 'dispersions_norm', 'highly_variable'
    uns: 'bulk_labels_colors', 'louvain', 'louvain_colors', 'neighbors', 'pca', 'rank_genes_groups'
    obsm: 'X_pca', 'X_umap'
    varm: 'PCs'
    obsp: 'distances', 'connectivities')  |

which isn’t valid markdown.

The problem in fixing this is is that tabulate seems unmaintained, and there is no community fork yet: astanin/python-tabulate#281

So we can’t expect that project to release a fix soon.

@HaoZeke
Copy link
Member

HaoZeke commented Jul 1, 2024

Seems like https://github.com/hvalev/py-markdown-table might be useful here.

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

No branches or pull requests

2 participants