-
Notifications
You must be signed in to change notification settings - Fork 51
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
Use pyproject.toml instead of setup.cfg, pytest.ini & requirements.txt and other Python related config files #276
base: master
Are you sure you want to change the base?
Conversation
I am interested in your opinions @leonardocarreras and @m-mirz. |
Good idea 👍 |
I think it is a great idea 🙌🏻 |
16d172f
to
0b2b038
Compare
This is ready for review :) I've also added pre-commit as a tool to perform several checks against changes which are staged for commit. Such as removing trailing whitespaces, checking JSON, YAML and XML syntax and Python / C++ code formatting. While doing so, I realized that much of the Python code was ugly formatted. |
@m-mirz I guess the SonarCloud warnings are false-positives. Its at least not code which I've touched. |
Signed-off-by: Steffen Vogel <[email protected]>
python: pick 266daa8f wip: villas: Minor fixes and tweaks for VillasInterface Signed-off-by: Steffen Vogel <[email protected]>
Signed-off-by: Steffen Vogel <[email protected]>
Signed-off-by: Steffen Vogel <[email protected]>
Remove trailing whitespaces Harmonize file endings to single empty line Signed-off-by: Steffen Vogel <[email protected]>
Signed-off-by: Steffen Vogel <[email protected]>
Signed-off-by: Steffen Vogel <[email protected]>
Signed-off-by: Steffen Vogel <[email protected]>
Signed-off-by: Steffen Vogel <[email protected]>
Signed-off-by: Steffen Vogel <[email protected]>
Signed-off-by: Steffen Vogel <[email protected]>
Signed-off-by: Steffen Vogel <[email protected]>
Hi @martinmoraga @leonardocarreras @dinkelbachjan, Markus has reviewed and approved this change. However, we would like to find more approvals before going ahead and merging it. Do you have a second to look at this change? |
pip3 install -r requirements.txt | ||
pip3 install --upgrade setuptools | ||
pip3 install --upgrade wheel | ||
pip3 install .[test,docs] |
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.
Here looks like we are doing a different thing, not only installing dependencies but also the package in the currently active folder (dpsim). Is this the intended behaviour?
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.
Actually, this looks fine to me @stv0g @leonardocarreras
pip3 install -r requirements.txt | ||
pip3 install --upgrade setuptools | ||
pip3 install --upgrade wheel | ||
pip3 install . |
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.
Any particular reason for the difference here about only pip3 install .
vs .[test,docs]
in the packaging/Shell/install-fedora-deps-dev.sh
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.
@stv0g Doesn't this install the dpsim package as well and not just deps?
@@ -24,8 +24,7 @@ apt-get -y install \ | |||
libgraphviz-dev \ | |||
libsundials-dev | |||
|
|||
pip3 install --user -r requirements.txt | |||
pip3 install --user -r requirements-jupyter.txt | |||
pip3 install --user . |
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.
Any particular reason for the difference here about only pip3 install .
vs .[test,docs]
in the packaging/Shell/install-fedora-deps-dev.sh
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.
@stv0g Here I would also expect only the installation of deps and not the dpsim package.
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.
Hi @stv0g! Thanks for the extra formatting, I think the code will look a lot more standardized now... From the side of the code it looks good to me in general, I would like some more opinions still on the how we do...
Side topic: Apparently, the more changes are here, the more Sonar complains and demands higher quality from reformatted existing code... |
Signed-off-by: Steffen Vogel <[email protected]>
It refers to a file named requirements-jupyter.txt which does not exist for quite some time now.. Also the file was broken by a missing line continuation.. Signed-off-by: Steffen Vogel <[email protected]>
Signed-off-by: Steffen Vogel <[email protected]>
Signed-off-by: Steffen Vogel <[email protected]>
35fa11c
Quality Gate failedFailed conditions See analysis details on SonarCloud Catch issues before they fail your Quality Gate with our IDE extension SonarLint |
@stv0g @leonardocarreras I think this can be merged after the question regarding pip install have been resolved. |
Modern Python is slowly adopting
pyproject.toml
as a single place to define a Python package and related tool settings like black for formatting, flake8 for linting and pytest for testing.Lets try to move as much of the Python-related project configuration to this file and unclutter the root of the repo.
This PR does:
requirements*.txt
,pytest.ini
andsetup.cfg
files intopyproject.toml
pyproject.toml
.gitlab-ci.yml