From ef76b042b652c29bb5df2b25459966d2e3f30b5c Mon Sep 17 00:00:00 2001 From: Pere Miquel Brull Date: Sat, 24 Feb 2024 19:16:49 +0100 Subject: [PATCH] Fix types --- gitdb/dao/contributors.py | 4 ++-- gitdb/dao/issues.py | 6 +++--- gitdb/dao/reviews.py | 4 ++-- gitdb/dao/stars.py | 4 ++-- gitdb/dao/weekly_commits.py | 4 ++-- setup.py | 4 ++-- 6 files changed, 13 insertions(+), 13 deletions(-) diff --git a/gitdb/dao/contributors.py b/gitdb/dao/contributors.py index c5a0e5b..78f33eb 100644 --- a/gitdb/dao/contributors.py +++ b/gitdb/dao/contributors.py @@ -3,7 +3,7 @@ """ from typing import Any, Dict, List -from sqlalchemy import Column, Integer, Sequence, String +from sqlalchemy import Column, Integer, Sequence, String, BigInteger from sqlalchemy.orm import DeclarativeMeta, Session from gitdb.api.client import APIClient @@ -29,7 +29,7 @@ class ContributorsModel(base_instance): __tablename__ = "contributors" - id = Column(Integer, Sequence("contributors_id_sequence"), primary_key=True) + id = Column(BigInteger, Sequence("contributors_id_sequence"), primary_key=True) contributions = Column(Integer) user_id = Column(Integer) user_login = Column(String) diff --git a/gitdb/dao/issues.py b/gitdb/dao/issues.py index 57bcc08..3dbb0c2 100644 --- a/gitdb/dao/issues.py +++ b/gitdb/dao/issues.py @@ -3,7 +3,7 @@ """ from typing import Any, Dict, List -from sqlalchemy import ARRAY, Column, DateTime, Integer, String +from sqlalchemy import ARRAY, Column, DateTime, Integer, String, BigInteger from sqlalchemy.orm import DeclarativeMeta, Session from gitdb.api.client import APIClient @@ -38,7 +38,7 @@ class IssuesModel(base_instance): __tablename__ = "issues" - id = Column(Integer, primary_key=True) + id = Column(BigInteger, primary_key=True) number = Column(Integer, primary_key=True) title = Column(String) body = Column(String) @@ -62,7 +62,7 @@ class PullsModel(base_instance): __tablename__ = "pulls" - id = Column(Integer, primary_key=True) + id = Column(BigInteger, primary_key=True) number = Column(Integer, primary_key=True) title = Column(String) body = Column(String) diff --git a/gitdb/dao/reviews.py b/gitdb/dao/reviews.py index 93523cb..d43dcea 100644 --- a/gitdb/dao/reviews.py +++ b/gitdb/dao/reviews.py @@ -4,7 +4,7 @@ from typing import Any, Dict, List, Optional from pydantic import BaseModel -from sqlalchemy import Column, DateTime, Integer, Sequence, String +from sqlalchemy import Column, DateTime, Integer, Sequence, String, BigInteger from sqlalchemy.orm import DeclarativeMeta, Session from gitdb.api.client import APIClient @@ -69,7 +69,7 @@ class ReviewsModel(base_instance): __tablename__ = "latest_reviews" - id = Column(Integer, Sequence("review_id_seq"), primary_key=True) + id = Column(BigInteger, Sequence("review_id_seq"), primary_key=True) number = Column(Integer) reviewer = Column(String) review_state = Column(String) diff --git a/gitdb/dao/stars.py b/gitdb/dao/stars.py index 797533e..77dbfa1 100644 --- a/gitdb/dao/stars.py +++ b/gitdb/dao/stars.py @@ -3,7 +3,7 @@ """ from typing import Any, Dict, List -from sqlalchemy import Column, DateTime, Integer, Sequence, String +from sqlalchemy import Column, DateTime, Integer, Sequence, String, BigInteger from sqlalchemy.orm import DeclarativeMeta, Session from gitdb.api.client import APIClient @@ -35,7 +35,7 @@ class StarsModel(base_instance): __tablename__ = "stargazers" - id = Column(Integer, Sequence("stargazers_id_sequence"), primary_key=True) + id = Column(BigInteger, Sequence("stargazers_id_sequence"), primary_key=True) starred_at = Column(DateTime) user_id = Column(Integer) user_login = Column(String) diff --git a/gitdb/dao/weekly_commits.py b/gitdb/dao/weekly_commits.py index 847c902..45c0131 100644 --- a/gitdb/dao/weekly_commits.py +++ b/gitdb/dao/weekly_commits.py @@ -4,7 +4,7 @@ from datetime import datetime, timedelta from typing import Dict, List -from sqlalchemy import Column, DateTime, Integer, Sequence +from sqlalchemy import Column, DateTime, Integer, Sequence, BigInteger from sqlalchemy.orm import DeclarativeMeta, Session from gitdb.api.client import APIClient @@ -32,7 +32,7 @@ class WeeklyCommitsModel(base_instance): __tablename__ = "weekly_commits" - id = Column(Integer, Sequence("commits_id_sequence"), primary_key=True) + id = Column(BigInteger, Sequence("commits_id_sequence"), primary_key=True) date = Column(DateTime) commits = Column(Integer) diff --git a/setup.py b/setup.py index ccb5c58..e5ad744 100644 --- a/setup.py +++ b/setup.py @@ -26,8 +26,8 @@ def get_long_description(): dev = {"isort", "pre-commit", "ruff", "black", "pycln"} setup( - name="git-db", - version="0.1.0", + name="PyGitDB", + version="0.1.1", description="Load git stats into a DuckDB db locally for easy analytics.", long_description=get_long_description(), long_description_content_type="text/markdown",