Skip to content

Commit b128d23

Browse files
committed
Autoformat: prettier
1 parent 870eea0 commit b128d23

File tree

5 files changed

+216
-229
lines changed

5 files changed

+216
-229
lines changed

.github/workflows/python-publish.yml

Lines changed: 16 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -9,23 +9,22 @@ on:
99

1010
jobs:
1111
deploy:
12-
1312
runs-on: ubuntu-latest
1413

1514
steps:
16-
- uses: actions/checkout@v2
17-
- name: Set up Python
18-
uses: actions/setup-python@v2
19-
with:
20-
python-version: '3.x'
21-
- name: Install dependencies
22-
run: |
23-
python -m pip install --upgrade pip
24-
pip install setuptools wheel twine
25-
- name: Build and publish
26-
env:
27-
TWINE_USERNAME: '__token__'
28-
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
29-
run: |
30-
python setup.py sdist bdist_wheel
31-
twine upload dist/*
15+
- uses: actions/checkout@v2
16+
- name: Set up Python
17+
uses: actions/setup-python@v2
18+
with:
19+
python-version: "3.x"
20+
- name: Install dependencies
21+
run: |
22+
python -m pip install --upgrade pip
23+
pip install setuptools wheel twine
24+
- name: Build and publish
25+
env:
26+
TWINE_USERNAME: "__token__"
27+
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
28+
run: |
29+
python setup.py sdist bdist_wheel
30+
twine upload dist/*

.github/workflows/test.yml

Lines changed: 34 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
name: Python package
32

43
on: [push, pull_request]
@@ -19,45 +18,45 @@ jobs:
1918
strategy:
2019
matrix:
2120
python-version:
22-
- '3.5'
23-
- '3.9'
21+
- "3.5"
22+
- "3.9"
2423
JHUB_VER:
25-
- '0.9.6'
26-
- '1.0.0'
27-
- '1.1.0'
28-
- '1.2.0'
24+
- "0.9.6"
25+
- "1.0.0"
26+
- "1.1.0"
27+
- "1.2.0"
2928
allow_failure: [false]
3029
include:
31-
- JHUB_VER: 'master'
32-
python-version: '3.9'
30+
- JHUB_VER: "master"
31+
python-version: "3.9"
3332
allow_failure: true
3433

3534
steps:
36-
- uses: actions/checkout@v2
37-
- name: Set up Python ${{ matrix.python-version }}
38-
uses: actions/setup-python@v2
39-
with:
40-
python-version: ${{ matrix.python-version }}
35+
- uses: actions/checkout@v2
36+
- name: Set up Python ${{ matrix.python-version }}
37+
uses: actions/setup-python@v2
38+
with:
39+
python-version: ${{ matrix.python-version }}
4140

42-
- name: Install dependencies
43-
run: |
44-
python -m pip install --upgrade pip
45-
python -m pip install pytest
46-
pip install -r requirements.txt
47-
- name: Install nodejs dependencies
48-
run: |
49-
sudo npm install -g configurable-http-proxy
50-
# We need to check compatibility with different versions of the JH
51-
# API, including latest development. For that, we also need to
52-
# pull in the dependencies of that old JH version (but we don't
53-
# need conda/npm for our tests).
54-
- name: install JupyterHub
55-
run: |
56-
git clone --quiet --branch ${{ matrix.JHUB_VER }} https://github.com/jupyterhub/jupyterhub.git jupyterhub
57-
pip install --pre -r jupyterhub/dev-requirements.txt
58-
pip install --upgrade pytest
59-
pip install --pre -e jupyterhub
41+
- name: Install dependencies
42+
run: |
43+
python -m pip install --upgrade pip
44+
python -m pip install pytest
45+
pip install -r requirements.txt
46+
- name: Install nodejs dependencies
47+
run: |
48+
sudo npm install -g configurable-http-proxy
49+
# We need to check compatibility with different versions of the JH
50+
# API, including latest development. For that, we also need to
51+
# pull in the dependencies of that old JH version (but we don't
52+
# need conda/npm for our tests).
53+
- name: install JupyterHub
54+
run: |
55+
git clone --quiet --branch ${{ matrix.JHUB_VER }} https://github.com/jupyterhub/jupyterhub.git jupyterhub
56+
pip install --pre -r jupyterhub/dev-requirements.txt
57+
pip install --upgrade pytest
58+
pip install --pre -e jupyterhub
6059
61-
- name: pytest
62-
run: |
63-
pytest --lf --cov batchspawner batchspawner/tests -v
60+
- name: pytest
61+
run: |
62+
pytest --lf --cov batchspawner batchspawner/tests -v

CHANGELOG.md

Lines changed: 46 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -14,85 +14,81 @@ Fixed
1414

1515
Added (user)
1616

17-
* PR #170: SlurmSpawner: add `req_gres` to specify `-go-res`.
18-
* PR #137: GridEngineSpawner: spawner will now add the following system environment values to the spawner environment, in accordance with the Univa Admin Guide: `SGE_CELL`, `SGE_EXECD`, `SGE_ROOT`, `SGE_CLUSTER_NAME`, `SGE_QMASTER_PORT`, `SGE_EXECD_PORT`, `PATH`
17+
- PR #170: SlurmSpawner: add `req_gres` to specify `-go-res`.
18+
- PR #137: GridEngineSpawner: spawner will now add the following system environment values to the spawner environment, in accordance with the Univa Admin Guide: `SGE_CELL`, `SGE_EXECD`, `SGE_ROOT`, `SGE_CLUSTER_NAME`, `SGE_QMASTER_PORT`, `SGE_EXECD_PORT`, `PATH`
1919

2020
Added (developer)
2121

22-
* PR #187: support for unknown job state
22+
- PR #187: support for unknown job state
2323

2424
Changed
2525

26-
* PR #177: Fail on first error in batch script by setting `set -e` to script templates.
27-
* PR #165: SlurmSpawner: Update template to use `--chdir` instead of `--workdir`. Users of Slurm older than 17.11 may need to revert this locally.
28-
* PR #189: remove bashism from default script template
29-
* PR #195: fix exception handling in run_command
30-
* PR #198: change from Travis to gh-actions for testing
31-
* PR #196: documentation
32-
* PR #199: update setup.py
26+
- PR #177: Fail on first error in batch script by setting `set -e` to script templates.
27+
- PR #165: SlurmSpawner: Update template to use `--chdir` instead of `--workdir`. Users of Slurm older than 17.11 may need to revert this locally.
28+
- PR #189: remove bashism from default script template
29+
- PR #195: fix exception handling in run_command
30+
- PR #198: change from Travis to gh-actions for testing
31+
- PR #196: documentation
32+
- PR #199: update setup.py
3333

3434
## v1.0 (requires minimum JupyterHub 0.9 and Python 3.5)
3535

3636
Added (user)
3737

38-
* Add support for JupyterHub named servers. #167
39-
* Add Jinja2 templating as an option for all scripts and commands. If '{{' or `{%` is used anywhere in the string, it is used as a jinja2 template.
40-
* Add new option exec_prefix, which defaults to `sudo -E -u {username}`. This replaces explicit `sudo` in every batch command - changes in local commands may be needed.
41-
* New option: `req_keepvars_extra`, which allows keeping extra variables in addition to what is defined by JupyterHub itself (addition of variables to keep instead of replacement). #99
42-
* Add `req_prologue` and `req_epilogue` options to scripts which are inserted before/after the main jupyterhub-singleuser command, which allow for generic setup/cleanup without overriding the entire script. #96
43-
* SlurmSpawner: add the `req_reservation` option. #91
44-
* Add basic support for JupyterHub progress updates, but this is not used much yet. #86
38+
- Add support for JupyterHub named servers. #167
39+
- Add Jinja2 templating as an option for all scripts and commands. If '{{' or `{%` is used anywhere in the string, it is used as a jinja2 template.
40+
- Add new option exec_prefix, which defaults to `sudo -E -u {username}`. This replaces explicit `sudo` in every batch command - changes in local commands may be needed.
41+
- New option: `req_keepvars_extra`, which allows keeping extra variables in addition to what is defined by JupyterHub itself (addition of variables to keep instead of replacement). #99
42+
- Add `req_prologue` and `req_epilogue` options to scripts which are inserted before/after the main jupyterhub-singleuser command, which allow for generic setup/cleanup without overriding the entire script. #96
43+
- SlurmSpawner: add the `req_reservation` option. #91
44+
- Add basic support for JupyterHub progress updates, but this is not used much yet. #86
4545

4646
Added (developer)
4747

48-
* Add many more tests.
49-
* Add a new page `SPAWNERS.md` which information on specific spawners. Begin trying to collect a list of spawner-specific contacts. #97
50-
* Rename `current_ip` and `current_port` commands to `ip` and `port`. No user impact. #139
51-
* Update to Python 3.5 `async` / `await` syntax to support JupyterHub progress updates. #90
48+
- Add many more tests.
49+
- Add a new page `SPAWNERS.md` which information on specific spawners. Begin trying to collect a list of spawner-specific contacts. #97
50+
- Rename `current_ip` and `current_port` commands to `ip` and `port`. No user impact. #139
51+
- Update to Python 3.5 `async` / `await` syntax to support JupyterHub progress updates. #90
5252

5353
Changed
5454

55-
* PR #58 and #141 changes logic of port selection, so that it is selected *after* the singleuser server starts. This means that the port number has to be conveyed back to JupyterHub. This requires the following changes:
56-
- `jupyterhub_config.py` *must* explicitely import `batchspawner`
57-
- Add a new option `batchspawner_singleuser_cmd` which is used as a wrapper in the single-user servers, which conveys the remote port back to JupyterHub. This is now an integral part of the spawn process.
55+
- PR #58 and #141 changes logic of port selection, so that it is selected _after_ the singleuser server starts. This means that the port number has to be conveyed back to JupyterHub. This requires the following changes:
56+
- `jupyterhub_config.py` _must_ explicitely import `batchspawner`
57+
- Add a new option `batchspawner_singleuser_cmd` which is used as a wrapper in the single-user servers, which conveys the remote port back to JupyterHub. This is now an integral part of the spawn process.
5858
- If you have installed with `pip install -e`, you will have to re-install so that the new script `batchspawner-singleuser` is added to `$PATH`.
59-
* Update minimum requirements to JupyterHub 0.9 and Python 3.5. #143
60-
* Update Slurm batch script. Now, the single-user notebook is run in a job step, with a wrapper of `srun`. This may need to be removed using `req_srun=''` if you don't want environment variables limited.
61-
* Pass the environment dictionary to the queue and cancel commands as well. This is mostly user environment, but may be useful to these commands as well in some cases. #108, #111 If these environment variables were used for authentication as an admin, be aware that there are pre-existing security issues because they may be passed to the user via the batch submit command, see #82.
62-
59+
- Update minimum requirements to JupyterHub 0.9 and Python 3.5. #143
60+
- Update Slurm batch script. Now, the single-user notebook is run in a job step, with a wrapper of `srun`. This may need to be removed using `req_srun=''` if you don't want environment variables limited.
61+
- Pass the environment dictionary to the queue and cancel commands as well. This is mostly user environment, but may be useful to these commands as well in some cases. #108, #111 If these environment variables were used for authentication as an admin, be aware that there are pre-existing security issues because they may be passed to the user via the batch submit command, see #82.
6362

6463
Fixed
6564

66-
* Improve debugging on failed submission by raising errors including error messages from the commands. #106
67-
* Many other non-user or developer visible changes. #107 #106 #100
68-
* In Travis CI, blacklist jsonschema=3.0.0a1 because it breaks tests
65+
- Improve debugging on failed submission by raising errors including error messages from the commands. #106
66+
- Many other non-user or developer visible changes. #107 #106 #100
67+
- In Travis CI, blacklist jsonschema=3.0.0a1 because it breaks tests
6968

7069
Removed
7170

72-
7371
## v0.8.1 (bugfix release)
7472

75-
* Fix regression: single-user server binding address is overwritten by previous session server address, resulting in failure to start. Issue #76
73+
- Fix regression: single-user server binding address is overwritten by previous session server address, resulting in failure to start. Issue #76
7674

7775
## v0.8.0 (compatible with JupyterHub 0.5.0 through 0.8.1/0.9dev)
7876

79-
* SlurmSpawner: Remove `--uid` for (at least) Slurm 17.11 compatibility. If you use `sudo`, this should not be necessary, but because this is security related you should check that user management is as you expect. If your configuration does not use `sudo` then you may need to add the `--uid` option in a custom `batch_script`.
80-
* add base options `req_ngpus` `req_partition` `req_account` and `req_options`
81-
* Fix up logging
82-
* Merge `user_options` with the template substitution vars instead of having it as a separate key
83-
* Update ip/port handling for JupyterHub 0.8
84-
* Add `LICENSE` (BSD3) and `CONTRIBUTING.md`
85-
* Add `LsfSpawner` for IBM LFS
86-
* Add `MultiSlurmSpawner`
87-
* Add `MoabSpawner`
88-
* Add `condorSpawner`
89-
* Add `GridEngineSpawner`
90-
* SlurmSpawner: add `req_qos` option
91-
* WrapSpawner and ProfilesSpawner, which provide mechanisms for runtime configuration of spawners, have been split out and moved to the [`wrapspawner`](https://github.com/jupyterhub/wrapspawner) package
92-
* Enable CI testing via Travis-CI
93-
77+
- SlurmSpawner: Remove `--uid` for (at least) Slurm 17.11 compatibility. If you use `sudo`, this should not be necessary, but because this is security related you should check that user management is as you expect. If your configuration does not use `sudo` then you may need to add the `--uid` option in a custom `batch_script`.
78+
- add base options `req_ngpus` `req_partition` `req_account` and `req_options`
79+
- Fix up logging
80+
- Merge `user_options` with the template substitution vars instead of having it as a separate key
81+
- Update ip/port handling for JupyterHub 0.8
82+
- Add `LICENSE` (BSD3) and `CONTRIBUTING.md`
83+
- Add `LsfSpawner` for IBM LFS
84+
- Add `MultiSlurmSpawner`
85+
- Add `MoabSpawner`
86+
- Add `condorSpawner`
87+
- Add `GridEngineSpawner`
88+
- SlurmSpawner: add `req_qos` option
89+
- WrapSpawner and ProfilesSpawner, which provide mechanisms for runtime configuration of spawners, have been split out and moved to the [`wrapspawner`](https://github.com/jupyterhub/wrapspawner) package
90+
- Enable CI testing via Travis-CI
9491

9592
## v0.3 (tag: jhub-0.3, compatible with JupyterHub 0.3.0)
9693

97-
* initial release containing `TorqueSpawner` and `SlurmSpawner`
98-
94+
- initial release containing `TorqueSpawner` and `SlurmSpawner`

0 commit comments

Comments
 (0)