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

Update setup.py - matplotlib #23

Closed
wants to merge 1 commit into from

Conversation

agsdot
Copy link

@agsdot agsdot commented Dec 12, 2023

matplotlib needed in

from matplotlib.axes import Axes
.

@veghp
Copy link
Member

veghp commented Dec 12, 2023

Thank you for spotting this, indeed it requires matplotlib for certain functions. It's a large dependency so I'm thinking whether to make it an optional install option (as in DNA Chisel for example)

@agsdot
Copy link
Author

agsdot commented Dec 12, 2023

👍

@agsdot
Copy link
Author

agsdot commented Feb 27, 2024

Any update on this @veghp , also I'm curious. How could I use tailwindcss 3 instead of semantic for this project?

@Zulko
Copy link
Member

Zulko commented Feb 28, 2024

I am also voting for making matplotlib optional, the import is only used line 162:

if isinstance(fig, Axes):

This is really just a "comfort" check (the user could provide the ax.figure directly) and this could be replaced by the following which, although slightly less stringent, removes the need for matplotlib entirely

if fig.__class__.__name__ == "Axes":

@veghp
Copy link
Member

veghp commented Feb 28, 2024

Yes I vote on that option too. I can implement it this week.

@agsdot re your other question, I haven't used tailwindcss, but for semantic, the css is stored here: https://github.com/Edinburgh-Genome-Foundry/pdf_reports/tree/master/pdf_reports/css
which is loaded here

SEMANTIC_UI_CSS = os.path.join(THIS_PATH, "css", "semantic.min.css")

and used in this function:
html, target=None, base_url=None, use_default_styling=True, extra_stylesheets=()

To use other styles, set use_default_styling=False and specify extra CSS filepath(s) with extra_stylesheets=()

extra_stylesheets
List of paths to other ".css" files used to define new styles or
overwrite default styles.

Would that solve the question?

@veghp veghp closed this in 7550c54 Apr 17, 2024
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.

None yet

3 participants