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

Use Jupyter Releaser #6048

Merged
merged 12 commits into from
May 12, 2021
Merged
57 changes: 57 additions & 0 deletions .github/workflows/check-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: Check Release
on:
push:
branches: ["master"]
pull_request:
branches: ["*"]

permissions:
contents:
write

jobs:
check_release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install Python
uses: actions/setup-python@v2
with:
python-version: 3.9
architecture: "x64"
- name: Install node
uses: actions/setup-node@v2
with:
node-version: '14.x'
- name: Get pip cache dir
id: pip-cache
run: |
echo "::set-output name=dir::$(pip cache dir)"
- name: Cache pip
uses: actions/cache@v1
with:
path: ${{ steps.pip-cache.outputs.dir }}
key: ${{ runner.os }}-pip-${{ hashFiles('setup.cfg') }}
restore-keys: |
${{ runner.os }}-pip-
${{ runner.os }}-pip-
- name: Cache checked links
uses: actions/cache@v2
with:
path: ~/.cache/pytest-link-check
key: ${{ runner.os }}-linkcheck-${{ hashFiles('**/.md') }}-md-links
restore-keys: |
${{ runner.os }}-linkcheck-
- name: Upgrade packaging dependencies
run: |
pip install --upgrade pip setuptools wheel --user
- name: Install Dependencies
run: |
pip install -e .
- name: Check Release
env:
TWINE_PASSWORD: ${{ secrets.TEST_PYPI_TOKEN }}
uses: jupyter-server/jupyter_releaser/.github/actions/check-release@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -54,3 +54,5 @@ geckodriver.log

# copied changelog
docs/source/changelog.md

.jupyter_releaser_checkout
14 changes: 12 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,18 @@ upgrading `notebook`.
Use `pip install pip --upgrade` to upgrade pip. Check pip version with
`pip --version`.

<!-- <START NEW CHANGELOG ENTRY> -->

## 6.4.0a1

No merged PRs

<!-- <END NEW CHANGELOG ENTRY> -->

## 6.4.0a0

No merged PRs

## 6.3.0

### Merged PRs
Expand Down Expand Up @@ -41,7 +53,6 @@ Use `pip install pip --upgrade` to upgrade pip. Check pip version with

