MIC-DKFZ / HD-BET

MRI brain extraction tool
Apache License 2.0
255 stars 61 forks source link

Set SimpleITK to 2.0.2, maintain list of packages only in requirements.txt #57

Open tashrifbillah opened 1 month ago

tashrifbillah commented 1 month ago

Hi, proposing this long overdue change--we should maintain the list of packages only in one place i.e. requirements.txt. This allows us to not touch setup.py.

On the other hand, after 3 years, while trying to build HD-BET, we found that it does not build with soft version specification of SimpleITK. Hence, I have hardly specified 2.0.2. I notice that one of your commits already did it that way. But then somebody made it soft. I have just undone the latter.

ebrahimebrahim commented 1 month ago

Hi, please see my proposal in #56 in which we get rid of setup.py and requirements.txt in favor of pyproject.toml. The proposal is to do this in order support publishing the package, which will make it much easier to install and also make it possible to use as a dependency in other published work. With that change it will also be possible to add unit tests that can detect issues like the one caused by the progress of SimpleITK.

The hard specification that you have here can be done inside the pyproject.toml.

Do you know if the maintainers of this project are interested in something like #56?

tashrifbillah commented 1 month ago

Do you know if the maintainers of this project are interested in something like https://github.com/MIC-DKFZ/HD-BET/pull/56?

I know I am not interested as 56 introduces complexity to a simple project and makes it hard for successors to maintain it. So it should be kept as is with my modification.

ebrahimebrahim commented 1 month ago

Fair opinion :)

The complexity automates a lot of the maintenance tasks. The project becomes easier to maintain. Publishing makes it possible to pip install the project directly.

jcfr commented 1 month ago

@tashrifbillah Thanks for the feedback! :pray:

As you mentioned, ensuring the project's maintainability over time is crucial. :rocket:

Additionally, we should base the project's infrastructure and continuous integration on modern best practices. This will streamline the contribution process, testing, and distribution.

I believe @ebrahimebrahim's proposal addresses this effectively. By leveraging a well-maintained and tested template, it adopts best practices already in use in hundreds of projects. This approach ensures that users can install and use the project seamlessly via Python wheels^2 without needing to install development tools locally.

These best practices are detailed in the development guides available at https://scientific-python.org/.

It's also important to note that our current infrastructure, including your proposed changes, relies on setup.py, which is now considered obsolete. We should transition to using a pyproject.toml^1 file instead.