ImperialCollegeLondon / SWMManywhere

SWMManywhere is used to derive and simulate a sewer network anywhere in the world
https://imperialcollegelondon.github.io/SWMManywhere/
BSD 3-Clause "New" or "Revised" License
4 stars 1 forks source link

Packaging and development #273

Closed cheginit closed 1 month ago

cheginit commented 2 months ago

I recently released PyWBT. I switched my workflow from micromamba to Pixi. It took a while for me to figure it out but when I did, it made things so much easier and more streamlined. You can check out the contributing file to see how it can be used. Setting it up is very easy, you can just look at the pyproject of the project and the Pixi related blocks. Its logic is very simple once you get the hang of it.

For PyPi distribution, I have a GitHub Actions workflow that you can check that automates almost everything. You just have to create a project on PyPi under your account, following the instructions here. So, PyPi is mostly automated.

Conda-forge, however, has more manual steps since it has to be approved by their team. It's easy and straightforward, though. You need to fork this repo. Then create a folder with the name of the package under the recipes folder. It should usually contain just a metal.yml file, depending on the complexity of the project. You can generate the meta.yml easily by using grayskull python package. For example, for pywbt, after installing grayskull with pipx, I ran grayskull pypi pywbt in the recipes folder. This command generates a folder with the name of the package and the meta.yml file. You only need to open the meta.yml file and add a home: https://link/to/github/repo, just under the about: section. Then you open a PR. You can check out my PR for PyWBT here.

barneydobson commented 2 months ago

thanks for the info. Just pinging #270 and #261 for reference