Skip to content

Commit

Permalink
check for db before sync
Browse files Browse the repository at this point in the history
  • Loading branch information
tomlue committed Apr 16, 2024
1 parent 494e938 commit 7a03ef1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

setup(
name='sysrev',
version='1.3.2',
version='1.3.3',
description='get sysrev project data and use the sysrev api',
long_description=long_description,
long_description_content_type='text/markdown', # Specify the content type here
Expand Down
5 changes: 5 additions & 0 deletions sysrev/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,12 @@ def create_sqlite_db():
conn.commit()
conn.close()

# TODO - this could be made more efficient by checking sqlite state and updating the sysrev api
def sync(self, client, project_id):
# check that db exists
if not pathlib.Path('.sr/sr.sqlite').exists():
self.create_sqlite_db()

project_info = client.get_project_info(project_id)

labels = client.get_labels(project_id)
Expand Down

0 comments on commit 7a03ef1

Please sign in to comment.