Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
55 changes: 55 additions & 0 deletions .github/workflows/check-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: Check Release
on:
push:
branches: ["master"]
pull_request:
branches: ["*"]

jobs:
check_release:
runs-on: ubuntu-latest
strategy:
matrix:
group: [check_release, link_check]
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install Python
uses: actions/setup-python@v2
with:
python-version: 3.9
architecture: "x64"
- name: Get pip cache dir
id: pip-cache
run: |
echo "::set-output name=dir::$(pip cache dir)"
- name: Cache pip
uses: actions/cache@v2
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
if: ${{ matrix.group == 'link_check' }}
uses: actions/cache@v2
with:
path: ~/.cache/pytest-link-check
key: ${{ runner.os }}-linkcheck-${{ hashFiles('**/*.md', '**/*.rst') }}-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
if: ${{ matrix.group == 'check_release' }}
uses: jupyter-server/jupyter_releaser/.github/actions/check-release@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Run Link Check
if: ${{ matrix.group == 'link_check' }}
uses: jupyter-server/jupyter_releaser/.github/actions/check-links@v1
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@

## 6.1.0

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

### Enhancements made

- Implemented `richInspectVariable` request handler [#734](https://github.com/ipython/ipykernel/pull/734) ([@JohanMabille](https://github.com/JohanMabille))
Expand All @@ -29,6 +31,8 @@

- Fix exception raised by `OutStream.write` [#726](https://github.com/ipython/ipykernel/pull/726) ([@SimonKrughoff](https://github.com/SimonKrughoff))

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

## 6.0

## 6.0.3
Expand Down
6 changes: 3 additions & 3 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
include COPYING.md
include CONTRIBUTING.md
include README.md
include *.md
include pyproject.toml

# Documentation
Expand All @@ -23,3 +21,5 @@ global-exclude .git
global-exclude .ipynb_checkpoints

prune data_kernelspec
exclude .mailmap
exclude readthedocs.yml
20 changes: 13 additions & 7 deletions RELEASE.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,25 @@
# Release Guide

- Update `docs/changelog.rst`
- Update `ipykernel/_version.py`
## Using `jupyter_releaser`

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

## Manual Release

- Update `CHANGELOG`

- Run the following:

```bash
version=`python setup.py --version 2>/dev/null`
git commit -a -m "Release $version"
git tag $version; true;
export VERSION=<version>
pip install jupyter_releaser
tbump --only-patch $VERSION
git commit -a -m "Release $VERSION"
git tag $VERSION; true;
git push --all
git push --tags
rm -rf dist build
pip install build twine
python -m build .
pip install twine
twine check dist/*
twine upload dist/*
```
26 changes: 14 additions & 12 deletions ipykernel/_version.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
version_info = (6, 2, 0)
__version__ = ".".join(map(str, version_info[:3]))
"""
store the current version info of the server.
"""
import re

# pep440 is annoying, beta/alpha/rc should _not_ have dots or pip/setuptools
# confuses which one between the wheel and sdist is the most recent.
if len(version_info) == 4:
extra = version_info[3]
if extra.startswith(('a','b','rc')):
__version__ = __version__+extra
else:
__version__ = __version__+'.'+extra
if len(version_info) > 4:
raise NotImplementedError
# Version string must appear intact for tbump versioning
__version__ = '6.2.0'

# 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)

kernel_protocol_version_info = (5, 3)
kernel_protocol_version = '%s.%s' % kernel_protocol_version_info
20 changes: 20 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,23 @@ requires=[
"jupyter_core>=4.2",
"jupyter_client",
]

[tool.check-manifest]
ignore = []

[tool.jupyter-releaser]
skip = ["check-links"]

[tool.tbump.version]
current = "6.2.0"
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 = "ipykernel/_version.py"
2 changes: 2 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@

[bdist_wheel]
universal=0

[metadata]
license_file = COPYING.md
version = attr: ipykernel._version.__version__

[nosetests]
warningfilters= default |.* |DeprecationWarning |ipykernel.*
Expand Down
12 changes: 0 additions & 12 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,23 +39,11 @@ def run(self):
'ipykernel': ['resources/*.*'],
}

version_ns = {}
with open(pjoin(here, name, '_version.py')) as f:
exec(f.read(), {}, version_ns)

current_version = version_ns['__version__']

loose_pep440re = re.compile(r'^(\d+)\.(\d+)\.(\d+((a|b|rc)\d+)?)(\.post\d+)?(\.dev\d*)?$')
if not loose_pep440re.match(current_version):
raise ValueError("Version number '%s' is not valid (should match [N!]N(.N)*[{a|b|rc}N][.postN][.devN])" % current_version)


with open(pjoin(here, 'README.md')) as fid:
LONG_DESCRIPTION = fid.read()

setup_args = dict(
name=name,
version=current_version,
cmdclass={
'bdist_egg': bdist_egg if 'bdist_egg' in sys.argv else bdist_egg_disabled,
},
Expand Down