Skip to content

Commit

Permalink
v4.2.0 (#129)
Browse files Browse the repository at this point in the history
* Fixing encoding for matplotlib and the icon (#128)

* Update output.py

Fixed encoding for matplotlib

* Update base.html.jinja

Fixed icon

* Fix Bokeh unit test

* Update docs

Co-authored-by: apwebber <[email protected]>
  • Loading branch information
domvwt and apwebber authored Nov 10, 2022
1 parent 2c60f81 commit c0aa9f0
Show file tree
Hide file tree
Showing 11 changed files with 396 additions and 267 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ reqs: ## output requirements.txt
poetry export -f requirements.txt -o requirements.txt --without-hashes

release: dist ## package and upload a release
poetry publish
twine upload

dist: clean ## builds source and wheel package
poetry build
Expand Down
13 changes: 8 additions & 5 deletions docs/02-user-guide/report-style.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Report Style

## CSS and Jinja
## Output Options

Customising the look and feel of **esparto** pages is best achieved through
modifying the default Jinja template and CSS style sheet.
Expand All @@ -11,14 +11,17 @@ defaults, or passed to the `es.Page` constructor using the `es.OutputOptions` cl
# Updating global defaults.
es.options.esparto_css = "./esparto.css"
es.options.jinja_template = "./esparto.html.jinja"
es.options.matplotlib.notebook_format = "png"
```

```python
# Using page level options.
output_options = es.OutputOptions(
esparto_css="./esparto.css",
jinja_template="./esparto.html.jinja",
)
output_options = es.OutputOptions()

output_options.esparto_css = "./esparto.css"
output_options.jinja_template = "./esparto.html.jinja"
output_options.matplotlib.notebook_format = "png"

page = es.Page(output_options=output_options)
```

Expand Down
1 change: 0 additions & 1 deletion docs/02-user-guide/tutorial-notebooks.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

## Data Analysis

The Iris dataset is one of the best known datasets in statistics.
In this example we put together a simple data analysis report using:

* Text content with markdown formatting
Expand Down
2 changes: 1 addition & 1 deletion docs/03-api-reference/options.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
Default options are configured through `es.options`, page level options can
be passed to the `Page` constructor.

Please read [the user guide](/02-user-guide/output-options) for more details.
Please read [the user guide](/02-user-guide/report-style) for more details.

## ::: esparto._options.OutputOptions

Expand Down
6 changes: 6 additions & 0 deletions docs/04-about/release-notes.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
Release Notes
=============

4.2.0 (2022-11-10)
------------------

- Fixes
- Fix bug preventing some Matplotlib figures from being converted to SVG and HTML [(#127)](https://github.com/domvwt/esparto/issues/127)

4.1.0 (2022-06-29)
------------------

Expand Down
2 changes: 1 addition & 1 deletion esparto/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

__author__ = """Dominic Thorn"""
__email__ = "[email protected]"
__version__ = "4.1.0"
__version__ = "4.2.0"

_MODULE_PATH: _Path = _Path(__file__).parent.absolute()

Expand Down
2 changes: 1 addition & 1 deletion esparto/publish/output.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ def publish_html(
html_rendered = relocate_scripts(html_rendered)

if filepath:
Path(filepath).write_text(html_rendered)
Path(filepath).write_text(html_rendered, encoding="utf-8")

if return_html:
return html_rendered
Expand Down
2 changes: 1 addition & 1 deletion esparto/resources/jinja/base.html.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<head>
<title>{{ doc_title | default("esparto-doc", true) }}</title>
<link rel="icon"
href="data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 100 100%22><text y=%22.9em%22 font-size=%2290%22>📊</text></svg>">
href="data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 100 100%22><text y=%22.9em%22 font-size=%2290%22>&#128202;</text></svg>">
<!-- Meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
Expand Down
Loading

0 comments on commit c0aa9f0

Please sign in to comment.