contact-person-profile-csv-imp-local 0.0.48__tar.gz → 0.0.49__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.48 → contact_person_profile_csv_imp_local-0.0.49}/PKG-INFO +2 -2
- {contact_person_profile_csv_imp_local-0.0.48 → contact_person_profile_csv_imp_local-0.0.49}/contact_person_profile_csv_imp_local/src/CSVToContactPersonProfile.py +64 -4
- {contact_person_profile_csv_imp_local-0.0.48 → contact_person_profile_csv_imp_local-0.0.49}/contact_person_profile_csv_imp_local.egg-info/PKG-INFO +2 -2
- {contact_person_profile_csv_imp_local-0.0.48 → contact_person_profile_csv_imp_local-0.0.49}/contact_person_profile_csv_imp_local.egg-info/requires.txt +1 -1
- {contact_person_profile_csv_imp_local-0.0.48 → contact_person_profile_csv_imp_local-0.0.49}/setup.py +2 -2
- {contact_person_profile_csv_imp_local-0.0.48 → contact_person_profile_csv_imp_local-0.0.49}/README.md +0 -0
- {contact_person_profile_csv_imp_local-0.0.48 → contact_person_profile_csv_imp_local-0.0.49}/contact_person_profile_csv_imp_local/src/__init__.py +0 -0
- {contact_person_profile_csv_imp_local-0.0.48 → contact_person_profile_csv_imp_local-0.0.49}/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.48 → contact_person_profile_csv_imp_local-0.0.49}/contact_person_profile_csv_imp_local.egg-info/SOURCES.txt +0 -0
- {contact_person_profile_csv_imp_local-0.0.48 → contact_person_profile_csv_imp_local-0.0.49}/contact_person_profile_csv_imp_local.egg-info/dependency_links.txt +0 -0
- {contact_person_profile_csv_imp_local-0.0.48 → contact_person_profile_csv_imp_local-0.0.49}/contact_person_profile_csv_imp_local.egg-info/top_level.txt +0 -0
- {contact_person_profile_csv_imp_local-0.0.48 → contact_person_profile_csv_imp_local-0.0.49}/pyproject.toml +0 -0
- {contact_person_profile_csv_imp_local-0.0.48 → contact_person_profile_csv_imp_local-0.0.49}/setup.cfg +0 -0
{contact_person_profile_csv_imp_local-0.0.48 → contact_person_profile_csv_imp_local-0.0.49}/PKG-INFO
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: contact-person-profile-csv-imp-local
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.49
|
|
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
|
|
@@ -12,7 +12,7 @@ Requires-Dist: contact-local>=0.0.48
|
|
|
12
12
|
Requires-Dist: logger-local>=0.0.135
|
|
13
13
|
Requires-Dist: database-mysql-local>=0.1.1
|
|
14
14
|
Requires-Dist: user-context-remote>=0.0.77
|
|
15
|
-
Requires-Dist: contact-email-address-local>=0.0.
|
|
15
|
+
Requires-Dist: contact-email-address-local>=0.0.40.1234
|
|
16
16
|
Requires-Dist: contact-group-local>=0.0.68
|
|
17
17
|
Requires-Dist: contact-location-local>=0.0.14
|
|
18
18
|
Requires-Dist: contact-notes-local>=0.0.33
|
|
@@ -173,11 +173,32 @@ class CSVToContactPersonProfile(
|
|
|
173
173
|
# Otherwise, return the value
|
|
174
174
|
return value
|
|
175
175
|
|
|
176
|
-
|
|
177
|
-
#
|
|
176
|
+
# # TODO Does this function should be here on in https://github.com/circles-zone/variable-local-python-package/tree/dev/variable_local_python_package/variable_local/src "field/field.py"?
|
|
177
|
+
# def __get_field_name(self, field_id: int, data_source_type_id: int) -> str:
|
|
178
|
+
# """
|
|
179
|
+
# Get the field name from the database
|
|
180
|
+
# :param field_id: The field ID
|
|
181
|
+
# :param data_source_type_id: The data source ID
|
|
182
|
+
# :return: The field name
|
|
183
|
+
# """
|
|
184
|
+
#
|
|
185
|
+
# 'data_source_type_id': data_source_type_id})
|
|
186
|
+
|
|
187
|
+
# self.set_schema(schema_name="data_source_field")
|
|
188
|
+
# data_source_field_tuples = self.select_multi_tuple_by_where(view_table_name="data_source_field_view",
|
|
189
|
+
# select_clause_value="external_field_name",
|
|
190
|
+
# where="data_source_type_id = %s AND field_id = %s",
|
|
191
|
+
# params=(data_source_type_id, field_id))
|
|
192
|
+
|
|
193
|
+
# if data_source_field_tuples:
|
|
194
|
+
#
|
|
195
|
+
# return data_source_field_tuples[0][0]
|
|
196
|
+
# return
|
|
197
|
+
|
|
198
|
+
# TODO what are the diff between csv_path and directory_name?
|
|
178
199
|
# ans: csv_path is the full path to the csv file, directory_name is the directory where the csv file is located
|
|
179
200
|
|
|
180
|
-
# I think file name should be after directory_name and csv_path
|
|
201
|
+
# TODO I think file name should be after directory_name and csv_path
|
|
181
202
|
# ans: it cannot be after directory_name and csv_path because it is a required parameter
|
|
182
203
|
|
|
183
204
|
# TODO: break this function into smaller functions
|
|
@@ -206,7 +227,7 @@ class CSVToContactPersonProfile(
|
|
|
206
227
|
:return:
|
|
207
228
|
"""
|
|
208
229
|
data_source_type_name = DataSources().get_data_source_name_by_id(data_source_type_id)
|
|
209
|
-
# There can be multiple profiles with the same email, why not to query `user_external_table`.`main_profile_id`?
|
|
230
|
+
# TODO There can be multiple profiles with the same email, why not to query `user_external_table`.`main_profile_id`?
|
|
210
231
|
# Answer: first, We can't query tables with GenericCRUD, second, we may not find profile_id in user_external table
|
|
211
232
|
# and may have to insert a new record to user_external_table, in this case we need profile_id from profile_view
|
|
212
233
|
profile_id = self.select_one_value_by_column_and_value(
|
|
@@ -231,6 +252,7 @@ class CSVToContactPersonProfile(
|
|
|
231
252
|
column_value=user_external_username)
|
|
232
253
|
'''
|
|
233
254
|
self.logger.info(f"profile_id: {profile_id}")
|
|
255
|
+
# TODO Please explain
|
|
234
256
|
# if csv_path is provided then we will use the full path
|
|
235
257
|
# if csv_path is not provided then we will use the directory_name and file_name to create the full path
|
|
236
258
|
# if directory_name is not provided the assumption is that the file is in the same directory as the script and not in a folder
|
|
@@ -309,6 +331,21 @@ class CSVToContactPersonProfile(
|
|
|
309
331
|
contact_dict['is_test_data'] = self.is_test_data
|
|
310
332
|
|
|
311
333
|
# TODO Please call get_display_name(first_name, last_name, organization) if display_as is empty
|
|
334
|
+
|
|
335
|
+
# for phone in ['phone1', 'phone2', 'phone3']:
|
|
336
|
+
# if contact_dict[phone] is None:
|
|
337
|
+
# continue
|
|
338
|
+
# phone_data = process_phone(original_phone_number=contact_dict[phone])
|
|
339
|
+
# if phone_data is None:
|
|
340
|
+
# continue
|
|
341
|
+
# else:
|
|
342
|
+
# contact_dict[phone] = phone_data['normalized_phone_number']
|
|
343
|
+
|
|
344
|
+
# contact_dict['first_name'] = process_first_name(
|
|
345
|
+
# original_first_name=contact_dict['first_name'])
|
|
346
|
+
# contact_dict['last_name'] = process_last_name(
|
|
347
|
+
# original_last_name=contact_dict['last_name'])
|
|
348
|
+
|
|
312
349
|
# TODO This should be executed also by Google Contact Sync (please make sure it is in
|
|
313
350
|
# people-local-python-package i.e. get_display_name(first_name, last_name, organization) -> str
|
|
314
351
|
if contact_dict.get('display_as') is None:
|
|
@@ -320,6 +357,8 @@ class CSVToContactPersonProfile(
|
|
|
320
357
|
if not contact_dict['display_as'] and contact_dict.get('organization'):
|
|
321
358
|
contact_dict['display_as'] += " " + contact_dict['organization']
|
|
322
359
|
|
|
360
|
+
# TODO if contact_dict['display_as'] still empty raise?
|
|
361
|
+
|
|
323
362
|
# TODO process_notes( contact_dict[notes] )
|
|
324
363
|
|
|
325
364
|
# TODO We should take care of situation which the contact already exists and we need to update it
|
|
@@ -339,6 +378,9 @@ class CSVToContactPersonProfile(
|
|
|
339
378
|
data_source_instance_id=data_source_instance_id,
|
|
340
379
|
data_source_type_id=data_source_type_id)
|
|
341
380
|
contact_data_by_contact_id_dict[contact_id] = contact_dict
|
|
381
|
+
# groups_linked_by_job_title = process_job_title(contact_id=contact_id, job_title=contact_dict['job_title'])
|
|
382
|
+
# if groups_linked_by_job_title is None:
|
|
383
|
+
# logger.info("No groups linked by job title to contact " + str(contact_id))
|
|
342
384
|
|
|
343
385
|
return contact_data_by_contact_id_dict
|
|
344
386
|
|
|
@@ -634,6 +676,24 @@ class CSVToContactPersonProfile(
|
|
|
634
676
|
|
|
635
677
|
return contact_phone_ids
|
|
636
678
|
|
|
679
|
+
# old, TODO, do we need it?
|
|
680
|
+
def __insert_link_contact_user_external(self, contact_dict: dict) -> int:
|
|
681
|
+
contact_id = contact_dict.get("contact_id")
|
|
682
|
+
print("Before " + __name__, file=sys.stderr, flush=True)
|
|
683
|
+
contact_user_external_id = \
|
|
684
|
+
self.contact_user_external.insert_contact_and_link_to_existing_or_new_user_external(
|
|
685
|
+
contact_dict=contact_dict,
|
|
686
|
+
contact_email_address_str=contact_dict["email1"],
|
|
687
|
+
contact_id=contact_id,
|
|
688
|
+
system_id=contact_dict.get("system_id"),
|
|
689
|
+
# TODO What happends if contact do not have email?
|
|
690
|
+
# TODO I'm not sure we should use contact_dict["email1"] for user_external_dict["username"] probably bug
|
|
691
|
+
user_external_dict={"username": contact_dict["email1"]}
|
|
692
|
+
)
|
|
693
|
+
print("After " + __name__, file=sys.stderr, flush=True)
|
|
694
|
+
return contact_user_external_id
|
|
695
|
+
|
|
696
|
+
# new
|
|
637
697
|
def __insert_link_contact_user_external_by_contact_dict_and_user_external_dict(
|
|
638
698
|
self,
|
|
639
699
|
contact_dict: dict,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: contact-person-profile-csv-imp-local
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.49
|
|
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
|
|
@@ -12,7 +12,7 @@ Requires-Dist: contact-local>=0.0.48
|
|
|
12
12
|
Requires-Dist: logger-local>=0.0.135
|
|
13
13
|
Requires-Dist: database-mysql-local>=0.1.1
|
|
14
14
|
Requires-Dist: user-context-remote>=0.0.77
|
|
15
|
-
Requires-Dist: contact-email-address-local>=0.0.
|
|
15
|
+
Requires-Dist: contact-email-address-local>=0.0.40.1234
|
|
16
16
|
Requires-Dist: contact-group-local>=0.0.68
|
|
17
17
|
Requires-Dist: contact-location-local>=0.0.14
|
|
18
18
|
Requires-Dist: contact-notes-local>=0.0.33
|
|
@@ -2,7 +2,7 @@ contact-local>=0.0.48
|
|
|
2
2
|
logger-local>=0.0.135
|
|
3
3
|
database-mysql-local>=0.1.1
|
|
4
4
|
user-context-remote>=0.0.77
|
|
5
|
-
contact-email-address-local>=0.0.
|
|
5
|
+
contact-email-address-local>=0.0.40.1234
|
|
6
6
|
contact-group-local>=0.0.68
|
|
7
7
|
contact-location-local>=0.0.14
|
|
8
8
|
contact-notes-local>=0.0.33
|
{contact_person_profile_csv_imp_local-0.0.48 → contact_person_profile_csv_imp_local-0.0.49}/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.49', # https://pypi.org/project/contact-person-profile-csv-imp-local/
|
|
9
9
|
|
|
10
10
|
author="Circles",
|
|
11
11
|
author_email="info@circles.ai",
|
|
@@ -26,7 +26,7 @@ setuptools.setup(
|
|
|
26
26
|
'logger-local>=0.0.135',
|
|
27
27
|
'database-mysql-local>=0.1.1',
|
|
28
28
|
'user-context-remote>=0.0.77',
|
|
29
|
-
'contact-email-address-local>=0.0.
|
|
29
|
+
'contact-email-address-local>=0.0.40.1234',
|
|
30
30
|
'contact-group-local>=0.0.68',
|
|
31
31
|
'contact-location-local>=0.0.14',
|
|
32
32
|
'contact-notes-local>=0.0.33',
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|