Skip to content

Commit

Permalink
Implement working Datacite data source (WIP)
Browse files Browse the repository at this point in the history
- Re-implement VTSource, TarFiles, TarFilesCursor, WorksCursor
- Pass code through black

The following now work:
bin/a3k  query datacite tests/data/datacite.tar.gz \
  -q 'SELECT id,container_id,doi,url FROM Works'
bin/a3k query datacite tests/data/datacite.tar.gz \
  -q 'SELECT id,container_id,work_id,name FROM work_creators'
bin/a3k query datacite tests/data/datacite.tar.gz \
  -q 'SELECT works.id,works.container_id,doi,name FROM works
    INNER JOIN work_creators ON work_creators.work_id = works.id'

Still needed:
- Pass pylint
- Unit and integration tests
- Refactor duplicate of progress bar
- Examples
  • Loading branch information
dspinellis committed Jun 21, 2024
1 parent 4a4b2fe commit 7e59f2c
Show file tree
Hide file tree
Showing 2 changed files with 387 additions and 288 deletions.
3 changes: 2 additions & 1 deletion src/alexandria3k/data_source.py
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,8 @@ def Column(self, col):

def Close(self):
"""Cursor's destructor, used for cleanup"""
self.parent_cursor.Close()
if self.parent_cursor:
self.parent_cursor.Close()
self.elements = None


Expand Down
Loading

0 comments on commit 7e59f2c

Please sign in to comment.