Skip to content

Commit

Permalink
Prepare for Jupyter Releaser
Browse files Browse the repository at this point in the history
  • Loading branch information
davidbrochart committed Oct 14, 2021
1 parent 441135a commit ef29522
Show file tree
Hide file tree
Showing 6 changed files with 141 additions and 1 deletion.
75 changes: 75 additions & 0 deletions .github/workflows/check-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
name: Check Release
on:
push:
branches: ["master"]
pull_request:
branches: ["*"]

permissions:
contents: write

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: Install node
uses: actions/setup-node@v2
with:
node-version: "14.x"
# Cache yarn
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- name: Cache yarn
uses: actions/cache@v2
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Get pip cache dir
id: pip-cache
run: |
echo "::set-output name=dir::$(pip cache dir)"
- name: Cache pip
uses: actions/cache@v1
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 --pre jupyterlab
./dev-install.sh
- name: Check Release
if: ${{ matrix.group == 'check_release' }}
uses: jupyter-server/jupyter_releaser/.github/actions/check-release@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Check Links
if: ${{ matrix.group == 'link_check' }}
uses: jupyter-server/jupyter_releaser/.github/actions/check-links@v1
File renamed without changes.
8 changes: 8 additions & 0 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#!/usr/bin/env python3
#

import os.path as osp
import shutil

# -- source files and parsers -----------------------------------

Expand Down Expand Up @@ -135,3 +137,9 @@
'includehidden': True,
'titles_only': False
}


def setup(app):
HERE = osp.abspath(osp.dirname(__file__))
dest = osp.join(HERE, 'changelog.md')
shutil.copy(osp.join(HERE, '..', '..', 'CHANGELOG.md'), dest)
17 changes: 17 additions & 0 deletions jupyterlab_widgets/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,20 @@ npm = ["jlpm"]

[tool.check-manifest]
ignore = ["jupyterlab_widgets/labextension/**", "yarn.lock", ".*", "package-lock.json"]

[tool.tbump.version]
current = "2.0.0a3"
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 = "jupyterlab_widgets/_version.py"

[tool.jupyter-releaser]
skip = ["check-links"]
25 changes: 24 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,27 @@
# These are the assumed default build requirements from pip:
# https://pip.pypa.io/en/stable/reference/pip/#pep-517-and-518-support
requires = ["setuptools>=40.8.0", "wheel"]
build-backend = "setuptools.build_meta"
build-backend = "setuptools.build_meta"

[tool.check-manifest]
ignore = [".*"]

[tool.tbump.version]
current = "8.0.0a6"
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 = "ipywidgets/_version.py"

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

[tool.jupyter-releaser.options]
python_packages = [".", "jupyterlab_widgets", "widgetsnbextension"]
17 changes: 17 additions & 0 deletions widgetsnbextension/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,20 @@ npm = ["yarn"]

[tool.check-manifest]
ignore = ["widgetnbextension/static/**", "yarn.lock", ".*", "package-lock.json"]

[tool.tbump.version]
current = "4.0.0a4"
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 = "widgetsnbextension/_version.py"

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

0 comments on commit ef29522

Please sign in to comment.