pybel / bel-repository

A utility for loading data from repositories of BEL documents
MIT License
1 stars 0 forks source link

Implement distributed repository #4

Open cthoyt opened 5 years ago

cthoyt commented 5 years ago

Should be able to take a list of strings with links to git repositories and take care of cloning, installing, and updating them in a temporary cache.

from bel_repository import DistributedBELRepository

urls = {
    'hbp_knowledge': 'https://github.com/pharmacome/knowledge.git',
    'neurommsig_knowledge': 'https://github.com/neurommsig/neurommsig-knowledge.git',
}

distributed_bel_repository = DistributedBELRepository(
    urls=urls, 
    metadata=...,
)

# Should be able to get graphs the same way and follow the 
# same public API as bel_repository.BELRepository
graphs = distributed_bel_repository.get_graphs()