Skip to content

Commit 43384a3

Browse files
committed
Use Jupyter Packaging
1 parent 940bd2e commit 43384a3

16 files changed

+247
-1241
lines changed

.github/workflows/codeql-analysis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ name: "CodeQL"
1414

1515
on:
1616
push:
17-
branches: [ '*' ]
17+
branches: [ 'master' ]
1818
pull_request:
1919
# The branches below must be a subset of the branches above
2020
branches: [ master ]

.github/workflows/python-linux.yml

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: Jupyter Server Tests [Linux]
22
on:
33
push:
4-
branches: '*'
4+
branches: 'master'
55
pull_request:
66
branches: '*'
77
jobs:
@@ -37,7 +37,7 @@ jobs:
3737
${{ runner.os }}-pip-
3838
- name: Install the Python dependencies
3939
run: |
40-
pip install -e .[test] codecov
40+
pip install -e ".[test]" codecov
4141
- name: List installed packages
4242
run: |
4343
pip freeze
@@ -62,7 +62,19 @@ jobs:
6262
codecov
6363
- name: Test full install
6464
run: |
65-
pip uninstall -y jupyter_server
66-
pip install .
67-
cd /tmp
68-
pytest --pyargs jupyter_server
65+
python -m venv test_install
66+
./test_install/bin/python -m pip install -U pip
67+
./test_install/bin/python -m pip install ".[test]"
68+
pushd test_install
69+
./bin/pytest --pyargs jupyter_server
70+
popd
71+
- name: Check the Manifest
72+
run: |
73+
pip install check-manifest
74+
git clean -dfx
75+
check-manifest -v
76+
- name: Check Version Bump
77+
run: |
78+
pip install tbump
79+
tbump --non-interactive --only-patch 100.1.1
80+
git checkout .

.github/workflows/python-macos.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: Jupyter Server Tests [Mac OS]
22
on:
33
push:
4-
branches: '*'
4+
branches: 'master'
55
pull_request:
66
branches: '*'
77
jobs:

.github/workflows/python-windows.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: Jupyter Server Tests [Windows]
22
on:
33
push:
4-
branches: '*'
4+
branches: 'master'
55
pull_request:
66
branches: '*'
77
jobs:

CHANGELOG.md

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ All notable changes to this project will be documented in this file.
44

55
## 1.6.1
66

