-
-
Notifications
You must be signed in to change notification settings - Fork 381
Add basic import test #1516
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
Add basic import test #1516
Conversation
| cd ./install-test | ||
| sed -i 's/^\(python *= *\).*$/\1">=3.10,<3.12"/' pyproject.toml | ||
| poetry add "$(ls ../dist/*.whl)[server]" | ||
| poetry add "$(ls ../dist/*.whl)[server]" |
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.
why are we still using poetry if there's PDM?
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.
Test before was with poetry, and habits die hard ^^'
Can change, have to see how to create empty project with pdm
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.
I'd actually only use pdm to create a virtualenv (since pdm is already installed anyway)
pdm venv create XXX
and then activate it and install giskard with regular pip
pip install "$(ls ../dist/*.whl)[server]"
python -c 'import giskard'
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.
this makes it way more readable too
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.
and closer to what people will do
.github/workflows/build-python.yml
Outdated
| run: pdm build | ||
| - name: Create new project, install wheel and import | ||
| run: | | ||
| mkdir ./install-run |
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.
I'd still skip the pdm init as we don't need a project to be create just simple venv:
pdm venv create --name test-install
eval $(pdm venv activate test-install)
pip install "$(ls ../dist/*.whl)"
python -c "import giskard"
after the second line in the script you shouldn't need to use pdm to run python
b2aa512 to
1dcd305
Compare
| uses: snok/install-poetry@v1 | ||
| - name: Create new project and install wheel | ||
| run: | | ||
| poetry new ./install-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.
could you rename this step to "Create new project and install server wheel (Poetry)"
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.
Done
.github/workflows/build-python.yml
Outdated
| sed -i 's/^\(python *= *\).*$/\1">=3.10,<3.12"/' pyproject.toml | ||
| poetry add "$(ls ../dist/*.whl)[server]" | ||
| poetry add "$(ls ../dist/*.whl)[server]" | ||
| - name: Create new project, install wheel and import |
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.
please also add Poetry to the step name
andreybavt
left a comment
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.
to make it clear what is going on let's mention pdm/pip/poetry in step names
|
Kudos, SonarCloud Quality Gate passed! |








Description
Related Issue
Type of Change
Checklist
CODE_OF_CONDUCT.mddocument.CONTRIBUTING.mdguide.make codestyle.