ontology-development-kit icon indicating copy to clipboard operation
ontology-development-kit copied to clipboard

Find a standard way to document python dependencies that are out of scope for ODK

Open matentzn opened this issue 10 months ago • 2 comments

In many of the repos I work with, I keep having to litter the Makefile with random pip install X commands. I wonder if there would be an easier way to do this, for example having a requirements.txt at the top level of the ODK repo.

This could also help dealing with issues like https://github.com/INCATools/ontology-development-kit/issues/1028#issuecomment-2021296298, where a GitHub action expects that file to install dependencies during the run of the action.

Not entirely convinced we should do this, but saying it out loud for the record.

matentzn avatar Apr 02 '24 12:04 matentzn

I have said before that in my opinion, the best and most efficient solution for people who need additional software (Python packages or whatever) that is not in the ODK and that would not be suitable for addition to the upstream ODK, is to make their own custom ODK image with whatever they need. I have not changed my mind.

That being said, if we do want to provide a somewhat easy way to install additional Python packages in an ODK instance:

We should avoid doing that by means of a top-level requirements.txt file. I don’t remember the details, but I’ve been bitten before by having a file named requirements.txt in a repository, because there are tools out there that automatically assume that such a file is intended for them and start trying to use it to install Python packages. We should pick another name, one that is not already widely used, and I believe it should not even be directly under the repository’s root – rather somewhere under src/ontology/config or something like that.

gouttegd avatar Apr 02 '24 13:04 gouttegd

Ah yes, actually now that you say it, some actions are looking there by default I think, and that broke stuff in really strange ways!

I marked the issue as minor priority as I dont think that pip install in a make goal is thaaaaat terrible. Just a bit!

matentzn avatar Apr 04 '24 18:04 matentzn