Open JackKelly opened 10 years ago
Ah, thanks loads for digging into this. This is a bug. I think the problem is that I did all my developing by installing NILM Metadata using python setup.py develop
instead of python setup.py install
. The difference is that develop
doesn't copy the package to /usr/local/lib/python2.7/dist-packages/
. I imagine there's fairly easy fix by getting setup.py
to copy the *.yaml
files over... but, because I'm supposed to be focussing on my IBM work right now, this should fix the issue (I'll update the README)
sudo python setup.py develop
Great. I've just updated https://github.com/nilmtk/nilm_metadata/blob/master/README.md to include this line in the installation instructions rather than a duplicate of sudo python setup.py install
Ah, cool, I think we both did pretty much exactly the same thing at the same time! I think I've merged both our changes!
Hey @JackKelly. cc: @nipunreddevil
For making a working conda recipe for nilm_metadata, python setup.py install
option was necessary. Tried fixing the missing central_metadata
with the package_data
option in setuptools. However, problems arose as setuptools takes a specific package structure as specified in this example under the topic "Setting up your Directory Structure".
For now, the central_metadata
folder is at a position relative to the inner nilm_metadata
folder. But this would create problems with multiple platforms and packages. What do you suggest?
Thanks loads for looking at this.
sorry, I won't have time to look into this today.
What would you suggest? Moving the central_metadata
folder?
Yes. The setuptools directory structure demands that all files required by the package have to reside in the inner folder named after the package taken into account. We could move central_metadata
and have the setup.py
file modified to make this work.
I'll fork nilm_metadata
,try out the modifications and let you know if this works or not.
PS: The way in which nilm_metadata
and central_metadata
are being used have to be altered as well. Just basic path changes, but changes nevertheless.
cool. Yes, if you make the changes you feel necessary in your fork then I'll take a look. Thanks for looking into this!
On 9 January 2015 at 09:46, Mridul Malpotra notifications@github.com wrote:
Yes. The setuptools directory structure demands that all files required by the package have to reside in the inner folder named after the package taken into account. We could move central_metadata and have the setup.py file modified to make this work. I'll fork nilm_metadata,try out the modifications and let you know if this works or not.
PS: The way in which nilm_metadata and central_metadata are being used have to be altered as well. Just basic path changes, but changes nevertheless.
— Reply to this email directly or view it on GitHub https://github.com/nilmtk/nilm_metadata/issues/6#issuecomment-69313267.
Oli emailed this bug report:
Hi Jack,
I'm trying to write the metadata for wikienergy at the moment, but have hit a problem when I try to read in the building1.yaml metadata for my dataset. When I don't include building1.yaml in the metadata, things seem to work just fine. However, when I do include it, it generates this stacktrace:
so it seems like nilm-metadata is breaking while asserting that the provided path is in fact a directory. Debugging a little further:
and it turns out that the central_metadata directory doesn't exist beside the nilm_metadata directory. I downloaded the central_metadata from github which seems to have solved the problem. Is this something that should have copied over automatically when I did 'sudo python setup.py install' for nilm-metadata?
Sorry for the long email. Feel free to call me if it's easier! Oli