followthemoney 4.1.1__py3-none-any.whl → 4.1.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.
- followthemoney/__init__.py +1 -1
- followthemoney/statement/entity.py +5 -0
- followthemoney/types/country.py +2 -8
- {followthemoney-4.1.1.dist-info → followthemoney-4.1.2.dist-info}/METADATA +2 -3
- {followthemoney-4.1.1.dist-info → followthemoney-4.1.2.dist-info}/RECORD +8 -8
- {followthemoney-4.1.1.dist-info → followthemoney-4.1.2.dist-info}/WHEEL +0 -0
- {followthemoney-4.1.1.dist-info → followthemoney-4.1.2.dist-info}/entry_points.txt +0 -0
- {followthemoney-4.1.1.dist-info → followthemoney-4.1.2.dist-info}/licenses/LICENSE +0 -0
followthemoney/__init__.py
CHANGED
|
@@ -9,7 +9,7 @@ from followthemoney.statement import Statement, StatementEntity, SE
|
|
|
9
9
|
from followthemoney.dataset import Dataset, DefaultDataset, DS
|
|
10
10
|
from followthemoney.util import set_model_locale
|
|
11
11
|
|
|
12
|
-
__version__ = "4.1.
|
|
12
|
+
__version__ = "4.1.2"
|
|
13
13
|
|
|
14
14
|
# Data model singleton
|
|
15
15
|
model = Model.instance()
|
|
@@ -372,6 +372,7 @@ class StatementEntity(EntityProxy):
|
|
|
372
372
|
}
|
|
373
373
|
referents: Set[Optional[str]] = set(self.extra_referents)
|
|
374
374
|
datasets = set(self.datasets)
|
|
375
|
+
origins: Set[str] = set()
|
|
375
376
|
first_seen = None
|
|
376
377
|
last_seen = None
|
|
377
378
|
for stmts in self._statements.values():
|
|
@@ -385,9 +386,13 @@ class StatementEntity(EntityProxy):
|
|
|
385
386
|
if stmt.entity_id is not None and stmt.entity_id != self.id:
|
|
386
387
|
referents.add(stmt.entity_id)
|
|
387
388
|
datasets.add(stmt.dataset)
|
|
389
|
+
if stmt.origin is not None:
|
|
390
|
+
origins.add(stmt.origin)
|
|
388
391
|
|
|
389
392
|
data["referents"] = list(referents)
|
|
390
393
|
data["datasets"] = list(datasets)
|
|
394
|
+
if origins:
|
|
395
|
+
data["origin"] = list(origins)
|
|
391
396
|
|
|
392
397
|
if first_seen is not None:
|
|
393
398
|
data["first_seen"] = first_seen
|
followthemoney/types/country.py
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import countrynames
|
|
2
1
|
from typing import Optional, TYPE_CHECKING
|
|
3
2
|
from babel.core import Locale
|
|
4
|
-
from rigour.territories import
|
|
3
|
+
from rigour.territories import get_ftm_countries, lookup_territory
|
|
5
4
|
|
|
6
5
|
from followthemoney.types.common import EnumType, EnumValues
|
|
7
6
|
from followthemoney.util import const, defer as _
|
|
@@ -37,16 +36,11 @@ class CountryType(EnumType):
|
|
|
37
36
|
|
|
38
37
|
The input may be a country code, a country name, etc.
|
|
39
38
|
"""
|
|
40
|
-
territory =
|
|
39
|
+
territory = lookup_territory(text, fuzzy=fuzzy)
|
|
41
40
|
if territory is not None:
|
|
42
41
|
ftm_country = territory.ftm_country
|
|
43
42
|
if ftm_country is not None:
|
|
44
43
|
return ftm_country
|
|
45
|
-
code = countrynames.to_code(text, fuzzy=fuzzy)
|
|
46
|
-
if code is not None:
|
|
47
|
-
territory = get_territory(code)
|
|
48
|
-
if territory is not None:
|
|
49
|
-
return territory.ftm_country
|
|
50
44
|
return None
|
|
51
45
|
|
|
52
46
|
def country_hint(self, value: str) -> str:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: followthemoney
|
|
3
|
-
Version: 4.1.
|
|
3
|
+
Version: 4.1.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/opensanctions/followthemoney.git
|
|
@@ -39,7 +39,6 @@ Requires-Python: >=3.10
|
|
|
39
39
|
Requires-Dist: babel<3.0.0,>=2.14.0
|
|
40
40
|
Requires-Dist: banal<1.1.0,>=1.0.6
|
|
41
41
|
Requires-Dist: click<9.0.0,>=8.0
|
|
42
|
-
Requires-Dist: countrynames<2.0.0,>=1.13.0
|
|
43
42
|
Requires-Dist: networkx<3.5,>=2.5
|
|
44
43
|
Requires-Dist: normality<4.0.0,>=3.0.1
|
|
45
44
|
Requires-Dist: openpyxl<4.0.0,>=3.0.5
|
|
@@ -51,7 +50,7 @@ Requires-Dist: pytz>=2021.1
|
|
|
51
50
|
Requires-Dist: pyyaml<7.0.0,>=5.0.0
|
|
52
51
|
Requires-Dist: rdflib<7.2.0,>=6.2.0
|
|
53
52
|
Requires-Dist: requests<3.0.0,>=2.21.0
|
|
54
|
-
Requires-Dist: rigour<2.0.0,>=1.
|
|
53
|
+
Requires-Dist: rigour<2.0.0,>=1.2.0
|
|
55
54
|
Requires-Dist: sqlalchemy[mypy]<3.0.0,>=2.0.0
|
|
56
55
|
Provides-Extra: dev
|
|
57
56
|
Requires-Dist: build; extra == 'dev'
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
followthemoney/__init__.py,sha256=
|
|
1
|
+
followthemoney/__init__.py,sha256=1G8YlnRJL9_8pMYDUPl29Njf33pRdmat6kmg2elXBbs,856
|
|
2
2
|
followthemoney/compare.py,sha256=bZlnj2VMoe67q4Lyq_VwS1a-EJnEK1kC8prbs8jyL9E,5774
|
|
3
3
|
followthemoney/entity.py,sha256=hHY9yysn_iFTtXqcHg4hHhYfmgLw4prWul8rD1X82Y0,3184
|
|
4
4
|
followthemoney/exc.py,sha256=GyMgwY4QVm87hLevDfV7gM1MJsDqfNCi_UQw7F_A8X8,858
|
|
@@ -113,7 +113,7 @@ followthemoney/schema/Vessel.yaml,sha256=nFaUJ_0BzFJstvog1iDvwV9DHKHr9ky4DLb1NZG
|
|
|
113
113
|
followthemoney/schema/Video.yaml,sha256=LY3DYMWTHXiAhL0hxBCNCz50cp2sPbUlEhhig5Fbjos,327
|
|
114
114
|
followthemoney/schema/Workbook.yaml,sha256=iikWPElz4klA7SkWH7eae6xqhbkMCIP_3zdeXzFEMU0,354
|
|
115
115
|
followthemoney/statement/__init__.py,sha256=7m2VUCAuqNZXIY0WFJRFkw5UG14QuxATL4f_xbqKwhw,633
|
|
116
|
-
followthemoney/statement/entity.py,sha256=
|
|
116
|
+
followthemoney/statement/entity.py,sha256=MKHGmFeDwcW2lTbAeKSdU53YwDuoLm5iKy4roeb8_lo,16172
|
|
117
117
|
followthemoney/statement/serialize.py,sha256=9eXzQ1biR2mSxWRID5C7xDdku4b4ZImHeRJ53yLZ0yo,7225
|
|
118
118
|
followthemoney/statement/statement.py,sha256=Ae-EYuzS8S12BkaRqrvMuI1C7YwlRKa5C_pTBELyNMM,8029
|
|
119
119
|
followthemoney/statement/util.py,sha256=B-ozuRc1TWvpop52873Pqt5OPj8H6uk4KyRJLfAhr10,780
|
|
@@ -144,7 +144,7 @@ followthemoney/types/__init__.py,sha256=rWwQeiuMh2BNIuvhpMfJ4bPADDvt9Axu1eedvNFi
|
|
|
144
144
|
followthemoney/types/address.py,sha256=nMFCj5QJyqA1ddpUmDLpRTum0nGXE-J70_WGnaLXnYo,2130
|
|
145
145
|
followthemoney/types/checksum.py,sha256=zZrU8WX4CY3Vta_vOyfgDNzIwbmtje7AaDv3O1fBMnk,823
|
|
146
146
|
followthemoney/types/common.py,sha256=4ks7zPT8rknrGSd4JFc1zRkS-TL4SX-25_ZbjcVDos0,10081
|
|
147
|
-
followthemoney/types/country.py,sha256=
|
|
147
|
+
followthemoney/types/country.py,sha256=n8vihijDVud_3Ra-as4Ize0jf_HbcdKVR5YX3TlKZy0,1533
|
|
148
148
|
followthemoney/types/date.py,sha256=PjcaEyW6CBzf0-gHWKUsKjWIaD3AVBEl0zLSRQOVXxc,3105
|
|
149
149
|
followthemoney/types/email.py,sha256=L3RTYrMABlNQF7hCynXGfzoj6YNEHW5JAY_BwuhoZdA,3375
|
|
150
150
|
followthemoney/types/entity.py,sha256=oDxVEhuxyU1ScpOpebPpUm3o0I9j_p7Qrq-t5yNpluQ,2338
|
|
@@ -160,8 +160,8 @@ followthemoney/types/phone.py,sha256=r8uRqWinS0CYnYBTs405k5gO4jeatUDgjdzzijoMKJE
|
|
|
160
160
|
followthemoney/types/string.py,sha256=fqyTauAm4mNnNaoH-yH087RBbNh-G5ZZUO3awTGQUUg,1230
|
|
161
161
|
followthemoney/types/topic.py,sha256=CS5IoI8gm4MSVxfV6K4mGd20_tT1SaKMkcOt_ObSsAg,3678
|
|
162
162
|
followthemoney/types/url.py,sha256=QFpS_JIV8unFHuh_uGv22SWUUkocBoOpzLsAJWom_gI,1455
|
|
163
|
-
followthemoney-4.1.
|
|
164
|
-
followthemoney-4.1.
|
|
165
|
-
followthemoney-4.1.
|
|
166
|
-
followthemoney-4.1.
|
|
167
|
-
followthemoney-4.1.
|
|
163
|
+
followthemoney-4.1.2.dist-info/METADATA,sha256=Hy34w4IjkrPyJ2O0nPRhUcamZ3oiN7h_kbGYdyIUnnI,6748
|
|
164
|
+
followthemoney-4.1.2.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
165
|
+
followthemoney-4.1.2.dist-info/entry_points.txt,sha256=caoFTlf213jhg5sz3TNSofutjUTzaKtWATuSIdd9Cps,653
|
|
166
|
+
followthemoney-4.1.2.dist-info/licenses/LICENSE,sha256=H6_EVXisnJC0-18CjXIaqrBSFq_VH3OnS7u3dccOv6g,1148
|
|
167
|
+
followthemoney-4.1.2.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|