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

Make tutorials interactive with binder #115

Merged
merged 7 commits into from
Apr 7, 2021

Conversation

create-issue-branch[bot]
Copy link
Contributor

closes #80

@pablo-de-andres pablo-de-andres linked an issue Apr 2, 2021 that may be closed by this pull request
@pablo-de-andres
Copy link
Member

There are now 3 tutorials that can be run on binder (cuds_api, ontology_interface and wrapper_development)
I checked, and they should be working fine.
To check for yourselves, you can copy the link from the binder badge, and replace master with 80-Make_tutorials_interactive_with_binder

@pablo-de-andres pablo-de-andres marked this pull request as ready for review April 6, 2021 17:19
@kysrpex
Copy link
Contributor

kysrpex commented Apr 7, 2021

I checked and indeed they work fine. However, I am experiencing a strange problem with this branch: the CUDS API tutorial and the Ontology Interface tutorials do not show up on the table of contents. @pablo-de-andres Are you able to see them there?

@pablo-de-andres
Copy link
Member

My bad. I renamed some files, because there was an inconsistency between - and _ in the namings

@kysrpex
Copy link
Contributor

kysrpex commented Apr 7, 2021

I have tracked down a bit better the error of the Binder badge not being displayed when using the Docker image. It happens because the python Docker image it is based on is itself based on Debian Buster, and at least one of the packages binutils binutils-common binutils-x86-64-linux-gnu cpp g++ gcc libatomic1 libbinutils libc-bin libc-dev-bin libc6 libc6-dev libcc1-0 libgomp1 libitm1 liblsan0 libpython3-stdlib libquadmath0 libstdc++6 libtsan0 libubsan1 python3 python3-distutils python3-lib2to3 python3-minimal are causing this bug.

I have discovered this using this modified dockerfile, which installs Pandoc from Debian Bullseye. This triggers the update of the above mentioned packages.

FROM python:3.8-buster
RUN apt-get update
RUN apt-get install -y default-jre graphviz
RUN apt-get install -y texlive-latex-recommended \
                       texlive-latex-extra \
                       texlive-fonts-recommended \
                       latexmk

RUN sed -i 's/buster/bullseye/g' /etc/apt/sources.list
RUN sed -i 's\bullseye/updates\bullseye-security\g' /etc/apt/sources.list
RUN apt-get update
RUN apt-get install -y pandoc


WORKDIR /app
ADD . .

RUN pip install -r requirements.txt

CMD sphinx-autobuild --host 0.0.0.0 docs/source docs/build/html

# Build:
# $ docker build -f local_build.Dockerfile -t simphony-docs .

# Run:
# $ docker run --rm -v $PWD:/app -p 8000:8000 simphony-docs

For now I suggest that we do not do anything more in this regard, as whether the bug will be happening on readthedocs or not will depend on the software stack installed in there. We may put effort in fixing it in the end this actually happens.

@kysrpex
Copy link
Contributor

kysrpex commented Apr 7, 2021

I also centered the Binder badges.

@pablo-de-andres
Copy link
Member

I believe they were centered by default (or so it showed on my vscode Notebook)
However, I can't test it right now because of the issue building the docs

@kysrpex
Copy link
Contributor

kysrpex commented Apr 7, 2021

About the tooltip of the Binder badges, I think that nbsphinx (the plugin that renders notebooks in the docs) is breaking it. It seems to keep only a handful of HTML tags after the conversion. See #468 on nbsphinx's repo. There is nothing we can do to fix this.

@kysrpex
Copy link
Contributor

kysrpex commented Apr 7, 2021

I believe they were centered by default (or so it showed on my vscode Notebook)
However, I can't test it right now because of the issue building the docs

Do not worry, I think it also has something to do with nbsphinx.

@kysrpex kysrpex merged commit d627ca5 into dev Apr 7, 2021
@kysrpex kysrpex deleted the 80-Make_tutorials_interactive_with_binder branch April 7, 2021 12:48
@kysrpex kysrpex added this to the Sprint #1 milestone Apr 12, 2021
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.

Make tutorials interactive with binder
2 participants