MIC-DKFZ / HD-BET

MRI brain extraction tool
Apache License 2.0
284 stars 65 forks source link

Support publishing to PyPI #56

Closed ebrahimebrahim closed 1 month ago

ebrahimebrahim commented 5 months ago

This adds support for publishing to PyPI by transitioning from the legacy setup.py to pyproject.toml.

The changes are adapted from the output of cookiecutter scientific-python/cookie based off scientific-python/cookie@8c0a1627. See https://learn.scientific-python.org/development/

Changes include:

The major benefit of this proposed update is that HD_BET can be more easily maintained and automatically published to PyPI upon release. This helps bring HD_BET further into the larger python neuroimaging ecosystem by allowing other packages to mark it as a dependency.

The only required step on your side will be to create a pending publisher on PyPI so that the GitHub workflow can automatically publish the package upon release creation. Would be happy to provide more details on any of this.

ebrahimebrahim commented 5 months ago

@FabianIsensee What do you think of this approach to publishing the project and automating some of the routine maintenance? Happy to provide some help in keeping this wonderful project alive!

FabianIsensee commented 4 months ago

Hey, thanks for the PR. This project is no longer actively developed and I welcome ways of reducing the amount of work we have to invest into keeping it running for everyone. Can you please enlighten me how I can integrate the automatic pypi publishing once it is merged?

ebrahimebrahim commented 4 months ago

Once it is merged the steps to publish would be:

(The "automatic" aspect of it is that the publish step is triggered automatically whenever you create a release on github. This is achieved by the configuration in the cd.yml file that is added in this PR)

FabianIsensee commented 4 months ago

Thanks, will do. Might need some more days because I need to fix some things on our end

ebrahimebrahim commented 3 months ago

@FabianIsensee Let me know if there are any more questions I can answer or anything I can help with to move this along

ebrahimebrahim commented 1 month ago

Looks like this was merged and then reverted in 2f99c84979433d9a908f90527ab70885f069082e?

FabianIsensee commented 1 month ago

Yes this is too much at once for me. I do not have the time right now to go through everything I would be merging and understanding it, so I prefer to keep things simple for now. I know this might be difficult to understand from the perspective of an experienced software dev but I have to pick my battles and reduce workload in others. The way hd-bet is right now is what causes the least amount of work to maintain it I am currently considering retraining HD-BET within nnU-Net to keep my software stack consistent. The code in this repo is very old (2018)

ebrahimebrahim commented 1 month ago

No worries at all -- it's understandable. The idea here is to reduce the workload of maintenance and increase accessibility of your tools, but there is of course an up front cost of understanding the tools that automate certain aspects of maintenance. Another person might have accepted not understanding all the tools but you want to make sure you understanding everything in your codebase -- I am the same way :)