-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Feature/print friendly pages (#21) * Correct print formatting * Update docs and version number * Update docs * Update roadmap * Update release notes * Update release notes formatting * Feature/output to pdf (#25) * Move Jinja template to resources directory * Add weasyprint dependency * Implement and test PDF creation * Update docs * Fix image scaling * Extract image resizing to external function * Revert back to current API for scaling * Omit display, getters, setters from coverage * Update lock file * Feature/inline content dependencies (#26) * Refactor content dependency handling * Allow inline dependencies * Add user options for offline mode * Feature/render plots as svg (#27) * Add svg export for plots * Update docs * Update iris example
- Loading branch information
Showing
26 changed files
with
28,656 additions
and
370 deletions.
There are no files selected for viewing
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
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,26 @@ | ||
# esparto._publish | ||
|
||
!!! info | ||
Publishing methods should be accessed via Layout classes. | ||
Publishing methods should usually be accessed via Layout classes: | ||
|
||
``` python | ||
import esparto as es | ||
|
||
# Create a new Page | ||
page = es.Page(title="My New Page") | ||
|
||
# Render to Jupyter Notebook cell: | ||
page.display() | ||
|
||
# Publish the document to an HTML file: | ||
page.save() | ||
page.save_html("my-page.html") | ||
|
||
# Or as a PDF: | ||
page.save_pdf("my-page.pdf") | ||
|
||
``` | ||
|
||
## ::: esparto._publish.publish | ||
### ::: esparto._publish.publish_html | ||
|
||
### ::: esparto._publish.publish_pdf | ||
|
||
## ::: esparto._publish.nb_display | ||
### ::: esparto._publish.nb_display | ||
|
||
<br> |
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,6 @@ | ||
## New Features | ||
* Provide content support for | ||
* Plotly | ||
* Bokeh | ||
* Altair | ||
Potential features: | ||
|
||
* Alternative themes | ||
* Additional Bootstrap components | ||
* User supplied Jinja templates | ||
* Custom CSS |
Large diffs are not rendered by default.
Oops, something went wrong.
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,11 +2,14 @@ | |
"""Top-level package for esparto.""" | ||
|
||
from importlib.util import find_spec as _find_spec | ||
from typing import Set | ||
from pathlib import Path as _Path | ||
from typing import Set as _Set | ||
|
||
__author__ = """Dominic Thorn""" | ||
__email__ = "[email protected]" | ||
__version__ = "0.2.2" | ||
__version__ = "0.2.3" | ||
|
||
_MODULE_PATH: _Path = _Path(__file__).parent.absolute() | ||
|
||
|
||
_OPTIONAL_DEPENDENCIES: set = { | ||
|
@@ -16,9 +19,10 @@ | |
"pandas", | ||
"bokeh", | ||
"plotly", | ||
"weasyprint", | ||
} | ||
|
||
_INSTALLED_MODULES: Set[str] = { | ||
_INSTALLED_MODULES: _Set[str] = { | ||
x.name for x in [_find_spec(dep) for dep in _OPTIONAL_DEPENDENCIES] if x | ||
} | ||
|
||
|
@@ -31,3 +35,4 @@ | |
Markdown, | ||
) | ||
from esparto._layout import Column, Page, Row, Section | ||
from esparto._options import options |
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
Oops, something went wrong.