ABI-CTT-Group / metadata-manager

http://sitesdev.bioeng.auckland.ac.nz/clin864/metadata-manager/build/index.html
Apache License 2.0
2 stars 0 forks source link

How should the tools be packaged? #2

Open dbrnz opened 2 years ago

dbrnz commented 2 years ago

I see that the requirements.txt that is part of PR #1 specifies both Jupyter and Python's extensions for Windows (pywin32). Whilst these might be part of a development environment, are they necessary for the general Python package?

If nothing else, I suggest we use poetry for both dependency management and packaging -- amongst other things it cleanly separates requirements and works well with ReadTheDocs (generating documentation whenever changes are pushed to GitHub -- I previously used pipenv but struggled in getting it to work with R-T-Docs.)

chinchien-lin commented 2 years ago

Hi @dbrnz,

Thank you for pointing this out. Yes, I think they might not be necessary as they were auto-generated by "pip freeze > requirements.txt". They might be just included in other dependencies but not actually being used.

I will have a look at poetry as you mentioned perhaps could switch to it for dependency management. @Prasad, what do you think @Prasad?

PrasadBabarendaGamage commented 2 years ago

Thanks very much @dbrnz!! Very valuable feedback!

@LIN810116 Seems there is a third-party plugin for pycharm https://plugins.jetbrains.com/plugin/14307-poetry

I think the dependencies e.g. Jupyter came in from the template project (https://github.com/Research-software-development-resources/template-project) @LIN810116 Seems best if also use poetry there?

@dbrnz If you have any suggestions on the best practices - would be great to hear your thoughts (even if it's just some comments - we can put it into the sphinx documentation (https://research-software-development-tutorials.readthedocs.io/) + add you to the contributors list : ) @LIN810116 perhaps we can add the info on poetry to the best practices section in this documentation?

dbrnz commented 2 years ago

I think it is important to understand and use virtual environments when working with Python and that is where tools such as pyenv, pipenv, poetry, and others come into their own. Poetry is one of the more recent of these tools so understands pyproject files (there's a PEP about these but I don't know the number). In fact there is little need to use Docker (or a similar container) if development is done using a virtual environment,