Skip to content

Commit 1c6a0d0

Browse files
authored
Merge pull request #118 from mathbunnyru/asalikhov/cleanup
Add linters and do a general cleanup
2 parents b7911ca + e1dcae2 commit 1c6a0d0

File tree

11 files changed

+57
-14
lines changed

11 files changed

+57
-14
lines changed

.flake8

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
[flake8]
2+
max-line-length = 88
3+
select = C,E,F,W,B,B950
4+
extend-ignore = E203, E501, W503

.github/dependabot.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# To get started with Dependabot version updates, you'll need to specify which
2+
# package ecosystems to update and where the package manifests are located.
3+
# Please see the documentation for all configuration options:
4+
# https://docs.github.com/en/code-security/supply-chain-security/keeping-your-dependencies-updated-automatically/configuration-options-for-dependency-updates
5+
6+
version: 2
7+
updates:
8+
- package-ecosystem: github-actions
9+
directory: /
10+
schedule:
11+
interval: weekly

.github/workflows/test.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44
name: Tests
55

66
on:
7+
schedule:
8+
# Weekly, at 03:00 on Monday UTC time
9+
- cron: "0 3 * * 1"
710
pull_request:
811
push:
912
workflow_dispatch:

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
secrets/
22
userlist
33
.DS_Store
4+
__pycache__/

.pre-commit-config.yaml

Lines changed: 30 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
repos:
1212
# Autoformat: Python code
1313
- repo: https://github.com/psf/black
14-
rev: 22.8.0
14+
rev: 23.1.0
1515
hooks:
1616
- id: black
1717
args:
@@ -21,6 +21,34 @@ repos:
2121

2222
# Autoformat: markdown, yaml
2323
- repo: https://github.com/pre-commit/mirrors-prettier
24-
rev: v2.7.1
24+
rev: v3.0.0-alpha.4
2525
hooks:
2626
- id: prettier
27+
28+
# `pre-commit sample-config` default hooks
29+
- repo: https://github.com/pre-commit/pre-commit-hooks
30+
rev: v4.4.0
31+
hooks:
32+
- id: check-added-large-files
33+
- id: end-of-file-fixer
34+
- id: trailing-whitespace
35+
36+
# Lint: Dockerfile
37+
- repo: https://github.com/hadolint/hadolint.git
38+
rev: v2.12.1-beta
39+
hooks:
40+
- id: hadolint-docker
41+
entry: hadolint/hadolint:v2.12.1-beta hadolint
42+
43+
# Lint: Python
44+
- repo: https://github.com/PyCQA/flake8
45+
rev: 6.0.0
46+
hooks:
47+
- id: flake8
48+
49+
# pre-commit.ci config reference: https://pre-commit.ci/#configuration
50+
ci:
51+
autoupdate_schedule: monthly
52+
# Docker hooks do not work in pre-commit.ci
53+
# See: <https://github.com/pre-commit-ci/issues/issues/11>
54+
skip: [hadolint-docker]

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
# Contributing
22

3-
Welcome! As a [Jupyter](https://jupyter.org) project, we follow the [Jupyter contributor guide](https://jupyter.readthedocs.io/en/latest/contributor/content-contributor.html).
3+
Welcome! As a [Jupyter](https://jupyter.org) project, we follow the [Jupyter contributor guide](https://docs.jupyter.org/en/latest/contributing/content-contributor.html).

README.md

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ You can configure JupyterHub to spawn Notebook servers from any Docker image, as
7373
long as the image's `ENTRYPOINT` and/or `CMD` starts a single-user instance of
7474
Jupyter Notebook server that is compatible with JupyterHub.
7575

76-
To specify which Notebook image to spawn for users, you set the value of the
76+
To specify which Notebook image to spawn for users, you set the value of the
7777
`DOCKER_NOTEBOOK_IMAGE` environment variable to the desired container image.
7878

7979
Whether you build a custom Notebook image or pull an image from a public or
@@ -105,11 +105,7 @@ To run the JupyterHub container in detached mode:
105105
docker-compose up -d
106106
```
107107

108-
Once the container is running, you should be able to access the JupyterHub console at
109-
110-
```
111-
http://localhost:8000
112-
```
108+
Once the container is running, you should be able to access the JupyterHub console at `http://localhost:8000`.
113109

114110
To bring down the JupyterHub container:
115111

ci/check_hub.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ while [ $count -lt 60 ]; do
1010
started=1
1111
break
1212
fi
13-
echo -n .
13+
printf .
1414
count=$((count+1))
1515
done
1616
if [ $started -eq 0 ]; then

ci/config_token.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
c.JupyterHub.load_roles = [
1+
c.JupyterHub.load_roles = [ # noqa: F821
22
{
33
"name": "test-admin",
44
"scopes": ["admin:users", "admin:servers", "access:servers"],
55
"services": ["test"],
66
}
77
]
88

9-
c.JupyterHub.services = [
9+
c.JupyterHub.services = [ # noqa: F821
1010
{
1111
"name": "test",
1212
"api_token": "test-token-123",

docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ services:
1010
context: .
1111
dockerfile: Dockerfile.jupyterhub
1212
args:
13-
JUPYTERHUB_VERSION: 3.0.0
13+
JUPYTERHUB_VERSION: latest
1414
restart: always
1515
image: jupyterhub
1616
container_name: jupyterhub

0 commit comments

Comments
 (0)