-
Notifications
You must be signed in to change notification settings - Fork 0
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
#19 move slc notebook #122
Conversation
2. Added class SlctManager 3. Added integration test 4. Added a helper function for creating an pyexasol connection which also runs the ALTER SESSION command for all registered languages
665ce3c
to
e0957f9
Compare
e0957f9
to
2be5218
Compare
@contextlib.contextmanager | ||
def enter(self): | ||
"""Changes working directory and returns to previous on exit.""" | ||
prev_cwd = Path.cwd() | ||
os.chdir(self.root_dir) | ||
try: | ||
yield | ||
finally: | ||
os.chdir(prev_cwd) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
with python 3.11
there is a ready to go context manager for changing the dir is available see (https://docs.python.org/3/library/contextlib.html#contextlib.chdir)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good to know. Thx
ctx.emit("success") | ||
/ | ||
""") | ||
con = open_pyexasol_connection_with_lang_definitions(slc_secrets, schema='TEST') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
having a connection
fixture would be a possible simiplification
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would not work in this case, as I have these dependencies to the other tests.
related to exasol/ai-lab#19
open_pyexasol_connection_with_lang_definitions
inlanguage_container_activation.py
which creates a pyexasol connection and appliesALTER SESSION
command with all registered languagesslct_manager
which provides a wrapper for exaslct commands used in thescript_languages_container
notebooksexasol-script-languages-container-tool
as dependency