Skip to content

Commit

Permalink
Create webpdf (#7)
Browse files Browse the repository at this point in the history
* + removed plotly from pyproject

* + updated for webpdf
  • Loading branch information
jonsedar authored Dec 17, 2024
1 parent 7fc4419 commit d8c2c62
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 8 deletions.
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -87,15 +87,15 @@ lint: ## run code linters and static security (checks only)
ruff format --no-cache --diff


slides: ## render slides (and pdf) and place in publish/ dir
slides: ## render slides (and webpdf) and place in publish/ dir
export PATH=$(MAMBADIR)/envs/oreum_copula/bin:$$PATH; \
export CONDA_ENV_PATH=$(MAMBADIR)/envs/oreum_copula/bin; \
export CONDA_DEFAULT_ENV=oreum_copula; \
cd notebooks; \
jupyter nbconvert --config renders/config_slides.py; \
jupyter nbconvert --config renders/config_pdf.py
jupyter nbconvert --config renders/config_webpdf.py
mv notebooks/renders/000_Intro.slides.html publish/index.html
cp notebooks/renders/000_Intro.pdf publish/
mv notebooks/renders/000_Intro.pdf publish/


test-dev-env: ## test the dev machine install of critial numeric packages
Expand Down
Binary file removed notebooks/renders/000_Intro.pdf
Binary file not shown.
1 change: 1 addition & 0 deletions notebooks/renders/config_pdf.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# config_pdf.py
# per https://nbconvert.readthedocs.io/en/latest/config_options.html
# gets used alongside ~/.jupyter/jupyter_nbconvert_config.py
# which you can create from this dir as `$> jupyter nbconvert --generate-config`
# run this from inside notebooks/ dir:
Expand Down
1 change: 1 addition & 0 deletions notebooks/renders/config_slides.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# config_slides.py
# per https://nbconvert.readthedocs.io/en/latest/config_options.html
# gets used alongside ~/.jupyter/jupyter_nbconvert_config.py
# which you can create from this dir as `$> jupyter nbconvert --generate-config`
# run this from inside notebooks/ dir:
Expand Down
15 changes: 15 additions & 0 deletions notebooks/renders/config_webpdf.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# config_webpdf.py
# per https://nbconvert.readthedocs.io/en/latest/config_options.html
# gets used alongside ~/.jupyter/jupyter_nbconvert_config.py
# which you can create from this dir as `$> jupyter nbconvert --generate-config`
# run this from inside notebooks/ dir:
# $> jupyter nbconvert --config renders/config_webpdf.py
c = get_config()
c.NbConvertApp.export_format = "webpdf"
c.FilesWriter.build_directory = "renders" # output-dir
c.NbConvertApp.notebooks = ["000_Intro.ipynb"]
c.WebPDFExporter.embed_images = True
c.WebPDFExporter.exclude_input = True
c.WebPDFExporter.exclude_input_prompt = True
c.WebPDFExporter.exclude_output_prompt = True
# c.WebPDFExporter.allow-chromium-download = True # not needed?
Binary file modified publish/000_Intro.pdf
Binary file not shown.
2 changes: 1 addition & 1 deletion publish/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -7521,7 +7521,7 @@ <h2 id="What-is-Copula-Regression?"><em>What is Copula Regression?</em><a class=
<div class="jp-InputArea jp-Cell-inputArea"><div class="jp-RenderedHTMLCommon jp-RenderedMarkdown jp-MarkdownOutput" data-mime-type="text/markdown">
<p><strong>General project approach</strong></p>
<p>The emphasis in this project is to build a variety of models of increasing sophistication and demonstrate their usage.
We strike a balance between building up concepts &amp; methods vs practical application &amp; worked examples in a <code>pmyc</code>-based
We strike a balance between building up concepts &amp; methods vs practical application &amp; worked examples in a <code>pymc</code>-based
Bayesian workflow.</p>
<p>We don't focus on specific analysis of the dataset, nor try to infer too much. The dataset is simply a good substrate on
which to learn and demonstrate the variety of model architectures used herein.</p>
Expand Down
5 changes: 1 addition & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,6 @@ dev = [
oreum_core_pypi = [
"oreum_core[pymc]>=0.9.10", # the latest package using osx-arm64 Accelerate
]
plotly = [
"plotly",
"kaleido",
]

[project.urls]
homepage = "https://github.com/oreum-industries/oreum_copula"
Expand Down Expand Up @@ -134,6 +130,7 @@ ignore = [
[tool.ruff.lint.per-file-ignores]
"*.ipynb" = ["E402", "B011"]
"config_slides.py" = ["F821"]
"config_webpdf.py" = ["F821"]
"config_pdf.py" = ["F821"]

[tool.ruff.format]
Expand Down

0 comments on commit d8c2c62

Please sign in to comment.