The current setup for packaging is a bit dated, we use setup.py and don't use nide features like extras etc. What we could achieve:
- Use
pyproject.toml for configuring the whole package
- Use
extras to install optional packages: pip install mollie-api-python[examples] would install flask, mollie-api-python[test] would install pytest etc. This is better than using separate requirement.txt files, or write things in documentation.
- We could setup minimum and maximum versions for dependencies, ensuring that we automatically upgrade a dependency for which a vulnerability was found to a newer version (or trigger a conflict for the vulnerable version).
- Minimum/maximum version specifiers for dependencies can also be used by @dependabot to inform us automatically about vulnerabilities we're not aware of.
- Specify supported python versions for the package, helping our users to use the correct package for their environment.
Reference docs: https://packaging.python.org/en/latest/tutorials/packaging-projects/
The current setup for packaging is a bit dated, we use
setup.pyand don't use nide features like extras etc. What we could achieve:pyproject.tomlfor configuring the whole packageextrasto install optional packages:pip install mollie-api-python[examples]would installflask,mollie-api-python[test]would installpytestetc. This is better than using separaterequirement.txtfiles, or write things in documentation.Reference docs: https://packaging.python.org/en/latest/tutorials/packaging-projects/