Compare commits
89 Commits
| Author | SHA1 | Date |
|---|---|---|
|
|
1b363e0431 | 3 years ago |
|
|
90cf12c48e | 3 years ago |
|
|
ae66301abe | 3 years ago |
|
|
796a1693df | 3 years ago |
|
|
0e5239d756 | 3 years ago |
|
|
77198fa6b8 | 3 years ago |
|
|
fab76230a7 | 3 years ago |
|
|
a8d5ca7a38 | 3 years ago |
|
|
dc0c8c47c7 | 3 years ago |
|
|
71d48bf50b | 3 years ago |
|
|
6944302f77 | 3 years ago |
|
|
b132283d32 | 4 years ago |
|
|
60c38c02a2 | 4 years ago |
|
|
03ada465b2 | 4 years ago |
|
|
9bdc741223 | 4 years ago |
|
|
44f3012a8d | 4 years ago |
|
|
986c88317d | 4 years ago |
|
|
7f4a78a6df | 4 years ago |
|
|
a02fe351df | 4 years ago |
|
|
37387bec8e | 4 years ago |
|
|
69f6cbee94 | 4 years ago |
|
|
96b6d54315 | 5 years ago |
|
|
6d65298595 | 5 years ago |
|
|
f194d49d4c | 5 years ago |
|
|
f300e92670 | 5 years ago |
|
|
f9195b25d7 | 5 years ago |
|
|
42d4ed516c | 5 years ago |
|
|
48018b2fea | 5 years ago |
|
|
e26a465822 | 5 years ago |
|
|
7aa0b1b571 | 6 years ago |
|
|
9788d52d46 | 6 years ago |
|
|
0b99a19dee | 6 years ago |
|
|
127180855b | 6 years ago |
|
|
f297ce6803 | 6 years ago |
|
|
d9eef5ddc9 | 6 years ago |
|
|
5fcb9e912e | 6 years ago |
|
|
dee53a1148 | 6 years ago |
|
|
f113632a29 | 6 years ago |
|
|
b3e9c6cedb | 6 years ago |
|
|
fef839dee4 | 6 years ago |
|
|
ca30421c62 | 6 years ago |
|
|
b8e30ea84b | 7 years ago |
|
|
8f2ab101aa | 7 years ago |
|
|
979e0bd15e | 7 years ago |
|
|
16cf97cf3c | 7 years ago |
|
|
c6fafc38cb | 7 years ago |
|
|
5bc968c8d6 | 7 years ago |
|
|
70fe9f0ddb | 7 years ago |
|
|
9e5c6ef360 | 7 years ago |
|
|
fd8586c4c1 | 7 years ago |
|
|
deb4d4a663 | 7 years ago |
|
|
197e568828 | 7 years ago |
|
|
05aa4b2cff | 7 years ago |
|
|
0ff8b86d53 | 7 years ago |
|
|
bfaa613857 | 7 years ago |
|
|
b5105814fc | 7 years ago |
|
|
cfc335b764 | 7 years ago |
|
|
f3f00df5b0 | 7 years ago |
|
|
d1e8d4df6c | 7 years ago |
|
|
8244468dc3 | 7 years ago |
|
|
667b459070 | 7 years ago |
|
|
1b5b60357a | 7 years ago |
|
|
ab6445233e | 7 years ago |
|
|
daa1bde4f2 | 7 years ago |
|
|
cf3622c1ff | 7 years ago |
|
|
bc459d05d1 | 7 years ago |
|
|
f8d7d4086f | 7 years ago |
|
|
536c30ef97 | 7 years ago |
|
|
fe7c29096f | 7 years ago |
|
|
3e4bc670c4 | 7 years ago |
|
|
d624d00477 | 7 years ago |
|
|
7b0ed75141 | 7 years ago |
|
|
3941536b22 | 7 years ago |
|
|
546ac5956d | 7 years ago |
|
|
aec34c4869 | 7 years ago |
|
|
c0175f63d9 | 7 years ago |
|
|
9310eb2ee5 | 7 years ago |
|
|
75117d3dac | 7 years ago |
|
|
f6c230e1be | 7 years ago |
|
|
4ca3f41c2a | 7 years ago |
|
|
8619d32719 | 7 years ago |
|
|
db5c2fecbe | 7 years ago |
|
|
e7868e670c | 7 years ago |
|
|
94ac73c466 | 7 years ago |
|
|
1485fc2be5 | 7 years ago |
|
|
ad25be985c | 7 years ago |
|
|
dd56b4ec11 | 7 years ago |
|
|
154fa08c48 | 7 years ago |
|
|
4026ef0107 | 7 years ago |
@ -0,0 +1,73 @@
|
||||
# Making a Release of Notebook
|
||||
|
||||
## Start from a fresh git checkout and conda environment
|
||||
|
||||
### Set the release branch
|
||||
|
||||
```bash
|
||||
export release_branch=master
|
||||
```
|
||||
|
||||
### Create the git checkout
|
||||
|
||||
```bash
|
||||
git clone git@github.com:jupyter/notebook.git
|
||||
cd notebook
|
||||
git checkout ${release_banch}
|
||||
```
|
||||
|
||||
### Create and activate the conda environment
|
||||
|
||||
```bash
|
||||
conda create -n notebook-release -c conda-forge jupyter
|
||||
conda activate notebook-release
|
||||
```
|
||||
|
||||
## Perform a local dev install
|
||||
|
||||
```bash
|
||||
pip install -ve .
|
||||
```
|
||||
|
||||
## Install release dependencies
|
||||
|
||||
```bash
|
||||
conda install -c conda-forge nodejs babel twine
|
||||
npm install -g po2json
|
||||
```
|
||||
|
||||
## Update the version
|
||||
|
||||
```bash
|
||||
vim notebook/_version.py
|
||||
python setup.py jsversion
|
||||
git commit -am "Release $(python setup.py --version)"
|
||||
git tag $(python setup.py --version)
|
||||
```
|
||||
|
||||
## Create the artifacts
|
||||
|
||||
```bash
|
||||
rm -rf dist
|
||||
python setup.py sdist
|
||||
python setup.py bdist_wheel
|
||||
```
|
||||
|
||||
## Upload the artifacts
|
||||
|
||||
```bash
|
||||
twine check dist/* && twine upload dist/*
|
||||
```
|
||||
|
||||
## Change back to dev version
|
||||
|
||||
```bash
|
||||
vim notebook/_version.py # Add the .dev suffix
|
||||
git commit -am "Back to dev version"
|
||||
```
|
||||
|
||||
## Push the commits and tags
|
||||
|
||||
```bash
|
||||
git push origin ${release_branch} --tags
|
||||
```
|
||||
@ -1,3 +1,3 @@
|
||||
sphinx>=1.3.6
|
||||
sphinx<2.0
|
||||
sphinx-rtd-theme
|
||||
nbsphinx
|
||||
|
||||
@ -1,67 +0,0 @@
|
||||
.. _notebook_release:
|
||||
|
||||
Making a Notebook release
|
||||
=========================
|
||||
|
||||
This document guides a contributor through creating a release of the Jupyter
|
||||
notebook.
|
||||
|
||||
Check installed tools
|
||||
---------------------
|
||||
|
||||
Review ``CONTRIBUTING.rst``. Make sure all the tools needed to generate the
|
||||
minified JavaScript and CSS files are properly installed.
|
||||
|
||||
Clean the repository
|
||||
--------------------
|
||||
|
||||
You can remove all non-tracked files with:
|
||||
|
||||
.. code:: bash
|
||||
|
||||
git clean -xfdi
|
||||
|
||||
This would ask you for confirmation before removing all untracked files. Make
|
||||
sure the ``dist/`` folder is clean and avoid stale build from
|
||||
previous attempts.
|
||||
|
||||
Create the release
|
||||
------------------
|
||||
|
||||
#. Update version number in ``notebook/_version.py``.
|
||||
|
||||
#. Run this command:
|
||||
|
||||
.. code:: bash
|
||||
|
||||
python setup.py jsversion
|
||||
|
||||
It will modify (at least) ``notebook/static/base/js/namespace.js`` which
|
||||
makes the notebook version available from within JavaScript.
|
||||
|
||||
#. Commit and tag the release with the current version number:
|
||||
|
||||
.. code:: bash
|
||||
|
||||
git commit -am "release $VERSION"
|
||||
git tag $VERSION
|
||||
|
||||
#. You are now ready to build the ``sdist`` and ``wheel``:
|
||||
|
||||
.. code:: bash
|
||||
|
||||
python setup.py sdist
|
||||
python setup.py bdist_wheel
|
||||
|
||||
#. You can now test the ``wheel`` and the ``sdist`` locally before uploading
|
||||
to PyPI. Make sure to use `twine <https://github.com/pypa/twine>`_ to
|
||||
upload the archives over SSL.
|
||||
|
||||
.. code:: bash
|
||||
|
||||
twine upload dist/*
|
||||
|
||||
#. If all went well, change the ``notebook/_version.py`` back adding the
|
||||
``.dev`` suffix.
|
||||
|
||||
#. Push directly on master, not forgetting to push ``--tags`` too.
|
||||
@ -0,0 +1,54 @@
|
||||
"""Tests for login redirects"""
|
||||
|
||||
import requests
|
||||
from tornado.httputil import url_concat
|
||||
|
||||
from notebook.tests.launchnotebook import NotebookTestBase
|
||||
|
||||
|
||||
class LoginTest(NotebookTestBase):
|
||||
def login(self, next):
|
||||
first = requests.get(self.base_url() + "login")
|
||||
first.raise_for_status()
|
||||
resp = requests.post(
|
||||
url_concat(
|
||||
self.base_url() + "login",
|
||||
{'next': next},
|
||||
),
|
||||
allow_redirects=False,
|
||||
data={
|
||||
"password": self.token,
|
||||
"_xsrf": first.cookies.get("_xsrf", ""),
|
||||
},
|
||||
cookies=first.cookies,
|
||||
)
|
||||
resp.raise_for_status()
|
||||
return resp.headers['Location']
|
||||
|
||||
def test_next_bad(self):
|
||||
for bad_next in (
|
||||
"//some-host",
|
||||
"//host" + self.url_prefix + "tree",
|
||||
"https://google.com",
|
||||
"/absolute/not/base_url",
|
||||
"///jupyter.org",
|
||||
"/\\some-host",
|
||||
):
|
||||
url = self.login(next=bad_next)
|
||||
self.assertEqual(url, self.url_prefix)
|
||||
assert url
|
||||
|
||||
def test_next_ok(self):
|
||||
for next_path in (
|
||||
"tree/",
|
||||
self.base_url() + "has/host",
|
||||
"notebooks/notebook.ipynb",
|
||||
"tree//something",
|
||||
):
|
||||
if "://" in next_path:
|
||||
expected = next_path
|
||||
else:
|
||||
expected = self.url_prefix + next_path
|
||||
|
||||
actual = self.login(next=expected)
|
||||
self.assertEqual(actual, expected)
|
||||
@ -0,0 +1,18 @@
|
||||
{# This template is not served, but written as a file to open in the browser,
|
||||
passing the token without putting it in a command-line argument. #}
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="refresh" content="1;url={{ open_url }}" />
|
||||
<title>Opening Jupyter Notebook</title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<p>
|
||||
This page should redirect you to Jupyter Notebook. If it doesn't,
|
||||
<a href="{{ open_url }}">click here to go to Jupyter</a>.
|
||||
</p>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@ -0,0 +1,34 @@
|
||||
const path = require('path');
|
||||
const crypto = require('crypto');
|
||||
|
||||
// Workaround for loaders using "md4" by default, which is not supported in FIPS-compliant OpenSSL
|
||||
// See https://github.com/jupyterlab/jupyterlab/issues/11248
|
||||
const cryptoOrigCreateHash = crypto.createHash;
|
||||
crypto.createHash = (algorithm) =>
|
||||
cryptoOrigCreateHash(algorithm == 'md4' ? 'sha256' : algorithm);
|
||||
|
||||
module.exports = {
|
||||
entry: ['babel-polyfill', '@jupyterlab/apputils/lib/sanitizer'],
|
||||
output: {
|
||||
filename: 'index.js',
|
||||
path: path.resolve(__dirname, 'notebook/static/components/sanitizer'),
|
||||
libraryTarget: "amd",
|
||||
},
|
||||
devtool: false,
|
||||
optimization: {
|
||||
minimize: false
|
||||
},
|
||||
module: {
|
||||
rules: [
|
||||
{
|
||||
test: /\.m?jsx?$/,
|
||||
use: {
|
||||
loader: 'babel-loader',
|
||||
options: {
|
||||
presets: ['@babel/preset-env'],
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
Loading…
Reference in new issue