Files
docker-stacks/tests/images_hierarchy.py
Yuvi Panda a489a0f259 Add jupyter/julia-notebook (#1926)
* Add jupyter/julia-notebook

There is a growing number of Julia users in the Jupyter
ecosystem who do not use R, and hence would <3 to have a
dedicated docker image that doesn't bring in all the R
stuff that datascience-notebook brings in! The built image
size is much smaller, and eventually paves the way to
better ecosystem support for Julia.

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Add a test for julia-notebook

* Tell tests what julia-notebook inherits from

* Sort lists with julia-notebook

* Fix README for julia-notebook

* Add julia-notebook to the makefile

* Move julia-notebook below r-notebook

* Use hard tabs in Makefile

* Do some more sorting

* Rename test_julia to avoid mypy issue

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Re-order julia/r-notebook

Co-authored-by: Ayaz Salikhov <mathbunnyru@users.noreply.github.com>

* Move julia-notebook stanza under r-notebook

* Update inheritance diagram

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Ayaz Salikhov <mathbunnyru@users.noreply.github.com>
2023-06-28 14:41:45 +04:00

34 lines
1.1 KiB
Python

# Copyright (c) Jupyter Development Team.
# Distributed under the terms of the Modified BSD License.
from pathlib import Path
from typing import Optional
THIS_DIR = Path(__file__).parent.resolve()
# Please, take a look at the hierarchy of the images here:
# https://jupyter-docker-stacks.readthedocs.io/en/latest/using/selecting.html#image-relationships
ALL_IMAGES = {
"docker-stacks-foundation": None,
"base-notebook": "docker-stacks-foundation",
"minimal-notebook": "base-notebook",
"scipy-notebook": "minimal-notebook",
"r-notebook": "minimal-notebook",
"julia-notebook": "minimal-notebook",
"tensorflow-notebook": "scipy-notebook",
"datascience-notebook": "scipy-notebook",
"pyspark-notebook": "scipy-notebook",
"all-spark-notebook": "pyspark-notebook",
}
def get_test_dirs(
short_image_name: Optional[str],
) -> list[Path]:
if short_image_name is None:
return []
test_dirs = get_test_dirs(ALL_IMAGES[short_image_name])
if (current_image_tests_dir := THIS_DIR / short_image_name).exists():
test_dirs.append(current_image_tests_dir)
return test_dirs