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

Build with JupyterLite 0.5.0 + Pyodide kernel 0.5.1, plus miscellaneous JupyterLite REPL updates #24

Merged
merged 7 commits into from
Jan 15, 2025
Merged
Show file tree
Hide file tree
Changes from 5 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
3 changes: 2 additions & 1 deletion jupyter_lite_config.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"LiteBuildConfig": {
"apps": ["repl"],
"no_unused_shared_packages": true
"no_unused_shared_packages": true,
"no_sourcemaps": true
}
}
14 changes: 8 additions & 6 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
# Core modules (mandatory)
jupyterlab~=4.2.5
jupyterlite-core>=0.4.5,<0.5
ivanistheone marked this conversation as resolved.
Show resolved Hide resolved

# Python kernel (optional)
jupyterlite-pyodide-kernel>=0.4.7,<0.5
# Core modules and Pyodide kernel (mandatory)
# Pyodide kernel versions 0.4.7 and 0.5.0 come with
# Pyodide 0.27, with SymPy 1.13.3, respectively:
# https://jupyterlite-pyodide-kernel.readthedocs.io/en/stable/#compatibility
# https://pyodide.org/en/stable/usage/packages-in-pyodide.html
# We constrain/pin them to avoid breaking changes on rebuilds.
jupyterlite-core>=0.5.0,<0.6.0
jupyterlite-pyodide-kernel==0.5.0

# Specific to generating SymPy Live index page
jinja2==3.1.5
Expand Down
11 changes: 6 additions & 5 deletions templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@

$(document).ready(function() {
// default iframe src with SymPy initcode
var iframe_src = "{{ host }}{{ path }}{{ query }}&code={{ initcode|urlencode }}";
// see https://jupyterlite.readthedocs.io/en/stable/quickstart/embed-repl.html#configuration for URL customisation
var iframe_src = "{{ host }}{{ path }}{{ query }}?kernel=python&execute=0?toolbar=1&code={{ initcode|urlencode }}";
agriyakhetarpal marked this conversation as resolved.
Show resolved Hide resolved
// check if we have additional statements to evaluate in the query string
var statements = getURLParameter('evaluate');
if (statements) {
Expand Down Expand Up @@ -92,7 +93,7 @@ <h3>Instructions</h3>
{% trans %}Press ENTER to run the code or use the Run button in the toolbar.{% endtrans %}
</p>
<p id="loading_message">
{% trans %}Note it can take up to 30 seconds before the shell finishes loading and is ready to run commands.{% endtrans %}
{% trans %}Note it can take up to 30 seconds before the shell finishes loading and is ready to run commands.{% endtrans %}
</p>
</div>
</div>
Expand All @@ -119,8 +120,8 @@ <h3>{% trans %}About this page{% endtrans %}</h3>
</pre>
</p>
<p>
{% trans %}SymPy Live shell is powered by{% endtrans %} <a href="https://jupyterlite.readthedocs.io/en/latest/">JupyterLite</a>.
{% trans %}It can take up to 30 seconds before the shell code and libraries load completely and become available for using interactively.{% endtrans %}
{% trans %}SymPy Live shell is powered by{% endtrans %} <a href="https://jupyterlite.readthedocs.io/en/stable/">JupyterLite</a>.
{% trans %}It can take up to 30 seconds before the shell code and libraries load completely and become available for using interactively.{% endtrans %}
</p>
</div>

Expand All @@ -141,7 +142,7 @@ <h3>Example session</h3>
</p>

<p>
{% trans %}Read the tutorial in the SymPy docs to learn more about SymPy{% endtrans %}:
{% trans %}Read the tutorial in the SymPy docs to learn more about SymPy{% endtrans %}:
<a href="https://docs.sympy.org/tutorial/">{% trans %}SymPy Tutorial{% endtrans %}</a>.
</p>
</div>
Expand Down
Loading