diff --git a/docs/maintaining/tagging.md b/docs/maintaining/tagging.md index 377304f5..71e1eb5c 100644 --- a/docs/maintaining/tagging.md +++ b/docs/maintaining/tagging.md @@ -28,6 +28,7 @@ For example, we dump all `conda` packages with their versions into the manifest. ```{literalinclude} tagging_examples/docker_runner.py :language: py +:lines: 3- ``` ### GitHelper @@ -36,6 +37,7 @@ For example, we dump all `conda` packages with their versions into the manifest. ```{literalinclude} tagging_examples/git_helper.py :language: py +:lines: 3- ``` The prefix of commit hash (namely, 12 letters) is used as an image tag to make it easy to inherit from a fixed version of a docker image. @@ -50,6 +52,7 @@ All the taggers are inherited from `TaggerInterface`: ```{literalinclude} ../../tagging/taggers/tagger_interface.py :language: py +:lines: 3- ``` So, the `tag_value(container)` method gets a docker container as an input and returns a tag. @@ -58,6 +61,7 @@ So, the `tag_value(container)` method gets a docker container as an input and re ```{literalinclude} ../../tagging/taggers/sha.py :language: py +:lines: 3- ``` - `taggers/` subdirectory contains all the taggers. @@ -72,6 +76,7 @@ All the other manifest classes are inherited from `ManifestInterface`: ```{literalinclude} ../../tagging/manifests/manifest_interface.py :language: py +:lines: 3- ``` - The `markdown_piece(container)` method returns a piece of markdown file to be used as a part of the build manifest. @@ -80,6 +85,7 @@ All the other manifest classes are inherited from `ManifestInterface`: ```{literalinclude} ../../tagging/manifests/apt_packages.py :language: py +:lines: 3- ``` - `quoted_output(container, cmd)` simply runs the command inside a container using `DockerRunner.run_simple_command` and wraps it to triple quotes to create a valid markdown piece. @@ -87,7 +93,7 @@ All the other manifest classes are inherited from `ManifestInterface`: - `manifests/` subdirectory contains all the manifests. - `apps/write_manifest.py` is a Python executable to create the build manifest and history line for an image. -### Images Hierarchy +## Images Hierarchy All images' dependencies on each other and what taggers and manifest are applicable to them are defined in `hierarchy/images_hierarchy.py`. diff --git a/docs/maintaining/tagging_examples/docker_runner.py b/docs/maintaining/tagging_examples/docker_runner.py index 528bc36a..efd80313 100644 --- a/docs/maintaining/tagging_examples/docker_runner.py +++ b/docs/maintaining/tagging_examples/docker_runner.py @@ -1,3 +1,5 @@ +# Copyright (c) Jupyter Development Team. +# Distributed under the terms of the Modified BSD License. from tagging.utils.docker_runner import DockerRunner with DockerRunner("ubuntu") as container: diff --git a/docs/maintaining/tagging_examples/git_helper.py b/docs/maintaining/tagging_examples/git_helper.py index de909232..dbe8a318 100644 --- a/docs/maintaining/tagging_examples/git_helper.py +++ b/docs/maintaining/tagging_examples/git_helper.py @@ -1,3 +1,5 @@ +# Copyright (c) Jupyter Development Team. +# Distributed under the terms of the Modified BSD License. from tagging.utils.git_helper import GitHelper print("Git hash:", GitHelper.commit_hash()) diff --git a/tagging/apps/common_cli_arguments.py b/tagging/apps/common_cli_arguments.py index 59dfce95..f15927c3 100644 --- a/tagging/apps/common_cli_arguments.py +++ b/tagging/apps/common_cli_arguments.py @@ -1,3 +1,5 @@ +# Copyright (c) Jupyter Development Team. +# Distributed under the terms of the Modified BSD License. import argparse diff --git a/tagging/hierarchy/get_taggers_and_manifests.py b/tagging/hierarchy/get_taggers_and_manifests.py index e817445d..063f8893 100644 --- a/tagging/hierarchy/get_taggers_and_manifests.py +++ b/tagging/hierarchy/get_taggers_and_manifests.py @@ -1,6 +1,5 @@ # Copyright (c) Jupyter Development Team. # Distributed under the terms of the Modified BSD License. - from tagging.hierarchy.images_hierarchy import ALL_IMAGES from tagging.manifests.manifest_interface import ManifestInterface from tagging.taggers.tagger_interface import TaggerInterface diff --git a/tagging/manifests/manifest_interface.py b/tagging/manifests/manifest_interface.py index 2677810b..f39d93ac 100644 --- a/tagging/manifests/manifest_interface.py +++ b/tagging/manifests/manifest_interface.py @@ -1,3 +1,5 @@ +# Copyright (c) Jupyter Development Team. +# Distributed under the terms of the Modified BSD License. from docker.models.containers import Container diff --git a/tagging/taggers/tagger_interface.py b/tagging/taggers/tagger_interface.py index 25408151..21515cf2 100644 --- a/tagging/taggers/tagger_interface.py +++ b/tagging/taggers/tagger_interface.py @@ -1,3 +1,5 @@ +# Copyright (c) Jupyter Development Team. +# Distributed under the terms of the Modified BSD License. from docker.models.containers import Container