Update pre-commit hooks, fix MD059/descriptive-link-text

This commit is contained in:
Ayaz Salikhov
2025-06-04 00:35:13 +01:00
parent 7830074b9e
commit dbcf753aab
7 changed files with 12 additions and 13 deletions

View File

@@ -14,7 +14,7 @@
repos: repos:
# Autoupdate: Python code # Autoupdate: Python code
- repo: https://github.com/asottile/pyupgrade - repo: https://github.com/asottile/pyupgrade
rev: ce40a160603ab0e7d9c627ae33d7ef3906e2d2b2 # frozen: v3.19.1 rev: 37bfa06d791fd38fb4e54910b36a2ff57641b074 # frozen: v3.20.0
hooks: hooks:
- id: pyupgrade - id: pyupgrade
args: [--py312-plus] args: [--py312-plus]
@@ -35,7 +35,7 @@ repos:
# Check python code static typing # Check python code static typing
- repo: https://github.com/pre-commit/mirrors-mypy - repo: https://github.com/pre-commit/mirrors-mypy
rev: f40886d54c729f533f864ed6ce584e920feb0af7 # frozen: v1.15.0 rev: 7010b10a09f65cd60a23c207349b539aa36dbec1 # frozen: v1.16.0
hooks: hooks:
- id: mypy - id: mypy
args: [--config, ./mypy.ini] args: [--config, ./mypy.ini]
@@ -126,7 +126,7 @@ repos:
# Lint: Markdown # Lint: Markdown
- repo: https://github.com/DavidAnson/markdownlint-cli2 - repo: https://github.com/DavidAnson/markdownlint-cli2
rev: d174eb7a8f35e05d4065c82d375ad84aa0b32352 # frozen: v0.17.2 rev: d7a4f7cf4914d3bffb9b83bdbc45fd2a00c91ff9 # frozen: v0.18.1
hooks: hooks:
- id: markdownlint-cli2 - id: markdownlint-cli2
args: [--fix] args: [--fix]

View File

