Data Importer Package

Submodules

Managers

SEED Platform (TM), Copyright (c) Alliance for Sustainable Energy, LLC, and other contributors. See also https://github.com/seed-platform/seed/main/LICENSE.md

class seed.data_importer.managers.NotDeletedManager(*args, **kwargs)

Bases: django.db.models.manager.Manager

get_all(*args, **kwargs)

Method to return ALL ImportFiles, including the ones where deleted == True which are normally excluded. This is used for database/filesystem cleanup.

get_queryset(*args, **kwargs)

Return a new QuerySet object. Subclasses can override this method to customize the behavior of the Manager.

Models

URLs

Utils

SEED Platform (TM), Copyright (c) Alliance for Sustainable Energy, LLC, and other contributors. See also https://github.com/seed-platform/seed/main/LICENSE.md

Utility methods pertaining to data import tasks (save, mapping, matching).

seed.data_importer.utils.kbtu_thermal_conversion_factors(country)

Returns thermal conversion factors provided by Portfolio Manager. In the PM app, using NREL’s test account, a property was created for each US and CAN. All possible Meters of different Type and Units were added. Readings of value 1 were added to deduce the factors provided below.

Consideration was given regarding having the provided ‘country’ value align with Organizations’ thermal_conversion_assumption enums. Even though these two should be aligned, the concept and need for these factors are not specific solely to Orgs. So the ‘country’ value here is expected to be a string. Specifically, there are instances in the codebase where the factors are needed irrespective of any Organization’s preferences.

seed.data_importer.utils.usage_point_id(raw_source_id)

Extracts and returns the usage point ID of a GreenButton full uri ID.

Views

Module contents

SEED Platform (TM), Copyright (c) Alliance for Sustainable Energy, LLC, and other contributors. See also https://github.com/seed-platform/seed/main/LICENSE.md