Conversation
| log: CommandLogger, | ||
| ) -> int: | ||
| if len(conda_packages.packages) > 0: | ||
| cmd_n_errs = prepare_all_cmds(conda_packages, conda_binary) |
There was a problem hiding this comment.
Note that you also need to set the following environment variables:
MAMBA_EXE="/bin/micromamba";
MAMBA_ROOT_PREFIX="/opt/conda';
CONDA_ROOT_PREFIX="/opt/conda';
For now, you can set it using hard-coded values. Later the values will be stored in the Pydantic model.
There was a problem hiding this comment.
@sgn4sangar you probably need to add a new parameter to the CommandExecutor to pass these environment variables. Popen accepts a dictionary with environment variables
…nstall_micromamba_command # Conflicts: # doc/changes/unreleased.md
…onda_install # Conflicts: # exasol/exaslpm/pkg_mgmt/install_apt_packages.py # exasol/exaslpm/pkg_mgmt/install_common.py # exasol/exaslpm/pkg_mgmt/install_packages.py
…ature/6_implement_conda_install
…onda_install # Conflicts: # doc/changes/unreleased.md # exasol/exaslpm/pkg_mgmt/install_micromamba.py # exasol/exaslpm/pkg_mgmt/install_packages.py # exasol/exaslpm/pkg_mgmt/micromamba_env.py # test/integration/docker_test_environment/docker_test_container.py # test/integration/package_fixtures.py # test/integration/test_install_micromamba_via_binary.py # test/integration/test_install_micromamba_via_command_executor.py # test/unit/pkg_mgmt/test_install_micromamba.py # test/unit/pkg_mgmt/test_install_packages.py
| "exasol-db-api @ https://exasol.org/exasol-db-api\n" | ||
| ) | ||
|
|
||
| assert context_with_python_env.binary_checker.check_binary.mock_calls == [ |
There was a problem hiding this comment.
Came into my mind that it would be good to test this, when writing the conda install packages test. So , I added same check here.
2. Activated negative test for install conda packages
| packages = json.loads(out.strip()) | ||
| return [ | ||
| CondaPackage( | ||
| name=pkg["name"], version=pkg["version"], channel=pkg["channel"] |
There was a problem hiding this comment.
Do you get the build parsed out of the json?
| output_file: TextIOBase, all_packages: list[CondaPackage] | ||
| ) -> None: | ||
| for package in all_packages: | ||
| channel_str = f"{package.channel}::" if package.channel else "" |
There was a problem hiding this comment.
I actually meant to extract the construction of a single package string, because then you can test this properly with unit tests, but it is good enough this way
There was a problem hiding this comment.
As dicsussed offline, lets do it later.
| if expected.channel and expected.channel != installed.channel: | ||
| return False | ||
|
|
||
| if expected.build and expected.build != installed.build: |
There was a problem hiding this comment.
expected build could be in theory a string with wildcards. I guess you didn't use a build string in the tests.
There was a problem hiding this comment.
Changed the numpy package definition in integration test to:
CondaPackage(
name="numpy", version=">=2.3.0,<3", channel="main", build="py314*"
),
and adjusted the ContainsCondaPackages class to work with wildcards in build string.
|



fixes #6