Skip to content

Commit a2dd977

Browse files
authored
Clean up workflow and pyproject (#884)
* clean up workflow and pyproject * cleanup * cleanup * fix testpaths
1 parent ece9e85 commit a2dd977

File tree

2 files changed

+22
-25
lines changed

2 files changed

+22
-25
lines changed

.github/workflows/main.yml

Lines changed: 19 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
with:
2727
token: ${{ secrets.GITHUB_TOKEN }}
2828

29-
check-links:
29+
check_links:
3030
runs-on: ubuntu-latest
3131
steps:
3232
- uses: actions/checkout@v3
@@ -61,56 +61,52 @@ jobs:
6161
- name: Run the tests on pypy
6262
if: ${{ startsWith(matrix.python-version, 'pypy') }}
6363
run: |
64-
hatch run test:test -W default || hatch run test:test -W default --lf
64+
hatch run test:nowarn || hatch run test:nowarn --lf
6565
- name: Run the tests on windows
6666
if: ${{ startsWith(matrix.os, 'windows') }}
6767
run: |
68-
hatch run cov:test -W default || hatch run test:test -W default --lf
68+
hatch run cov:nowarn || hatch run test:nowarn --lf
6969
- name: Code coverage
7070
run: |
7171
pip install codecov
7272
codecov
73+
7374
docs:
7475
runs-on: ubuntu-latest
7576
steps:
7677
- uses: actions/checkout@v3
7778
- uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
7879
- run: hatch run docs:build
7980

80-
test_miniumum_verisons:
81+
test_minimum_verisons:
8182
name: Test Minimum Versions
8283
runs-on: ubuntu-latest
8384
timeout-minutes: 10
8485
steps:
8586
- uses: actions/checkout@v3
86-
- name: Base Setup
87-
uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
87+
- uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
8888
with:
8989
python_version: "3.8"
90-
- name: Install miniumum versions
91-
uses: jupyterlab/maintainer-tools/.github/actions/install-minimums@v1
90+
- uses: jupyterlab/maintainer-tools/.github/actions/install-minimums@v1
91+
with:
92+
only_create_file: 1
9293
- name: Run the unit tests
93-
run: pytest -vv -W default || pytest -vv -W default --lf
94+
run: |
95+
export PIP_CONSTRAINT="./contraints_file.txt"
96+
hatch run test:nowarn || hatch run test:nowarn --lf
9497
9598
test_prereleases:
9699
name: Test Prereleases
97100
timeout-minutes: 10
98101
runs-on: ubuntu-latest
99102
steps:
100-
- name: Checkout
101-
uses: actions/checkout@v3
102-
- name: Base Setup
103-
uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
104-
- name: Install the Python dependencies
105-
run: |
106-
pip install --upgrade --upgrade-strategy eager --pre -e ".[test]"
107-
- name: List installed packages
108-
run: |
109-
pip freeze
110-
pip check
103+
- uses: actions/checkout@v3
104+
- uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
111105
- name: Run the tests
112106
run: |
113-
pytest -vv -W default || pytest -vv -W default --lf
107+
export PIP_PRE=1
108+
hatch run test:nowarn || hatch run test:nowarn --lf
109+
114110
make_sdist:
115111
name: Make SDist
116112
runs-on: ubuntu-latest
@@ -136,8 +132,8 @@ jobs:
136132
needs:
137133
- test
138134
- docs
139-
- check-links
140-
- test_miniumum_verisons
135+
- check_links
136+
- test_minimum_verisons
141137
- pre-commit
142138
- test_prereleases
143139
- test_sdist

pyproject.toml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ dependencies = [
2929
"python-dateutil>=2.8.2",
3030
"pyzmq>=23.0",
3131
"tornado>=6.2",
32-
"traitlets",
32+
"traitlets>=5.3",
3333
]
3434

3535
[[project.authors]]
@@ -97,15 +97,16 @@ dependencies = ["coverage", "pytest-cov"]
9797
ARGS = "-vv --cov jupyter_client --cov-branch --cov-report term-missing:skip-covered"
9898
[tool.hatch.envs.cov.scripts]
9999
test = "python -m pytest $ARGS {args}"
100+
nowarn = "python -m pytest $ARGS -W default {args}"
100101

101102
[tool.black]
102103
line-length = 100
103104
skip-string-normalization = true
104105
target_version = [
105-
"py37",
106106
"py38",
107107
"py39",
108108
"py310",
109+
"py311",
109110
]
110111

111112
[tool.pytest.ini_options]

0 commit comments

Comments
 (0)