christopher-wild / FAIR4RS-Packaging

https://christopher-wild.github.io/FAIR4RS-Packaging/
Other
1 stars 0 forks source link

Feedback : Section 6 - Publishing Python Packages #21

Open ns-rse opened 2 months ago

ns-rse commented 2 months ago

The final challenge here lacks a clear solution where people can have a solid takeaway/reference to understand and refer back to.

The description is still fairly manual but there is the pypa/gh-action-pypi-publish that can be leveraged to make the task somewhat simpler.

I've used this in a couple of packages, you can see example in AFM-SPM/TopoStats. I have an additional set of project.optional-dependencies defined in pyproject.toml in the list pypi which are specifically installed prior to building the package...

[project.optional-dependencies]
...
pypi = [
  "build",
  "setuptools_scm[toml]",
  "wheel",
]

Also PyPI now supports Trusted Publishers which makes it really simple to configure GitHub/GitLab to publish packages.

RicCampbell commented 1 month ago

In the licensing section, would it be possible to change '..your selection of license may be influenced by the licenses of your dependencies.' to constrained please as it does have a direct impact on choice (or lack of) of licence. All very good though!