ScottishCovidResponse / SCRCIssueTracking

Central issue tracking repository for all repos in the consortium
6 stars 0 forks source link

Consider moving away from `conda` packaging #770

Closed bobturneruk closed 3 years ago

bobturneruk commented 3 years ago

Most projects use requirements.txt and conda as just a convenient virtual environment. This will help with packaging for pypi which we probably want to do.

kzscisoft commented 3 years ago

I have been using Poetry a lot since I first discovered it nearly a year ago, it is my go-to Python dependency handler as it creates its own shareable virtual environment which ensures all devs are working from the same conditions.

https://python-poetry.org/docs

bobturneruk commented 3 years ago

Thanks @kzscisoft - I've heard good things. I find python packaging and dependency stuff is sometimes tricky as here's so many different approaches. I'm inclined towards a lowest common denominator, allowing people to use poetry, conda, venv, whatever... We're moving from the previous phase where we had a lot more control over how people installed and used stuff, where specifying e.g. conda made sense. I think this more recent project might be a better model https://github.com/pykale/pykale

kzscisoft commented 3 years ago

@bobturneruk I think the only argument I would have there is that the shareable virtual environment is still missing. Poetry creates a file poetry.lock which means the exact conditions of a virtual environment are shareable. I think this has great benefits.

What I will say though is for more advanced installations (requiring running of additional scripts etc) Poetry would perhaps fall behind setup.py, it depends on the project at hand I guess.

bobturneruk commented 3 years ago

Thanks @kzscisoft - we should definitely discuss this more. Is poetry.lock similar to a conda spec-file? https://github.com/ScottishCovidResponse/simple_network_sim/blob/master/spec-file.txt

bobturneruk commented 3 years ago

Conda package is no longer available.