Skip to content

Commit de97d35

Browse files
Split up the backend, frontend, and the docprovider (#280)
* Split up the backend, frontend, and the docprovider * Fix LICENSE issue * Try a different way * Include LICENSE copies in git for simplicity * Test creating sdist for projects, not the root metapackage * Without concurrency * Fix sdist install * Include tests in `jupyter-server-ydoc` * Move test dependencies, align indent * Fix module name * Hopefully final test to sdist test * Only run pytest where needed * Add Python 3.12 version classifier Co-authored-by: David Brochart <[email protected]> * Implement independent version bumps, and minor/major/release specifiers * Bump all version to 3.0.0-alpha.0 * Reset versions for the three Python packages to 1.0.0a0 * Improve wording Co-authored-by: David Brochart <[email protected]> * Raise rather than assert --------- Co-authored-by: David Brochart <[email protected]>
1 parent cf774a4 commit de97d35

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

66 files changed

+1360
-584
lines changed

.github/workflows/test.yml

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ jobs:
114114
- name: Run the tests with Coverage
115115
if: ${{ !startsWith(matrix.python-version, 'pypy') && !startsWith(runner.os, 'Windows') }}
116116
run: |
117-
python -m pytest -vv --cov jupyter_collaboration --cov-branch --cov-report term-missing:skip-covered
117+
python -m pytest -vv --cov jupyter_server_ydoc --cov-branch --cov-report term-missing:skip-covered
118118
119119
#- name: Run the tests on pypy
120120
# if: ${{ startsWith(matrix.python-version, 'pypy') }}
@@ -126,7 +126,7 @@ jobs:
126126
- name: Run the tests on Windows
127127
if: ${{ startsWith(runner.os, 'Windows') }}
128128
run: |
129-
python -W ignore::ImportWarning -m pytest -vv --cov jupyter_collaboration --cov-branch --cov-report term-missing:skip-covered
129+
python -W ignore::ImportWarning -m pytest -vv --cov jupyter_server_ydoc --cov-branch --cov-report term-missing:skip-covered
130130
131131
- uses: jupyterlab/maintainer-tools/.github/actions/upload-coverage@v1
132132

@@ -136,7 +136,7 @@ jobs:
136136
run: |
137137
set -eux
138138
jupyter server extension list
139-
jupyter server extension list 2>&1 | grep -ie "jupyter_collaboration.*OK"
139+
jupyter server extension list 2>&1 | grep -ie "jupyter_server_ydoc.*OK"
140140
jupyter labextension list
141141
jupyter labextension list 2>&1 | grep -ie "@jupyter/collaboration-extension.*OK"
142142
python -m jupyterlab.browser_check
@@ -196,7 +196,15 @@ jobs:
196196
steps:
197197
- uses: actions/checkout@v3
198198
- uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
199-
- uses: jupyterlab/maintainer-tools/.github/actions/make-sdist@v1
199+
- name: Build SDist
200+
shell: bash
201+
run: |
202+
pip install build
203+
find projects/* -maxdepth 0 -type d | xargs -L 1 python -m build --sdist --outdir dist/
204+
- uses: actions/upload-artifact@v3
205+
with:
206+
name: "sdist"
207+
path: dist/*.tar.gz
200208

201209
test_sdist:
202210
runs-on: ubuntu-latest
@@ -216,10 +224,11 @@ jobs:
216224
set -ex
217225
cd sdist
218226
mkdir test
219-
tar --strip-components=1 -zxvf *.tar.gz -C ./test
227+
find *.tar.gz | xargs -L 1 tar -C ./test -zxvf
220228
cd test
221229
python -m pip install "jupyterlab>=4.0.0,<5"
222-
python -m pip install ".[test]"
230+
# install each from source, except for `jupyter_collaboration` metapackage
231+
find ./* -maxdepth 0 -type d -not -path './jupyter_collaboration-*' | sed 's/$/[test]/' | xargs -L 1 python -m pip install
223232
echo "::endgroup::"
224233
225234
- name: Run Test
@@ -228,10 +237,14 @@ jobs:
228237
echo "::group::Run test"
229238
set -ex
230239
cd sdist/test
240+
241+
# for now only `jupyter_server_ydoc` includes python tests
242+
cd jupyter_server_ydoc*
231243
python -m pytest -vv -raXxs --durations 10 --color=yes
244+
cd ..
232245
233246
jupyter server extension list
234-
jupyter server extension list 2>&1 | grep -ie "jupyter_collaboration.*OK"
247+
jupyter server extension list 2>&1 | grep -ie "jupyter_server_ydoc.*OK"
235248
jupyter labextension list
236249
jupyter labextension list 2>&1 | grep -ie "@jupyter/collaboration-extension.*OK"
237250
python -m jupyterlab.browser_check --no-browser-test

.gitignore

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,8 @@ node_modules/
99
*.tsbuildinfo
1010
package-lock.json
1111
docs/source/ts
12-
jupyter_collaboration/labextension
13-
14-
# Version file is handled by hatchling
15-
jupyter_collaboration/_version.py
12+
.jupyter
13+
labextension
1614

1715
# Integration tests
1816
ui-tests/test-results/

.licenserc.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,6 @@ header:
2424
- 'coverage'
2525
- 'LICENSE'
2626
- 'yarn.lock'
27+
- '**/_version.py'
2728

2829
comment: on-failure

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ repos:
6060
rev: v0.991
6161
hooks:
6262
- id: mypy
63-
exclude: "^binder/jupyter_config\\.py$"
63+
exclude: "(^binder/jupyter_config\\.py$)|(/setup\\.py$)"
6464
args: ["--config-file", "pyproject.toml"]
6565
additional_dependencies: [tornado, pytest]
6666
stages: [manual]

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
# Jupyter Real-Time Collaboration
22

3-
[![Build Status](https://github.com/jupyterlab/jupyter_collaboration/actions/workflows/test.yml/badge.svg?query=branch%3Amain++)](https://github.com/jupyterlab/jupyter_collaboration/actions?query=branch%3Amain++)[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/jupyterlab/jupyter_collaboration/main)[![PyPI](https://img.shields.io/pypi/v/jupyter-collaboration)](https://pypi.org/project/jupyter-collaboration)[![npm](https://img.shields.io/npm/v/@jupyter/collaboration-extension)](https://www.npmjs.com/package/@jupyter/collaboration-extension)
3+
[![Build Status](https://github.com/jupyterlab/jupyter_collaboration/actions/workflows/test.yml/badge.svg?query=branch%3Amain++)](https://github.com/jupyterlab/jupyter_collaboration/actions?query=branch%3Amain++)
4+
[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/jupyterlab/jupyter_collaboration/main)
5+
[![PyPI](https://img.shields.io/pypi/v/jupyter-collaboration)](https://pypi.org/project/jupyter-collaboration)
6+
[![npm](https://img.shields.io/npm/v/@jupyter/collaboration-extension)](https://www.npmjs.com/package/@jupyter/collaboration-extension)
47

58
JupyterLab Real-Time Collaboration is a Jupyter Server Extension and JupyterLab extensions providing support for [Y documents](https://github.com/jupyter-server/jupyter_ydoc) and adding collaboration UI elements in JupyterLab.
69

RELEASE.md

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,20 @@
1-
# Making a Jupyter Server Release
1+
# Making a jupyter-collaboration Release
22

33
## Using `jupyter_releaser`
44

55
The recommended way to make a release is to use [`jupyter_releaser`](https://github.com/jupyter-server/jupyter_releaser#checklist-for-adoption).
6+
7+
## Version specification
8+
9+
Here is an example of how version numbers progress through a release process.
10+
Input appropriate specifier into the `jupyter-releaser` workflow dispatch dialog to bump version numbers for this release.
11+
12+
| Command | Python Version Change | NPM Version change |
13+
| --------- | --------------------- | ---------------------------------- |
14+
| `major` | x.y.z-> (x+1).0.0.a0 | All a.b.c -> a.(b+10).0-alpha.0 |
15+
| `minor` | x.y.z-> x.(y+1).0.a0 | All a.b.c -> a.(b+1).0-alpha.0 |
16+
| `build` | x.y.z.a0-> x.y.z.a1 | All a.b.c-alpha.0 -> a.b.c-alpha.1 |
17+
| `release` | x.y.z.a1-> x.y.z.b0 | All a.b.c-alpha.1 -> a.b.c-beta.0 |
18+
| `release` | x.y.z.b1-> x.y.z.rc0 | All a.b.c-beta.1 -> a.b.c-rc.0 |
19+
| `release` | x.y.z.rc0-> x.y.z | All a.b.c-rc0 -> a.b.c |
20+
| `patch` | x.y.z -> x.y.(z+1) | Changed a.b.c -> a.b.(c+1) |

docs/source/developer/contributing.rst

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,13 @@ steps:
3939
pip install --upgrade pip
4040
git clone https://github.com/jupyterlab/jupyter_collaboration
4141
cd jupyter_collaboration
42+
# install monorepo
4243
pip install -e ".[dev,test]"
43-
jupyter labextension develop --overwrite .
44+
# install local dependencies as editable
45+
pip install -e projects/jupyter-collaboration-ui -e projects/jupyter-docprovider -e projects/jupyter-server-ydoc
46+
# link lab extensions
47+
jupyter labextension develop --overwrite projects/jupyter-collaboration-ui
48+
jupyter labextension develop --overwrite projects/jupyter-docprovider
4449
4550
4651
If you are using a system-wide Python installation and you only want to install the server for you,

docs/source/developer/python_api.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@
44
Python API
55
==========
66

7-
``jupyter_collaboration`` instantiates :any:`YDocExtension` and stores it under ``serverapp.settings`` dictionary, under the ``"jupyter_collaboration"`` key.
7+
``jupyter_server_ydoc`` instantiates :any:`YDocExtension` and stores it under ``serverapp.settings`` dictionary, under the ``"jupyter_server_ydoc"`` key.
88
This instance can be used in other extensions to access the public API methods.
99

1010
For example, to access a read-only view of the shared notebook model in your jupyter-server extension, you can use the :any:`get_document` method:
1111

1212
.. code-block::
1313
14-
collaboration = serverapp.settings["jupyter_collaboration"]
14+
collaboration = serverapp.settings["jupyter_server_ydoc"]
1515
document = collaboration.get_document(
1616
path='Untitled.ipynb',
1717
content_type="notebook",
@@ -23,10 +23,10 @@ For example, to access a read-only view of the shared notebook model in your jup
2323
API Reference
2424
-------------
2525

26-
.. automodule:: jupyter_collaboration.app
26+
.. automodule:: jupyter_server_ydoc.app
2727
:members:
2828
:inherited-members:
2929

30-
.. automodule:: jupyter_collaboration.handlers
30+
.. automodule:: jupyter_server_ydoc.handlers
3131
:members:
3232
:inherited-members:

lerna.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"version": "2.0.11",
2+
"version": "3.0.0-alpha.0",
33
"npmClient": "yarn",
44
"useWorkspaces": true
55
}

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@jupyter/real-time-collaboration",
33
"private": true,
4-
"version": "2.0.11",
4+
"version": "3.0.0-alpha.0",
55
"description": "JupyterLab Extension enabling Real-Time Collaboration",
66
"keywords": [
77
"jupyter",
@@ -66,4 +66,4 @@
6666
"typedoc": "~0.23.28",
6767
"typescript": "~5.0.4"
6868
}
69-
}
69+
}

0 commit comments

Comments
 (0)