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

Bump dependencies to fix CI #335

Merged
merged 3 commits into from
Aug 13, 2024
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
6 changes: 3 additions & 3 deletions projects/jupyter-collaboration/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ classifiers = [
"Framework :: Jupyter :: JupyterLab :: Extensions :: Prebuilt",
]
dependencies = [
"jupyter-server-ydoc>=1.0.0a0",
"jupyter-collaboration-ui>=1.0.0a0",
"jupyter-docprovider>=1.0.0a0"
"jupyter-server-ydoc>=1.0.0b1",
"jupyter-collaboration-ui>=1.0.0b1",
"jupyter-docprovider>=1.0.0b1"
]
dynamic = ["version"]

Expand Down
5 changes: 3 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ dynamic = ["version"]
dev = [
"click",
"pre-commit",
"jupyter_releaser"
"jupyter_releaser",
"tomlkit"
]
test = [
"jupyter-server-ydoc[test] @ {root:uri}/projects/jupyter-server-ydoc",
Expand Down Expand Up @@ -80,7 +81,7 @@ before-build-python = [
"jlpm clean:lib"
]
before-bump-version = [
"python -m pip install -U jupyterlab",
"python -m pip install -U jupyterlab tomlkit",
"jlpm"
]

Expand Down
16 changes: 16 additions & 0 deletions scripts/bump_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
from pathlib import Path

import click
import tomlkit
from jupyter_releaser.util import get_version, run
from pkg_resources import parse_version # type: ignore

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

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

project_pins = {}

# bump the Python packages
for version_file in HERE.glob("projects/**/_version.py"):
content = version_file.read_text().splitlines()
Expand All @@ -92,6 +95,19 @@ def bump(force, skip_if_dirty, spec):
current = current.strip("'\"")
version_spec = increment_version(current, spec)
version_file.write_text(f'__version__ = "{version_spec}"\n')
project = version_file.parent.name
project_pins[project] = version_spec

# bump the required version in jupyter-collaboration metapackage
# to ensure that users can just upgrade `jupyter-collaboration`
# and get all fixes for free
metapackage = "jupyter-collaboration"
metapackage_toml_path = HERE / "projects" / metapackage / "pyproject.toml"
metapackage_toml = tomlkit.parse(metapackage_toml_path.read_text())
metapackage_toml["dependencies"] = [
key + ">=" + project_pins[key] for key in sorted(project_pins) if key != metapackage
]
metapackage_toml_path.write_text(tomlkit.dumps(metapackage_toml))

path = HERE.joinpath("package.json")
if path.exists():
Expand Down
Loading