Use khiops-core and khiops-driver-* pip packages containing binaries only#582
Use khiops-core and khiops-driver-* pip packages containing binaries only#582tramora wants to merge 2 commits into
Conversation
caa2f18 to
fd7c550
Compare
394d474 to
5312426
Compare
|
False sentiment of success : we simulate multiple Python environments using conda (#573). This is very unfortunate as we are not able yet to detect automatically an issue with the new PyPI packages regarding the remote drivers khiops-core:1041. In my opinion this one is a blocking issue. |
5312426 to
b0223fa
Compare
Hence, to properly test this, issue #573 must be addressed first. Right, @tramora ? |
95a1d21 to
cfd1802
Compare
I changed the |
| f"'{installation_method}' installation method. Make sure " | ||
| "you have installed khiops >= 10.2.3. " | ||
| "you have installed properly the Khiops Python library " | ||
| "and Khiops (if this later was not installed automatically). " |
There was a problem hiding this comment.
s/this later/the latter/
There was a problem hiding this comment.
s/this latter/the latter/
| installation_method = _infer_khiops_installation_method() | ||
|
|
||
| # Fail immediately if the major versions differ | ||
| # It can still occur if the installation method is 'conda' or 'conda-based', |
There was a problem hiding this comment.
Why? In the Conda case, the dependency is also specified, in meta.yml, right?
|
|
||
| __version__ = "11.0.0.3" | ||
|
|
||
| # The current Khiops Python library (when packaged as a PyPI package) |
There was a problem hiding this comment.
I would move this snippet to the runner, in the context of the "pip" installation method.
There was a problem hiding this comment.
Moved into the KhiopsLocalRunner::_detect_library_installation_incompatibilities...
If the khiops-core PyPI package was removed, an error is raised far before in KhiopsLocalRunner::_initialize_khiops_environment except in a very edge case I faced during my tests : khiops-core PyPI package was installed system-wide. In this case KhiopsLocalRunner::_initialize_khiops_environment runs successfully but the current detection raises an error
There was a problem hiding this comment.
I think the environment should not initialize successfully in this case. See comments https://github.com/KhiopsML/khiops-python/pull/582/changes#r3373317679 and https://github.com/KhiopsML/khiops-python/pull/582/changes#r3373326847.
popescu-v
left a comment
There was a problem hiding this comment.
See pending comments.
c89c7a6 to
aba597f
Compare
…ries only
- these packages become mandatory ("khiops-core") or optional ("khiops-driver-*") dependencies dragged during the installation process
- these packages must be installed in the Conda environments used to simulate multiple environs (the Conda packages MUST not be used)
- in order to avoid distorting usage statistics the test workflows will always use khiops packages from TestPypi
aba597f to
47a0f74
Compare
|
An issue remains while executing the "expensive tests" and thus running the integration tests for remote files access. |
| python -m pip install tomli | ||
| # First, install all dependencies except khiops-core and khiops-drivers-* | ||
| python scripts/extract_dependencies_from_pyproject_toml.py -f "pyproject.toml" --exclude-khiops-family > requires-no-khiops.txt | ||
| python -m pip install --user `cat requires-no-khiops.txt` |
There was a problem hiding this comment.
Why not -r requires-no-khiops.txt rather than cat requires-no-khiops.txt ?
| python -m pip install --user `cat requires-no-khiops.txt` | ||
| # khiops-core and khiops-drivers-* must always be installed from TestPyPI in order to avoid distorting usage statistics | ||
| python scripts/extract_dependencies_from_pyproject_toml.py -f "pyproject.toml" --khiops-family-only > requires-khiops.txt | ||
| python -m pip install --user --index-url https://test.pypi.org/simple `cat requires-khiops.txt` |
There was a problem hiding this comment.
Why not -r rather than cat?
| pip install `cat requires-no-khiops.txt` | ||
| # khiops-core and khiops-drivers-* must always be installed from TestPyPI in order to avoid distorting usage statistics | ||
| python scripts/extract_dependencies_from_pyproject_toml.py -f "pyproject.toml" --khiops-family-only > requires-khiops.txt | ||
| pip install --index-url https://test.pypi.org/simple `cat requires-khiops.txt` |
There was a problem hiding this comment.
Why not -r rather than cat?
| pip install tomli | ||
| # First, install all dependencies except khiops-core and khiops-drivers-* | ||
| python scripts/extract_dependencies_from_pyproject_toml.py -f "pyproject.toml" --exclude-khiops-family > requires-no-khiops.txt | ||
| pip install `cat requires-no-khiops.txt` |
There was a problem hiding this comment.
Why not -r rather than cat?
| pip install tomli | ||
| # First, install all dependencies except khiops-core and khiops-drivers-* | ||
| python scripts/extract_dependencies_from_pyproject_toml.py -f "pyproject.toml" --exclude-khiops-family > requires-no-khiops.txt | ||
| pip install `cat requires-no-khiops.txt` |
There was a problem hiding this comment.
Why not -r rather than cat?
| pip install `cat requires-no-khiops.txt` | ||
| # khiops-core and khiops-drivers-* must always be installed from TestPyPI in order to avoid distorting usage statistics | ||
| python scripts/extract_dependencies_from_pyproject_toml.py -f "pyproject.toml" --khiops-family-only > requires-khiops.txt | ||
| pip install --index-url https://test.pypi.org/simple `cat requires-khiops.txt` |
There was a problem hiding this comment.
Why not -r rather than cat?
| $CONDA install -y -n "$CONDA_ENV" pip | ||
| # First, install all dependencies except khiops-core and khiops-drivers-* | ||
| $CONDA run --no-capture-output -n "$CONDA_ENV" python scripts/extract_dependencies_from_pyproject_toml.py -f "pyproject.toml" --exclude-khiops-family > requires-no-khiops.txt | ||
| $CONDA run -n "$CONDA_ENV" pip install `cat requires-no-khiops.txt` |
There was a problem hiding this comment.
Why not -r rather than cat?
| $CONDA run -n "$CONDA_ENV" pip install `cat requires-no-khiops.txt` | ||
| # khiops-core and khiops-drivers-* must always be installed from TestPyPI in order to avoid distorting usage statistics | ||
| $CONDA run --no-capture-output -n "$CONDA_ENV" python scripts/extract_dependencies_from_pyproject_toml.py -f "pyproject.toml" --khiops-family-only > requires-khiops.txt | ||
| $CONDA run -n "$CONDA_ENV" pip install --index-url https://test.pypi.org/simple `cat requires-khiops.txt` |
There was a problem hiding this comment.
Why not -r rather than cat?
| rm -f requires.txt | ||
| # First, install all dependencies except khiops-core and khiops-drivers-* | ||
| python scripts/extract_dependencies_from_pyproject_toml.py -f "pyproject.toml" --exclude-khiops-family > requires-no-khiops.txt | ||
| pip install `cat requires-no-khiops.txt` |
There was a problem hiding this comment.
Why not -r rather than cat?
| pip install `cat requires-no-khiops.txt` | ||
| # khiops-core and khiops-drivers-* must always be installed from TestPyPI in order to avoid distorting usage statistics | ||
| python scripts/extract_dependencies_from_pyproject_toml.py -f "pyproject.toml" --khiops-family-only > requires-khiops.txt | ||
| pip install --index-url https://test.pypi.org/simple `cat requires-khiops.txt` |
There was a problem hiding this comment.
Why not -r rather than cat?
| # variable set by the Khiops Desktop Application installer | ||
| # Search for the `khiops_env` script location | ||
| installation_method = _infer_khiops_installation_method() | ||
| if platform.system() == "Windows" and installation_method == "binary+pip": |
There was a problem hiding this comment.
Why not put the khiops-core package check in case of Pip installation here?
| try: | ||
| distribution("khiops-core") | ||
| except PackageNotFoundError as exc: | ||
| error = ( | ||
| f"The Khiops binaries are not installed properly: {exc}. " | ||
| "Re-install the Khiops Python library to automatically install " | ||
| "Khiops. Go to https://khiops.org for more information.\n" | ||
| ) | ||
| error_list.append(error) |
There was a problem hiding this comment.
I would put this check and fail (raise exception) far earlier, when the attempt is made to initialize the Khiops environment, just after the installation method has been detected (see the other comment in this respect, above).
| an absolute path is inferred using the current folder which will probably | ||
| cause an error eventually. | ||
|
|
||
| this method raises a `RuntimeError` if the dynamic library is not found |
There was a problem hiding this comment.
Reformat this line to:
Raises
-------
`RuntimeError`
The dynamic library of the driver is not found.
|
|
||
| this method raises a `RuntimeError` if the dynamic library is not found | ||
| """ | ||
| assert type(remote_storage_type) == str and len(remote_storage_type) > 0 |
There was a problem hiding this comment.
The second assert implies the first one AFAIU. Hence, I would remove the first assert.
Fixes #572 and #578
TODO Before Asking for a Review
main(ormain-v10)Unreleasedsection ofCHANGELOG.md(no date)index.html