contact-person-profile-csv-imp-local 0.0.38__tar.gz → 0.0.39__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {contact_person_profile_csv_imp_local-0.0.38 → contact_person_profile_csv_imp_local-0.0.39}/PKG-INFO +1 -1
- {contact_person_profile_csv_imp_local-0.0.38 → contact_person_profile_csv_imp_local-0.0.39}/contact_person_profile_csv_imp_local/src/CSVToContactPersonProfile.py +12 -8
- {contact_person_profile_csv_imp_local-0.0.38 → contact_person_profile_csv_imp_local-0.0.39}/contact_person_profile_csv_imp_local.egg-info/PKG-INFO +1 -1
- {contact_person_profile_csv_imp_local-0.0.38 → contact_person_profile_csv_imp_local-0.0.39}/setup.py +1 -1
- {contact_person_profile_csv_imp_local-0.0.38 → contact_person_profile_csv_imp_local-0.0.39}/README.md +0 -0
- {contact_person_profile_csv_imp_local-0.0.38 → contact_person_profile_csv_imp_local-0.0.39}/contact_person_profile_csv_imp_local/src/__init__.py +0 -0
- {contact_person_profile_csv_imp_local-0.0.38 → contact_person_profile_csv_imp_local-0.0.39}/contact_person_profile_csv_imp_local/src/contact_person_profile_csv_imp_local_constants.py +0 -0
- {contact_person_profile_csv_imp_local-0.0.38 → contact_person_profile_csv_imp_local-0.0.39}/contact_person_profile_csv_imp_local.egg-info/SOURCES.txt +0 -0
- {contact_person_profile_csv_imp_local-0.0.38 → contact_person_profile_csv_imp_local-0.0.39}/contact_person_profile_csv_imp_local.egg-info/dependency_links.txt +0 -0
- {contact_person_profile_csv_imp_local-0.0.38 → contact_person_profile_csv_imp_local-0.0.39}/contact_person_profile_csv_imp_local.egg-info/requires.txt +0 -0
- {contact_person_profile_csv_imp_local-0.0.38 → contact_person_profile_csv_imp_local-0.0.39}/contact_person_profile_csv_imp_local.egg-info/top_level.txt +0 -0
- {contact_person_profile_csv_imp_local-0.0.38 → contact_person_profile_csv_imp_local-0.0.39}/pyproject.toml +0 -0
- {contact_person_profile_csv_imp_local-0.0.38 → contact_person_profile_csv_imp_local-0.0.39}/setup.cfg +0 -0
{contact_person_profile_csv_imp_local-0.0.38 → contact_person_profile_csv_imp_local-0.0.39}/PKG-INFO
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: contact-person-profile-csv-imp-local
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.39
|
|
4
4
|
Summary: PyPI Package for Circles CSVToContactPersonProfile-local Local/Remote Python
|
|
5
5
|
Home-page: https://github.com/circles-zone/contact-person-profile-csv-imp-local-python-package
|
|
6
6
|
Author: Circles
|
|
@@ -173,7 +173,7 @@ class CSVToContactPersonProfile(GenericCRUD, metaclass=MetaLogger,
|
|
|
173
173
|
# TODO Align the parameters between import-contact-csv with sync-google-contact
|
|
174
174
|
# TODO Can we please add groups_str parameter to both sync-google-contact and import-contact-csv where we add all contacts to those groups?
|
|
175
175
|
def insert_update_contact_from_csv(
|
|
176
|
-
self, *, data_source_type_id: int, file_name: str = None,
|
|
176
|
+
self, *, username: str, email_address: str, data_source_type_id: int, file_name: str = None, system_id: int = None,
|
|
177
177
|
# TODO Add support to criteria_set_id
|
|
178
178
|
directory_name: str = None, csv_path: str = None, start_index: int = 0, end_index: int = None,
|
|
179
179
|
groups_dicts: list[dict] = None, profile_id: int = None) -> dict:
|
|
@@ -196,7 +196,7 @@ class CSVToContactPersonProfile(GenericCRUD, metaclass=MetaLogger,
|
|
|
196
196
|
profile_id_by_email_address = ProfilesLocal().select_one_value_by_column_and_value(
|
|
197
197
|
schema_name="profile", view_table_name="profile_view",
|
|
198
198
|
select_clause_value="profile_id", column_name="profile.main_email_address",
|
|
199
|
-
column_value=
|
|
199
|
+
column_value=email_address)
|
|
200
200
|
system_id = system_id or CONTACT_PERSON_PROFILE_CSV_SYSTEM_ID
|
|
201
201
|
self.set_schema(schema_name="field")
|
|
202
202
|
profile_id = profile_id or profile_id_by_email_address
|
|
@@ -229,13 +229,13 @@ class CSVToContactPersonProfile(GenericCRUD, metaclass=MetaLogger,
|
|
|
229
229
|
'address1_country', 'address2_street', 'address2_city', 'address2_state', 'address2_postal_code',
|
|
230
230
|
'address2_country', 'job_title', 'organization', 'display_as')
|
|
231
231
|
|
|
232
|
-
user_external_id = self.__get_user_external_id(user_external_username=
|
|
232
|
+
user_external_id = self.__get_user_external_id(user_external_username=username,
|
|
233
233
|
profile_id=profile_id, system_id=system_id)
|
|
234
234
|
# We create a new data_source_instance_id everytime we import a new csv file
|
|
235
235
|
data_source_instance_id = self.__get_data_source_instance_id(
|
|
236
236
|
data_source_type_id=data_source_type_id, csv_file_path=csv_file_path,
|
|
237
237
|
user_external_id=user_external_id, file_name=file_name,
|
|
238
|
-
user_external_username=
|
|
238
|
+
user_external_username=username,
|
|
239
239
|
start_index=start_index, end_index=end_index
|
|
240
240
|
)
|
|
241
241
|
fields_dictonary = self.data_sources.get_fields_name_from_csv(data_source_type_id)
|
|
@@ -509,8 +509,9 @@ class CSVToContactPersonProfile(GenericCRUD, metaclass=MetaLogger,
|
|
|
509
509
|
|
|
510
510
|
def __insert_link_contact_groups(self, contact_dict: dict) -> list:
|
|
511
511
|
contact_id = contact_dict.get("contact_id")
|
|
512
|
+
# TODO groups_dicts_list
|
|
512
513
|
groups = []
|
|
513
|
-
|
|
514
|
+
linked_groups_results_list = None
|
|
514
515
|
organization = contact_dict.get("organization")
|
|
515
516
|
if organization:
|
|
516
517
|
organization_group_dict = {
|
|
@@ -538,14 +539,16 @@ class CSVToContactPersonProfile(GenericCRUD, metaclass=MetaLogger,
|
|
|
538
539
|
}
|
|
539
540
|
groups.append(job_title_group_dict)
|
|
540
541
|
if contact_dict.get("groups"):
|
|
542
|
+
# TODO _contacts_groups_names_list?
|
|
541
543
|
_groups = contact_dict.get("groups").split(", ")
|
|
542
544
|
for group in _groups:
|
|
543
545
|
group_dict = {
|
|
544
546
|
# table:
|
|
545
|
-
"name": group,
|
|
547
|
+
"name": group, # TODO We need to translate to English
|
|
546
548
|
"hashtag": '#' + group.upper(),
|
|
547
549
|
"main_group_type_id": self.unknown_main_group_type_id,
|
|
548
550
|
# ml table:
|
|
551
|
+
# TODO What about the lang_code?
|
|
549
552
|
"is_main_title": False,
|
|
550
553
|
"title": group,
|
|
551
554
|
}
|
|
@@ -553,10 +556,11 @@ class CSVToContactPersonProfile(GenericCRUD, metaclass=MetaLogger,
|
|
|
553
556
|
for group in self.groups_list:
|
|
554
557
|
groups.append(group)
|
|
555
558
|
if len(groups) > 0:
|
|
556
|
-
|
|
559
|
+
linked_groups_results_list = self.contact_groups.insert_link_contact_group_with_group_local(
|
|
557
560
|
contact_id=contact_id, groups_list_of_dicts=groups)
|
|
561
|
+
contact_dict["linked_group_results_list"] = linked_groups_results_list
|
|
558
562
|
|
|
559
|
-
return
|
|
563
|
+
return linked_groups_results_list
|
|
560
564
|
|
|
561
565
|
def __insert_link_contact_persons(self, contact_dict: dict) -> dict:
|
|
562
566
|
if not contact_dict.get("first_name") and not contact_dict.get("last_name"):
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: contact-person-profile-csv-imp-local
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.39
|
|
4
4
|
Summary: PyPI Package for Circles CSVToContactPersonProfile-local Local/Remote Python
|
|
5
5
|
Home-page: https://github.com/circles-zone/contact-person-profile-csv-imp-local-python-package
|
|
6
6
|
Author: Circles
|
{contact_person_profile_csv_imp_local-0.0.38 → contact_person_profile_csv_imp_local-0.0.39}/setup.py
RENAMED
|
@@ -5,7 +5,7 @@ package_dir = PACKAGE_NAME.replace("-", "_")
|
|
|
5
5
|
|
|
6
6
|
setuptools.setup(
|
|
7
7
|
name=PACKAGE_NAME,
|
|
8
|
-
version='0.0.
|
|
8
|
+
version='0.0.39', # https://pypi.org/project/contact-person-profile-csv-imp-local/
|
|
9
9
|
author="Circles",
|
|
10
10
|
author_email="info@circles.ai",
|
|
11
11
|
description="PyPI Package for Circles CSVToContactPersonProfile-local Local/Remote Python",
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|