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

Use matrepr for rich __str__ and _repr_html_ #605

Merged
merged 2 commits into from
Sep 7, 2023

Conversation

alugowski
Copy link
Contributor

If available, use the matrepr package to render array values in string and HTML output.

Reverts to current behavior if matrepr is not installed.

See this Jupyter notebook for a demo of what 1D, 2D, and 3D sparse arrays look like when rendered by matrepr.

Closes #604

If available, use the matrepr package to render array values in string and HTML output.
Reverts to current behavior if matrepr is not installed.
hameerabbasi
hameerabbasi previously approved these changes Aug 30, 2023
Copy link
Collaborator

@hameerabbasi hameerabbasi left a comment

Choose a reason for hiding this comment

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

Fairly minimal and self-contained. Thanks!

@hameerabbasi
Copy link
Collaborator

I'll take a look at the CI later today.

@alugowski
Copy link
Contributor Author

I'll take a look at the CI later today.

I see a few other recent PRs with the same fail.

The message is right, .pre-commit-config.yaml does not appear in the repo, though I see some PRs don't run that check at all.

@codecov
Copy link

codecov bot commented Sep 7, 2023

Codecov Report

Merging #605 (e5b06b6) into master (096f9b0) will decrease coverage by 0.21%.
The diff coverage is 59.09%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #605      +/-   ##
==========================================
- Coverage   92.15%   91.95%   -0.21%     
==========================================
  Files          20       20              
  Lines        3313     3330      +17     
==========================================
+ Hits         3053     3062       +9     
- Misses        260      268       +8     
📢 Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pydata).

@alugowski
Copy link
Contributor Author

The test fails were from the linter, I implemented its suggestions.

Copy link
Collaborator

@hameerabbasi hameerabbasi left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@hameerabbasi hameerabbasi merged commit 44e434d into pydata:master Sep 7, 2023
@alugowski alugowski deleted the matrepr branch January 6, 2024 07:52
@alugowski alugowski restored the matrepr branch January 6, 2024 07:52
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.

Consider MatRepr for __repr__ and _repr_html_
2 participants