-
Notifications
You must be signed in to change notification settings - Fork 2.8k
WIP - feat: introduce pyproject.toml and pre-commit file #53
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
feat: toml file uses poetry as a dependency management and packaging system feat: pre-commit added. It can be use with git hooks for checks Signed-off-by: Onuralp SEZER <[email protected]>
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.
Hello there, thank you for opening an PR ! 🙏🏻 The team was notified and they will get back to you asap.
Hi, @onuralpszr 👋🏻! I underestimated you. Thank you very much for taking the time. This was the first time I would use this setup so on this occasion I have some questions. Questions
Notes
We really would like to keep the current Python version requirement. Problem is that very Computer Vision projects are slow when it comes to adopting new versions.
Was that actually code or comments? |
Hello; Let me answering your questions with possible source links as well. 1 - I do use pyproject.toml over setup.py because it is more modern and easy to manage for me. I do not need requirement.txt and I can set version or can put between versions also I can do all of my check configs and so many other functionally inside that toml file. There is an also pep link about that so it can give also more idea about as well. 2- I use Poetry because It can manage pyproject and install packages so basically manage pip and setup.py in 1 command line also it has ability to check package versions. I can use something else for packahing like "hatchling" but it just personal choice and I do use a lot personal and in business it is very much useful tool. I can also specify python version when I create venv and has more control over my project. Technically I use pip indirectly but it still useful and worth file give it a shot. Plus toml file is bigger advantage because you have sections and more cleaner and have more options as well. You can also do publish and build via poetry directly as well. 3- pre-commit does not require poetry it is a standalone tool you can use it just needs configs and pre-commit can fetch that from "toml" file or we can put all inside the pre-commit yml. Also "toml" file can be created differently like I said early on like "hatchling" so it is technically need a "toml" file in that case not the "poetry". Poetry is manage toml/add package/publish/build / can be extended (via plugins) and since it is a toml file pre-commit and use that as well. For example If you check fastapi project you can see they also use toml file but they prefer to use "hatchling" so for pre-commit it needs a place to read "configs" can be pyproject.toml or can be inside of it own config or you can create config for each tool like "black config file, yapf config file etc..." For that last part If you run UPDATE-2 pypa/pip#8559 (pypa/pip want us to use pyproject.toml by default instead of old setup.py) |
Hi, @onuralpszr 👋🏻! Sorry, I get distracted by other important stuff. Still, want to contribute? I hope 🙏🏻 |
Yes I want to do it. I answered your questions so please let me know how do you want to proceed it.know. So I can do more work on it. I stopped a bit because of your questions. |
Awesome @onuralpszr! 🔥 I got a bit overwhelmed with open issues and PRs before the |
Description
feat: introduce pyproject.toml and pre-commit file
feat: toml file uses poetry as a dependency management and packaging system
feat: pre-commit added. It can be use with git hooks for checks
Extra notes
I also found that some of the lines pass way more than 88 lines and there is no new line at the end of line in files. I did not add those changes yet but I can do if it is gets accepted.
While I was doing migration work, I also want to hear your opinion as well, please let me know and thank you.
List any dependencies that are required for this change.
Type of change
How has this change been tested, please provide a testcase or example of how you tested the change?
Install poetry and run
Any specific deployment considerations
For example, documentation changes, usability, usage/costs, secrets, etc.
pre-commit config required on repository settings for automatic pre-commit pr and and pre-commit github actions