Introduce pyproject toml file with optional install method and dropping python 3.7 support #180
Conversation
Signed-off-by: Onuralp SEZER <thunderbirdtr@gmail.com>
…versions Signed-off-by: Onuralp SEZER <thunderbirdtr@gmail.com>
…akefile Signed-off-by: Onuralp SEZER <thunderbirdtr@gmail.com>
…nd pypi-test Signed-off-by: Onuralp SEZER <thunderbirdtr@gmail.com>
|
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.
|
| 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.
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.
I sent the proper commit and my comments about it.
There was a problem hiding this comment.
In that case, let's bring back opencv-python as not optional. We need to install some version of opencv by default.
| [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.
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.
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.
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 <thunderbirdtr@gmail.com>
Signed-off-by: Onuralp SEZER <thunderbirdtr@gmail.com>
|
|
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 <thunderbirdtr@gmail.com>
|
For quick local testing |
Signed-off-by: Onuralp SEZER <thunderbirdtr@gmail.com>
|
Hi @onuralpszr 👋🏻 Thanks a lot for your patience and willingness to look for solutions to my doubts. We need to have some version of |
| 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.
In that case, let's bring back opencv-python as not optional. We need to install some version of opencv by default.
| [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.
Poetry does that automatically
So it is not possible to just not have it?
Signed-off-by: Onuralp SEZER <thunderbirdtr@gmail.com>
|
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 <thunderbirdtr@gmail.com>
|
@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