weecology / DeepForest

Python Package for Airborne RGB machine learning

Home Page:https://deepforest.readthedocs.io/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Check unused dependencies

Mu-Magdy opened this issue · comments

Compare the requirements file to check if we are installing unneeded requirements
Tried to use pipreqs to check for requirements, but it only generates the requirements that are imported in the file so it misses some system packages
I will make here like a thread checking if we need this module or not

@Mu-Magdy - was this closed by #725 or is there still more work to be done. If #725 took care of it you can go ahead and close. Thanks!

Hi @ethanwhite

I think that I can make a new pr and try to delete some modules that i can't see directly in code then make a commit to check if the tests fails then that module is used. if tests pass that means it is not used.

Do you think this is the best approach or there is a better one?

ps: I tried python libraries that make automatic requirements.txt file like ( pipreqs ) but it mainly goes through all .py files and write imported libraries in requirements.txt file it doesn't check for docs build or other files

I think that approach would work fine. You could do it locally by setting up fresh environments (conda or virtual environments) or through GitHub. If doing it through GitHub either run the tests in your fork or if you submit PRs to this repo mark them with [WIP] so folks know not to worry about them.

This is definitely a little tricky to do in an automated fashion since some of these dependencies are optional optional dependencies for other packages that we need for what we are doing with them. You can also post the current list of dependencies that we don't explicitly import to Slack and see if folks remember what is going on with them.

As mentioned on slack all other libraries are used for documentation. That closes this issue