1 | # Licensed to the StackStorm, Inc ('StackStorm') under one or more |
||
2 | # contributor license agreements. See the NOTICE file distributed with |
||
3 | # this work for additional information regarding copyright ownership. |
||
4 | # The ASF licenses this file to You under the Apache License, Version 2.0 |
||
5 | # (the "License"); you may not use this file except in compliance with |
||
6 | # the License. You may obtain a copy of the License at |
||
7 | # |
||
8 | # http://www.apache.org/licenses/LICENSE-2.0 |
||
9 | # |
||
10 | # Unless required by applicable law or agreed to in writing, software |
||
11 | # distributed under the License is distributed on an "AS IS" BASIS, |
||
12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||
13 | # See the License for the specific language governing permissions and |
||
14 | # limitations under the License. |
||
15 | |||
16 | __all__ = [ |
||
17 | 'PACKS_PACK_NAME', |
||
18 | 'PACK_REF_WHITELIST_REGEX', |
||
19 | 'PACK_RESERVED_CHARACTERS', |
||
20 | 'PACK_VERSION_SEPARATOR', |
||
21 | 'PACK_VERSION_REGEX', |
||
22 | 'ST2_VERSION_REGEX', |
||
23 | 'SYSTEM_PACK_NAME', |
||
24 | 'PACKS_PACK_NAME', |
||
25 | 'LINUX_PACK_NAME', |
||
26 | 'SYSTEM_PACK_NAMES', |
||
27 | 'CHATOPS_PACK_NAME', |
||
28 | 'USER_PACK_NAME_BLACKLIST', |
||
29 | 'BASE_PACK_REQUIREMENTS', |
||
30 | 'MANIFEST_FILE_NAME', |
||
31 | 'CONFIG_SCHEMA_FILE_NAME' |
||
32 | ] |
||
33 | |||
34 | # Prefix for render context w/ config |
||
35 | PACK_CONFIG_CONTEXT_KV_PREFIX = 'config_context' |
||
36 | |||
37 | # A list of allowed characters for the pack name |
||
38 | PACK_REF_WHITELIST_REGEX = r'^[a-z0-9_]+$' |
||
39 | |||
40 | # Check for a valid semver string |
||
41 | PACK_VERSION_REGEX = r'^(?:0|[1-9]\d*)\.(?:0|[1-9]\d*)\.(?:0|[1-9]\d*)(?:-[\da-z\-]+(?:\.[\da-z\-]+)*)?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?$' # noqa |
||
0 ignored issues
–
show
|
|||
42 | |||
43 | # Special characters which can't be used in pack names |
||
44 | PACK_RESERVED_CHARACTERS = [ |
||
45 | '.' |
||
46 | ] |
||
47 | |||
48 | # Version sperator when version is supplied in pack name |
||
49 | # Example: [email protected] |
||
50 | PACK_VERSION_SEPARATOR = '=' |
||
51 | |||
52 | # Check for st2 version in engines |
||
53 | ST2_VERSION_REGEX = r'^((>?>|>=|=|<=|<?<)\s*[0-9]+\.[0-9]+\.[0-9]+?(\s*,)?\s*)+$' |
||
54 | |||
55 | # Name used for system pack |
||
56 | SYSTEM_PACK_NAME = 'core' |
||
57 | |||
58 | # Name used for pack management pack |
||
59 | PACKS_PACK_NAME = 'packs' |
||
60 | |||
61 | # Name used for linux pack |
||
62 | LINUX_PACK_NAME = 'linux' |
||
63 | |||
64 | # Name of the default pack |
||
65 | DEFAULT_PACK_NAME = 'default' |
||
66 | |||
67 | # Name of the chatops pack |
||
68 | CHATOPS_PACK_NAME = 'chatops' |
||
69 | |||
70 | # A list of system pack names |
||
71 | SYSTEM_PACK_NAMES = [ |
||
72 | CHATOPS_PACK_NAME, |
||
73 | SYSTEM_PACK_NAME, |
||
74 | PACKS_PACK_NAME, |
||
75 | LINUX_PACK_NAME |
||
76 | ] |
||
77 | |||
78 | # A list of pack names which can't be used by user-supplied packs |
||
79 | USER_PACK_NAME_BLACKLIST = [ |
||
80 | SYSTEM_PACK_NAME, |
||
81 | PACKS_PACK_NAME |
||
82 | ] |
||
83 | |||
84 | # Python requirements which are common to all the packs and are installed into the Python pack |
||
85 | # sandbox (virtualenv) |
||
86 | BASE_PACK_REQUIREMENTS = [ |
||
87 | 'six>=1.9.0,<2.0' |
||
88 | ] |
||
89 | |||
90 | # Python requirements which are common to all the packs and need to be installed |
||
91 | # for Python 3 pack virtual environments to work |
||
92 | BASE_PACK_PYTHON3_REQUIREMENTS = [ |
||
93 | 'pyyaml>=3.12,<4.0' |
||
94 | ] |
||
95 | |||
96 | # Name of the pack manifest file |
||
97 | MANIFEST_FILE_NAME = 'pack.yaml' |
||
98 | |||
99 | # File name for the config schema file |
||
100 | CONFIG_SCHEMA_FILE_NAME = 'config.schema.yaml' |
||
101 |
This check looks for lines that are too long. You can specify the maximum line length.