Skip to content

Commit 7ea2cd5

Browse files
authored
Bump dependencies to fix CI (#335)
* Bump dependencies to fix CI * Update metapackage on release * Install `tomlkit` before version bump
1 parent f04736a commit 7ea2cd5

File tree

3 files changed

+22
-5
lines changed

3 files changed

+22
-5
lines changed

projects/jupyter-collaboration/pyproject.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@ classifiers = [
2929
"Framework :: Jupyter :: JupyterLab :: Extensions :: Prebuilt",
3030
]
3131
dependencies = [
32-
"jupyter-server-ydoc>=1.0.0a0",
33-
"jupyter-collaboration-ui>=1.0.0a0",
34-
"jupyter-docprovider>=1.0.0a0"
32+
"jupyter-server-ydoc>=1.0.0b1",
33+
"jupyter-collaboration-ui>=1.0.0b1",
34+
"jupyter-docprovider>=1.0.0b1"
3535
]
3636
dynamic = ["version"]
3737

pyproject.toml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ dynamic = ["version"]
2323
dev = [
2424
"click",
2525
"pre-commit",
26-
"jupyter_releaser"
26+
"jupyter_releaser",
27+
"tomlkit"
2728
]
2829
test = [
2930
"jupyter-server-ydoc[test] @ {root:uri}/projects/jupyter-server-ydoc",
@@ -80,7 +81,7 @@ before-build-python = [
8081
"jlpm clean:lib"
8182
]
8283
before-bump-version = [
83-
"python -m pip install -U jupyterlab",
84+
"python -m pip install -U jupyterlab tomlkit",
8485
"jlpm"
8586
]
8687

scripts/bump_version.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
from pathlib import Path
66

77
import click
8+
import tomlkit
89
from jupyter_releaser.util import get_version, run
910
from pkg_resources import parse_version # type: ignore
1011

@@ -80,6 +81,8 @@ def bump(force, skip_if_dirty, spec):
8081

8182
HERE = Path(__file__).parent.parent.resolve()
8283

84+
project_pins = {}
85+
8386
# bump the Python packages
8487
for version_file in HERE.glob("projects/**/_version.py"):
8588
content = version_file.read_text().splitlines()
@@ -92,6 +95,19 @@ def bump(force, skip_if_dirty, spec):
9295
current = current.strip("'\"")
9396
version_spec = increment_version(current, spec)
9497
version_file.write_text(f'__version__ = "{version_spec}"\n')
98+
project = version_file.parent.name
99+
project_pins[project] = version_spec
100+
101+
# bump the required version in jupyter-collaboration metapackage
102+
# to ensure that users can just upgrade `jupyter-collaboration`
103+
# and get all fixes for free
104+
metapackage = "jupyter-collaboration"
105+
metapackage_toml_path = HERE / "projects" / metapackage / "pyproject.toml"
106+
metapackage_toml = tomlkit.parse(metapackage_toml_path.read_text())
107+
metapackage_toml["dependencies"] = [
108+
key + ">=" + project_pins[key] for key in sorted(project_pins) if key != metapackage
109+
]
110+
metapackage_toml_path.write_text(tomlkit.dumps(metapackage_toml))
95111

96112
path = HERE.joinpath("package.json")
97113
if path.exists():

0 commit comments

Comments
 (0)