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

nbclassic to use its own static assets #96

Merged
merged 27 commits into from
May 11, 2022
Merged
Show file tree
Hide file tree
Changes from 8 commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
414a4c7
nbclassic to use its own static assets
echarles May 4, 2022
b3e87c4
Add missing python code for extensions
echarles May 4, 2022
619ec53
Update docs/source/examples/Notebook/examples_index.rst
echarles May 5, 2022
3917920
Update docs/source/links.txt
echarles May 5, 2022
ecd473a
Update docs/source/links.txt
echarles May 5, 2022
8ec8166
Update docs/source/notebook.rst
echarles May 5, 2022
13a074d
Update docs/source/template.tpl
echarles May 5, 2022
85dd909
Update docs/source/examples/Notebook/JavaScript Notebook Extensions.i…
echarles May 5, 2022
64d4845
Update nbclassic/static/style/ipython.less
echarles May 10, 2022
b47b298
Update nbclassic/static/style/style.less
echarles May 10, 2022
88d5a20
Update nbclassic/templates/notebook.html
echarles May 10, 2022
0128505
ensure server starts on jstest
echarles May 10, 2022
a45aac6
launch jstest with jpserver options
echarles May 10, 2022
ae6466b
add bundler source
echarles May 10, 2022
4f86909
rm reference to api.yaml as it is shipped by jupyter-server
echarles May 10, 2022
8cf2c43
add i18n resources
echarles May 10, 2022
6a702ef
run nbclassic.jstest on the CI
echarles May 10, 2022
493cd53
add needed dependency in setup.py
echarles May 10, 2022
4fe6a51
fixes for selenium tests
echarles May 10, 2022
76a6945
selenium tests should import nbclassic
echarles May 10, 2022
ade3306
docs should import nbclassic
echarles May 10, 2022
95c5c11
use utils from jupyter-server
echarles May 10, 2022
b9cb55e
import list_running_servers from jupyter_server
echarles May 10, 2022
89036c8
docs: add jupyter-server dep
echarles May 11, 2022
31eb8f0
docs: add notebook_shim dep
echarles May 11, 2022
0f3b1ca
add transutils
echarles May 11, 2022
8659a47
remove __version__.py
echarles May 11, 2022
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
2 changes: 1 addition & 1 deletion .bowerrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"directory": "notebook/static/components"
"directory": "nbclassic/static/components"
}
2 changes: 1 addition & 1 deletion .github/workflows/js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:

- name: Temporary workaround for sanitizer loading in JS Tests
run: |
cp tools/security_deprecated.js notebook/static/base/js/security.js
cp tools/security_deprecated.js nbclassic/static/base/js/security.js

