Still trying to figure out how everything works and fits together, but here is what I have found so far. This was originally triggered by looking into arviz-devs/xarray-einstats#18, but it is not necessarily related, to try and fix this I ended up doing some workarounds that are far from ideal but ti seems they will be necessary for the time being.
The pyproject.toml template currently lists two dynamic fields:
|
dynamic = ["version", "description"] |
From what I understood, this means that they are not defined in the pyproject file itself but should instead be retrieved dynamically by the build library during the install process. flit seems to then magically take the correct version for the package and a short description. The version thing works great, but the short description does not. What ends up being used as short description is the first line of the __init__.py
package level docstring:
|
""" |
|
{{ cookiecutter.project_name }} |
|
|
|
{{ cookiecutter.short_description }} |
|
""" |
that means that with the current config, the package name is repeated as short description instead of using the actual short description. This can be seen in https://pypi.org/project/xarray-einstats/ for example:
xarray-einstats.
is used as short description (side note, since pydocstyle was added to tox checks, I think line two needs to end with a dot for a clean generated project to pass the checks). This can be fixed by updating the docstring template in init.py or by making the description be a static field, I am not sure it is worth it to have description
as a dynamic field using the first line of the dosctring as it is still hardcoded in the readme.
I can submit a PR for either of the two options. Let me know which one do you prefer or if you think a 3rd option would be better.