Skip to content

Commit

Permalink
Switch to using hatch version (#186)
Browse files Browse the repository at this point in the history
  • Loading branch information
blink1073 authored Sep 22, 2022
1 parent 5c19d2f commit bda5569
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 34 deletions.
8 changes: 0 additions & 8 deletions .github/workflows/check-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,13 @@ concurrency:
jobs:
check_release:
runs-on: ubuntu-latest
strategy:
matrix:
group: [check_release, link_check]
fail-fast: false
steps:
- uses: actions/checkout@v2
- uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
- name: Install Dependencies
run: |
pip install -e .
- name: Check Release
if: ${{ matrix.group == 'check_release' }}
uses: jupyter-server/jupyter_releaser/.github/actions/check-release@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Run Link Check
if: ${{ matrix.group == 'link_check' }}
uses: jupyter-server/jupyter_releaser/.github/actions/check-links@v1
10 changes: 8 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,14 +94,20 @@ jobs:
- uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
- uses: jupyterlab/maintainer-tools/.github/actions/test-sdist@v1

check-links:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
- uses: jupyterlab/maintainer-tools/.github/actions/check-links@v1

# Run "pre-commit run --all-files --hook-stage=manual"
pre-commit:
name: Run pre-commit hook
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Checkout
uses: actions/checkout@v2
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v3
- name: Run pre-commit
Expand Down
11 changes: 5 additions & 6 deletions RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,13 @@ To create a manual release, update the version number in `terminado/__init__.py`

```
git clean -dffx
python setup.py sdist
python setup.py bdist_wheel
export script_version=`python setup.py --version 2>/dev/null`
pip install pipx
pipx run build
export script_version=`pipx run hatch version 2>/dev/null`
git commit -a -m "Release $script_version"
git tag $script_version
git push --all
git push --tags
pip install twine
twine check dist/*
twine upload dist/*
pipx run twine check dist/*
pipx run twine upload dist/*
```
22 changes: 4 additions & 18 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
[build-system]
requires = ["hatchling>=0.25"]
requires = ["hatchling>=1.5"]
build-backend = "hatchling.build"

[project]
name = "terminado"
version = "0.15.0"
dynamic = ["version"]
license = { file = "LICENSE" }
description = "Tornado websocket backend for the Xterm.js Javascript terminal emulator library."
classifiers = [ "Environment :: Web Environment", "License :: OSI Approved :: BSD License", "Programming Language :: Python :: 3", "Topic :: Terminals :: Terminal Emulators/X Terminals",]
Expand All @@ -28,22 +28,8 @@ test = [ "pytest>=6.0", "pre-commit", "pytest-timeout",]
[tool.jupyter-releaser]
skip = ["check-links"]

[tool.tbump.version]
current = "0.15.0"
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 = "terminado/__init__.py"

[[tool.tbump.file]]
src = "pyproject.toml"
[tool.hatch.version]
path = "terminado/__init__.py"

[tool.pytest.ini_options]
addopts = "-raXs --durations 10 --color=yes --doctest-modules"
Expand Down

0 comments on commit bda5569

Please sign in to comment.