Hi all,
http://fedoraproject.org/wiki/Infrastructure/PackageDatabase has been out there for a bit...
I've put together a strawman schema (as a TurboGears model.py) to help move things along - apologies if someone else has beaten me to it. I think at this point the right questions to be asking are long the lines of "will this schema support feature X or use case Y?". From a quick glance at the web page, I *think* it mostly will. There are some problems with this still, but open source is all about fixing those problems :)
class Collection(SQLObject): name = StringCol(length=128, notNone=True) # "Core", "Extras", or whatever names-for-grouping you want
class Package(SQLObject): name = StringCol(length=128, notNone=True) # "Core", "Extras", or whatever names-for-grouping you want created = DateTimeCol(default=sqlbuilder.func.NOW(), notNone=True) status = EnumCol(enumValues=('awaitingreview', 'approved', 'denied'), default='awaitingreview', notNone=True)
class PackageHistory(SQLObject): # Records changes to packages package = ForeignKey('Package', notNone=True) by_user_id = IntCol(notNone=True) # Foreign key into account database - user who made the change action = EnumCol(enumValues=('added', 'removed', 'statuschanged'), notNone=True) status = StringCol(length=128, notNone=True) # Not EnumCol, but could be changed to be one. when = DateTimeCol(default=sqlbuilder.func.NOW(), notNone=True)
class PackageListing(SQLObject): package = ForeignKey('Package', notNone=True) collection = ForeignKey('Collection', notNone=True) created = DateTimeCol(default=sqlbuilder.func.NOW(), notNone=True) status = EnumCol(enumValues=('awaitingreview', 'awaitingbranch', 'approved', 'denied'), default='awaitingreview', notNone=True)
class PackageListingHistory(SQLObject): # Records changes to packages package_listing = ForeignKey('PackageListing', notNone=True) by_user_id = IntCol(notNone=True) # Foreign key into account database - user who made the change action = EnumCol(enumValues=('added', 'removed', 'statuschanged'), notNone=True) status = StringCol(length=128, notNone=True) # Not EnumCol, but could be changed to be one. when = DateTimeCol(default=sqlbuilder.func.NOW(), notNone=True)
class PackageVersion(SQLObject): # A specific version on a specific branch package_listing = ForeignKey('PackageListing', notNone=True) version = StringCol(length=128, notNone=True) status = EnumCol(enumValues=('awaitingdevel', 'awaitingreview', 'awaitingqa', 'awaitingpublish', 'approved', 'denied', 'obsolete'), default='awaitingdevel', notNone=True) created = DateTimeCol(default=sqlbuilder.func.NOW(), notNone=True)
class PackageVersionHistory(SQLObject): # Records changes to packages package_version = ForeignKey('PackageVersion', notNone=True) by_user_id = IntCol(notNone=True) # Foreign key into account database - user who made the change action = EnumCol(enumValues=('added', 'statuschanged'), notNone=True) status = StringCol(length=128, notNone=True) # Not EnumCol, but could be changed to be one. when = DateTimeCol(default=sqlbuilder.func.NOW(), notNone=True)
class PackageInterest(SQLObject): # Note: PackageInterestHistory table assumes that records will never be removed from here. # Instead, set the status to 'obsolete' user_id = IntCol(notNone=True) package_listing = ForeignKey('PackageListing', notNone=True) status = EnumCol(enumValues=('awaitingreview', 'approved', 'denied', 'obsolete'), default='awaitingreview', notNone=True) role = EnumCol(enumValues=('watcher', 'owner'), default='watcher', notNone=True) # Used for authorization
class PackageInterestHistory(SQLObject): package_interest = ForeignKey('PackageInterest', notNone=True) action = EnumCol(enumValues=('added', 'statuschanged'), notNone=True) status = StringCol(length=128, notNone=True) # Not EnumCol, but could be changed to be one. when = DateTimeCol(default=sqlbuilder.func.NOW(), notNone=True)
Best, -- Elliot
Elliot Lee wrote:
Hi all,
http://fedoraproject.org/wiki/Infrastructure/PackageDatabase has been out there for a bit...
I've put together a strawman schema (as a TurboGears model.py) to help move things along - apologies if someone else has beaten me to it. I think at this point the right questions to be asking are long the lines of "will this schema support feature X or use case Y?". From a quick glance at the web page, I *think* it mostly will. There are some problems with this still, but open source is all about fixing those problems :)
This is cool Elliot. This is a project I would like to help out on, but didn't really know where to start.
Hopefully we can get a few other people to pitch in.
Michael
On Jul 1, 2006, at 00:27, Michael J. Knox wrote:
Elliot Lee wrote:
Hi all, http://fedoraproject.org/wiki/Infrastructure/PackageDatabase has been out there for a bit... I've put together a strawman schema (as a TurboGears model.py) to help move things along - apologies if someone else has beaten me to it. I think at this point the right questions to be asking are long the lines of "will this schema support feature X or use case Y?". From a quick glance at the web page, I *think* it mostly will. There are some problems with this still, but open source is all about fixing those problems :)
This is cool Elliot. This is a project I would like to help out on, but didn't really know where to start.
That in itself is helpful to know, because it's never 100% clear whether progress is dependent on having time or having knowledge :)
In general, quite a few projects are at the stage where the main helping out to be done is figuring out what needs to be done. There's no set task list for the packageDB or account system, just a need for someone to figure out what's going on, and to keep pushing at it until a complete spec emerges.
Are there areas where others could use more elaboration to get them started?
Best, -- Elliot
infrastructure@lists.fedoraproject.org