Skip to content

Commit 0c483ad

Browse files
committed
Add copyright and improve tagging docs
1 parent e815fde commit 0c483ad

File tree

7 files changed

+17
-2
lines changed

7 files changed

+17
-2
lines changed

docs/maintaining/tagging.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ For example, we dump all `conda` packages with their versions into the manifest.
2828

2929
```{literalinclude} tagging_examples/docker_runner.py
3030
:language: py
31+
:lines: 3-
3132
```
3233

3334
### GitHelper
@@ -36,6 +37,7 @@ For example, we dump all `conda` packages with their versions into the manifest.
3637

3738
```{literalinclude} tagging_examples/git_helper.py
3839
:language: py
40+
:lines: 3-
3941
```
4042

4143
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`:
5052

5153
```{literalinclude} ../../tagging/taggers/tagger_interface.py
5254
:language: py
55+
:lines: 3-
5356
```
5457

5558
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
5861

5962
```{literalinclude} ../../tagging/taggers/sha.py
6063
:language: py
64+
:lines: 3-
6165
```
6266

6367
- `taggers/` subdirectory contains all the taggers.
@@ -72,6 +76,7 @@ All the other manifest classes are inherited from `ManifestInterface`:
7276

7377
```{literalinclude} ../../tagging/manifests/manifest_interface.py
7478
:language: py
79+
:lines: 3-
7580
```
7681

7782
- The `markdown_piece(container)` method returns a piece of markdown file to be used as a part of the build manifest.
@@ -80,14 +85,15 @@ All the other manifest classes are inherited from `ManifestInterface`:
8085

8186
```{literalinclude} ../../tagging/manifests/apt_packages.py
8287
:language: py
88+
:lines: 3-
8389
```
8490

8591
- `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.
8692
It also adds the command which was run to the markdown piece.
8793
- `manifests/` subdirectory contains all the manifests.
8894
- `apps/write_manifest.py` is a Python executable to create the build manifest and history line for an image.
8995

90-
### Images Hierarchy
96+
## Images Hierarchy
9197

9298
All images' dependencies on each other and what taggers and manifest are applicable to them are defined in `hierarchy/images_hierarchy.py`.
9399

docs/maintaining/tagging_examples/docker_runner.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# Copyright (c) Jupyter Development Team.
2+
# Distributed under the terms of the Modified BSD License.
13
from tagging.utils.docker_runner import DockerRunner
24

35
with DockerRunner("ubuntu") as container:

docs/maintaining/tagging_examples/git_helper.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# Copyright (c) Jupyter Development Team.
2+
# Distributed under the terms of the Modified BSD License.
13
from tagging.utils.git_helper import GitHelper
24

35
print("Git hash:", GitHelper.commit_hash())

tagging/apps/common_cli_arguments.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# Copyright (c) Jupyter Development Team.
2+
# Distributed under the terms of the Modified BSD License.
13
import argparse
24

35

tagging/hierarchy/get_taggers_and_manifests.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
# Copyright (c) Jupyter Development Team.
22
# Distributed under the terms of the Modified BSD License.
3-
43
from tagging.hierarchy.images_hierarchy import ALL_IMAGES
54
from tagging.manifests.manifest_interface import ManifestInterface
65
from tagging.taggers.tagger_interface import TaggerInterface

tagging/manifests/manifest_interface.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# Copyright (c) Jupyter Development Team.
2+
# Distributed under the terms of the Modified BSD License.
13
from docker.models.containers import Container
24

35

tagging/taggers/tagger_interface.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# Copyright (c) Jupyter Development Team.
2+
# Distributed under the terms of the Modified BSD License.
13
from docker.models.containers import Container
24

35

0 commit comments

Comments
 (0)