followthemoney 3.8.1__py3-none-any.whl → 3.8.2__py3-none-any.whl
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.
Potentially problematic release.
This version of followthemoney might be problematic. Click here for more details.
- followthemoney/__init__.py +1 -1
- followthemoney/export/neo4j.py +4 -5
- followthemoney/schema/Occupancy.yaml +7 -0
- followthemoney/util.py +5 -0
- {followthemoney-3.8.1.dist-info → followthemoney-3.8.2.dist-info}/METADATA +2 -3
- {followthemoney-3.8.1.dist-info → followthemoney-3.8.2.dist-info}/RECORD +9 -9
- {followthemoney-3.8.1.dist-info → followthemoney-3.8.2.dist-info}/WHEEL +0 -0
- {followthemoney-3.8.1.dist-info → followthemoney-3.8.2.dist-info}/entry_points.txt +0 -0
- {followthemoney-3.8.1.dist-info → followthemoney-3.8.2.dist-info}/licenses/LICENSE +0 -0
followthemoney/__init__.py
CHANGED
followthemoney/export/neo4j.py
CHANGED
|
@@ -2,13 +2,12 @@ import os
|
|
|
2
2
|
import json
|
|
3
3
|
import logging
|
|
4
4
|
from typing import Any, Dict, Iterable, List, Optional, Set, TextIO
|
|
5
|
-
import stringcase # type: ignore
|
|
6
5
|
|
|
7
6
|
from followthemoney.export.csv import CSVMixin, CSVWriter
|
|
8
7
|
from followthemoney.export.graph import GraphExporter, DEFAULT_EDGE_TYPES
|
|
9
8
|
from followthemoney.graph import Edge, Node
|
|
10
9
|
from followthemoney.schema import Schema
|
|
11
|
-
from followthemoney.util import PathLike
|
|
10
|
+
from followthemoney.util import PathLike, const_case
|
|
12
11
|
|
|
13
12
|
log = logging.getLogger(__name__)
|
|
14
13
|
NEO4J_ADMIN_PATH = os.environ.get("NEO4J_ADMIN_PATH", "neo4j-admin")
|
|
@@ -72,12 +71,12 @@ class Neo4JCSVExporter(CSVMixin, GraphExporter):
|
|
|
72
71
|
|
|
73
72
|
def write_edge(self, edge: Edge, extra: List[str]) -> None:
|
|
74
73
|
if edge.prop is not None:
|
|
75
|
-
type_ =
|
|
74
|
+
type_ = const_case(edge.prop.name)
|
|
76
75
|
row = [type_, edge.source_id, edge.target_id, edge.weight]
|
|
77
76
|
self.links_writer.writerow(row)
|
|
78
77
|
if edge.proxy is not None:
|
|
79
78
|
proxy = edge.proxy
|
|
80
|
-
type_ =
|
|
79
|
+
type_ = const_case(proxy.schema.name)
|
|
81
80
|
# That potentially may lead to multiple edges with same id
|
|
82
81
|
cells = [proxy.id, type_, edge.source_id, edge.target_id]
|
|
83
82
|
cells.extend(extra or [])
|
|
@@ -174,7 +173,7 @@ class CypherGraphExporter(GraphExporter):
|
|
|
174
173
|
% {
|
|
175
174
|
"source": self._to_map({"id": edge.source_id}),
|
|
176
175
|
"target": self._to_map({"id": edge.target_id}),
|
|
177
|
-
"type":
|
|
176
|
+
"type": const_case(edge.type_name),
|
|
178
177
|
"map": self._to_map(attributes),
|
|
179
178
|
}
|
|
180
179
|
)
|
followthemoney/util.py
CHANGED
|
@@ -105,6 +105,11 @@ def join_text(*parts: Any, sep: str = " ") -> Optional[str]:
|
|
|
105
105
|
return sep.join(texts)
|
|
106
106
|
|
|
107
107
|
|
|
108
|
+
def const_case(text: str) -> str:
|
|
109
|
+
"""Convert the given text to a constant case."""
|
|
110
|
+
return text.upper().replace(" ", "_")
|
|
111
|
+
|
|
112
|
+
|
|
108
113
|
def get_entity_id(obj: Any) -> Optional[str]:
|
|
109
114
|
"""Given an entity-ish object, try to get the ID."""
|
|
110
115
|
if is_mapping(obj):
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: followthemoney
|
|
3
|
-
Version: 3.8.
|
|
3
|
+
Version: 3.8.2
|
|
4
4
|
Summary: A data model for anti corruption data modeling and analysis.
|
|
5
5
|
Project-URL: Documentation, https://followthemoney.tech/
|
|
6
6
|
Project-URL: Repository, https://github.com/alephdata/followthemoney.git
|
|
@@ -44,7 +44,7 @@ Requires-Dist: networkx<3.5,>=2.5
|
|
|
44
44
|
Requires-Dist: normality<3.0.0,>=2.4.0
|
|
45
45
|
Requires-Dist: openpyxl<4.0.0,>=3.0.5
|
|
46
46
|
Requires-Dist: orjson<4.0,>=3.7
|
|
47
|
-
Requires-Dist: phonenumbers<
|
|
47
|
+
Requires-Dist: phonenumbers<10.0.0,>=8.12.22
|
|
48
48
|
Requires-Dist: prefixdate<1.0.0,>=0.4.0
|
|
49
49
|
Requires-Dist: python-stdnum<2.0.0,>=1.16
|
|
50
50
|
Requires-Dist: pytz>=2021.1
|
|
@@ -54,7 +54,6 @@ Requires-Dist: requests<3.0.0,>=2.21.0
|
|
|
54
54
|
Requires-Dist: rigour<1.0.0,>=0.9.3
|
|
55
55
|
Requires-Dist: sqlalchemy2-stubs
|
|
56
56
|
Requires-Dist: sqlalchemy<3.0.0,>=1.4.49
|
|
57
|
-
Requires-Dist: stringcase<2.0.0,>=1.2.0
|
|
58
57
|
Requires-Dist: types-pyyaml
|
|
59
58
|
Provides-Extra: dev
|
|
60
59
|
Requires-Dist: build; extra == 'dev'
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
followthemoney/__init__.py,sha256=
|
|
1
|
+
followthemoney/__init__.py,sha256=Dg8HdUrc5z44TPcnl1rFNFH9sJBn-9VNS4XEo3TO5xk,360
|
|
2
2
|
followthemoney/compare.py,sha256=1GFkCfTzA8QR0CH90kvySR8hvl9hQRUerW5Xw2Ivmpg,5134
|
|
3
3
|
followthemoney/exc.py,sha256=ynZs_UnTVxHR-iBfat_CpVLraYzVX5yLtVf5Ti14hl4,734
|
|
4
4
|
followthemoney/graph.py,sha256=VNDKrUBkz_-DmKsr5v-Xm8VfxzabnTwkU_MFk92_TjA,10848
|
|
@@ -13,7 +13,7 @@ followthemoney/proxy.py,sha256=M7RIPF0k-P3v7GYKYhRVVaO1cnUf5FArJepE-2c0KMQ,20033
|
|
|
13
13
|
followthemoney/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
14
14
|
followthemoney/rdf.py,sha256=9wPs-tqN9QILuvrmH_YheNaFQctyIQqoIEqcS465QHs,343
|
|
15
15
|
followthemoney/schema.py,sha256=vPG2C4r0ar3F74fbU_v-YPq4I3Qfmu9gzxMFWksU7I4,18097
|
|
16
|
-
followthemoney/util.py,sha256=
|
|
16
|
+
followthemoney/util.py,sha256=6VR-T5-vT-8xpE6__Skrqe_MpE6y6csvNKERTJlsITA,4527
|
|
17
17
|
followthemoney/cli/__init__.py,sha256=Fl05wMr5-FlOSMRpmu1HJSNfPRpy8u9as5IRbGXdo4U,421
|
|
18
18
|
followthemoney/cli/aggregate.py,sha256=Gwfi5Bt1LCwqbpsCu4P1Cr-QJtCWhbaqgGEzfwJUUL4,2142
|
|
19
19
|
followthemoney/cli/cli.py,sha256=yrPw2iyKY-E-uRWe6KN9W3ayvz-22vfpe_ZeD0RiI0c,3591
|
|
@@ -26,7 +26,7 @@ followthemoney/export/common.py,sha256=_YrXrwsqmyboDZDhtJ_PazUUJYe1Y-Trqc9lz4YlV
|
|
|
26
26
|
followthemoney/export/csv.py,sha256=AvWgyWg0nICAVLv4k9QgWRlgJhJonKCjzlZkrahe5Tg,2633
|
|
27
27
|
followthemoney/export/excel.py,sha256=pj6zNpIbye_Zm3vhCamcqHEe9Fw-RyjtWQDCFY6608s,2645
|
|
28
28
|
followthemoney/export/graph.py,sha256=v0z1FgadyFk5aQ0A5q8E9R4fSO-Tpi5JU9YTDwnRKD8,2765
|
|
29
|
-
followthemoney/export/neo4j.py,sha256=
|
|
29
|
+
followthemoney/export/neo4j.py,sha256=aw1vBOLTRinFbOhn19WThLlQ6NWVbm2gop5Jz_ihc58,7052
|
|
30
30
|
followthemoney/export/rdf.py,sha256=E6RiW7oIsJdaBaLAVm6o-MTokARZtqONPuayILqTqo0,786
|
|
31
31
|
followthemoney/mapping/__init__.py,sha256=iwNqzzvrzJNbNDlOCaDLlBTUrNTlnYHIB5cvo_-9oN4,82
|
|
32
32
|
followthemoney/mapping/csv.py,sha256=Tvc6VSh7-ca63LEE4G0yqOCeGMETkuKzUjIkVn4_d7Q,3185
|
|
@@ -73,7 +73,7 @@ followthemoney/schema/Membership.yaml,sha256=IPmaOX4Ai2r4sGcA5ig2WmLvWHb38akdxp4
|
|
|
73
73
|
followthemoney/schema/Mention.yaml,sha256=nBeulR_Jm4x75aJ7yNF0TAVhHJqXQaEzOutLIn_YU-4,1086
|
|
74
74
|
followthemoney/schema/Message.yaml,sha256=PAxZ2NRFVvnOlp9Ohh5fJDEThjJ0jm3M2YCbJ9KtMuE,1565
|
|
75
75
|
followthemoney/schema/Note.yaml,sha256=NohwtFupxIssZuEgQowiQWqKit4uQ-OatAu3yp9eJj4,411
|
|
76
|
-
followthemoney/schema/Occupancy.yaml,sha256=
|
|
76
|
+
followthemoney/schema/Occupancy.yaml,sha256=WojlqzuWao84MJxRE9K6a-1D-Jtu78-0h6laODhdKw8,975
|
|
77
77
|
followthemoney/schema/Organization.yaml,sha256=wPXU1ni0-3QzvttDq-gIjbAYHzcWoo3nsLGLw6cnHKI,1064
|
|
78
78
|
followthemoney/schema/Ownership.yaml,sha256=tLWESE9VX0aUuhe6C1pToq2-auPVZBdE3xvBmTRfmPc,1057
|
|
79
79
|
followthemoney/schema/Package.yaml,sha256=gPr-P3lcg7OOAav_KVa8baK4yK57JwfcXwxXheD96UQ,310
|
|
@@ -150,8 +150,8 @@ followthemoney/types/registry.py,sha256=hvQ1oIWz_4PpyUnKA5azbaZCulNb5LCIPyC-AQYV
|
|
|
150
150
|
followthemoney/types/string.py,sha256=grDn1OgKWxIzVxGEdp0HjVKIqtQ9W4SW2ty4quv3Pcs,1202
|
|
151
151
|
followthemoney/types/topic.py,sha256=6g57JKTFF_I233-afvuaswFxMaN_Kmg5MZ4_iAKZh9c,3754
|
|
152
152
|
followthemoney/types/url.py,sha256=r7Pd6Yfn--amwMi_nHoTLMwm5SH8h50SMgQaa2G4PJ0,1492
|
|
153
|
-
followthemoney-3.8.
|
|
154
|
-
followthemoney-3.8.
|
|
155
|
-
followthemoney-3.8.
|
|
156
|
-
followthemoney-3.8.
|
|
157
|
-
followthemoney-3.8.
|
|
153
|
+
followthemoney-3.8.2.dist-info/METADATA,sha256=n8x2oj_bwI3bRutHznbjfhX5nwNyG_MWdQy9vwLKaPk,6106
|
|
154
|
+
followthemoney-3.8.2.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
155
|
+
followthemoney-3.8.2.dist-info/entry_points.txt,sha256=xvTXjAz0CiZplq4V3iQXlmBexaJyW3zNucIvcDP6L_c,593
|
|
156
|
+
followthemoney-3.8.2.dist-info/licenses/LICENSE,sha256=3tfmmk9RtT1eh67a-NDRwcmOLzztbCtqlHW6O1U92ZA,1098
|
|
157
|
+
followthemoney-3.8.2.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|