Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated nb-connector for pinned slc_release #329

Merged
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ scikit-learn==1.5.1 # required for notebook sklearn
matplotlib==3.7.4 # required for notebook sklearn
jupysql==0.10.10 # required for multiple notebooks
stopwatch.py>=2.0.1 # also required by ITDE
exasol-notebook-connector @ git+https://github.com/exasol/notebook-connector@e3a8525
exasol-notebook-connector @ git+https://github.com/exasol/notebook-connector@63a755a
pickleshare==0.7.5 # See https://github.com/exasol/ai-lab/issues/291 for details.
ipyfilechooser==0.6.0 # required for SLC notebooks
ipywidgets==8.1.1 # enable interactive Javascript widgets in the notebooks
15 changes: 6 additions & 9 deletions test/notebooks/nbtest_script_languages_container.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
from notebook_test_utils import (backend_setup,
run_notebook)
from exasol.nb_connector.ai_lab_config import AILabConfig as CKey
from exasol.nb_connector.slct_manager import SlctManager
from exasol.nb_connector.secret_store import Secrets
from exasol.pytest_backend import BACKEND_ONPREM

Expand All @@ -17,13 +18,14 @@ def _slc_repo_dir() -> Path:
return Path.cwd() / "script_languages_release"


def _store_slc_config(store_path: Path, store_password: str, clone_repo: bool):
def _store_slc_config(store_path: Path, store_password: str, clone_repo: bool) -> Secrets:

slc_source = "Clone script languages release repository" if clone_repo else "Use the existing clone"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have questions, but that we can discus later

conf = Secrets(store_path, store_password)
conf.connection()
conf.save(CKey.slc_source, slc_source)
conf.save(CKey.slc_target_dir, str(_slc_repo_dir()))
return conf


@pytest.fixture()
Expand Down Expand Up @@ -56,12 +58,6 @@ def test_script_languages_container_cloning_slc_repo(backend,
os.chdir(current_dir)


def _clone_slc_repo():
from git import Repo
repo = Repo.clone_from("https://github.com/exasol/script-languages-release", _slc_repo_dir())
repo.submodule_update(recursive=True)


def test_script_languages_container_with_existing_slc_repo(backend,
backend_setup,
cleanup_slc_repo_dir) -> None:
Expand All @@ -75,8 +71,9 @@ def test_script_languages_container_with_existing_slc_repo(backend,
os.chdir('./script_languages_container')
slc_repo_path = _slc_repo_dir()
assert not slc_repo_path.is_dir()
_clone_slc_repo()
_store_slc_config(store_path, store_password, False)
secrets = _store_slc_config(store_path, store_password, False)
slct_manager = SlctManager(secrets)
slct_manager.clone_slc_repo()
run_notebook('configure_slc_repository.ipynb', store_file, store_password)
run_notebook('export_as_is.ipynb', store_file, store_password)
run_notebook('customize.ipynb', store_file, store_password)
Expand Down