[ckan-dev] CKAN config - definitions
Toby Dacre
toby.okfn at gmail.com
Wed May 15 13:46:53 UTC 2013
On 15 May 2013 14:40, Sean Hammond <sean.hammond at okfn.org> wrote:
>> Following on from the discussion about the ckan configuration:
>>
>> We need to define config options currently we do this in app_globals
>>
>> eg
>>
>> 'search.facets.default': {'default': '10', 'type': 'int',
>> 'name': 'facets_default_number'},
>>
>> This needs to be expanded for example to have a description, example etc
>> This starts to get messy and hard to read.
>>
>> I want to add a new file like this
>>
>> config_options.ini
>> ============
>>
>> [search.facets.default]
>> default = 10
>> type = int
>> name = facets_default_number
>> description =
>> This is some long bit of rst
>> so that it can be in the docs
>>
>>
>> ..note::
>>
>> something important
>>
>> example = config_options.ini = 10
>>
>> [next.option]
>> ....
>>
>> Would this be an acceptable format for people? This would be the only
>> place that the config options where defined.
>
> This looks good to me. What about files like deployment.ini_tmpl, will
> they be autogenerated from this config_options.ini? It's probably good
> if they are, otherwise there's potential confusion between the default
> values as defined in config_options.ini and the values of uncommented
> config options in deployment.ini_tmpl.
>
Maybe the end outcome is we just delete deployment.ini_tmpl and
generate the file directly from the config options. We'd need to add
the 'comments' for the .ini file too. That would be part 2 of this
work
part one
------------
new definitions
config -> templates -> config etc
auto documentation
part two
-----------
deployment.ini_tmpl
extensions
deprecations/renames
code tests for mis-use etc
> _______________________________________________
> ckan-dev mailing list
> ckan-dev at lists.okfn.org
> http://lists.okfn.org/mailman/listinfo/ckan-dev
> Unsubscribe: http://lists.okfn.org/mailman/options/ckan-dev
--
Toby Dacre
The Open Knowledge Foundation
Empowering through Open Knowledge
http://okfn.org/ | @okfn
More information about the ckan-dev
mailing list