annotate configmix/constants.py @ 305:f529ca46dd50

Implemented the "ref" namespace to get configuration tree references. BUGS: - Tests should be done more thoroughly and extensively - Interaction of tree references and variable substitution should be tested more properly - Documentation is missing yet
author Franz Glasner <fzglas.hg@dom66.de>
date Mon, 26 Apr 2021 09:42:42 +0200
parents 2a2f5b86fe34
children dd454e1efea4
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
303
2a2f5b86fe34 Move some important public constants into the .constants sub-module
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
1 # -*- coding: utf-8 -*-
2a2f5b86fe34 Move some important public constants into the .constants sub-module
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
2 # :-
2a2f5b86fe34 Move some important public constants into the .constants sub-module
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
3 # :Copyright: (c) 2015-2021, Franz Glasner. All rights reserved.
2a2f5b86fe34 Move some important public constants into the .constants sub-module
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
4 # :License: BSD-3-Clause. See LICENSE.txt for details.
2a2f5b86fe34 Move some important public constants into the .constants sub-module
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
5 # :-
2a2f5b86fe34 Move some important public constants into the .constants sub-module
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
6 """Some important public contants
2a2f5b86fe34 Move some important public constants into the .constants sub-module
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
7
2a2f5b86fe34 Move some important public constants into the .constants sub-module
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
8 """
2a2f5b86fe34 Move some important public constants into the .constants sub-module
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
9
2a2f5b86fe34 Move some important public constants into the .constants sub-module
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
10 from .compat import u
2a2f5b86fe34 Move some important public constants into the .constants sub-module
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
11
2a2f5b86fe34 Move some important public constants into the .constants sub-module
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
12
2a2f5b86fe34 Move some important public constants into the .constants sub-module
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
13 COMMENTS = [
2a2f5b86fe34 Move some important public constants into the .constants sub-module
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
14 u("__comment"),
2a2f5b86fe34 Move some important public constants into the .constants sub-module
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
15 u("__doc"),
2a2f5b86fe34 Move some important public constants into the .constants sub-module
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
16 ]
2a2f5b86fe34 Move some important public constants into the .constants sub-module
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
17 """Prefixes for comment configuration keys that are to be handled as
2a2f5b86fe34 Move some important public constants into the .constants sub-module
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
18 comments
2a2f5b86fe34 Move some important public constants into the .constants sub-module
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
19
2a2f5b86fe34 Move some important public constants into the .constants sub-module
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
20 """
2a2f5b86fe34 Move some important public constants into the .constants sub-module
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
21
2a2f5b86fe34 Move some important public constants into the .constants sub-module
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
22 DIR_PREFIX = u("<dir>")
2a2f5b86fe34 Move some important public constants into the .constants sub-module
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
23 """Prefix for configuration values to read other configuration files from
2a2f5b86fe34 Move some important public constants into the .constants sub-module
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
24 given directory
2a2f5b86fe34 Move some important public constants into the .constants sub-module
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
25
2a2f5b86fe34 Move some important public constants into the .constants sub-module
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
26 """
2a2f5b86fe34 Move some important public constants into the .constants sub-module
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
27
2a2f5b86fe34 Move some important public constants into the .constants sub-module
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
28 DEL_VALUE = u("{{::DEL::}}")
2a2f5b86fe34 Move some important public constants into the .constants sub-module
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
29 """Value for configuration items to signal that the corresponding
2a2f5b86fe34 Move some important public constants into the .constants sub-module
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
30 key-value is to be deleted when configurations are merged
2a2f5b86fe34 Move some important public constants into the .constants sub-module
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
31
2a2f5b86fe34 Move some important public constants into the .constants sub-module
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
32 """
305
f529ca46dd50 Implemented the "ref" namespace to get configuration tree references.
Franz Glasner <fzglas.hg@dom66.de>
parents: 303
diff changeset
33
f529ca46dd50 Implemented the "ref" namespace to get configuration tree references.
Franz Glasner <fzglas.hg@dom66.de>
parents: 303
diff changeset
34 REF_NAMESPACE = u("ref")
f529ca46dd50 Implemented the "ref" namespace to get configuration tree references.
Franz Glasner <fzglas.hg@dom66.de>
parents: 303
diff changeset
35 """Special internal namespace used for implementation of tree
f529ca46dd50 Implemented the "ref" namespace to get configuration tree references.
Franz Glasner <fzglas.hg@dom66.de>
parents: 303
diff changeset
36 `references`
f529ca46dd50 Implemented the "ref" namespace to get configuration tree references.
Franz Glasner <fzglas.hg@dom66.de>
parents: 303
diff changeset
37
f529ca46dd50 Implemented the "ref" namespace to get configuration tree references.
Franz Glasner <fzglas.hg@dom66.de>
parents: 303
diff changeset
38 """