-
Notifications
You must be signed in to change notification settings - Fork 21
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
floogen: Add support for installation within python virtual environment #81
base: main
Are you sure you want to change the base?
Conversation
Added optional installation method, which exploits python venvs based on `poetry`. This provides an isolated and local environment which helps preventing setup conflicts. - Added script to build `floogen` within `poetry` venv. - Added `poetry` configs. - Updated `pyproject.toml` with precise deps versions for more reproducible builds (temporary, it will be managed with `poetry.lock`). - Updated documentation.
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.
Thanks for the pull request @gbellocchi !
I have some questions about poetry, which I am not too familiar with. What was the reason to go with that? I am not necessarily against it, but it seems to me a bit more complicated than what I am used to. For instance, what is the advantage of poetry compared to a standard python or conda virtual environment (with pip install)?
# Copyright 2023 University of Modena and Reggio Emilia. | ||
# Licensed under the Apache License, Version 2.0, see LICENSE for details. | ||
# SPDX-License-Identifier: Apache-2.0 |
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.
The linter will not like your university😉 You will have to use the ETH/Bologna header to pass the CI
# | ||
# Author: Gianluca Bellocchi <gianluca.bellocchi@unimore.it> | ||
|
||
#!/bin/bash |
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.
Shebang should be the first line before the license header
[virtualenvs] | ||
in-project = true |
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.
Couldn't this be merged in to pyproject.toml
?
"pydantic == 2.5.3", | ||
"networkx == 3.2.1", | ||
"matplotlib == 3.8.2", | ||
"mako == 1.3.1", | ||
"ruamel.yaml == 0.18.5", | ||
"hjson == 3.1.0", | ||
"jsonref == 1.1.0", | ||
"click == 8.1.7", | ||
"pylint == 3.0.3", | ||
"pytest == 7.4.4", | ||
"pygame == 2.6.1" |
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 would not specify the patch version, major or minor version should be enough. The exact version is anyway locked in poetry.lock
right?
echo "$ENV_LIST" | grep "venv" &> /dev/null | ||
if [ $? == 0 ]; then |
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.
Shouldn't poetry automatically check if there is already a python environment?
I have added an optional installation method for
floogen
, exploiting a Python virtual environment (based onpoetry
).floogen
withinpoetry
venv.poetry
configs.pyproject.toml
with precise dependencies versions for more reproducible builds (temporary, it can also be managed withpoetry.lock
).