tapis-project / camera-traps

BSD 3-Clause "New" or "Revised" License
5 stars 9 forks source link

Reorganize the image_scoring_plugin flake #34

Closed waltermoreira closed 4 months ago

waltermoreira commented 4 months ago

This PR improves the flake for image_scoring_plugin.

The main features are:

For executing the interactive environment, run

nix develop
python

For testing, run:

nix develop
python `realpath load_test_image_scoring.py`

(realpath is necessary because the interpreter has its $CWD pointing to the location of the model file, so it needs an explicit path to the Python file.)

Note that the flake can also build the code outside of the environment. For example, the following should work even outside of the development environment:

nix build
./result/bin/python `realpath load_test_image_scoring.py`
joestubbs commented 4 months ago

Awesome, thanks!!