Loading autocnet/__init__.py +6 −5 Original line number Diff line number Diff line import os import autocnet __version__ = "0.1.0" _ROOT = os.path.abspath(os.path.dirname(__file__)) def get_data(path): return os.path.join(_ROOT, 'data', path) def get_data(filename): packagdir = autocnet.__path__[0] dirname = os.path.join(os.path.dirname(packagdir), 'data') fullname = os.path.join(dirname, filename) return fullname autocnet/fileio/io_db.py +1 −0 Original line number Diff line number Diff line Loading @@ -20,6 +20,7 @@ def setup_db_session(db): : object A SQLAlchemy session object """ print(db) engine = create_engine('sqlite:///{}'.format(db)) Base.metadata.bind = engine Base.metadata.create_all() Loading autocnet/fileio/tests/test_io_db.py +0 −1 Original line number Diff line number Diff line Loading @@ -14,6 +14,5 @@ from .. import io_db class TestDataDB(unittest.TestCase): def test_setup_session(self): print(get_data('data.db')) data_session = io_db.setup_db_session(get_data('data.db')) self.assertIsInstance(data_session, session.Session) No newline at end of file autocnet/graph/network.py +2 −7 Original line number Diff line number Diff line Loading @@ -677,9 +677,6 @@ class CandidateGraph(nx.Graph): Parameters ---------- source_node : str The identifier for the node matches : dataframe The pandas dataframe containing the matches """ Loading @@ -688,10 +685,8 @@ class CandidateGraph(nx.Graph): for j, dest_group in source_group.groupby('destination_image'): source_key = dest_group['source_image'].values[0] destination_key = dest_group['destination_image'].values[0] try: edge = self.edge[source_key][destination_key] except: # pragma: no cover edge = self.edge[destination_key][source_key] if hasattr(edge, 'matches'): df = edge.matches Loading data/data.db 0 → 100644 +52 KiB File added.No diff preview for this file type. View file Loading
autocnet/__init__.py +6 −5 Original line number Diff line number Diff line import os import autocnet __version__ = "0.1.0" _ROOT = os.path.abspath(os.path.dirname(__file__)) def get_data(path): return os.path.join(_ROOT, 'data', path) def get_data(filename): packagdir = autocnet.__path__[0] dirname = os.path.join(os.path.dirname(packagdir), 'data') fullname = os.path.join(dirname, filename) return fullname
autocnet/fileio/io_db.py +1 −0 Original line number Diff line number Diff line Loading @@ -20,6 +20,7 @@ def setup_db_session(db): : object A SQLAlchemy session object """ print(db) engine = create_engine('sqlite:///{}'.format(db)) Base.metadata.bind = engine Base.metadata.create_all() Loading
autocnet/fileio/tests/test_io_db.py +0 −1 Original line number Diff line number Diff line Loading @@ -14,6 +14,5 @@ from .. import io_db class TestDataDB(unittest.TestCase): def test_setup_session(self): print(get_data('data.db')) data_session = io_db.setup_db_session(get_data('data.db')) self.assertIsInstance(data_session, session.Session) No newline at end of file
autocnet/graph/network.py +2 −7 Original line number Diff line number Diff line Loading @@ -677,9 +677,6 @@ class CandidateGraph(nx.Graph): Parameters ---------- source_node : str The identifier for the node matches : dataframe The pandas dataframe containing the matches """ Loading @@ -688,10 +685,8 @@ class CandidateGraph(nx.Graph): for j, dest_group in source_group.groupby('destination_image'): source_key = dest_group['source_image'].values[0] destination_key = dest_group['destination_image'].values[0] try: edge = self.edge[source_key][destination_key] except: # pragma: no cover edge = self.edge[destination_key][source_key] if hasattr(edge, 'matches'): df = edge.matches Loading