Skip to content

Commit 7a6bbfe

Browse files
authored
Merge pull request #281 from blink1073/use-hatch
2 parents 6db557c + 1f64b07 commit 7a6bbfe

File tree

10 files changed

+91
-137
lines changed

10 files changed

+91
-137
lines changed

.github/workflows/python-package.yml

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,9 @@ jobs:
4545
- uses: actions/setup-python@v2
4646
- name: Linting
4747
run: |
48-
pip install check-manifest mypy
49-
check-manifest
48+
pip install Flake8-pyproject mypy
5049
mypy jupyter_console
50+
flake8 jupyter_console
5151
5252
check_release:
5353
runs-on: ubuntu-latest
@@ -65,7 +65,7 @@ jobs:
6565
- uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
6666
- uses: jupyterlab/maintainer-tools/.github/actions/check-links@v1
6767

68-
test_minimum_verisons:
68+
test_minimum_versions:
6969
name: Test Minimum Versions
7070
runs-on: ubuntu-latest
7171
timeout-minutes: 10
@@ -78,3 +78,18 @@ jobs:
7878
run: |
7979
pip install ".[test]"
8080
pytest || pytest --lf
81+
82+
tests_check: # This job does nothing and is only used for the branch protection
83+
if: always()
84+
needs:
85+
- build
86+
- lint
87+
- check_release
88+
- check_links
89+
- test_minimum_versions
90+
runs-on: ubuntu-latest
91+
steps:
92+
- name: Decide whether the needed jobs succeeded or failed
93+
uses: re-actors/alls-green@release/v1
94+
with:
95+
jobs: ${{ toJSON(needs) }}
File renamed without changes.

MANIFEST.in

Lines changed: 0 additions & 29 deletions
This file was deleted.

RELEASING.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@ The recommended way to make a release is to use [`jupyter_releaser`](https://git
99
### Prerequisites
1010

1111
- First check that the CHANGELOG.md is up to date for the next release version
12-
- Install packaging requirements: `pip install tbump build tomlkit==0.7.0`
12+
- Install packaging requirements: `pip install hatch twine`
1313

1414
### Bump version
1515

1616
- `export version=<NEW_VERSION>`
17-
- `tbump ${version} --no-push`
17+
- `hatch version ${version}`
1818

1919
### Push to GitHub
2020

@@ -27,6 +27,6 @@ git push upstream && git push upstream --tags
2727
```bash
2828
rm -rf dist/*
2929
rm -rf build/*
30-
python -m build .
30+
hatch build .
3131
twine upload dist/*
3232
```

jupyter_console/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
"""Jupyter terminal console"""
22

3-
from ._version import version_info, __version__
3+
from ._version import version_info, __version__ # noqa

jupyter_console/tests/test_console.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
from traitlets.tests.utils import check_help_all_output
1616

1717

18-
should_skip = sys.platform == "win32" or sys.version_info < (3,8) or sys.version_info[:2] == (3, 10)
18+
should_skip = sys.platform == "win32" or sys.version_info < (3,8) or sys.version_info[:2] == (3, 10) # noqa
1919

2020

2121
@flaky

pyproject.toml

Lines changed: 68 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,75 @@
11
[build-system]
2-
requires = ["setuptools>=40.8.0", "wheel"]
3-
build-backend = "setuptools.build_meta"
2+
requires = ["hatchling>=1.5"]
3+
build-backend = "hatchling.build"
4+
5+
[project]
6+
name = "jupyter-console"
7+
dynamic = ["version"]
8+
description = "Jupyter terminal console"
9+
readme = "README.md"
10+
license = { file= "LICENSE" }
11+
requires-python = ">=3.7"
12+
authors = [
13+
{ name = "Jupyter Development Team", email = "[email protected]" },
14+
]
15+
keywords = [
16+
"Interactive",
17+
"Interpreter",
18+
"Shell",
19+
"Web",
20+
]
21+
classifiers = [
22+
"Intended Audience :: Developers",
23+
"Intended Audience :: Science/Research",
24+
"Intended Audience :: System Administrators",
25+
"License :: OSI Approved :: BSD License",
26+
"Programming Language :: Python",
27+
"Programming Language :: Python :: 3",
28+
"Programming Language :: Python :: 3.7",
29+
"Programming Language :: Python :: 3.8",
30+
"Programming Language :: Python :: 3.9",
31+
"Programming Language :: Python :: 3.10",
32+
"Programming Language :: Python :: 3.11",
33+
]
34+
dependencies = [
35+
"ipykernel>=6.14",
36+
"ipython",
37+
"jupyter_client>=7.0.0",
38+
"jupyter_core>=4.12,!=5.0.*",
39+
"prompt_toolkit>=3.0.30",
40+
"pygments",
41+
"pyzmq>=17",
42+
"traitlets>=5.4",
43+
]
44+
45+
[project.optional-dependencies]
46+
test = [
47+
"pexpect",
48+
"pytest",
49+
"flaky",
50+
]
51+
52+
[project.scripts]
53+
jupyter-console = "jupyter_console.app:main"
54+
55+
[project.urls]
56+
Homepage = "https://jupyter.org"
57+
58+
[tool.hatch.version]
59+
path = "jupyter_console/_version.py"
60+
61+
[tool.hatch.build.targets.sdist]
62+
include = [
63+
"/jupyter_console",
64+
]
465

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

8-
[tool.check-manifest]
9-
ignore = [".mailmap", "*.yml", "*.yaml"]
10-
11-
[tool.tbump.version]
12-
current = "6.5.1"
13-
regex = '''
14-
(?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)
15-
((?P<channel>a|b|rc|.dev)(?P<release>\d+))?
16-
'''
69+
[tool.pytest.ini_options]
70+
addopts = "--durations=10"
1771

18-
[tool.tbump.git]
19-
message_template = "Bump to {new_version}"
20-
tag_template = "v{new_version}"
72+
[tool.flake8]
73+
max-line-length = "99"
74+
ignore = "W291, E266, E265, E128, E251, E402, E124, E302, W293, E231, E222, W503, E126, E121, W391, E226, E127, W504"
2175

22-
[[tool.tbump.file]]
23-
src = "jupyter_console/_version.py"

pytest.ini

Lines changed: 0 additions & 2 deletions
This file was deleted.

setup.cfg

Lines changed: 0 additions & 8 deletions
This file was deleted.

setup.py

Lines changed: 0 additions & 74 deletions
This file was deleted.

0 commit comments

Comments
 (0)