Init
blackline.project.init
DEFAULT_DATASET_FOLDER = 'dataset'
module-attribute
DEFAULT_ORGANIZATION_FOLDER = 'organization'
module-attribute
DEFAULT_RESOURCE_FOLDER = 'resource'
module-attribute
DEFAULT_SYSTEM_FOLDER = 'system'
module-attribute
INIT_ADAPTER = f'# See details docs at https://docs.getblackline.com/# Only required fields are shown here.profiles:{DEFAULT_PROFILE}:type: <type_name>config:...'
module-attribute
INIT_DATASET = '\n# See details docs at https://docs.getblackline.com/\n# Only required fields are shown here.\ndataset:\n - key: <requred_key>\n ...\n'
module-attribute
INIT_DATASET_FILENAME = 'dataset.yaml'
module-attribute
INIT_DATASET_FOLDER = 'dataset'
module-attribute
INIT_ORGANIZATION = '\n# See details docs at https://docs.getblackline.com/\n# Only required fields are shown here.\norganization:\n - key: <requred_key>\n ...\n'
module-attribute
INIT_ORGANIZATION_FILENAME = 'organization.yaml'
module-attribute
INIT_ORGANIZATION_FOLDER = 'organization'
module-attribute
INIT_RESOURCE = '\n# See details docs at https://docs.getblackline.com/\n# Only required fields are shown here.\nresource:\n - key: <requred_key>\n resource_type: <requred_resource_type>\n privacy_declarations:\n - name: <requred_name>\n data_categories:\n - <requred_data_category>\n data_use: <requred_data_use>\n data_subjects:\n - <requred_data_subject>\n data_qualifier: <requred_data_qualifier>\n ...\n'
module-attribute
INIT_RESOURCE_FILENAME = 'resource.yaml'
module-attribute
INIT_RESOURCE_FOLDER = 'resource'
module-attribute
INIT_SYSTEM = '\n# See details docs at https://docs.getblackline.com/\n# Only required fields are shown here.\nsystem:\n - key: <requred_key>\n ...\n'
module-attribute
INIT_SYSTEM_FILENAME = 'system.yaml'
module-attribute
INIT_SYSTEM_FOLDER = 'system'
module-attribute
InitProject
Source code in BAR /opt/hostedtoolcache/Python/3.10.12/x64/lib/python3.10/site-packages/blackline/project/init.py
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 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 |
|
adapters_path = Path(path, adapters or DEFAULT_ADAPTERS_FOLDER)
instance-attribute
catalogue_path = Path(path, catalogue or DEFAULT_CATALOGUE_FOLDER)
instance-attribute
dataset = dataset
instance-attribute
default_profile = default_profile
instance-attribute
init_adapter = init_adapter
instance-attribute
init_dataset = init_dataset
instance-attribute
init_organization: str = init_organization
instance-attribute
init_resource = init_resource
instance-attribute
init_system = init_system
instance-attribute
name = name
instance-attribute
organization = organization
instance-attribute
overwrite = overwrite
instance-attribute
path = path
instance-attribute
project_config = ProjectConfig(name=self.name, config_version=PROJECT_CONFIG_VERSION, version=PROJECT_VERSION, default_profile=self.default_profile, catalogue_path=self.catalogue_path, adapters_path=self.adapters_path, project_root=self.path)
instance-attribute
resource = resource
instance-attribute
system = system
instance-attribute
__init__(path, name, overwrite=False, default_profile=DEFAULT_PROFILE, catalogue=DEFAULT_CATALOGUE_FOLDER, adapters=DEFAULT_ADAPTERS_FOLDER, organization=DEFAULT_ORGANIZATION_FOLDER, system=DEFAULT_SYSTEM_FOLDER, resource=DEFAULT_RESOURCE_FOLDER, dataset=DEFAULT_DATASET_FOLDER, init_organization=INIT_ORGANIZATION, init_system=INIT_SYSTEM, init_resource=INIT_RESOURCE, init_dataset=INIT_DATASET, init_adapter=INIT_ADAPTER)
A class for initializing a new Blackline project.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
path |
Path
|
The path to the directory where the project should be created. |
required |
name |
The name of the project. |
required | |
overwrite |
Whether to overwrite an existing project with the same name. |
False
|
|
default_profile |
The default profile to use. |
DEFAULT_PROFILE
|
|
catalogue |
The name of the catalogue folder. |
DEFAULT_CATALOGUE_FOLDER
|
|
adapters |
str
|
The name of the adapters folder. |
DEFAULT_ADAPTERS_FOLDER
|
organization |
str
|
The name of the organization folder. |
DEFAULT_ORGANIZATION_FOLDER
|
system |
str
|
The name of the system folder. |
DEFAULT_SYSTEM_FOLDER
|
resource |
str
|
The name of the resource folder. |
DEFAULT_RESOURCE_FOLDER
|
dataset |
str
|
The name of the dataset folder. |
DEFAULT_DATASET_FOLDER
|
init_organization |
str
|
The initial organization configuration. |
INIT_ORGANIZATION
|
init_system |
str
|
The initial system configuration. |
INIT_SYSTEM
|
init_resource |
str
|
The initial resource configuration. |
INIT_RESOURCE
|
init_dataset |
str
|
The initial dataset configuration. |
INIT_DATASET
|
init_adapter |
str
|
The initial adapter configuration. |
INIT_ADAPTER
|
Attributes:
Name | Type | Description |
---|---|---|
path |
Path
|
The path to the directory where the project should be created. |
name |
str
|
The name of the project. |
overwrite |
bool
|
Whether to overwrite an existing project with the same name. # noqa: E501 |
default_profile |
str
|
The default profile to use. |
catalogue_path |
Path
|
The path to the catalogue folder. |
adapters_path |
Path
|
The path to the adapters folder. |
organization |
str
|
The name of the organization folder. |
system |
str
|
The name of the system folder. |
resource |
str
|
The name of the resource folder. |
Source code in /opt/hostedtoolcache/Python/3.10.12/x64/lib/python3.10/site-packages/blackline/project/init.py
create_adapter()
Creates an adapter for the project.
Returns:
Name | Type | Description |
---|---|---|
Path |
Path
|
The path of the adapter. |
Source code in /opt/hostedtoolcache/Python/3.10.12/x64/lib/python3.10/site-packages/blackline/project/init.py
create_adapter_file(resource_path)
Creates a file for the adapter.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
resource_path |
Path
|
The path of the adapter folder. |
required |
Returns:
Type | Description |
---|---|
None
|
None |
Source code in /opt/hostedtoolcache/Python/3.10.12/x64/lib/python3.10/site-packages/blackline/project/init.py
create_adapter_folders()
Creates folders for the adapter.
Returns:
Name | Type | Description |
---|---|---|
Path |
Path
|
The path of the adapter folder. |
Source code in /opt/hostedtoolcache/Python/3.10.12/x64/lib/python3.10/site-packages/blackline/project/init.py
create_catalogue()
Creates the catalogue folder and files.
Returns:
Type | Description |
---|---|
None
|
None |
Source code in /opt/hostedtoolcache/Python/3.10.12/x64/lib/python3.10/site-packages/blackline/project/init.py
create_catalogue_files(organization_path, system_path, resource_path, dataset_path)
Create the catalogue files in the specified paths.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
organization_path |
Path
|
Path to the organization folder. |
required |
system_path |
Path
|
Path to the system folder. |
required |
resource_path |
Path
|
Path to the resource folder. |
required |
dataset_path |
Path
|
Path to the dataset folder. |
required |
Returns:
Type | Description |
---|---|
None
|
None |
Source code in /opt/hostedtoolcache/Python/3.10.12/x64/lib/python3.10/site-packages/blackline/project/init.py
create_catalogue_folders()
Creates folders for the catalogue.
Returns:
Type | Description |
---|---|
Tuple[Path, Path, Path, Path]
|
A tuple containing the paths of the organisation, system, resource and dataset folders. # noqa: E501 |
Source code in /opt/hostedtoolcache/Python/3.10.12/x64/lib/python3.10/site-packages/blackline/project/init.py
create_project_yaml()
Creates a YAML file for the project configuration.