Project directory setup
Module for project directory setup.
Methods
create_dirs: Creates the main project directory and the associated subdirectories for the project.
check_if_dir_exists: Checks if the directory about to be created already exists.
check_if_dir_exists(dir_path)
Check if directory exists.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
dir_path |
str
|
String with path to the directory to check if it exists. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
dir_exists |
bool
|
Boolean value representing whether the directory exists or not. |
Source code in report_generator/project_setup/project_directory_setup.py
48 49 50 51 52 53 54 55 56 57 58 59 60 | |
create_dirs(home_dir, directory_name)
Create the project directories.
Creates directories for project files to be inserted.
Examples:
Example of use.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
home_dir |
str
|
String value for the path to the home directory. |
required |
directory_name |
str
|
String value for the name of the directory that is created. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
dir_path |
str
|
String value for the path to the project's directory |
Source code in report_generator/project_setup/project_directory_setup.py
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 | |