kuanb / peartree

peartree: A library for converting transit data into a directed graph for sketch network analysis.
MIT License
201 stars 23 forks source link

Compatibility issues peartree 0.6.0 - partridge 1.0.0 #119

Closed bpstewar closed 5 years ago

bpstewar commented 5 years ago

I believe peartree 0.6.0 and partridge 1.0.0 are incompatible, although it seems to import correctly with partridge 0.11.0. The solution is to either include an explicit number reference to the partridge library on install, or identify the problem.

C:\WBG\anaconda3\envs\GOSTnet\lib\site-packages\peartree_init_.py in 

from peartree.version import version # noqa: F401
     from peartree.paths import (
load_feed_as_graph,
get_representative_feed,

C:\WBG\anaconda3\envs\GOSTnet\lib\site-packages\peartree\paths.py in 
import partridge as ptg
     from .graph import (generate_empty_md_graph, generate_summary_graph_elements,
make_synthetic_system_network, populate_graph)
from .synthetic import SyntheticTransitNetwork

C:\WBG\anaconda3\envs\GOSTnet\lib\site-packages\peartree\graph.py in 
from .settings import WGS84
    from .summarizer import (generate_edge_and_wait_values,
generate_summary_edge_costs, generate_summary_wait_times)

C:\WBG\anaconda3\envs\GOSTnet\lib\site-packages\peartree\summarizer.py in 
def generate_edge_and_wait_values(
    feed: ptg.feed,
    target_time_start: int,
    target_time_end: int,

AttributeError: module 'partridge' has no attribute 'feed'
kuanb commented 5 years ago

Thank you @bpstewar Yes - apologies for this error. In this commit (https://github.com/remix/partridge/commit/521bf99e3692c5723e1fff3cff0bc5b9a67a30ce), the author of partridge changed the class name for feed from lower case to upper case. peartree needs to be updated to reflect that, as well.

Looks like this is related to the version 1 release work he's been doing. A short term solution would be to use v0.11 as you discovered.

I will aim to issue a minor update to reflect this modification soon. Thanks for the heads up.

invisiblefunnel commented 5 years ago

@kuanb I should have given you a heads up about the change. Let me know if I can be helpful in updating peartree.

EDIT: I tried to document the relevant changes here: https://github.com/remix/partridge/releases/tag/v1.0.0

kuanb commented 5 years ago

Thanks @invisiblefunnel I was aware of v1 work but had just failed to sit down and review updates on my end.

kuanb commented 5 years ago

@bpstewar peartree v0.6.1 has been released (https://pypi.org/project/peartree/). peartree now requires partridge v1.0.0 or greater.

Thanks again for the issue!