[@abielhammonds](https://github.com/search?q=repo%3Ajupyter%2Fnotebook+involves%3Aabielhammonds+updated%3A2021-01-13..2021-03-18&type=Issues) | [@afshin](https://github.com/search?q=repo%3Ajupyter%2Fnotebook+involves%3Aafshin+updated%3A2021-01-13..2021-03-18&type=Issues) | [@ajharry](https://github.com/search?q=repo%3Ajupyter%2Fnotebook+involves%3Aajharry+updated%3A2021-01-13..2021-03-18&type=Issues) | [@Alokrar](https://github.com/search?q=repo%3Ajupyter%2Fnotebook+involves%3AAlokrar+updated%3A2021-01-13..2021-03-18&type=Issues) | [@befeleme](https://github.com/search?q=repo%3Ajupyter%2Fnotebook+involves%3Abefeleme+updated%3A2021-01-13..2021-03-18&type=Issues) | [@blairdrummond](https://github.com/search?q=repo%3Ajupyter%2Fnotebook+involves%3Ablairdrummond+updated%3A2021-01-13..2021-03-18&type=Issues) | [@blink1073](https://github.com/search?q=repo%3Ajupyter%2Fnotebook+involves%3Ablink1073+updated%3A2021-01-13..2021-03-18&type=Issues) | [@bollwyvl](https://github.com/search?q=repo%3Ajupyter%2Fnotebook+involves%3Abollwyvl+updated%3A2021-01-13..2021-03-18&type=Issues) | [@Carreau](https://github.com/search?q=repo%3Ajupyter%2Fnotebook+involves%3ACarreau+updated%3A2021-01-13..2021-03-18&type=Issues) | [@ChenChenDS](https://github.com/search?q=repo%3Ajupyter%2Fnotebook+involves%3AChenChenDS+updated%3A2021-01-13..2021-03-18&type=Issues) | [@cosmoscalibur](https://github.com/search?q=repo%3Ajupyter%2Fnotebook+involves%3Acosmoscalibur+updated%3A2021-01-13..2021-03-18&type=Issues) | [@dlrice](https://github.com/search?q=repo%3Ajupyter%2Fnotebook+involves%3Adlrice+updated%3A2021-01-13..2021-03-18&type=Issues) | [@dwanneruchi](https://github.com/search?q=repo%3Ajupyter%2Fnotebook+involves%3Adwanneruchi+updated%3A2021-01-13..2021-03-18&type=Issues) | [@ElisonSherton](https://github.com/search?q=repo%3Ajupyter%2Fnotebook+involves%3AElisonSherton+updated%3A2021-01-13..2021-03-18&type=Issues) | [@FazeelUsmani](https://github.com/search?q=repo%3Ajupyter%2Fnotebook+involves%3AFazeelUsmani+updated%3A2021-01-13..2021-03-18&type=Issues) | [@frenzymadness](https://github.com/search?q=repo%3Ajupyter%2Fnotebook+involves%3Afrenzymadness+updated%3A2021-01-13..2021-03-18&type=Issues) | [@goerz](https://github.com/search?q=repo%3Ajupyter%2Fnotebook+involves%3Agoerz+updated%3A2021-01-13..2021-03-18&type=Issues) | [@insolor](https://github.com/search?q=repo%3Ajupyter%2Fnotebook+involves%3Ainsolor+updated%3A2021-01-13..2021-03-18&type=Issues) | [@jasongrout](https://github.com/search?q=repo%3Ajupyter%2Fnotebook+involves%3Ajasongrout+updated%3A2021-01-13..2021-03-18&type=Issues) | [@JianghuiDu](https://github.com/search?q=repo%3Ajupyter%2Fnotebook+involves%3AJianghuiDu+updated%3A2021-01-13..2021-03-18&type=Issues) | [@JuzerShakir](https://github.com/search?q=repo%3Ajupyter%2Fnotebook+involves%3AJuzerShakir+updated%3A2021-01-13..2021-03-18&type=Issues) | [@kevin-bates](https://github.com/search?q=repo%3Ajupyter%2Fnotebook+involves%3Akevin-bates+updated%3A2021-01-13..2021-03-18&type=Issues) | [@Khalilsqu](https://github.com/search?q=repo%3Ajupyter%2Fnotebook+involves%3AKhalilsqu+updated%3A2021-01-13..2021-03-18&type=Issues) | [@meeseeksdev](https://github.com/search?q=repo%3Ajupyter%2Fnotebook+involves%3Ameeseeksdev+updated%3A2021-01-13..2021-03-18&type=Issues) | [@mgeier](https://github.com/search?q=repo%3Ajupyter%2Fnotebook+involves%3Amgeier+updated%3A2021-01-13..2021-03-18&type=Issues) | [@michaelpedota](https://github.com/search?q=repo%3Ajupyter%2Fnotebook+involves%3Amichaelpedota+updated%3A2021-01-13..2021-03-18&type=Issues) | [@mjbright](https://github.com/search?q=repo%3Ajupyter%2Fnotebook+involves%3Amjbright+updated%3A2021-01-13..2021-03-18&type=Issues) | [@MSeal](https://github.com/search?q=repo%3Ajupyter%2Fnotebook+involves%3AMSeal+updated%3A2021-01-13..2021-03-18&type=Issues) | [@ncoughlin](https://github.com/search?q=repo%3Ajupyter%2Fnotebook+involves%3Ancoughlin+updated%3A2021-01-13..2021-03-18&type=Issues) | [@NTimmons](https://github.com/search?q=repo%3Ajupyter%2Fnotebook+involves%3ANTimmons+updated%3A2021-01-13..2021-03-18&type=Issues) | [@ProsperousHeart](https://github.com/search?q=repo%3Ajupyter%2Fnotebook+involves%3AProsperousHeart+updated%3A2021-01-13..2021-03-18&type=Issues) | [@rjn01](https://github.com/search?q=repo%3Ajupyter%2Fnotebook+involves%3Arjn01+updated%3A2021-01-13..2021-03-18&type=Issues) | [@slw07g](https://github.com/search?q=repo%3Ajupyter%2Fnotebook+involves%3Aslw07g+updated%3A2021-01-13..2021-03-18&type=Issues) | [@stenivan](https://github.com/search?q=repo%3Ajupyter%2Fnotebook+involves%3Astenivan+updated%3A2021-01-13..2021-03-18&type=Issues) | [@takluyver](https://github.com/search?q=repo%3Ajupyter%2Fnotebook+involves%3Atakluyver+updated%3A2021-01-13..2021-03-18&type=Issues) | [@thomasrockhu](https://github.com/search?q=repo%3Ajupyter%2Fnotebook+involves%3Athomasrockhu+updated%3A2021-01-13..2021-03-18&type=Issues) | [@wgilpin](https://github.com/search?q=repo%3Ajupyter%2Fnotebook+involves%3Awgilpin+updated%3A2021-01-13..2021-03-18&type=Issues) | [@wxtt522](https://github.com/search?q=repo%3Ajupyter%2Fnotebook+involves%3Awxtt522+updated%3A2021-01-13..2021-03-18&type=Issues) | [@yuvipanda](https://github.com/search?q=repo%3Ajupyter%2Fnotebook+involves%3Ayuvipanda+updated%3A2021-01-13..2021-03-18&type=Issues) | [@Zsailer](https://github.com/search?q=repo%3Ajupyter%2Fnotebook+involves%3AZsailer+updated%3A2021-01-13..2021-03-18&type=Issues)


## 6.2.0

## Merged PRs
Expand Down Expand Up @@ -1319,7 +1330,6 @@ All users are strongly encouraged to upgrade to 4.2.2.
- Fix for ignored CSS on Windows
- Fix specifying destination when installing nbextensions


## 4.2.0

Release 4.2 adds a new API for enabling and installing extensions.
Expand Down
3 changes: 3 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,12 @@ include CHANGELOG.md
include package.json
include bower.json
include .bowerrc
include pyproject.toml
include setup.py
include setupbase.py
include Dockerfile
graft tools
graft notebook/tests

# Translations
graft notebook/i18n
Expand Down
33 changes: 19 additions & 14 deletions RELEASE.md
Original file line number Diff line number Diff line change
@@ -1,42 +1,48 @@
# Making a Release of Notebook

## Start from a fresh git checkout and conda environment
## Using `jupyter_releaser`

### Set the release branch
The recommended way to make a release is to use [`jupyter_releaser`](https://github.com/jupyter-server/jupyter_releaser#checklist-for-adoption).

## Manual Release Process

### Start from a fresh git checkout and conda environment

#### Set the release branch

```bash
export release_branch=master
```

### Create the git checkout
#### 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
#### 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
### Perform a local dev install

```bash
pip install -ve .
```

## Install release dependencies
### Install release dependencies

```bash
conda install -c conda-forge nodejs babel twine
conda install -c conda-forge nodejs babel twine build
npm install -g po2json
```

## Update the version
### Update the version
blink1073 marked this conversation as resolved.
Show resolved Hide resolved

```bash
vim notebook/_version.py
Expand All @@ -45,29 +51,28 @@ git commit -am "Release $(python setup.py --version)"
git tag $(python setup.py --version)
```

## Create the artifacts
### Create the artifacts

```bash
rm -rf dist
python setup.py sdist
python setup.py bdist_wheel
python -m build .
```

## Upload the artifacts
### Upload the artifacts

```bash
twine check dist/* && twine upload dist/*
```

## Change back to dev version
### Change back to dev version

```bash
vim notebook/_version.py # Add the .dev suffix
python setup.py jsversion
git commit -am "Back to dev version"
```

## Push the commits and tags
### Push the commits and tags

```bash
git push origin ${release_branch} --tags
Expand Down
2 changes: 1 addition & 1 deletion docs/source/config_overview.rst
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ front-end Notebook client (i.e. the familiar notebook interface).
documented in the configuration file and the user documentation.

- :ref:`Running a Notebook server <working_remotely>`
- Related: `Configuring a language kernel <https://jupyter.readthedocs.io/en/latest/install-kernel.html>`_
- Related: `Configuring a language kernel <https://ipython.readthedocs.io/en/latest/install/kernel_install.html>`_
to run in the Notebook server enables your server to run other languages, like R or Julia.

.. _configure_nbclient:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@
"\n",
"> Of course, in addition to the files listed, there are number of other files one needs to build a proper package. Here are some good resources:\n",
"- [The Hitchhiker's Guide to Packaging](https://the-hitchhikers-guide-to-packaging.readthedocs.io/en/latest/quickstart.html)\n",
"- [Repository Structure and Python](https://www.kennethreitz.org/essays/repository-structure-and-python) by Kenneth Reitz\n",
"- [Repository Structure and Python](https://kenreitz.org/essays/2013/01/27/repository-structure-and-python) by Kenneth Reitz\n",
"\n",
"> How you distribute them, too, is important:\n",
"- [Packaging and Distributing Projects](https://python-packaging-user-guide.readthedocs.io/tutorials/distributing-packages/)\n",
Expand Down Expand Up @@ -507,4 +507,4 @@
},
"nbformat": 4,
"nbformat_minor": 1
}
}
2 changes: 1 addition & 1 deletion docs/source/examples/Notebook/header.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Notebook Examples

