[Beaker-devel] A style guide for Beaker?

Amit Saha asaha at redhat.com
Fri Aug 2 07:10:56 UTC 2013



----- Original Message -----
> From: "Amit Saha" <asaha at redhat.com>
> To: "Beaker development" <beaker-devel at lists.fedorahosted.org>
> Sent: Friday, August 2, 2013 5:06:00 PM
> Subject: Re: [Beaker-devel] A style guide for Beaker?
> 
> 
> 
> ----- Original Message -----
> > From: "Nick Coghlan" <ncoghlan at redhat.com>
> > To: "beaker-devel" <beaker-devel at lists.fedorahosted.org>
> > Sent: Thursday, August 1, 2013 5:05:01 PM
> > Subject: [Beaker-devel] A style guide for Beaker?
> > 
> > Bringing a conversation from IRC to email :)
> > 
> > Currently, the dev guide has a few style hints in the "Source-code
> > walk-through" section. I had missed them because "walk-through" really
> > doesn't suggest "style guide" to me :)
> > 
> > We also have a few migrations in process that mean that existing code
> > isn't always a good guide to the style that should be used for future
> > patches, so I think it will be worth our while to spend some time
> > cleaning up this section of the dev guide.
> > 
> > Firstly, I think we should retitle this section "Source components and
> > style guide". It's more than just a source code walk-through :)
> > 
> > Things we should cover:
> > 
> > - the migration from non-declarative to declarative SQL Alchemy models
> > - the migration from TG1 to Flask (once that is reality)
> > - the migration to using ActivityMixin for activity log updates
> > - the migration of permission checks from the view layer to the model layer
> > - direction to use TG1 validators for TG1 views (what will we use for
> > Flask? Flask-WTF?)
> 
> An example of using TG1 validators for XML-RPC interfaces can be found here:
> http://gerrit.beaker-project.org/#/c/2140/5/Server/bkr/server/group.py
> 
> It is worth noting here is that the validators are not available as class
> attributes, but in a dictionary 'fields' of the class inheriting from Schema.


It's a bit  more effort, but is it possible that we have some "example" (perhaps, links
to a commit on cgit or code references - line numbers?) showing an example of the topics 
we cover, as far as possible?


More information about the Beaker-devel mailing list