CreateExportProjects package

Submodules

LOGS_solutions.CreateExportEntities.CreateExportProjects.ProjectManager module

class LOGS_solutions.CreateExportEntities.CreateExportProjects.ProjectManager.ProjectManager(logs, source_path=None, target_path=None, export_format='.csv')[source]

Bases: object

This class enables the creation of projects in a LOGS instance using a CSV file, or the export of projects from a LOGS instance into a CSV file.

create_projects()[source]

Creates a new project in the LOGS instance.

Return type:

None

export_projects()[source]

Exports projects from the LOGS instance to a CSV file or Excel file.

Return type:

None

export_projects_csv()[source]

Exports projects from the LOGS instance to a CSV file.

Return type:

None

export_projects_excel()[source]

Exports projects from the LOGS instance to an Excel file.

Return type:

None

post_process_data(projects_data)[source]

Post-processes the project data DataFrame by stripping whitespace from string fields and dropping empty rows. :type projects_data: DataFrame :param projects_data: DataFrame read from source file. :rtype: DataFrame :return: Post-processed DataFrame.

read_file()[source]

Reads the project data file and returns a DataFrame. :rtype: DataFrame :return: DataFrame containing the project data.

LOGS_solutions.CreateExportEntities.CreateExportProjects.main module

LOGS_solutions.CreateExportEntities.CreateExportProjects.main.main(args=None)[source]

Main function to create or export projects in a LOGS instance.

Important: This classes uses absolute paths. To obtain the correct absolute path, you must ensure that the relative path is correct in relation to the directory in which the script is executed. If you are not sure, use the absolute path for source_path and target_path Create Projects: Be aware that the csv/excel files must have the header ‘Project Name;Person ID;Admin Permission;Edit Permission;Add Permission;Read Permission’

LOGS_solutions.CreateExportEntities.CreateExportProjects.main.parse_args()[source]

Parse command line arguments.

LOGS_solutions.CreateExportEntities.CreateExportProjects.main.valid_format(value)[source]

Validate the export format.

LOGS_solutions.CreateExportEntities.CreateExportProjects.main.valid_source_path(source_path)[source]

Validates the given source paths.

Parameters:

source_path – The source path to validate.

Return type:

Path

Returns:

The absolute path for the source.

LOGS_solutions.CreateExportEntities.CreateExportProjects.main.valid_target_path(target_path)[source]

Validates the given paths.

Parameters:

target_path – The target path to validate.

Return type:

Path

Returns:

The absolute path for the target.

LOGS_solutions.CreateExportEntities.CreateExportProjects.main.validate_format(args)[source]

Validate the export format and ensure it matches the target paths.

Module contents