-
Notifications
You must be signed in to change notification settings - Fork 2
Add the detection of a python virtual environment when searching for unhappy installation paths under Windows #514
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
Merged
Merged
Changes from all commits
Commits
Show all changes
3 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -276,9 +276,21 @@ jobs: | |
| python -m pip install setuptools | ||
| python scripts/extract_dependencies_from_pyproject_toml.py -f "pyproject.toml" -s "\n" > requires.txt | ||
|
|
||
| # Install the Python requirements | ||
| # Install the Python requirements outside a python venv | ||
| Get-Content .\requires.txt ` | ||
| | ForEach-Object {python -m pip install $_.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 | ||
| Get-Content .\requires.txt ` | ||
| | ForEach-Object {khiops-windows-venv\Scripts\python -m pip install $_.toString()} | ||
|
|
||
| # Deactivate the python venv | ||
| deactivate | ||
| Remove-Item -force requires.txt | ||
| - name: Setup and Install Test Requirements | ||
| run: python -m pip install -r test-requirements.txt | ||
|
|
@@ -323,6 +335,22 @@ jobs: | |
|
|
||
| # Execute Khiops Coclustering sample (train and deploy model) | ||
| Invoke-Expression -Command "$Python -m khiops.samples.samples -i deploy_coclustering -e" | ||
|
|
||
| # Install khiops-python in the python venv using the sources | ||
| # The venv python executable is used here | ||
| Invoke-Expression -Command "khiops-windows-venv\Scripts\python -m pip install ." | ||
| # Change directory to avoid using the cloned khiops-python | ||
| Invoke-Expression -Command "cd khiops-windows-venv\" | ||
|
|
||
| # Print status | ||
| # The venv python executable is used here | ||
| Invoke-Expression -Command "Scripts\python -c 'import sys; import khiops.core as kh; return_code = kh.get_runner().print_status(); sys.exit(return_code)'" | ||
|
|
||
| # The installation status MUST not fail | ||
|
Member
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. Add a whiteline above to make a paragraph.
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. Fixed |
||
| if ($LASTEXITCODE -ne 0) { | ||
| Write-Host "::error::Status error: khiops-python installation status check MUST NOT fail" | ||
| exit 1 | ||
| } | ||
| check-khiops-integration-on-linux: | ||
| strategy: | ||
| fail-fast: false | ||
|
|
||
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.
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.
Instead of a
ForEach-Objectloop simply usepython -m pip install --requirements requires.txtUh 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.
It was a existing code, maybe it was to avoid issues manipulating multi-lines file under DOS (\r\n) ?
But OK to simplify this
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 the current command we are sure we get one dependency per line.