Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,22 @@

FROM ubuntu:22.04


RUN apt-get update && \
apt-get install -y python3-pip
apt-get install -y python3-pip git

# Use modern setuptools from pip instead of apt
RUN pip3 install pip setuptools --upgrade

RUN apt-get purge python3-setuptools
RUN apt-get purge -y python3-setuptools


# Install mypackage
WORKDIR /tmp/
RUN git clone https://github.com/jorgensd/reproducibility && \
pip3 install ./reproducibility[docs]

RUN rm -rf /tmp

# Create user with a home directory
ARG NB_USER
Expand Down
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@ doc: # Generate Sphinx HTML documentation, including API docs
@for file in ${DOCS}; do \
cp $$file docs/. ;\
done
# We use --set-kernel with jupytext to make it possible for binder to pick it up
@for demo in ${DEMOS}; do \
jupytext --to=ipynb demo/$$demo.py --output=docs/$$demo.ipynb ;\
jupytext --to=ipynb --set-kernel=python3 demo/$$demo.py --output=docs/$$demo.ipynb ;\
jupyter book build -W docs ;\
done

Expand Down
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ This repository is a template for how to set up a reproducible python environmen

## Python-packaging

To be able to create a python package, we need a folder with the name of the package (in this repository `mypackage`), and a `pyproject.toml` file.

To be able to create a python package, we need a folder with the name of the package (in this repository it is called `mypackage`, located under `src/mypackage`), and a `pyproject.toml` file.


## Make a repository citable
Expand Down
29 changes: 12 additions & 17 deletions docs/_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,33 +15,28 @@ execute:
# Information about where the book exists on the web
repository:
url: https://github.com/jorgensd/reproducibility # Online location of your book
path_to_book: docs # Optional path to your book, relative to the repository root
branch: main # Which branch of the repository should be used when creating links (optional)


sphinx:
extra_extensions:
- 'sphinx.ext.autodoc'
- 'sphinx.ext.napoleon'
- 'sphinx.ext.viewcode'

path_to_book: _sources # Optional path to your book, relative to the repository root
branch: gh-pages # Which branch of the repository should be used when creating links (optional)

launch_buttons:
notebook_interface: "jupyterlab" # The interface interactive links will activate ["classic", "jupyterlab"]
binderhub_url: "https://mybinder.org"
colab_url: "https://colab.research.google.com"



# Add GitHub buttons to your book
# See https://jupyterbook.org/customize/config.html#add-a-link-to-your-repository
html:
use_issues_button: true
use_repository_button: true


parse:
myst_enable_extensions:
- amsmath
- dollarmath
- linkify
- linkify

sphinx:
extra_extensions:
- 'sphinx.ext.autodoc'
- 'sphinx.ext.napoleon'
- 'sphinx.ext.viewcode'