- name: Install dependencies
run: |
Expand Down
58 changes: 58 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,61 @@
build
dist
_build
docs/man/*.gz
docs/source/api/generated
docs/source/config.rst
docs/gh-pages
nbclassic/i18n/*/LC_MESSAGES/*.mo
nbclassic/i18n/*/LC_MESSAGES/nbjs.json
nbclassic/static/components
nbclassic/static/style/*.min.css*
nbclassic/static/*/js/built/
nbclassic/static/*/built/
nbclassic/static/built/
nbclassic/static/*/js/main.min.js*
nbclassic/static/lab/*bundle.js
node_modules
*.py[co]
__pycache__
*.egg-info
*~
*.bak
.ipynb_checkpoints
.tox
.DS_Store
\#*#
.#*
.coverage
.pytest_cache
src

*.swp
*.map
.idea/
Read the Docs
config.rst
*.iml
/.project
/.pydevproject

package-lock.json
geckodriver.log
*.iml

# jetbrains IDE stuff
*.iml
.idea/

# ms IDE stuff
*.code-workspace
.history
.vscode

# copied changelog
docs/source/changelog.md

.jupyter_releaser_checkout

# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
![Testing nbclassic](https://github.com/jupyterlab/nbclassic/workflows/Testing%20nbclassic/badge.svg)


NBClassic runs the [Jupyter Notebook](https://github.com/jupyter/notebook) frontend on the Jupyter Server backend.
NBClassic runs the [Jupyter NbClassic](https://github.com/jupyter/nbclassic) frontend on the Jupyter Server backend.

This project prepares for a future where JupyterLab and other frontends switch to [Jupyter Server](https://github.com/jupyter/jupyter_server/) for their Python Web application backend. Using this package, users can launch Jupyter Notebook, JupyterLab and other frontends side-by-side on top of the new Python server backend.

Expand Down
2 changes: 1 addition & 1 deletion docs-translations/hi-IN/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,5 +73,5 @@ IPython कोडबेस का बिग स्प्लिट ™। IPython
- [Documentation for Jupyter notebook](https://jupyter-notebook.readthedocs.io/en/stable/)
- [Korean Version of Installation](https://github.com/ChungJooHo/Jupyter_Kor_doc/)
- [Documentation for Project Jupyter](https://jupyter.readthedocs.io/en/latest/index.html )
- [Issues](https://github.com/jupyter/notebook/issues)
- [Issues](https://github.com/jupyter/nbclassic/issues)
- [Technical support - Jupyter Google Group](https://groups.google.com/forum/#!forum/jupyter)
8 changes: 4 additions & 4 deletions docs-translations/ja-JP/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
[![Build Status](https://travis-ci.org/jupyter/notebook.svg?branch=master)](https://travis-ci.org/jupyter/notebook)
[![Documentation Status](https://readthedocs.org/projects/jupyter-notebook/badge/?version=latest)](https://jupyter-notebook.readthedocs.io/en/stable/?badge=latest)

英語版のリンク : [[English Version](http://github.com/jupyter/notebook/)]
英語版のリンク : [[English Version](http://github.com/jupyter/nbclassic/)]

Jupyter Notebookは、インタラクティブなWebベースのノートブック形式の環境です。

Expand Down Expand Up @@ -41,17 +41,17 @@ Jupyter Notebookをリモートで起動する前に、いくつかの構成が

## 開発用インストール

開発用インストールのセットアップ方法については、[`CONTRIBUTING.rst`](https://github.com/jupyter/notebook/blob/master/CONTRIBUTING.rst)を参照してください。
開発用インストールのセットアップ方法については、[`CONTRIBUTING.rst`](https://github.com/jupyter/nbclassic/blob/master/CONTRIBUTING.rst)を参照してください。

## 貢献

プロジェクトへの貢献に興味がある場合は、[`CONTRIBUTING.rst`](https://github.com/jupyter/notebook/blob/master/CONTRIBUTING.rst)をご覧ください。
プロジェクトへの貢献に興味がある場合は、[`CONTRIBUTING.rst`](https://github.com/jupyter/nbclassic/blob/master/CONTRIBUTING.rst)をご覧ください。

## 参考

- [Project Jupyter website](https://jupyter.org)
- [Online Demo at try.jupyter.org](https://try.jupyter.org)
- [Documentation for Jupyter notebook](https://jupyter-notebook.readthedocs.io/en/stable/)
- [Documentation for Project Jupyter](https://jupyter.readthedocs.io/en/latest/index.html )
- [Issues](https://github.com/jupyter/notebook/issues)
- [Issues](https://github.com/jupyter/nbclassic/issues)
- [Technical support - Jupyter Google Group](https://groups.google.com/forum/#!forum/jupyter)
4 changes: 2 additions & 2 deletions docs-translations/ko-KR/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
[![Build Status](https://travis-ci.org/jupyter/notebook.svg?branch=master)](https://travis-ci.org/jupyter/notebook)
[![Documentation Status](https://readthedocs.org/projects/jupyter-notebook/badge/?version=latest)](http://jupyter-notebook.readthedocs.io/en/stable/?badge=stable)

English 버전 링크 : [[English Version](http://github.com/jupyter/notebook/)]
English 버전 링크 : [[English Version](http://github.com/jupyter/nbclassic/)]

Jupyter notebook 은 상호 교환을 위한 웹 기반 환경입니다.

Expand Down Expand Up @@ -51,5 +51,5 @@ You can find the installation documentation for the
- [Online Demo at try.jupyter.org](https://try.jupyter.org)
- [Documentation for Jupyter notebook](https://jupyter-notebook.readthedocs.io/en/stable/)
- [Documentation for Project Jupyter](https://jupyter.readthedocs.io/en/latest/index.html )
- [Issues](https://github.com/jupyter/notebook/issues)
- [Issues](https://github.com/jupyter/nbclassic/issues)
- [Technical support - Jupyter Google Group](https://groups.google.com/forum/#!forum/jupyter)
2 changes: 1 addition & 1 deletion docs-translations/zh-CN/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,5 +73,5 @@ IPython代码库的Big Split™。 IPython 3是最后一个主要的整体
- [Documentation for Jupyter notebook](https://jupyter-notebook.readthedocs.io/en/stable/)
- [Korean Version of Installation](https://github.com/ChungJooHo/Jupyter_Kor_doc/)
- [Documentation for Project Jupyter](https://jupyter.readthedocs.io/en/latest/index.html )
- [Issues](https://github.com/jupyter/notebook/issues)
- [Issues](https://github.com/jupyter/nbclassic/issues)
- [Technical support - Jupyter Google Group](https://groups.google.com/forum/#!forum/jupyter)
2 changes: 1 addition & 1 deletion docs/jsdoc_config.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
],
"source": {
"include": [
"../notebook/static/notebook/js/notebook.js"
"../nbclassic/static/notebook/js/notebook.js"
]
},
"tags": {
Expand Down
4 changes: 2 additions & 2 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,13 +98,13 @@
author = 'The Jupyter Team'

# ghissue config
github_project_url = "https://github.com/jupyter/notebook"
github_project_url = "https://github.com/jupyter/nbclassic"

# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# built documents.
#
_version_py = '../../notebook/_version.py'
_version_py = '../../nbclassic/_version.py'
version_ns = {}
exec(compile(open(_version_py).read(), _version_py, 'exec'), version_ns)
# The short X.Y version.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"Have a look at [default custom.js](https://github.com/jupyter/notebook/blob/4.0.x/notebook/static/custom/custom.js), to see it's content and for more explanation."
"Have a look at [default custom.js](https://github.com/jupyter/nbclassic/blob/main/nbclassic/static/custom/custom.js), to see it's content and for more explanation."
]
},
{
Expand Down Expand Up @@ -306,7 +306,7 @@
"metadata": {},
"source": [
"```bash\n",
"$ cd ~/jupyter/notebook/notebook/static/notebook/js/\n",
"$ cd ~/jupyter/nbclassic/nbclassic/static/notebook/js/\n",
"$ yuidoc . --server\n",
"warn: (yuidoc): Failed to extract port, setting to the default :3000\n",
"info: (yuidoc): Starting YUIDoc@0.3.45 using YUI@3.9.1 with NodeJS@0.10.15\n",
Expand Down
3 changes: 2 additions & 1 deletion docs/source/examples/Notebook/examples_index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ Notebook Examples
The pages in this section are all converted notebook files. You can also
`view these notebooks on nbviewer`__.

__ https://nbviewer.jupyter.org/github/jupyter/notebook/blob/6.4.x/
__ https://nbviewer.jupyter.org/github/jupyter/nbclassic/blob/main/
docs/source/examples/Notebook/
docs/source/examples/Notebook/

.. toctree::
Expand Down
2 changes: 1 addition & 1 deletion docs/source/extending/bundler_extensions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ Bundler invocation details
--------------------------

Support for bundler extensions comes from Python modules in `notebook/bundler`
and JavaScript in `notebook/static/notebook/js/menubar.js`. The flow of data
and JavaScript in `nbclassic/static/notebook/js/menubar.js`. The flow of data
between the various components proceeds roughly as follows:

1. User opens a notebook document
Expand Down
2 changes: 1 addition & 1 deletion docs/source/extending/frontend_extensions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ action name, should be unique. Built-in actions, like the
actions defined in an extension, it makes sense to use the extension name as
the prefix. For the action name, the following guidelines should be considered:

.. adapted from notebook/static/notebook/js/actions.js
.. adapted from nbclassic/static/notebook/js/actions.js

* First pick a noun and a verb for the action. For example, if the action is
"restart kernel," the verb is "restart" and the noun is "kernel".
Expand Down
2 changes: 1 addition & 1 deletion docs/source/extending/handlers.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Custom request handlers

The notebook webserver can be interacted with using a well `defined
RESTful
API <http://petstore.swagger.io/?url=https://raw.githubusercontent.com/jupyter/notebook/master/notebook/services/api/api.yaml>`__.
API <http://petstore.swagger.io/?url=https://raw.githubusercontent.com/jupyter/nbclassic/master/nbclassic/services/api/api.yaml>`__.
You can define custom RESTful API handlers in addition to the ones
provided by the notebook. As described below, to define a custom handler
you need to first write a notebook server extension. Then, in the
Expand Down
6 changes: 3 additions & 3 deletions docs/source/links.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@
.. Main Jupyter notebook links

.. _Notebook Basics: notebook_p2_
.. _notebook_p2: https://nbviewer.jupyter.org/github/jupyter/notebook/blob/6.4.x/docs/source/examples/Notebook/Notebook%20Basics.ipynb
.. _notebook_p2: https://nbviewer.jupyter.org/github/jupyter/nbclassic/blob/main/docs/source/examples/Notebook/Notebook%20Basics.ipynb

.. _Running Code in the Jupyter Notebook: notebook_p1_
.. _notebook_p1: https://nbviewer.jupyter.org/github/jupyter/notebook/blob/master/docs/source/examples/Notebook/Running%20Code.ipynb
.. _notebook_p1: https://nbviewer.jupyter.org/github/jupyter/nbclassic/blob/master/docs/source/examples/Notebook/Running%20Code.ipynb

.. Other python projects
.. _matplotlib: https://matplotlib.org
Expand All @@ -38,4 +38,4 @@
.. _Plotting with Matplotlib: notebook_p3_
.. _notebook_p3: https://nbviewer.jupyter.org/github/ipython/ipython/blob/master/examples/IPython%20Kernel/Plotting%20in%20the%20Notebook.ipynb

.. _Working with Markdown Cells: https://nbviewer.jupyter.org/github/jupyter/notebook/blob/6.4.x/docs/source/examples/Notebook/Working%20With%20Markdown%20Cells.ipynb
.. _Working with Markdown Cells: https://nbviewer.jupyter.org/github/jupyter/nbclassic/blob/main/docs/source/examples/Notebook/Working%20With%20Markdown%20Cells.ipynb
2 changes: 1 addition & 1 deletion docs/source/notebook.rst
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ drop-down on the toolbar (which will be "Code", initially), or via

For more information on the different things you can do in a notebook,
see the `collection of examples
<https://nbviewer.jupyter.org/github/jupyter/notebook/tree/6.4.x/docs/source/examples/Notebook/>`_.
<https://nbviewer.jupyter.org/github/jupyter/nbclassic/tree/main/docs/source/examples/Notebook/>`_.

Code cells
~~~~~~~~~~
Expand Down
2 changes: 1 addition & 1 deletion docs/source/security.rst
Original file line number Diff line number Diff line change
Expand Up @@ -224,4 +224,4 @@ To share a signatures database among users, you can configure:

to specify a non-default path to the SQLite database (of notebook hashes,
essentially). We are aware that SQLite doesn't work well on NFS and we are
`working out better ways to do this <https://github.com/jupyter/notebook/issues/1782>`_.
`working out better ways to do this <https://github.com/jupyter/nbclassic/issues/1782>`_.
2 changes: 1 addition & 1 deletion docs/source/template.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

{% macro notebooklink() -%}

`View the original notebook on nbviewer <https://nbviewer.jupyter.org/github/jupyter/notebook/blob/6.4.x/docs/{{ resources['metadata']['path'] }}/{{ resources['metadata']['name'] | replace(' ', '%20') }}.ipynb>`__
`View the original notebook on nbviewer <https://nbviewer.jupyter.org/github/jupyter/nbclassic/blob/main/docs/{{ resources['metadata']['path'] }}/{{ resources['metadata']['name'] | replace(' ', '%20') }}.ipynb>`__


{%- endmacro %}
Expand Down
2 changes: 1 addition & 1 deletion docs/source/troubleshooting.rst
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ If you can't find an existing answer, you can ask questions at:
Gathering Information
^^^^^^^^^^^^^^^^^^^^^
Should you find that your problem warrants that an issue be opened in
`notebook <https://github.com/jupyter/notebook>`_ please don't forget to provide details
`notebook <https://github.com/jupyter/nbclassic>`_ please don't forget to provide details
like the following:

* What error messages do you see (within your notebook and, more importantly, in
Expand Down
4 changes: 2 additions & 2 deletions git-hooks/post-checkout
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ fi

# if style changed (and less available), rebuild sourcemaps
if [[
! -z "$(git diff $PREVIOUS_HEAD notebook/static/*/js/**.js)"
! -z "$(git diff $PREVIOUS_HEAD nbclassic/static/*/js/**.js)"
]]; then
echo "rebuilding javascript"
python setup.py js || echo "fail to rebuild javascript"
fi

if [[
! -z "$(git diff $PREVIOUS_HEAD notebook/static/*/less/**.less)"
! -z "$(git diff $PREVIOUS_HEAD nbclassic/static/*/less/**.less)"
]]; then
echo "rebuilding css sourcemaps"
python setup.py css || echo "fail to recompile css"
Expand Down
Loading