-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Introduce pyproject toml file with optional install method and dropping python 3.7 support #180
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
Conversation
Signed-off-by: Onuralp SEZER <[email protected]>
…versions Signed-off-by: Onuralp SEZER <[email protected]>
…akefile Signed-off-by: Onuralp SEZER <[email protected]>
…nd pypi-test Signed-off-by: Onuralp SEZER <[email protected]>
I noticed that in the discussion list (#181), we may need to introduce new mandatory or optional dependencies based on requirements and how the code is written. If we need more than one group, please let me know. Regarding optional installation, I am open to new names. I only used 'full' as a placeholder to demonstrate the installation process. Here is the issues I notice require new dependencies #177 - seaborn |
Hi, @onuralpszr 👋🏻! Massive change. Thanks a lot for helping us out. I left a few comments, but I also have a few that are not directly died to your change.
|
pyproject.toml
Outdated
opencv-python-headless = "^4.8.0.74" | ||
matplotlib = "^3.7.1" | ||
pyyaml = "^6.0" | ||
opencv-python= { version = "^4.8.0.74", optional = 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.
Is it possible to make opencv-python-headless
optional
and opencv-python
default? And if so, how would that work?
I'm asking because most of our users are probably desktop
users, but there is a growing need for headless
installation. I want to support both, but I still prioritize desktop
.
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 sent the proper commit and my comments about it.
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.
In that case, let's bring back opencv-python
as not optional
. We need to install some version of opencv
by default.
pyproject.toml
Outdated
[tool.poetry.dependencies] | ||
python = ">=3.8,<3.12.0" | ||
numpy = "^1.20.0" | ||
opencv-python-headless = "^4.8.0.74" |
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.
Do we need to pin a minimal version of all packages? Up until now, we only had numpy
pinned, and I don't want to force artificial constraints unless I really need to force something.
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.
Poetry does that automatically plus I did installation in python3.8 so any version above we assume it is gonna be fine.
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.
Poetry does that automatically
So it is not possible to just not have it?
docs: 📝 change min python 3.7 to 3.8 in readme Signed-off-by: Onuralp SEZER <[email protected]>
Signed-off-by: Onuralp SEZER <[email protected]>
|
While I was trying to find alternative way of with keeping "opencv-python" as default. I am having a problem and that is basically I cannot make opencv-python default because I cannot delete it in case of headless install, even we install for the first time it still going to install opencv-python no matter what and that defeats the purpose of split into extras system. What I can offer is pip install supervision # no opencv
pip install supervision[desktop] # opencv with GUI
pip install supervision[headless] # opencv without GUI |
Signed-off-by: Onuralp SEZER <[email protected]>
For quick local testing
|
Signed-off-by: Onuralp SEZER <[email protected]>
Hi @onuralpszr 👋🏻 Thanks a lot for your patience and willingness to look for solutions to my doubts. We need to have some version of |
pyproject.toml
Outdated
opencv-python-headless = "^4.8.0.74" | ||
matplotlib = "^3.7.1" | ||
pyyaml = "^6.0" | ||
opencv-python= { version = "^4.8.0.74", optional = 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.
In that case, let's bring back opencv-python
as not optional
. We need to install some version of opencv
by default.
pyproject.toml
Outdated
[tool.poetry.dependencies] | ||
python = ">=3.8,<3.12.0" | ||
numpy = "^1.20.0" | ||
opencv-python-headless = "^4.8.0.74" |
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.
Poetry does that automatically
So it is not possible to just not have it?
Signed-off-by: Onuralp SEZER <[email protected]>
1 - For versions yes just change toml file and you all good |
@onuralpszr looks good! I'll do a few tests, and we will merge. |
Awesome let me know if you need anything |
Hi @onuralpszr 👋🏻! I tested PR today. And it looks good. There is, however, something that I'm a bit worried about. Our Pillow version is too high and forces the environment to restart. I wouldn't like that to happen. Could we make the required version lower? Preferably
|
Signed-off-by: Onuralp SEZER <[email protected]>
@SkalskiP it's done. I refresh lock file too. |
@onuralpszr let me do few tests :) |
@onuralpszr Finished my tests. Merging. Fingers crossed 🤞🏻 |
Let the fun begin :) |
Our conversation about Pillow came back to me quickly... It looks like Colab is running the Pillow version with Critical vulnerabilities. https://github.com/roboflow/supervision/security/dependabot |
Let's open up an issue and keep public ask for users to use "higher" version they just have to restart runtime before they do stuff. At least we are going to be safe zone. |
@onuralpszr okey, so:
|
Good idea, and when you install via pip it will already give you latest so we mostly already covered as well. |
@onuralpszr done: #202 |
Description
Related issue(s):
Fix #130
Fix #179
This change introduce pyproject.toml file with poetry and allows to user only install opencv-python-headless or full version of opencv in choice.
Example
Second change is dropping python 3.7 support. It is because python 3.7 is reached to EOL and well known project like pytorch and tensorflow already dropped python 3.7 in their latest versions.
Link : https://devguide.python.org/versions/
Link : https://github.com/tensorflow/tensorflow
Link: https://github.com/pytorch/pytorch
List any dependencies that are required for this change.
Type of change
Please delete options that are not relevant.
How has this change been tested, please provide a testcase or example of how you tested the change?
For testing pyproject.toml users needs to install poetry in their system and create & activate environment via
Once this PR merged, document needs to indicate we no longer give full opencv but instead you will only get headless version of opencv