The pages in this section are all converted notebook files. You can also
[view these notebooks on nbviewer](http://nbviewer.jupyter.org/github/jupyter/notebook/blob/master/)
[view these notebooks on nbviewer](http://nbviewer.jupyter.org/github/jupyter/notebook/tree/master/)
8 changes: 3 additions & 5 deletions docs/source/notebook.rst
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,11 @@ example, for blog posts), reStructuredText, LaTeX, PDF, and slide shows, via
the nbconvert_ command.

Furthermore, any ``.ipynb`` notebook document available from a public
URL can be shared via the `Jupyter Notebook Viewer <nbviewer>`_ (nbviewer_).
URL can be shared via the Jupyter Notebook Viewer <nbviewer>.
This service loads the notebook document from the URL and renders it as a
static web page. The results may thus be shared with a colleague, or as a
public blog post, without other users needing to install the Jupyter notebook
themselves. In effect, nbviewer_ is simply nbconvert_ as
themselves. In effect, nbviewer is simply nbconvert_ as
a web service, so you can do your own static conversions with nbconvert,
without relying on nbviewer.

Expand Down Expand Up @@ -278,9 +278,7 @@ way, using standard LaTeX notation: ``$...$`` for inline mathematics and
``$$...$$`` for displayed mathematics. When the Markdown cell is executed,
the LaTeX portions are automatically rendered in the HTML output as equations
with high quality typography. This is made possible by MathJax_, which
supports a `large subset <mathjax_tex>`_ of LaTeX functionality

.. _mathjax_tex: https://docs.mathjax.org/en/latest/tex.html
supports a `large subset <https://docs.mathjax.org/en/latest/input/tex/index.html>`__ of LaTeX functionality

Standard mathematics environments defined by LaTeX and AMS-LaTeX (the
``amsmath`` package) also work, such as
Expand Down
17 changes: 12 additions & 5 deletions notebook/_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,19 @@
store the current version info of the notebook.

"""
import re

# Version string must appear intact for tbump versioning
__version__ = '6.4.0a1'

# Build up version_info tuple for backwards compatibility
pattern = r'(?P<major>\d+).(?P<minor>\d+).(?P<patch>\d+)(?P<rest>.*)'
match = re.match(pattern, __version__)
parts = [int(match[part]) for part in ['major', 'minor', 'patch']]
if match['rest']:
parts.append(match['rest'])
version_info = tuple(parts)

# Downstream maintainer, when running `python.setup.py jsversion`,
# the version string is propagated to the JavaScript files, do not forget to
# patch the JavaScript files in `.postN` release done by distributions.

# Next beta/alpha/rc release: The version number for beta is X.Y.ZbN **without dots**.

version_info = (6, 4, 0, '.dev0')
__version__ = '.'.join(map(str, version_info[:3])) + ''.join(version_info[3:])
2 changes: 1 addition & 1 deletion notebook/static/base/js/namespace.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ define(function(){
// tree
jglobal('SessionList','tree/js/sessionlist');

Jupyter.version = "6.4.0.dev0";
Jupyter.version = "6.4.0a1";
Jupyter._target = '_blank';

return Jupyter;
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"name": "jupyter-notebook-deps",
"private": true,
"version": "4.0.0",
"description": "Jupyter Notebook nodejs dependencies",
"author": "Jupyter Developers",
Expand Down
28 changes: 28 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
[build-system]
requires=["jupyter_packaging~=0.9,<2"]
build-backend = "setuptools.build_meta"

[tool.check-manifest]
ignore = ["docs-translations/**", ".*", "*.yml", "*.less", "git-hooks/**", "MANIFEST.in", "RELEASE.md", "jupyter.svg", "notebook/static/**", "notebook/i18n/**/*.json", "docs/source/*.*"]
ignore-bad-ideas = ["notebook/i18n/**/*.mo"]

[tool.jupyter-releaser.hooks]
after-bump-version = "python setup.py jsversion"
before-build-python = ["pip install babel", "npm install -g po2json"]

[tool.jupyter-releaser.options]
ignore-glob = ["docs/source/examples/Notebook/Working With Markdown Cells.ipynb", "docs-translations/**/README.md", "docs/source/contributing.rst", "docs/source/examples/Notebook/JavaScript Notebook Extensions.ipynb", "CHANGELOG.md"]

[tool.tbump.version]
current = "6.4.0a1"
regex = '''
(?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)
((?P<channel>a|b|rc|.dev)(?P<release>\d+))?
'''

[tool.tbump.git]
message_template = "Bump to {new_version}"
tag_template = "v{new_version}"

[[tool.tbump.file]]
src = "notebook/_version.py"
3 changes: 3 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@

from setuptools import setup

# Needed to support building with `setuptools.build_meta`
sys.path.insert(0, os.path.abspath(os.path.dirname(__file__)))

from setupbase import (
version,
find_packages,
Expand Down
4 changes: 2 additions & 2 deletions tools/tests/CSS Reference.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"See my [About](/about/) page for details. "
"See my [Confined Output](./Confined Output.ipynb/) sibling page. "
]
},
{
Expand Down Expand Up @@ -8203,4 +8203,4 @@
},
"nbformat": 4,
"nbformat_minor": 0
}
}