datamule 1.2.7__tar.gz → 1.2.9__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.
- {datamule-1.2.7 → datamule-1.2.9}/PKG-INFO +1 -1
- datamule-1.2.9/datamule/document/mappings/d.py +125 -0
- {datamule-1.2.7 → datamule-1.2.9}/datamule/document/processing.py +101 -30
- {datamule-1.2.7 → datamule-1.2.9}/datamule/document/table.py +12 -0
- {datamule-1.2.7 → datamule-1.2.9}/datamule.egg-info/PKG-INFO +1 -1
- {datamule-1.2.7 → datamule-1.2.9}/datamule.egg-info/SOURCES.txt +1 -0
- {datamule-1.2.7 → datamule-1.2.9}/setup.py +1 -1
- {datamule-1.2.7 → datamule-1.2.9}/datamule/__init__.py +0 -0
- {datamule-1.2.7 → datamule-1.2.9}/datamule/config.py +0 -0
- {datamule-1.2.7 → datamule-1.2.9}/datamule/document/__init__.py +0 -0
- {datamule-1.2.7 → datamule-1.2.9}/datamule/document/document.py +0 -0
- {datamule-1.2.7 → datamule-1.2.9}/datamule/document/mappings/__init__.py +0 -0
- {datamule-1.2.7 → datamule-1.2.9}/datamule/document/mappings/atsn.py +0 -0
- {datamule-1.2.7 → datamule-1.2.9}/datamule/document/mappings/cfportal.py +0 -0
- {datamule-1.2.7 → datamule-1.2.9}/datamule/document/mappings/ex102_abs.py +0 -0
- {datamule-1.2.7 → datamule-1.2.9}/datamule/document/mappings/ex99a_sdr.py +0 -0
- {datamule-1.2.7 → datamule-1.2.9}/datamule/document/mappings/ex99c_sdr.py +0 -0
- {datamule-1.2.7 → datamule-1.2.9}/datamule/document/mappings/ex99g_sdr.py +0 -0
- {datamule-1.2.7 → datamule-1.2.9}/datamule/document/mappings/ex99i_sdr.py +0 -0
- {datamule-1.2.7 → datamule-1.2.9}/datamule/document/mappings/information_table.py +0 -0
- {datamule-1.2.7 → datamule-1.2.9}/datamule/document/mappings/nmfp.py +0 -0
- {datamule-1.2.7 → datamule-1.2.9}/datamule/document/mappings/npx.py +0 -0
- {datamule-1.2.7 → datamule-1.2.9}/datamule/document/mappings/onefourtyfour.py +0 -0
- {datamule-1.2.7 → datamule-1.2.9}/datamule/document/mappings/ownership.py +0 -0
- {datamule-1.2.7 → datamule-1.2.9}/datamule/document/mappings/proxy_voting_record.py +0 -0
- {datamule-1.2.7 → datamule-1.2.9}/datamule/document/mappings/sbs.py +0 -0
- {datamule-1.2.7 → datamule-1.2.9}/datamule/document/mappings/sbsef.py +0 -0
- {datamule-1.2.7 → datamule-1.2.9}/datamule/document/mappings/schedule13.py +0 -0
- {datamule-1.2.7 → datamule-1.2.9}/datamule/document/mappings/sdr.py +0 -0
- {datamule-1.2.7 → datamule-1.2.9}/datamule/document/mappings/submission_metadata.py +0 -0
- {datamule-1.2.7 → datamule-1.2.9}/datamule/document/mappings/ta.py +0 -0
- {datamule-1.2.7 → datamule-1.2.9}/datamule/document/mappings/thirteenfhr.py +0 -0
- {datamule-1.2.7 → datamule-1.2.9}/datamule/document/mappings/twentyfivense.py +0 -0
- {datamule-1.2.7 → datamule-1.2.9}/datamule/document/mappings/twentyfourf2nt.py +0 -0
- {datamule-1.2.7 → datamule-1.2.9}/datamule/helper.py +0 -0
- {datamule-1.2.7 → datamule-1.2.9}/datamule/index.py +0 -0
- {datamule-1.2.7 → datamule-1.2.9}/datamule/mapping_dicts/__init__.py +0 -0
- {datamule-1.2.7 → datamule-1.2.9}/datamule/mapping_dicts/txt_mapping_dicts.py +0 -0
- {datamule-1.2.7 → datamule-1.2.9}/datamule/mapping_dicts/xml_mapping_dicts.py +0 -0
- {datamule-1.2.7 → datamule-1.2.9}/datamule/package_updater.py +0 -0
- {datamule-1.2.7 → datamule-1.2.9}/datamule/portfolio.py +0 -0
- {datamule-1.2.7 → datamule-1.2.9}/datamule/sec/__init__.py +0 -0
- {datamule-1.2.7 → datamule-1.2.9}/datamule/sec/infrastructure/__init__.py +0 -0
- {datamule-1.2.7 → datamule-1.2.9}/datamule/sec/infrastructure/submissions_metadata.py +0 -0
- {datamule-1.2.7 → datamule-1.2.9}/datamule/sec/submissions/__init__.py +0 -0
- {datamule-1.2.7 → datamule-1.2.9}/datamule/sec/submissions/downloader.py +0 -0
- {datamule-1.2.7 → datamule-1.2.9}/datamule/sec/submissions/eftsquery.py +0 -0
- {datamule-1.2.7 → datamule-1.2.9}/datamule/sec/submissions/monitor.py +0 -0
- {datamule-1.2.7 → datamule-1.2.9}/datamule/sec/submissions/streamer.py +0 -0
- {datamule-1.2.7 → datamule-1.2.9}/datamule/sec/submissions/textsearch.py +0 -0
- {datamule-1.2.7 → datamule-1.2.9}/datamule/sec/utils.py +0 -0
- {datamule-1.2.7 → datamule-1.2.9}/datamule/sec/xbrl/__init__.py +0 -0
- {datamule-1.2.7 → datamule-1.2.9}/datamule/sec/xbrl/downloadcompanyfacts.py +0 -0
- {datamule-1.2.7 → datamule-1.2.9}/datamule/sec/xbrl/filter_xbrl.py +0 -0
- {datamule-1.2.7 → datamule-1.2.9}/datamule/sec/xbrl/streamcompanyfacts.py +0 -0
- {datamule-1.2.7 → datamule-1.2.9}/datamule/sec/xbrl/xbrlmonitor.py +0 -0
- {datamule-1.2.7 → datamule-1.2.9}/datamule/seclibrary/__init__.py +0 -0
- {datamule-1.2.7 → datamule-1.2.9}/datamule/seclibrary/bq.py +0 -0
- {datamule-1.2.7 → datamule-1.2.9}/datamule/seclibrary/downloader.py +0 -0
- {datamule-1.2.7 → datamule-1.2.9}/datamule/seclibrary/query.py +0 -0
- {datamule-1.2.7 → datamule-1.2.9}/datamule/sheet.py +0 -0
- {datamule-1.2.7 → datamule-1.2.9}/datamule/submission.py +0 -0
- {datamule-1.2.7 → datamule-1.2.9}/datamule.egg-info/dependency_links.txt +0 -0
- {datamule-1.2.7 → datamule-1.2.9}/datamule.egg-info/requires.txt +0 -0
- {datamule-1.2.7 → datamule-1.2.9}/datamule.egg-info/top_level.txt +0 -0
- {datamule-1.2.7 → datamule-1.2.9}/setup.cfg +0 -0
@@ -0,0 +1,125 @@
|
|
1
|
+
issuer_list_d_dict = {
|
2
|
+
'issuer_issuerAddress_street1': 'issuerStreet1',
|
3
|
+
'issuer_cik': 'issuerCik',
|
4
|
+
'issuer_issuerAddress_stateOrCountryDescription': 'issuerStateOrCountryDescription',
|
5
|
+
'issuer_issuerAddress_zipCode': 'issuerZipCode',
|
6
|
+
'issuer_issuerPhoneNumber': 'issuerPhoneNumber',
|
7
|
+
'issuer_yearOfInc_value': 'yearOfIncValue',
|
8
|
+
'issuer_issuerAddress_stateOrCountry': 'issuerStateOrCountry',
|
9
|
+
'issuer_jurisdictionOfInc': 'jurisdictionOfInc',
|
10
|
+
'issuer_entityType': 'entityType',
|
11
|
+
'issuer_issuerAddress_street2': 'issuerStreet2',
|
12
|
+
'issuer_entityName': 'entityName',
|
13
|
+
'accession': 'accession',
|
14
|
+
'issuer_edgarPreviousNameList_value': 'edgarPreviousNameListValue',
|
15
|
+
'issuer_entityTypeOtherDesc': 'entityTypeOtherDesc',
|
16
|
+
'issuer_yearOfInc_yetToBeFormed': 'yearOfIncYetToBeFormed',
|
17
|
+
'issuer_yearOfInc_withinFiveYears': 'yearOfIncWithinFiveYears',
|
18
|
+
'issuer_issuerPreviousNameList_value': 'issuerPreviousNameListValue',
|
19
|
+
'issuer_issuerAddress_city': 'issuerCity'
|
20
|
+
}
|
21
|
+
|
22
|
+
metadata_d_dict = {
|
23
|
+
"testOrLive" : "testOrLive",
|
24
|
+
"schemaVersion" : "schemaVersion",
|
25
|
+
"accession" : "accession",
|
26
|
+
"submissionType" : "submissionType",
|
27
|
+
}
|
28
|
+
offering_data_d_dict = {
|
29
|
+
'salesCompensationList_recipient_foreignSolicitation': 'foreignSolicitation',
|
30
|
+
'typeOfFiling_dateOfFirstSale_yetToOccur': 'dateOfFirstSaleYetToOccur',
|
31
|
+
'industryGroup_investmentFundInfo_is40Act': 'is40Act',
|
32
|
+
'salesCommissionsFindersFees_findersFees_dollarAmount': 'findersFeesAmount',
|
33
|
+
'offeringSalesAmounts_totalRemaining': 'totalRemaining',
|
34
|
+
'issuerSize_aggregateNetAssetValueRange': 'aggregateNetAssetValueRange',
|
35
|
+
'typesOfSecuritiesOffered_isSecurityToBeAcquiredType': 'isSecurityToBeAcquiredType',
|
36
|
+
'salesCompensationList_recipient_recipientAddress_stateOrCountryDescription': 'recipientStateOrCountryDescription',
|
37
|
+
'typesOfSecuritiesOffered_isEquityType': 'isEquityType',
|
38
|
+
'investors_totalNumberAlreadyInvested': 'totalNumberAlreadyInvested',
|
39
|
+
'minimumInvestmentAccepted': 'minimumInvestmentAccepted',
|
40
|
+
'salesCompensationList_recipient_associatedBDName': 'associatedBDName',
|
41
|
+
'salesCompensationList_recipient_statesOfSolicitationList_state': 'statesOfSolicitationState',
|
42
|
+
'businessCombinationTransaction_isBusinessCombinationTransaction': 'isBusinessCombinationTransaction',
|
43
|
+
'useOfProceeds_grossProceedsUsed_isEstimate': 'grossProceedsUsedIsEstimate',
|
44
|
+
'federalExemptionsExclusions_item': 'federalExemptionsExclusionsItem',
|
45
|
+
'useOfProceeds_grossProceedsUsed_dollarAmount': 'grossProceedsUsedAmount',
|
46
|
+
'industryGroup_industryGroupType': 'industryGroupType',
|
47
|
+
'signatureBlock_signature_nameOfSigner': 'nameOfSigner',
|
48
|
+
'signatureBlock_signature_signatureDate': 'signatureDate',
|
49
|
+
'salesCommissionsFindersFees_salesCommissions_isEstimate': 'salesCommissionsIsEstimate',
|
50
|
+
'typesOfSecuritiesOffered_isOtherType': 'isOtherType',
|
51
|
+
'salesCompensationList_recipient_associatedBDCRDNumber': 'associatedBDCRDNumber',
|
52
|
+
'salesCompensationList_recipient_recipientAddress_stateOrCountry': 'recipientStateOrCountry',
|
53
|
+
'typesOfSecuritiesOffered_descriptionOfOtherType': 'descriptionOfOtherType',
|
54
|
+
'salesCommissionsFindersFees_salesCommissions_dollarAmount': 'salesCommissionsAmount',
|
55
|
+
'useOfProceeds_clarificationOfResponse': 'useOfProceedsClarification',
|
56
|
+
'accession': 'accession',
|
57
|
+
'typesOfSecuritiesOffered_isPooledInvestmentFundType': 'isPooledInvestmentFundType',
|
58
|
+
'salesCompensationList_recipient_statesOfSolicitationList_value': 'statesOfSolicitationValue',
|
59
|
+
'signatureBlock_signature_signatureName': 'signatureName',
|
60
|
+
'typeOfFiling_newOrAmendment_isAmendment': 'isAmendment',
|
61
|
+
'issuerSize_revenueRange': 'revenueRange',
|
62
|
+
'salesCommissionsFindersFees_clarificationOfResponse': 'salesCommissionsFindersFeesClarification',
|
63
|
+
'salesCompensationList_recipient_recipientAddress_zipCode': 'recipientZipCode',
|
64
|
+
'salesCompensationList_recipient_recipientAddress_city': 'recipientCity',
|
65
|
+
'typesOfSecuritiesOffered_isOptionToAcquireType': 'isOptionToAcquireType',
|
66
|
+
'businessCombinationTransaction_clarificationOfResponse': 'businessCombinationClarification',
|
67
|
+
'typesOfSecuritiesOffered_isTenantInCommonType': 'isTenantInCommonType',
|
68
|
+
'salesCompensationList_recipient_statesOfSolicitationList_description': 'statesOfSolicitationDescription',
|
69
|
+
'offeringSalesAmounts_totalOfferingAmount': 'totalOfferingAmount',
|
70
|
+
'investors_numberNonAccreditedInvestors': 'numberNonAccreditedInvestors',
|
71
|
+
'signatureBlock_authorizedRepresentative': 'authorizedRepresentative',
|
72
|
+
'signatureBlock_signature_issuerName': 'issuerName',
|
73
|
+
'salesCompensationList_recipient_recipientAddress_street2': 'recipientStreet2',
|
74
|
+
'typesOfSecuritiesOffered_isDebtType': 'isDebtType',
|
75
|
+
'salesCompensationList_recipient_recipientAddress_street1': 'recipientStreet1',
|
76
|
+
'signatureBlock_signature_signatureTitle': 'signatureTitle',
|
77
|
+
'industryGroup_investmentFundInfo_investmentFundType': 'investmentFundType',
|
78
|
+
'salesCommissionsFindersFees_findersFees_isEstimate': 'findersFeesIsEstimate',
|
79
|
+
'typeOfFiling_dateOfFirstSale_value': 'dateOfFirstSaleValue',
|
80
|
+
'offeringSalesAmounts_totalAmountSold': 'totalAmountSold',
|
81
|
+
'offeringSalesAmounts_clarificationOfResponse': 'offeringSalesAmountsClarification',
|
82
|
+
'investors_hasNonAccreditedInvestors': 'hasNonAccreditedInvestors',
|
83
|
+
'salesCompensationList_recipient_recipientCRDNumber': 'recipientCRDNumber',
|
84
|
+
'typesOfSecuritiesOffered_isMineralPropertyType': 'isMineralPropertyType',
|
85
|
+
'salesCompensationList_recipient_recipientName': 'recipientName',
|
86
|
+
'durationOfOffering_moreThanOneYear': 'moreThanOneYear'
|
87
|
+
}
|
88
|
+
primary_issuer_d_dict = {
|
89
|
+
'yearOfInc_withinFiveYears': 'yearOfIncWithinFiveYears',
|
90
|
+
'entityTypeOtherDesc': 'entityTypeOtherDesc',
|
91
|
+
'jurisdictionOfInc': 'jurisdictionOfInc',
|
92
|
+
'issuerAddress_street1': 'issuerStreet1',
|
93
|
+
'issuerAddress_zipCode': 'issuerZipCode',
|
94
|
+
'issuerPreviousNameList_previousName': 'issuerPreviousName',
|
95
|
+
'entityType': 'entityType',
|
96
|
+
'issuerPreviousNameList_value': 'issuerPreviousNameListValue',
|
97
|
+
'issuerPhoneNumber': 'issuerPhoneNumber',
|
98
|
+
'yearOfInc_value': 'yearOfIncValue',
|
99
|
+
'yearOfInc_yetToBeFormed': 'yearOfIncYetToBeFormed',
|
100
|
+
'edgarPreviousNameList_previousName': 'edgarPreviousName',
|
101
|
+
'edgarPreviousNameList_value': 'edgarPreviousNameListValue',
|
102
|
+
'issuerAddress_stateOrCountry': 'issuerStateOrCountry',
|
103
|
+
'entityName': 'entityName',
|
104
|
+
'accession': 'accession',
|
105
|
+
'issuerAddress_street2': 'issuerStreet2',
|
106
|
+
'issuerAddress_city': 'issuerCity',
|
107
|
+
'issuerAddress_stateOrCountryDescription': 'issuerStateOrCountryDescription',
|
108
|
+
'cik': 'cik',
|
109
|
+
'yearOfInc_overFiveYears': 'yearOfIncOverFiveYears'
|
110
|
+
}
|
111
|
+
|
112
|
+
related_persons_d_dict = {
|
113
|
+
'relatedPersonInfo_relatedPersonAddress_stateOrCountry': 'relatedPersonStateOrCountry',
|
114
|
+
'relatedPersonInfo_relatedPersonRelationshipList_relationship': 'relatedPersonRelationship',
|
115
|
+
'relatedPersonInfo_relationshipClarification': 'relationshipClarification',
|
116
|
+
'relatedPersonInfo_relatedPersonName_lastName': 'relatedPersonLastName',
|
117
|
+
'accession': 'accession',
|
118
|
+
'relatedPersonInfo_relatedPersonName_middleName': 'relatedPersonMiddleName',
|
119
|
+
'relatedPersonInfo_relatedPersonAddress_zipCode': 'relatedPersonZipCode',
|
120
|
+
'relatedPersonInfo_relatedPersonAddress_city': 'relatedPersonCity',
|
121
|
+
'relatedPersonInfo_relatedPersonAddress_street1': 'relatedPersonStreet1',
|
122
|
+
'relatedPersonInfo_relatedPersonAddress_stateOrCountryDescription': 'relatedPersonStateOrCountryDescription',
|
123
|
+
'relatedPersonInfo_relatedPersonName_firstName': 'relatedPersonFirstName',
|
124
|
+
'relatedPersonInfo_relatedPersonAddress_street2': 'relatedPersonStreet2'
|
125
|
+
}
|
@@ -20,10 +20,13 @@ def process_tabular_data(self):
|
|
20
20
|
elif self.type in ["25-NSE", "25-NSE/A"]:
|
21
21
|
tables = process_25nse(self.data, self.accession)
|
22
22
|
# complete mark:
|
23
|
-
elif self.type in ["N-PX","N-PX/A"]:
|
24
|
-
tables = process_npx(self.data, self.accession)
|
25
23
|
elif self.type in ["EX-102"]:
|
26
24
|
tables = process_ex102_abs(self.data, self.accession)
|
25
|
+
elif self.type in ["D","D/A"]:
|
26
|
+
tables = process_d(self.data, self.accession)
|
27
|
+
elif self.type in ["N-PX","N-PX/A"]:
|
28
|
+
tables = process_npx(self.data, self.accession)
|
29
|
+
|
27
30
|
|
28
31
|
elif self.type in ["SBSEF","SBSEF/A","SBSEF-V","SBSEF-W"]:
|
29
32
|
tables = process_sbsef(self.data, self.accession)
|
@@ -49,8 +52,7 @@ def process_tabular_data(self):
|
|
49
52
|
# tables = process_c(self.data, self.accession)
|
50
53
|
elif self.type in ["CFPORTAL","CFPORTAL/A","CFPORTAL-W"]:
|
51
54
|
tables = process_cfportal(self.data, self.accession)
|
52
|
-
|
53
|
-
# tables = process_d(self.data, self.accession)
|
55
|
+
|
54
56
|
# elif self.type in ["MA","MA-A","MA/A","MA-I","MA-I/A","MA-W"]:
|
55
57
|
# tables = process_ma(self.data, self.accession)
|
56
58
|
# elif self.type in ["N-CEN","N-CEN/A"]:
|
@@ -102,6 +104,67 @@ def _flatten_dict(d, parent_key=''):
|
|
102
104
|
|
103
105
|
return items
|
104
106
|
|
107
|
+
# flattens in a different way
|
108
|
+
def flatten_dict_to_rows(d, parent_key='', sep='_'):
|
109
|
+
|
110
|
+
if isinstance(d, list):
|
111
|
+
# If input is a list, flatten each item and return all rows
|
112
|
+
all_rows = []
|
113
|
+
for item in d:
|
114
|
+
all_rows.extend(flatten_dict_to_rows(item, parent_key, sep))
|
115
|
+
return all_rows
|
116
|
+
|
117
|
+
if not isinstance(d, dict):
|
118
|
+
# If input is a primitive value, return single row
|
119
|
+
return [{parent_key: d}] if parent_key else []
|
120
|
+
|
121
|
+
# Input is a dictionary
|
122
|
+
rows = [{}]
|
123
|
+
|
124
|
+
for k, v in d.items():
|
125
|
+
new_key = f"{parent_key}{sep}{k}" if parent_key else k
|
126
|
+
|
127
|
+
if isinstance(v, dict):
|
128
|
+
# Recursively flatten nested dictionaries
|
129
|
+
nested_rows = flatten_dict_to_rows(v, new_key, sep)
|
130
|
+
# Cross-product with existing rows
|
131
|
+
new_rows = []
|
132
|
+
for row in rows:
|
133
|
+
for nested_row in nested_rows:
|
134
|
+
combined_row = row.copy()
|
135
|
+
combined_row.update(nested_row)
|
136
|
+
new_rows.append(combined_row)
|
137
|
+
rows = new_rows
|
138
|
+
|
139
|
+
elif isinstance(v, list):
|
140
|
+
# Handle lists - create multiple rows
|
141
|
+
if not v: # Empty list
|
142
|
+
for row in rows:
|
143
|
+
row[new_key] = ''
|
144
|
+
else:
|
145
|
+
new_rows = []
|
146
|
+
for row in rows:
|
147
|
+
for list_item in v:
|
148
|
+
new_row = row.copy()
|
149
|
+
if isinstance(list_item, dict):
|
150
|
+
# Recursively flatten dict items in list
|
151
|
+
nested_rows = flatten_dict_to_rows(list_item, new_key, sep)
|
152
|
+
for nested_row in nested_rows:
|
153
|
+
combined_row = new_row.copy()
|
154
|
+
combined_row.update(nested_row)
|
155
|
+
new_rows.append(combined_row)
|
156
|
+
else:
|
157
|
+
# Primitive value in list
|
158
|
+
new_row[new_key] = list_item
|
159
|
+
new_rows.append(new_row)
|
160
|
+
rows = new_rows
|
161
|
+
else:
|
162
|
+
# Handle primitive values
|
163
|
+
for row in rows:
|
164
|
+
row[new_key] = v
|
165
|
+
|
166
|
+
return rows
|
167
|
+
|
105
168
|
def process_ownership(data, accession):
|
106
169
|
tables = []
|
107
170
|
if 'ownershipDocument' not in data:
|
@@ -353,33 +416,41 @@ def process_cfportal(data, accession):
|
|
353
416
|
|
354
417
|
return tables
|
355
418
|
|
356
|
-
|
357
|
-
|
358
|
-
|
359
|
-
|
360
|
-
|
361
|
-
|
362
|
-
|
363
|
-
|
364
|
-
|
365
|
-
|
366
|
-
|
367
|
-
|
368
|
-
|
369
|
-
|
370
|
-
|
371
|
-
|
372
|
-
|
373
|
-
|
374
|
-
|
375
|
-
#
|
376
|
-
|
377
|
-
|
378
|
-
|
379
|
-
|
380
|
-
|
419
|
+
def process_d(data, accession):
|
420
|
+
tables = []
|
421
|
+
groups = [('contactData', 'contact_data_d'),
|
422
|
+
('notificationAddressList', 'notification_address_list_d'),
|
423
|
+
('primaryIssuer', 'primary_issuer_d'),
|
424
|
+
('issuerList', 'issuer_list_d'),
|
425
|
+
('relatedPersonsList', 'related_persons_list_d'),
|
426
|
+
('offeringData', 'offering_data_d'),
|
427
|
+
]
|
428
|
+
for group,table_type in groups:
|
429
|
+
if group == 'relatedPersonList':
|
430
|
+
group_data = data['edgarSubmission'].pop('relatedPersonInfo', None)
|
431
|
+
data['edgarSubmission'].pop(group, None)
|
432
|
+
elif group == 'issuerList':
|
433
|
+
group_data = data['edgarSubmission'].pop('issuerList', None)
|
434
|
+
else:
|
435
|
+
group_data = data['edgarSubmission'].pop(group, None)
|
436
|
+
|
437
|
+
if group_data:
|
438
|
+
# Special handling ONLY for relatedPersonsList
|
439
|
+
if group in ['relatedPersonsList', 'issuerList','offeringData']:
|
440
|
+
# Use the new flatten_dict_to_rows ONLY for this key
|
441
|
+
flattened_rows = flatten_dict_to_rows(group_data)
|
442
|
+
if flattened_rows:
|
443
|
+
tables.append(Table(flattened_rows, table_type, accession))
|
444
|
+
else:
|
445
|
+
# Everything else remains EXACTLY the same
|
446
|
+
tables.append(Table(_flatten_dict(group_data), table_type, accession))
|
447
|
+
|
448
|
+
|
449
|
+
|
450
|
+
metadata_table = Table(_flatten_dict(data['edgarSubmission']), 'metadata_d', accession)
|
451
|
+
tables.append(metadata_table)
|
381
452
|
|
382
|
-
|
453
|
+
return tables
|
383
454
|
|
384
455
|
# def process_nmfp(data, accession):
|
385
456
|
# tables = []
|
@@ -20,6 +20,7 @@ from .mappings.twentyfourf2nt import *
|
|
20
20
|
from .mappings.information_table import *
|
21
21
|
from .mappings.submission_metadata import *
|
22
22
|
from .mappings.ex102_abs import *
|
23
|
+
from .mappings.d import *
|
23
24
|
|
24
25
|
from pathlib import Path
|
25
26
|
import csv
|
@@ -201,6 +202,17 @@ class Table():
|
|
201
202
|
elif self.type == 'signature_schedule_13':
|
202
203
|
mapping_dict = signature_schedule_13_dict
|
203
204
|
|
205
|
+
# D
|
206
|
+
elif self.type == 'issuer_list_d':
|
207
|
+
mapping_dict = issuer_list_d_dict
|
208
|
+
elif self.type == 'metadata_d':
|
209
|
+
mapping_dict = metadata_d_dict
|
210
|
+
elif self.type == 'offering_data_d':
|
211
|
+
mapping_dict = offering_data_d_dict
|
212
|
+
elif self.type == 'primary_issuer_d':
|
213
|
+
mapping_dict = primary_issuer_d_dict
|
214
|
+
elif self.type == 'related_persons_list_d':
|
215
|
+
mapping_dict = related_persons_d_dict
|
204
216
|
# SDR
|
205
217
|
elif self.type == 'sdr':
|
206
218
|
mapping_dict = sdr_dict
|
@@ -19,6 +19,7 @@ datamule/document/table.py
|
|
19
19
|
datamule/document/mappings/__init__.py
|
20
20
|
datamule/document/mappings/atsn.py
|
21
21
|
datamule/document/mappings/cfportal.py
|
22
|
+
datamule/document/mappings/d.py
|
22
23
|
datamule/document/mappings/ex102_abs.py
|
23
24
|
datamule/document/mappings/ex99a_sdr.py
|
24
25
|
datamule/document/mappings/ex99c_sdr.py
|
@@ -30,7 +30,7 @@ if not file_path.exists():
|
|
30
30
|
setup(
|
31
31
|
name="datamule",
|
32
32
|
author="John Friedman",
|
33
|
-
version="1.2.
|
33
|
+
version="1.2.9",
|
34
34
|
description="Making it easier to use SEC filings.",
|
35
35
|
packages=find_packages(include=['datamule', 'datamule.*']),
|
36
36
|
url="https://github.com/john-friedman/datamule-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
|
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
|
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
|
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
|
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
|
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
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|