← Back to team overview

configglue team mailing list archive

[Bug 753395] Re: Update to schema definition syntax

 

** Changed in: configglue
     Assignee: (unassigned) => Ricardo Kirkner (ricardokirkner)

** Changed in: configglue
   Importance: Undecided => Low

** Changed in: configglue
       Status: New => Fix Committed

-- 
You received this bug notification because you are a member of
Configglue developers, which is the registrant for configglue.
https://bugs.launchpad.net/bugs/753395

Title:
  Update to schema definition syntax

Status in configglue:
  Fix Committed

Bug description:
  Currently sections are defined as local variables in the class scope
  when defining schema. This approach works, but the sections are not
  visually distinct from each other. Better approach would be to use
  inner classes to achieve the scoping of options. An example:

      class ASchema(Schema):

          class database(Section):
              host = StringOption()
              port = IntOption()
              username = StringOption()
              password = StringOption()

          class login(Section):
              url = StringOption()
              access_token = StringOption()

  instead of current:

      class ASchema(Schema):

          database = ConfigSection()
          database.host = StringOption()
          database.port = IntOption()
          database.username = StringOption()
          database.password = StringOption()

          login = ConfigSection()
          login.url = StringOption()
          login.access_token = StringOption()

To manage notifications about this bug go to:
https://bugs.launchpad.net/configglue/+bug/753395/+subscriptions


References