openworm / tracker-commons

Compilation of information and code bases related to open-source trackers for C. elegans
11 stars 12 forks source link

pip package for wcon missing schema file #86

Closed cheelee closed 8 years ago

cheelee commented 8 years ago

The package installed via the command "pip install wcon" (under the conda environment for Python 3.5) appears to be missing the schema file as indicated by this error message for when I try to run the OWAT example "WCON Demo.py"

FileNotFoundError: [Errno 2] No such file or directory: '/home/cheelee/miniconda3/lib/python3.5/site-packages/wcon/wcon_schema.json'

This is easily fixed on my side by merely copying the necessary file from my clone of tracker-commons, but I'm thinking the pip package ought to be fixed to include the file. Thanks!

MichaelCurrie commented 8 years ago

Thanks for noticing this. I think I thought anything in the src/Python/wcon folder would get packaged automatically since src/Python/setup.py specifies the package name is wcon. Instead from http://stackoverflow.com/questions/1612733/ I've learned I should include a line in setup.py:

package_data={'': ['../../wcon_schema.py']},

This actually hopefully means we don't need two copies of wcon_schema.py, since I can specify via relative paths the path to the schema file in a folder outside of wcon/.

My commit for this is 592df94b2d93536917b9fc6b666b756da1239214.