keras-nlp icon indicating copy to clipboard operation
keras-nlp copied to clipboard

Make project PEP 518 compliant by using pyproject.toml and only declarative configuration

Open DavideWalder opened this issue 2 years ago • 2 comments

Is your feature request related to a problem? Please describe.

  • The project doesn't use a pyproject.toml to specify the build system, see: https://setuptools.pypa.io/en/latest/userguide/quickstart.html#basic-use

  • The project is built using setup.py instead of setup.cfg or pyproject.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)

DavideWalder avatar Feb 19 '23 11:02 DavideWalder

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.

mattdangerw avatar Feb 21 '23 18:02 mattdangerw

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

abheesht17 avatar Feb 24 '23 20:02 abheesht17

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

mattdangerw avatar Aug 20 '24 00:08 mattdangerw