Skip to content

Commit 48b0650

Browse files
authored
Add tags for mamba and conda versions (#2251)
* Add tags for mamba and conda versions * Update changelog
1 parent 9e445b5 commit 48b0650

File tree

3 files changed

+22
-0
lines changed

3 files changed

+22
-0
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,12 @@
33
This changelog only contains breaking and/or significant changes manually introduced to this repository (using Pull Requests).
44
All image manifests can be found in [the wiki](https://github.com/jupyter/docker-stacks/wiki).
55

6+
## 2025-03-12
7+
8+
Affected: all images.
9+
10+
- **Non-breaking:** Add `conda` and `mamba` version taggers ([#2251](https://github.com/jupyter/docker-stacks/pull/2251)).
11+
612
## 2025-02-21
713

814
Affected: all images.

tagging/hierarchy/images_hierarchy.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,13 @@
1313
from tagging.taggers.tagger_interface import TaggerInterface
1414
from tagging.taggers.ubuntu_version import UbuntuVersionTagger
1515
from tagging.taggers.versions import (
16+
CondaVersionTagger,
1617
JavaVersionTagger,
1718
JuliaVersionTagger,
1819
JupyterHubVersionTagger,
1920
JupyterLabVersionTagger,
2021
JupyterNotebookVersionTagger,
22+
MambaVersionTagger,
2123
PythonMajorMinorVersionTagger,
2224
PythonVersionTagger,
2325
PytorchVersionTagger,
@@ -43,6 +45,8 @@ class ImageDescription:
4345
UbuntuVersionTagger(),
4446
PythonMajorMinorVersionTagger(),
4547
PythonVersionTagger(),
48+
MambaVersionTagger(),
49+
CondaVersionTagger(),
4650
],
4751
manifests=[CondaEnvironmentManifest(), AptPackagesManifest()],
4852
),

tagging/taggers/versions.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,18 @@ def tag_value(container: Container) -> str:
3636
return full_version[: full_version.rfind(".")]
3737

3838

39+
class MambaVersionTagger(TaggerInterface):
40+
@staticmethod
41+
def tag_value(container: Container) -> str:
42+
return "mamba-" + _get_program_version(container, "mamba")
43+
44+
45+
class CondaVersionTagger(TaggerInterface):
46+
@staticmethod
47+
def tag_value(container: Container) -> str:
48+
return "conda-" + _get_program_version(container, "conda").split()[1]
49+
50+
3951
class JupyterNotebookVersionTagger(TaggerInterface):
4052
@staticmethod
4153
def tag_value(container: Container) -> str:

0 commit comments

Comments
 (0)