-
Notifications
You must be signed in to change notification settings - Fork 2
Use khiops-core and khiops-driver-* pip packages containing binaries only #582
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
Open
tramora
wants to merge
2
commits into
main
Choose a base branch
from
core-and-drivers-as-pip-packages
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -97,7 +97,12 @@ jobs: | |
| # Add homogeneous TOML support (Python >= 3.12 has standard tomllib) | ||
| $CONDA install -y -n "$CONDA_ENV" tomli | ||
| $CONDA run --no-capture-output -n "$CONDA_ENV" python scripts/extract_dependencies_from_pyproject_toml.py -f "pyproject.toml" > requires.txt | ||
| $CONDA install -y -n "$CONDA_ENV" `cat requires.txt` | ||
| # Conda is currently used to simulate multiple Python environment, let's avoid installing Conda Packages at all but Pip ones instead | ||
| $CONDA install -y -n "$CONDA_ENV" pip # Required otherwise the system pip would be run which will install outside the Conda env | ||
| # First, install all dependencies except khiops-core and khiops-drivers-* | ||
| $CONDA run -n "$CONDA_ENV" pip install `perl -pe "s/khiops-\S+//g" requires.txt` | ||
| # khiops-core and khiops-drivers-* must always be installed from TestPyPI in order to avoid distorting usage statistics | ||
| $CONDA run -n "$CONDA_ENV" pip install --index-url https://test.pypi.org/simple `grep -oE "khiops-\S+" requires.txt | paste -sd ' ' -` | ||
| rm -f requires.txt | ||
| - name: Configure Expensive Tests Setting | ||
| # Skip expensive tests by default, unless on the `main-v10` or `main` branches | ||
|
|
@@ -267,17 +272,20 @@ jobs: | |
| python scripts/extract_dependencies_from_pyproject_toml.py -f "pyproject.toml" -s "\n" > requires.txt | ||
|
|
||
| # Install the Python requirements outside a python venv | ||
| # khiops-core and khiops-drivers-* must always be installed from TestPyPI in order to avoid distorting usage statistics | ||
| # Use of both 'index-url' and '--extra-index-url' options allows indexes prioritization (PEP 766) | ||
| Get-Content .\requires.txt ` | ||
| | ForEach-Object {python -m pip install $_.toString()} | ||
| | ForEach-Object {python -m pip install --index-url https://test.pypi.org/simple --extra-index-url https://pypi.org/simple $_.toString()} | ||
|
|
||
| # Create and activate a python venv | ||
| python -m venv khiops-windows-venv | ||
| khiops-windows-venv\Scripts\Activate.ps1 | ||
|
|
||
| # Install the Python requirements inside a venv | ||
| # The venv python executable is used here | ||
| # Same indexes prioritization as above | ||
| Get-Content .\requires.txt ` | ||
| | ForEach-Object {khiops-windows-venv\Scripts\python -m pip install $_.toString()} | ||
| | ForEach-Object {khiops-windows-venv\Scripts\python -m pip install --index-url https://test.pypi.org/simple --extra-index-url https://pypi.org/simple $_.toString()} | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Cf. the
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. for Windows (PowerShell), I do not know yet the tools that would help me split into 2 lines |
||
|
|
||
| # Deactivate the python venv | ||
| deactivate | ||
|
|
@@ -392,7 +400,10 @@ jobs: | |
| # Install tomli for Python < 3.11 | ||
| pip install tomli | ||
| python scripts/extract_dependencies_from_pyproject_toml.py -f "pyproject.toml" > requires.txt | ||
| pip install `cat requires.txt` | ||
| # First, install all dependencies except khiops-core and khiops-drivers-* | ||
| pip install `perl -pe "s/khiops-\S+//g" requires.txt` | ||
| # khiops-core and khiops-drivers-* must always be installed from TestPyPI in order to avoid distorting usage statistics | ||
| pip install --index-url https://test.pypi.org/simple `grep -oE "khiops-\S+" requires.txt | paste -sd ' ' -` | ||
| rm -f requires.txt | ||
| if [[ "${{ matrix.container }}" == "debian13" ]]; then | ||
| deactivate | ||
|
|
@@ -447,20 +458,6 @@ jobs: | |
| echo "::error::Status error: improper setup, as expected: khiops-python has been cloned, not installed from a package" | ||
| fi | ||
|
|
||
| # Run the library against an incompatible Khiops (with a different major version) | ||
| # This instance of Khiops is isolated in a dedicated conda environment | ||
| CONDA="/root/miniforge3/bin/conda" | ||
| # Check an error is raised because of the major version mismatch | ||
| # The khiops-python library from the cloned sources is used here | ||
| PATTERN=$($CONDA run -n py3_khiops10_conda python -c "import khiops.core as kh; print(kh.get_runner().khiops_version)" 2> >(grep -Ei 'major version.*?does not match')) | ||
| if [ -z "$PATTERN" ]; then | ||
| echo "::error::Status error: khiops-python should fail because of the major version mismatch" | ||
| if [[ "${{ matrix.container }}" == "debian13" ]]; then | ||
| deactivate | ||
| fi | ||
| exit 1; | ||
| fi | ||
|
|
||
| # Run the remaining integration tests | ||
| python -m unittest -v tests.test_khiops_integrations | ||
|
|
||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Same as above regarding
--extra-index-url.Uh oh!
There was an error while loading. Please reload this page.
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.
for Windows (PowerShell), I do not know yet the tools that would help me split into 2 lines