petermr / pygetpapers

a Python version of getpapers
Apache License 2.0
78 stars 9 forks source link

Comments on Python packaging #35

Open ml-evs opened 2 years ago

ml-evs commented 2 years ago

As a second part of an unofficial JOSS pre-review, you might consider tweaking the way you package up this project, in the following ways:

  1. It seems that the git tags are not coupled to PyPI releases - JOSS requires the final reviewed code to be archived to Zenodo (or somewhere related), and there is nice integration to do this via GitHub releases (themselves based on git tags). It can also be nice to publish these releases automatically to PyPI (as we do for one of our packages here: https://github.com/Materials-Consortia/optimade-python-tools/blob/bb3c5a11364cce5c8e8d4c2019c9673a0e77d9ea/.github/workflows/cd_release.yml#L78-L85).
  2. Providing fully open versions of requirements can be helpful, but it is also very useful to provide specific combinations of versions of your dependencies that you have tested. You could do this in the requirements.txt file, for example, whilst leaving the versions more open in your setup.py. This would also allow you to automatically perform tests on new versions of your dependencies (which again can be automated using e.g. dependabot through GitHub directly).
ayush4921 commented 2 years ago

Hi @ml-evs ! Thanks alot for the example. I have successfully implemented this in pygetpapers.

ml-evs commented 2 years ago

Hi @ayush4921, received your email so I will continue adding some comments on these issues, if that is okay with you!

It looks like you have handled both my points above. One additional note about your setup.py: it might be useful to include a python_requires field to say which Python versions you support (in practice, the ones you are automatically testing it with, as your support for different Python versions will strongly depend on your dependencies). So maybe python_requires>=3.8? You can then remove the "trove" tags (e.g. lines like :: Python :: 3.4) for 3.4, 3.5 etc. that are used for filtering on PyPI.