--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/.hgignore Sun Jun 12 22:28:31 2016 +0800
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/candolint/models.py Sun Jun 12 22:28:31 2016 +0800
+database = pw.SqliteDatabase(None, journal_mode='WAL')
+class BaseModel(pw.Model):
+class Project(BaseModel):
+ url = pw.CharField(unique=True)
+ domain = pw.CharField()
+ user = pw.CharField(null=True)
+ (('domain', 'user', 'name'), True),
+class Change(BaseModel):
+ rev = pw.IntegerField()
+ branch = pw.CharField()
+ date = pw.DateTimeField()
+ author = pw.CharField()
+ message = pw.CharField()
+ project = pw.ForeignKeyField(Project, related_name='changes')
+ (('rev', 'project'), True),
+ (('node', 'project'), True),
+ ordinal = pw.IntegerField()
+ errors = pw.IntegerField()
+ warnings = pw.IntegerField()
+ success = pw.BooleanField()
+ started = pw.DateTimeField()
+ finished = pw.DateTimeField()
+ project = pw.ForeignKeyField(Project, related_name='checks')
+ change = pw.ForeignKeyField(Change, related_name='checks')
+ order_by = ('-finished', '-ordinal')
+ (('ordinal', 'project'), True),
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/incoming.py Sun Jun 12 22:28:31 2016 +0800
+from candolint.models import database, Project, Change, Check
+rel = lambda *x: os.path.abspath(os.path.join(os.path.dirname(__file__), *x))
+ database.init(rel('database.sqlite'))
+ database.create_tables([Project, Change, Check], safe=True)
+if __name__ == '__main__':
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/requirements.txt Sun Jun 12 22:28:31 2016 +0800