forked from nolar/kopf
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.importlinter
110 lines (99 loc) · 2.83 KB
/
.importlinter
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
; Importing constraints for layered layout of modules and packages.
; The goal is higher cohesion and lower coupling of components.
; https://import-linter.readthedocs.io/en/stable/contract_types.html
[importlinter]
root_package = kopf
include_external_packages = True
contract_types =
conditional: _importlinter_conditional.ConditionalImportContract
[importlinter:contract:root-layers]
name = The root framework modules must be layered
type = layers
layers =
kopf.on
kopf._kits
kopf._core
kopf._cogs
[importlinter:contract:core-layers]
name = The internal core must be layered
type = layers
layers =
kopf._core.reactor
kopf._core.engines
kopf._core.intents
kopf._core.actions
[importlinter:contract:cogs-layers]
name = The internal cogs must be layered
type = layers
layers =
kopf._cogs.clients
kopf._cogs.configs
kopf._cogs.structs
kopf._cogs.aiokits
kopf._cogs.helpers
[importlinter:contract:progress-storage]
name = Progress storages must be persistence settings
type = layers
layers =
kopf._cogs.configs.configuration
kopf._cogs.configs.progress
kopf._cogs.configs.conventions
[importlinter:contract:diffbase-storage]
name = Diffbase storages must be persistence settings
type = layers
layers =
kopf._cogs.configs.configuration
kopf._cogs.configs.diffbase
kopf._cogs.configs.conventions
[importlinter:contract:independent-storages]
name = Storage types must be unaware of each other
type = independence
modules =
kopf._cogs.configs.diffbase
kopf._cogs.configs.progress
[importlinter:contract:independent-aiokits]
name = Most asyncio kits must be unaware of each other
type = independence
modules =
kopf._cogs.aiokits.aioadapters
kopf._cogs.aiokits.aiobindings
kopf._cogs.aiokits.aioenums
kopf._cogs.aiokits.aiotoggles
kopf._cogs.aiokits.aiovalues
; but not aiotasks & aiotime!
[importlinter:contract:ban-toolkits]
name = The internals must be unaware of user-facing toolkits
type = forbidden
source_modules =
kopf._cogs
kopf._core
forbidden_modules =
kopf._kits
[importlinter:contract:indenpendent-toolkits]
name = The user-facing toolkits must be unaware of each other
type = independence
modules =
kopf._kits.hierarchies
kopf._kits.runner
kopf._kits.webhooks
[importlinter:contract:allow-3rd-party]
name = 3rd-party clients must be explicitly allowed
type = forbidden
source_modules =
kopf
forbidden_modules =
pykube
kubernetes
ignore_imports =
kopf._core.intents.piggybacking -> pykube
kopf._core.intents.piggybacking -> kubernetes
kopf._cogs.helpers.thirdparty -> pykube
kopf._cogs.helpers.thirdparty -> kubernetes
[importlinter:contract:secure-3rd-party]
name = 3rd-party clients must be secured by conditional imports
type = conditional
source_modules =
kopf
conditional_modules =
pykube
kubernetes