pepkit / peppy

Project metadata manager for PEPs in Python
https://pep.databio.org/peppy
BSD 2-Clause "Simplified" License
37 stars 13 forks source link

Example does not work #347

Closed MatusV8 closed 4 years ago

MatusV8 commented 4 years ago

Hello,

I am trying to get to know peppy so I wanted to follow the examples in the readme.

First of all, the tutorial points to an non existing example object "example1/project_config.yaml" which is not included at the indicated github "https://github.com/pepkit/example_peps.git".

Second of all, when I tried to execute

import peppy
proj1 = peppy.Project("example_basic/project_config.yaml")

I recieved this error:

Traceback (most recent call last):
  File "/home/s1469622/.local/lib/python3.6/site-packages/attmap/pathex_attmap.py", line 31, in __getattr__
    v = super(PathExAttMap, self).__getattribute__(item)
AttributeError: 'Project' object has no attribute 'metadata'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/s1469622/.local/lib/python3.6/site-packages/attmap/ordattmap.py", line 45, in __getitem__
    return super(OrdAttMap, self).__getitem__(item)
KeyError: 'metadata'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/s1469622/.local/lib/python3.6/site-packages/attmap/pathex_attmap.py", line 34, in __getattr__
    return self.__getitem__(item, expand)
  File "/home/s1469622/.local/lib/python3.6/site-packages/attmap/pathex_attmap.py", line 51, in __getitem__
    v = super(PathExAttMap, self).__getitem__(item)
  File "/home/s1469622/.local/lib/python3.6/site-packages/attmap/ordattmap.py", line 47, in __getitem__
    return AttMap.__getitem__(self, item)
  File "/home/s1469622/.local/lib/python3.6/site-packages/attmap/attmap.py", line 32, in __getitem__
    return self.__dict__[item]
KeyError: 'metadata'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/s1469622/.local/lib/python3.6/site-packages/peppy/project.py", line 206, in __init__
    sections = self.parse_config_file(subproject)
  File "/home/s1469622/.local/lib/python3.6/site-packages/peppy/project.py", line 932, in parse_config_file
    _LOGGER.debug("Project metadata: {}".format(self.metadata))
  File "/home/s1469622/.local/lib/python3.6/site-packages/attmap/pathex_attmap.py", line 38, in __getattr__
    raise AttributeError(item)
AttributeError: metadata

Could you help me with this please?

I installed the peppy as follows:

pip install --user peppy
pip install --user --upgrade peppy
nsheff commented 4 years ago

it looks like the example peps have been updated to PEP v2, but we still haven't released the v2-compatible peppy yet. So, the examples are a bit out of sync. You can try installing the dev branch of peppy, which is compatible with pep v2, which is documented at http://pep.databio.org. We are planning to release PEP v2 very soon (early this week, maybe even today), so we're right in the middle of updating all the packages that rely on it.

MatusV8 commented 4 years ago

I will just wait for the update then.

Thanks.

it looks like the example peps have been updated to PEP v2, but we still haven't released the v2-compatible peppy yet. So, the examples are a bit out of sync. You can try installing the dev branch of peppy, which is compatible with pep v2, which is documented at http://pep.databio.org. We are planning to release PEP v2 very soon (early this week, maybe even today), so we're right in the middle of updating all the packages that rely on it.

nsheff commented 4 years ago

hi @MatusV8 we've just released the new version, so give that a try when you have a chance and let us know if you find anything amiss. the example on the docs page is updated now.