Skip to content

Commit 614e478

Browse files
authored
Use hatch backend (#6425)
1 parent 3760a38 commit 614e478

File tree

15 files changed

+155
-210
lines changed

15 files changed

+155
-210
lines changed

.bumpversion.cfg

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@ current_version = 7, 0, 0, "alpha", 4
33
commit = False
44
tag = False
55
parse = (?P<major>\d+)\,\ (?P<minor>\d+)\,\ (?P<patch>\d+)\,\ \"(?P<release>\S+)\"\,\ (?P<build>\d+)
6-
serialize =
6+
serialize =
77
{major}, {minor}, {patch}, "{release}", {build}
88

99
[bumpversion:part:release]
1010
optional_value = final
11-
values =
11+
values =
1212
alpha
1313
beta
1414
candidate

.flake8

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
[flake8]
2+
ignore = E501, W503, E402
3+
builtins = c, get_config
4+
exclude =
5+
.cache,
6+
.github,
7+
docs,
8+
enable-extensions = G
9+
extend-ignore =
10+
G001, G002, G004, G200, G201, G202,
11+
# black adds spaces around ':'
12+
E203,

.github/workflows/build.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ jobs:
3232

3333
test:
3434
runs-on: ubuntu-latest
35+
timeout-minutes: 10
3536
steps:
3637
- name: Checkout
3738
uses: actions/checkout@v2
@@ -43,7 +44,7 @@ jobs:
4344

4445
- name: Install the package
4546
run: |
46-
python -m pip install ".[test]"
47+
python -m pip install ".[dev,test]"
4748
jlpm run build:test
4849
4950
- name: Unit tests
@@ -60,6 +61,7 @@ jobs:
6061
install:
6162
needs: [build]
6263
runs-on: ${{ matrix.os }}
64+
timeout-minutes: 10
6365
strategy:
6466
fail-fast: false
6567
matrix:

.github/workflows/buildutils.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ concurrency:
1616
jobs:
1717
versioning:
1818
runs-on: ubuntu-latest
19+
timeout-minutes: 10
1920
steps:
2021
- name: Checkout
2122
uses: actions/checkout@v2
@@ -25,7 +26,7 @@ jobs:
2526

2627
- name: Install dependencies
2728
run: |
28-
python -m pip install -U "jupyterlab>=4.0.0a25,<5" jupyter_packaging~=0.10
29+
python -m pip install -U "jupyterlab>=4.0.0a25,<5" hatch
2930
jlpm
3031
jlpm run build
3132
@@ -80,6 +81,6 @@ jobs:
8081

8182
- name: Install dependencies
8283
run: |
83-
python -m pip install -U "jupyterlab>=4.0.0a25,<5" jupyter_packaging~=0.10 pip
84+
python -m pip install -U "jupyterlab>=4.0.0a25,<5" pip
8485
jlpm
8586
jlpm run build

.github/workflows/check-release.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ concurrency:
1515
jobs:
1616
check_release:
1717
runs-on: ubuntu-latest
18+
timeout-minutes: 30
1819
strategy:
1920
matrix:
2021
group: [check_release, link_check]
@@ -36,3 +37,10 @@ jobs:
3637
- name: Check Links
3738
if: ${{ matrix.group == 'link_check' }}
3839
uses: jupyter-server/jupyter_releaser/.github/actions/check-links@v1
40+
41+
- name: Upload Distributions
42+
uses: actions/upload-artifact@v2
43+
if: ${{ matrix.group == 'check_release' }}
44+
with:
45+
name: notebook-jupyter-releaser-dist-${{ github.run_number }}
46+
path: .jupyter_releaser_checkout/dist

.github/workflows/docs.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ concurrency:
1111
jobs:
1212
build:
1313
runs-on: ubuntu-latest
14+
timeout-minutes: 10
1415
steps:
1516
- name: Checkout
1617
uses: actions/checkout@v2
@@ -20,7 +21,7 @@ jobs:
2021
python_version: '3.7'
2122
- name: Install the Python dependencies
2223
run: |
23-
pip install -e .[test] codecov
24+
pip install -e .[dev,test] codecov
2425
pip install -r docs/doc-requirements.txt
2526
wget https://github.com/jgm/pandoc/releases/download/1.19.1/pandoc-1.19.1-1-amd64.deb && sudo dpkg -i pandoc-1.19.1-1-amd64.deb
2627
- name: List installed packages

.github/workflows/ui-tests.yml

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ jobs:
2424
ui-tests:
2525
needs: [build]
2626
runs-on: ubuntu-latest
27+
timeout-minutes: 10
2728
strategy:
2829
fail-fast: false
2930
matrix:
@@ -32,21 +33,14 @@ jobs:
3233
- name: Checkout
3334
uses: actions/checkout@v2
3435

35-
- name: Install Python
36-
uses: actions/setup-python@v2
37-
with:
38-
python-version: '3.9'
39-
architecture: 'x64'
36+
- name: Base Setup
37+
uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
4038

4139
- uses: actions/download-artifact@v2
4240
with:
4341
name: notebook-dist-${{ github.run_number }}
4442
path: ./dist
4543

46-
- name: Install the prerequisites
47-
run: |
48-
python -m pip install pip wheel
49-
5044
- name: Install the package
5145
run: |
5246
cd dist

CONTRIBUTING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ mamba create -n notebook -c conda-forge python nodejs -y
2222
mamba activate notebook
2323

2424
# Install package in development mode
25-
pip install -e .
25+
pip install -e ".[dev,test]"
2626

2727
# Link the notebook extension and @jupyter-notebook schemas
2828
jlpm develop
@@ -107,7 +107,7 @@ speeding up the review process.
107107
As long as your code is valid,
108108
the pre-commit hook should take care of how it should look.
109109
`pre-commit` and its associated hooks will automatically be installed when
110-
you run `pip install -e ".[test]"`
110+
you run `pip install -e ".[dev,test]"`
111111

112112
To install `pre-commit` manually, run the following:
113113

MANIFEST.in

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

buildutils/src/develop.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,10 @@ commander
4343
);
4444
if (overwrite) {
4545
try {
46-
fs.unlinkSync(destDir);
47-
console.log('Removed previous symlink:', destDir);
46+
fs.removeSync(destDir);
47+
console.log('Removed previous destination:', destDir);
4848
} catch (e) {
49-
console.info('Skip unlinkink', destDir);
49+
console.info('Skip unlink', destDir);
5050
}
5151
}
5252
console.log('Symlinking:', sourceDir, destDir);

0 commit comments

Comments
 (0)