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

ENH: Add Styler.to_typst() #60733

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

3w36zj6
Copy link

@3w36zj6 3w36zj6 commented Jan 19, 2025

@3w36zj6 3w36zj6 marked this pull request as ready for review January 19, 2025 15:15
@3w36zj6 3w36zj6 requested a review from attack68 as a code owner January 19, 2025 15:15
@3w36zj6 3w36zj6 force-pushed the feature/add-typst-support-to-styler branch from dda68e3 to 518e5c3 Compare January 19, 2025 15:15
@attack68
Copy link
Contributor

I think this is a nice, minimalist implementation of Styler.to_typst, honouring some of the ideas in the original discussion. The coding mirrors the implementation for other formats in terms of signature and template composition.

Provided the tests pass I am supportive of adding this in. Would need a "whatsnew"

@3w36zj6 3w36zj6 force-pushed the feature/add-typst-support-to-styler branch from 518e5c3 to becfb36 Compare January 19, 2025 16:35
@3w36zj6 3w36zj6 marked this pull request as draft January 19, 2025 17:37
@attack68 attack68 added Styler conditional formatting using DataFrame.style Enhancement labels Jan 21, 2025
@3w36zj6 3w36zj6 force-pushed the feature/add-typst-support-to-styler branch from 5863c8a to 8f149ab Compare January 22, 2025 08:06
@3w36zj6 3w36zj6 marked this pull request as ready for review January 22, 2025 08:34
@3w36zj6
Copy link
Author

3w36zj6 commented Jan 30, 2025

Hi @attack68,
I have updated the "What's new". Could you please review it?

Copy link
Contributor

@attack68 attack68 left a comment

Choose a reason for hiding this comment

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

I think this is a neat well packaged addition to Styler outputs, and typst is gaining more attention.

The only omission I can spot is that it might need a link to be added to the "Styler Guide" which is the ipynb file. However, this is not necessary and can be added as a follow up.

Tests will need to pass, please look into failures and state if you think they are unrelated.

@attack68
Copy link
Contributor

@mroeschke want to have a second look?

"""
Write Styler to a file, buffer or string in Typst format.
.. versionadded:: 2.3.0
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
.. versionadded:: 2.3.0
.. versionadded:: 3.0.0

^^^^^^^^^^^^

- The :meth:`.Styler.to_typst` function has been added to write Styler to a file, buffer or string in Typst format (:issue:`57617`)
Copy link
Member

Choose a reason for hiding this comment

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

Can you move this to 3.0.0?

@3w36zj6 3w36zj6 force-pushed the feature/add-typst-support-to-styler branch 2 times, most recently from 52bee29 to 058327c Compare February 1, 2025 14:08
@3w36zj6 3w36zj6 requested a review from mroeschke February 1, 2025 15:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement Styler conditional formatting using DataFrame.style
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ENH: (Styler|DataFrame).to_typst()
3 participants