7-
87
([Full Changelog](https://github.com/jupyter-server/jupyter_server/compare/1.6.0...2756a29c5fdcfa62a3492004627541089d53d14f))
98

109
### Merged PRs
@@ -94,7 +93,6 @@ All notable changes to this project will be documented in this file.
9493

9594
[@afshin](https://github.com/search?q=repo%3Ajupyter-server%2Fjupyter_server+involves%3Aafshin+updated%3A2021-02-22..2021-03-23&type=Issues) | [@blink1073](https://github.com/search?q=repo%3Ajupyter-server%2Fjupyter_server+involves%3Ablink1073+updated%3A2021-02-22..2021-03-23&type=Issues) | [@codecov-io](https://github.com/search?q=repo%3Ajupyter-server%2Fjupyter_server+involves%3Acodecov-io+updated%3A2021-02-22..2021-03-23&type=Issues) | [@jtpio](https://github.com/search?q=repo%3Ajupyter-server%2Fjupyter_server+involves%3Ajtpio+updated%3A2021-02-22..2021-03-23&type=Issues) | [@kevin-bates](https://github.com/search?q=repo%3Ajupyter-server%2Fjupyter_server+involves%3Akevin-bates+updated%3A2021-02-22..2021-03-23&type=Issues) | [@kiendang](https://github.com/search?q=repo%3Ajupyter-server%2Fjupyter_server+involves%3Akiendang+updated%3A2021-02-22..2021-03-23&type=Issues) | [@minrk](https://github.com/search?q=repo%3Ajupyter-server%2Fjupyter_server+involves%3Aminrk+updated%3A2021-02-22..2021-03-23&type=Issues) | [@sngyo](https://github.com/search?q=repo%3Ajupyter-server%2Fjupyter_server+involves%3Asngyo+updated%3A2021-02-22..2021-03-23&type=Issues) | [@Zsailer](https://github.com/search?q=repo%3Ajupyter-server%2Fjupyter_server+involves%3AZsailer+updated%3A2021-02-22..2021-03-23&type=Issues)
9695

97-
9896
## [1.4.1](https://github.com/jupyter-server/jupyter_server/tree/1.4.1) (2021-02-22)
9997

10098
[Full Changelog](https://github.com/jupyter-server/jupyter_server/compare/1.4.0...bc252d33de2f647f98d048dc32888f0a83f005ac)
@@ -112,10 +110,8 @@ All notable changes to this project will be documented in this file.
112110

113111
[@jamesmishra](https://github.com/search?q=repo%3Ajupyter-server%2Fjupyter_server+involves%3Ajamesmishra+updated%3A2021-02-18..2021-02-22&type=Issues) | [@Zsailer](https://github.com/search?q=repo%3Ajupyter-server%2Fjupyter_server+involves%3AZsailer+updated%3A2021-02-18..2021-02-22&type=Issues)
114112

115-
116113
## [1.4.0](https://github.com/jupyter-server/jupyter_server/tree/1.4.0) (2021-02-18)
117114

118-
119115
[Full Changelog](https://github.com/jupyter-server/jupyter_server/compare/1.3.0...HEAD)
120116

121117
**Merged pull requests:**
@@ -130,7 +126,6 @@ All notable changes to this project will be documented in this file.
130126
- \[Gateway\] Track only this server's kernels [\#407](https://github.com/jupyter-server/jupyter_server/pull/407) ([kevin-bates](https://github.com/kevin-bates))
131127
- Update manager.py: more descriptive warnings when extensions fail to load [\#396](https://github.com/jupyter-server/jupyter_server/pull/396) ([alberti42](https://github.com/alberti42))
132128

133-
134129
## [1.3.0](https://github.com/jupyter-server/jupyter_server/tree/1.3.0) (2021-02-04)
135130

136131
[Full Changelog](https://github.com/jupyter-server/jupyter_server/compare/1.2.2...HEAD)
@@ -161,7 +156,6 @@ This was a broken release and was yanked from PyPI.
161156
- Increase culling test idle timeout [\#388](https://github.com/jupyter-server/jupyter_server/pull/388) ([kevin-bates](https://github.com/kevin-bates))
162157
- update changelog for 1.2.2 [\#387](https://github.com/jupyter-server/jupyter_server/pull/387) ([Zsailer](https://github.com/Zsailer))
163158

164-
165159
## [1.2.2](https://github.com/jupyter-server/jupyter_server/tree/1.2.2) (2021-01-14)
166160

167161
**Merged pull requests:**
@@ -172,7 +166,6 @@ This was a broken release and was yanked from PyPI.
172166
- Replace secure\_write, is\_hidden, exists with jupyter\_core's [\#382](https://github.com/jupyter-server/jupyter_server/pull/382) ([kevin-bates](https://github.com/kevin-bates))
173167
- Add --autoreload flag [\#380](https://github.com/jupyter-server/jupyter_server/pull/380) ([afshin](https://github.com/afshin))
174168

175-
176169
## [1.2.1](https://github.com/jupyter-server/jupyter_server/tree/1.2.1) (2021-01-08)
177170

178171
[Full Changelog](https://github.com/jupyter-server/jupyter_server/compare/1.2.0...1.2.1)
@@ -221,7 +214,6 @@ This was a broken release and was yanked from PyPI.
221214

222215
- Nudge kernel with info request until we receive IOPub messages [\#361](https://github.com/jupyter-server/jupyter_server/pull/361) ([SylvainCorlay](https://github.com/SylvainCorlay))
223216

224-
225217
## [1.1.1](https://github.com/jupyter-server/jupyter_server/tree/1.1.1) (2020-12-16)
226218

227219
[Full Changelog](https://github.com/jupyter-server/jupyter_server/compare/1.1.0...1.1.1)
@@ -230,7 +222,6 @@ This was a broken release and was yanked from PyPI.
230222

231223
- Fix: await possible async dir\_exists method [\#363](https://github.com/jupyter-server/jupyter_server/pull/363) ([mwakaba2](https://github.com/mwakaba2))
232224

233-
234225
## 1.1.0 (2020-12-11)
235226

236227
[Full Changelog](https://github.com/jupyter-server/jupyter_server/compare/1.0.10...1.1.0)
@@ -252,7 +243,6 @@ This was a broken release and was yanked from PyPI.
252243
- Enable CodeQL runs on all pushed branches [\#333](https://github.com/jupyter-server/jupyter_server/pull/333) ([kevin-bates](https://github.com/kevin-bates))
253244
- Asynchronous Contents API [\#324](https://github.com/jupyter-server/jupyter_server/pull/324) ([mwakaba2](https://github.com/mwakaba2))
254245

255-
256246
## 1.0.6 (2020-11-18)
257247

258248
1.0.6 is a security release, fixing one vulnerability:
@@ -261,7 +251,6 @@ This was a broken release and was yanked from PyPI.
261251

262252
- Fix open redirect vulnerability GHSA-grfj-wjv9-4f9v (CVE-2020-26232)
263253

264-
265254
## 1.0 (2020-9-18)
266255

267256
### Added.
@@ -293,15 +282,13 @@ This was a broken release and was yanked from PyPI.
293282
* Changed ExtensionApp mixin to inherit from `HasTraits`. This broke in traitlets 5.0 ([294](https://github.com/jupyter/jupyter_server/pull/294))
294283
* Replaces `urlparse` with `url_path_join` to prevent URL squashing issues. ([304](https://github.com/jupyter/jupyter_server/pull/304))
295284

296-
297285
## [0.3] - 2020-4-22
298286

299287
### Added
300288

301289
- ([#191](https://github.com/jupyter/jupyter_server/pull/191)) Async kernel managment is now possible using the `AsyncKernelManager` from `jupyter_client`
302290
- ([#201](https://github.com/jupyter/jupyter_server/pull/201)) Parameters can now be passed to new terminals created by the `terminals` REST API.
303291

304-
305292
### Changed
306293

307294
- ([#196](https://github.com/jupyter/jupyter_server/pull/196)) Documentation was rewritten + refactored to use pydata_sphinx_theme.
@@ -311,7 +298,6 @@ This was a broken release and was yanked from PyPI.
311298

312299
- ([#194](https://github.com/jupyter/jupyter_server/pull/194)) The bundlerextension entry point was removed.
313300

314-
315301
## [0.2.1] - 2020-1-10
316302

317303
### Added

CONTRIBUTING.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,4 +99,4 @@ Windows users can find ``make.bat`` in the ``docs`` folder.
9999

100100
You should also have a look at the `Project Jupyter Documentation Guide`__.
101101

102-
__ https://jupyter.readthedocs.io/en/latest/contrib_docs/index.html
102+
__ https://jupyter.readthedocs.io/en/latest/contributing/content-contributor.html

MANIFEST.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ include README.md
44
include RELEASE.md
55
include CHANGELOG.md
66
include setupbase.py
7+
include package.json
78

89
# include everything in package_data
910
recursive-include jupyter_server *

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ For more information, read our [documentation here](http://jupyter-server.readth
1212
To install the latest release locally, make sure you have
1313
[pip installed](https://pip.readthedocs.io/en/stable/installing/) and run:
1414

15-
$ pip install jupyter_server
15+
pip install jupyter_server
1616

1717
Jupyter Server currently supports Python>=3.6 on Linux, OSX and Windows.
1818

@@ -31,14 +31,14 @@ To see the changes between releases, checkout the [CHANGELOG](https://github.com
3131

3232
Launch with:
3333

34-
$ jupyter server
34+
jupyter server
3535

3636
### Testing
3737

3838
To test an installed `jupyter_server`, run the following:
3939

40-
$ pip install jupyter_server[test]
41-
$ pytest jupyter_server
40+
pip install jupyter_server[test]
41+
pytest jupyter_server
4242

4343
## Contributing
4444

RELEASE.md

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,44 @@
11
# Making a Jupyter Server Release
22
To create a release, perform the following steps...
33

4-
## Remove untracked files
4+
## Set up
55
```
6+
pip install tbump twine build
7+
git pull origin $(git branch --show-current)
68
git clean -dffx
79
```
810

911
## Update the version and apply the tag
1012
```
11-
vim jupyter_server/_version.py
12-
export script_version=`python setup.py --version 2>/dev/null`
13-
git commit -a -m "Release $script_version"
14-
git tag $script_version
13+
echo "Enter new version"
14+
read script_version
15+
tbump ${script_version}
16+
git commit -a -m "Release ${script_version}"
17+
git tag $script_version -m "Release ${script_version}"
1518
```
1619

1720
## Build the artifacts
1821
```
1922
rm -rf dist
20-
python setup.py sdist
21-
python setup.py bdist_wheel
23+
python -m build .
2224
```
2325

2426
## Update the version back to dev
2527
```
26-
vim jupyter_server/_version.py
28+
echo "Enter dev version"
29+
read dev_version
30+
tbump ${dev_version}
2731
git commit -a -m "Back to dev version"
2832
```
2933

3034
## Push the commits and tag
3135
```
32-
git push --all
33-
git push --tags
36+
git push origin $(git branch --show-current)
37+
git push origin --tags
3438
```
3539

3640
## Publish the artifacts to pypi
3741
```
38-
pip install twine
39-
twine check dist/*
42+
twine check dist/*
4043
twine upload dist/*
4144
```

jupyter_server/_version.py

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,8 @@
22
store the current version info of the server.
33
44
"""
5+
from jupyter_packaging import get_version_info
56

6-
# Downstream maintainer, when running `python.setup.py jsversion`,
7-
# the version string is propagated to the JavaScript files, do not forget to
8-
# patch the JavaScript files in `.postN` release done by distributions.
9-
10-
# Next beta/alpha/rc release: The version number for beta is X.Y.ZbN **without dots**.
11-
# However, be sure to INCLUDE a dot prefix when adding the dev release: X.Y.Z.devN
12-
# See: https://www.python.org/dev/peps/pep-0440/#public-version-identifiers
13-
14-
version_info = (1, 7, 0, '.dev0')
15-
__version__ = '.'.join(map(str, version_info[:3])) + ''.join(version_info[3:])
7+
# Version string must appear intact for tbump versioning
8+
__version__ = '1.7.0.dev0'
9+
version_info = get_version_info(__version__)

0 commit comments

Comments
 (0)