@@ -9,7 +9,7 @@ runs tests against pull requests submitted to the `jupyter/docker-stacks` reposi
We use the `pytest` module to run tests on the image. We use the `pytest` module to run tests on the image.
`conftest.py` and `pytest.ini` in the `tests` folder define the environment in which tests are run. `conftest.py` and `pytest.ini` in the `tests` folder define the environment in which tests are run.
More info on `pytest` can be found [here](https://docs.pytest.org/en/latest/contents.html). [Read `pytest` documentation](https://docs.pytest.org/en/latest/contents.html).
The actual image-specific test files are located in folders like `tests/by_image/<somestack>/` (e.g., `tests/by_image/docker-stacks-foundation/`, etc.). The actual image-specific test files are located in folders like `tests/by_image/<somestack>/` (e.g., `tests/by_image/docker-stacks-foundation/`, etc.).

View File

@@ -45,7 +45,7 @@ create a [recipe](../using/recipes.md) or [community stack](../contributing/stac
We have a [policy](./new-images-and-packages-policy.md), which we consider when adding new images or new packages to existing images. We have a [policy](./new-images-and-packages-policy.md), which we consider when adding new images or new packages to existing images.
``` ```
You can see an example of adding a new image [here](https://github.com/jupyter/docker-stacks/pull/1936/files). [Take a look at an example](https://github.com/jupyter/docker-stacks/pull/1936/files) of adding a new image.
When there's a new stack definition, check before merging the PR: When there's a new stack definition, check before merging the PR:

View File

@@ -140,7 +140,7 @@ or executables (`chmod +x`) to be run to the paths below:
- `/usr/local/bin/before-notebook.d/` - handled **after** all the standard options noted above are applied - `/usr/local/bin/before-notebook.d/` - handled **after** all the standard options noted above are applied
and ran right before the Server launches and ran right before the Server launches
See the `run-hooks.sh` script [here](https://github.com/jupyter/docker-stacks/blob/main/images/docker-stacks-foundation/run-hooks.sh) and how it's used in the [`start.sh`](https://github.com/jupyter/docker-stacks/blob/main/images/docker-stacks-foundation/start.sh) [Open the `run-hooks.sh` script](https://github.com/jupyter/docker-stacks/blob/main/images/docker-stacks-foundation/run-hooks.sh) and how it's used in the [`start.sh`](https://github.com/jupyter/docker-stacks/blob/main/images/docker-stacks-foundation/start.sh)
script for execution details. script for execution details.
## SSL Certificates ## SSL Certificates

View File

@@ -4,7 +4,7 @@ This section describes how to build a custom set of images.
It may be helpful if you need to change the Ubuntu or Python version, or to make a significant change to the build process itself. It may be helpful if you need to change the Ubuntu or Python version, or to make a significant change to the build process itself.
This project only builds one set of images at a time. This project only builds one set of images at a time.
If you want to use older images, take a look [here](../index.rst/#using-old-images). If you want to use older images, [take a look here](../index.rst/#using-old-images).
## Automating your build using template cookiecutter project ## Automating your build using template cookiecutter project

View File

@@ -6,8 +6,7 @@ There are two types of data you might want to persist.
1. If you want to persist your environment (i.e. packages installed by `mamba`, `conda`, `pip`, `apt-get`, and so on), 1. If you want to persist your environment (i.e. packages installed by `mamba`, `conda`, `pip`, `apt-get`, and so on),
then you should create an inherited image and install packages only once while building your Dockerfile. then you should create an inherited image and install packages only once while building your Dockerfile.
An example of using `mamba` and `pip` in a child image is available Take a look at [an example of using `mamba` and `pip`](./recipes.md#using-mamba-install-recommended-or-pip-install-in-a-child-docker-image) in a child image.
[here](./recipes.md#using-mamba-install-recommended-or-pip-install-in-a-child-docker-image).
```{note} ```{note}
If you install a package inside a running container (for example you run `pip install <package>` in a terminal), If you install a package inside a running container (for example you run `pip install <package>` in a terminal),
@@ -30,7 +29,7 @@ Adding them all is impossible, so we have several images to choose from.
## Who is `jovyan` ## Who is `jovyan`
As described [here](https://github.com/jupyter/docker-stacks/issues/358#issuecomment-288844834): As described [in this issue comment](https://github.com/jupyter/docker-stacks/issues/358#issuecomment-288844834):
```text ```text
Jo·vy·an Jo·vy·an
@@ -40,7 +39,7 @@ noun an inhabitant of Jupyter
`Jovyan` is often a special term used to describe members of the Jupyter community. `Jovyan` is often a special term used to describe members of the Jupyter community.
It is also used as the user ID in the Jupyter Docker stacks or referenced in conversations. It is also used as the user ID in the Jupyter Docker stacks or referenced in conversations.
You can find more information [here](https://docs.jupyter.org/en/latest/community/content-community.html#what-is-a-jovyan). You can find more information on [the Jupyter Community documentation](https://docs.jupyter.org/en/latest/community/content-community.html#what-is-a-jovyan).
## How to give root permissions to the user ## How to give root permissions to the user

View File

@@ -60,7 +60,7 @@ docker run -it --rm \
The default version of `Python` that ships with the image may not be the version you want. The default version of `Python` that ships with the image may not be the version you want.
The instructions below permit adding a conda environment with a different `Python` version and making it accessible to Jupyter. The instructions below permit adding a conda environment with a different `Python` version and making it accessible to Jupyter.
You may also use older images like `jupyter/base-notebook:python-3.10`. You may also use older images like `jupyter/base-notebook:python-3.10`.
A list of all tags can be found [here](https://github.com/jupyter/docker-stacks/wiki). We also maintain a [full build history](https://github.com/jupyter/docker-stacks/wiki).
```{literalinclude} recipe_code/custom_environment.dockerfile ```{literalinclude} recipe_code/custom_environment.dockerfile
:language: docker :language: docker
@@ -176,7 +176,7 @@ We also have contributed recipes for using JupyterHub.
### Use JupyterHub's DockerSpawner ### Use JupyterHub's DockerSpawner
You can find an example of using DockerSpawner [here](https://github.com/jupyterhub/jupyterhub-deploy-docker/tree/main/basic-example). You can find [an example of using DockerSpawner](https://github.com/jupyterhub/jupyterhub-deploy-docker/tree/main/basic-example).
### Containers with a specific version of JupyterHub ### Containers with a specific version of JupyterHub