Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add exporter to a local MongoDB #463

Open
wants to merge 48 commits into
base: master
Choose a base branch
from
Open

Conversation

amanchoudhri
Copy link
Collaborator

Add functions to export a given graph to a local MongoDB and then query some basic information back from that DB.

Before, get_edges() could be called either with:
a node as an input or criteria to search for matching nodes as the input
Now, those two input sets are broken up into smaller functions
@cthoyt
Copy link
Member

cthoyt commented Jul 30, 2020

Needs unit tests!

src/pybel/io/mongodb.py Outdated Show resolved Hide resolved
@codecov
Copy link

codecov bot commented Aug 1, 2020

Codecov Report

Merging #463 (f318f4a) into master (9331675) will increase coverage by 0.03%.
The diff coverage is 82.50%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #463      +/-   ##
==========================================
+ Coverage   78.30%   78.33%   +0.03%     
==========================================
  Files         176      177       +1     
  Lines        9443     9555     +112     
  Branches     1364     1387      +23     
==========================================
+ Hits         7394     7485      +91     
- Misses       1762     1775      +13     
- Partials      287      295       +8     
Impacted Files Coverage Δ
src/pybel/io/mongodb.py 81.08% <81.08%> (ø)
src/pybel/io/sbel.py 98.18% <100.00%> (+0.03%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9331675...ce37753. Read the comment docs.

amanchoudhri and others added 5 commits August 1, 2020 13:07
Before, there was a lot of repetition in deleting the '_id' and
'type' keys from mongo items. This commit makes that more DRY by
pulling that functionality out into _rm_mongo_keys().
@amanchoudhri amanchoudhri marked this pull request as ready for review August 2, 2020 20:10
src/pybel/io/mongodb.py Outdated Show resolved Hide resolved
src/pybel/io/mongodb.py Outdated Show resolved Hide resolved
src/pybel/io/mongodb.py Outdated Show resolved Hide resolved
src/pybel/io/mongodb.py Outdated Show resolved Hide resolved
src/pybel/io/mongodb.py Outdated Show resolved Hide resolved
src/pybel/io/mongodb.py Outdated Show resolved Hide resolved
src/pybel/io/mongodb.py Outdated Show resolved Hide resolved
src/pybel/io/mongodb.py Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants