Make project PEP 518 compliant by using pyproject.toml and only declarative configuration
Is your feature request related to a problem? Please describe.
-
The project doesn't use a
pyproject.tomlto specify the build system, see: https://setuptools.pypa.io/en/latest/userguide/quickstart.html#basic-use -
The project is built using
setup.pyinstead ofsetup.cfgorpyproject.toml, see here for the rationale
Describe the solution you'd like
Move the content of setup.py to pyproject.toml
Describe alternatives you've considered
Additional context
I had a look at the project to try to understand why setup.py is being used but couldn't find any.
Also, tools such as pytest, formatters and so on support pyproject.toml. The general direction is to only use this file for configuration (the TOML parser was also included in the standard library in Python 3.11)
Thanks! What's the main advantage to switching?
I suspect we won't want to do this independently. The whole of Keras and TF, is still using setup.py for the most part, so if just KerasNLP switched setup files that will probably cause more headaches then save.
Random comment. We might want to replace flake8 and isort with ruff: https://github.com/charliermarsh/ruff. Pandas, scipy, HF, etc. have migrated to ruff. Way faster, apparently. Of course, not a necessity to migrate, but just putting it here as an FYI :p
Closing this for now! I think the KerasNLP answer is we will follow whatever Keras does just to keep our overall infra similar. So if Keras switches we can switch here, and better to track any changes like this on https://github.com/keras-team/keras