followthemoney 1.3.7__py3-none-any.whl → 3.8.0__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 +5 -3
- followthemoney/cli/__init__.py +17 -0
- followthemoney/cli/aggregate.py +56 -0
- followthemoney/cli/cli.py +88 -0
- followthemoney/cli/exports.py +121 -0
- followthemoney/cli/mapping.py +85 -0
- followthemoney/cli/sieve.py +67 -0
- followthemoney/cli/util.py +142 -0
- followthemoney/compare.py +130 -60
- followthemoney/exc.py +19 -6
- followthemoney/export/common.py +29 -0
- followthemoney/export/csv.py +82 -0
- followthemoney/export/excel.py +75 -0
- followthemoney/export/graph.py +79 -0
- followthemoney/export/neo4j.py +182 -0
- followthemoney/export/rdf.py +26 -0
- followthemoney/graph.py +308 -0
- followthemoney/helpers.py +212 -0
- followthemoney/mapping/__init__.py +1 -1
- followthemoney/mapping/csv.py +67 -35
- followthemoney/mapping/entity.py +116 -44
- followthemoney/mapping/property.py +90 -44
- followthemoney/mapping/query.py +27 -19
- followthemoney/mapping/source.py +15 -5
- followthemoney/mapping/sql.py +75 -61
- followthemoney/messages.py +13 -7
- followthemoney/model.py +108 -56
- followthemoney/namespace.py +119 -0
- followthemoney/offshore.py +48 -0
- followthemoney/ontology.py +77 -0
- followthemoney/property.py +204 -71
- followthemoney/proxy.py +455 -118
- followthemoney/rdf.py +9 -0
- followthemoney/schema/Address.yaml +78 -0
- followthemoney/schema/Airplane.yaml +17 -10
- followthemoney/schema/Analyzable.yaml +54 -0
- followthemoney/schema/Article.yaml +16 -0
- followthemoney/schema/Assessment.yaml +32 -0
- followthemoney/schema/Asset.yaml +10 -4
- followthemoney/schema/Associate.yaml +41 -0
- followthemoney/schema/Audio.yaml +24 -0
- followthemoney/schema/BankAccount.yaml +53 -9
- followthemoney/schema/Call.yaml +48 -0
- followthemoney/schema/CallForTenders.yaml +117 -0
- followthemoney/schema/Company.yaml +37 -12
- followthemoney/schema/Contract.yaml +41 -7
- followthemoney/schema/ContractAward.yaml +30 -11
- followthemoney/schema/CourtCase.yaml +16 -10
- followthemoney/schema/CourtCaseParty.yaml +17 -6
- followthemoney/schema/CryptoWallet.yaml +48 -0
- followthemoney/schema/Debt.yaml +37 -0
- followthemoney/schema/Directorship.yaml +17 -4
- followthemoney/schema/Document.yaml +72 -139
- followthemoney/schema/Documentation.yml +38 -0
- followthemoney/schema/EconomicActivity.yaml +32 -17
- followthemoney/schema/Email.yaml +76 -0
- followthemoney/schema/Employment.yaml +39 -0
- followthemoney/schema/Event.yaml +35 -3
- followthemoney/schema/Family.yaml +41 -0
- followthemoney/schema/Folder.yaml +13 -0
- followthemoney/schema/HyperText.yaml +21 -0
- followthemoney/schema/Identification.yaml +40 -0
- followthemoney/schema/Image.yaml +25 -0
- followthemoney/schema/Interest.yaml +3 -6
- followthemoney/schema/Interval.yaml +56 -5
- followthemoney/schema/LegalEntity.yaml +81 -20
- followthemoney/schema/License.yaml +7 -3
- followthemoney/schema/Membership.yaml +19 -4
- followthemoney/schema/Mention.yaml +54 -0
- followthemoney/schema/Message.yaml +73 -0
- followthemoney/schema/Note.yaml +23 -0
- followthemoney/schema/Occupancy.yaml +40 -0
- followthemoney/schema/Organization.yaml +38 -3
- followthemoney/schema/Ownership.yaml +16 -4
- followthemoney/schema/Package.yaml +17 -0
- followthemoney/schema/Page.yaml +43 -0
- followthemoney/schema/Pages.yaml +23 -0
- followthemoney/schema/Passport.yaml +15 -17
- followthemoney/schema/Payment.yaml +38 -7
- followthemoney/schema/Person.yaml +61 -5
- followthemoney/schema/PlainText.yaml +17 -0
- followthemoney/schema/Position.yaml +50 -0
- followthemoney/schema/Post.yaml +42 -0
- followthemoney/schema/Project.yaml +27 -0
- followthemoney/schema/ProjectParticipant.yaml +36 -0
- followthemoney/schema/PublicBody.yaml +14 -3
- followthemoney/schema/RealEstate.yaml +19 -3
- followthemoney/schema/Representation.yaml +17 -6
- followthemoney/schema/Sanction.yaml +44 -20
- followthemoney/schema/Security.yaml +59 -0
- followthemoney/schema/Similar.yaml +37 -0
- followthemoney/schema/Succession.yaml +36 -0
- followthemoney/schema/Table.yaml +32 -0
- followthemoney/schema/TaxRoll.yaml +27 -9
- followthemoney/schema/Thing.yaml +69 -13
- followthemoney/schema/Trip.yaml +42 -0
- followthemoney/schema/UnknownLink.yaml +17 -6
- followthemoney/schema/UserAccount.yaml +44 -0
- followthemoney/schema/Value.yaml +5 -1
- followthemoney/schema/Vehicle.yaml +25 -8
- followthemoney/schema/Vessel.yaml +18 -10
- followthemoney/schema/Video.yaml +20 -0
- followthemoney/schema/Workbook.yaml +18 -0
- followthemoney/schema.py +406 -135
- followthemoney/translations/ar/LC_MESSAGES/followthemoney.mo +0 -0
- followthemoney/translations/ar/LC_MESSAGES/followthemoney.po +2900 -787
- followthemoney/translations/bs/LC_MESSAGES/followthemoney.mo +0 -0
- followthemoney/translations/bs/LC_MESSAGES/followthemoney.po +2108 -520
- followthemoney/translations/de/LC_MESSAGES/followthemoney.mo +0 -0
- followthemoney/translations/de/LC_MESSAGES/followthemoney.po +2902 -782
- followthemoney/translations/es/LC_MESSAGES/followthemoney.mo +0 -0
- followthemoney/translations/es/LC_MESSAGES/followthemoney.po +2893 -779
- followthemoney/translations/fr/LC_MESSAGES/followthemoney.mo +0 -0
- followthemoney/translations/fr/LC_MESSAGES/followthemoney.po +4362 -0
- followthemoney/translations/fr/followthemoney.po +3861 -0
- followthemoney/translations/messages.pot +3021 -725
- followthemoney/translations/nb/LC_MESSAGES/followthemoney.mo +0 -0
- followthemoney/translations/nb/LC_MESSAGES/followthemoney.po +3778 -0
- followthemoney/translations/nl/LC_MESSAGES/followthemoney.mo +0 -0
- followthemoney/translations/nl/LC_MESSAGES/followthemoney.po +3837 -0
- followthemoney/translations/pt_BR/LC_MESSAGES/followthemoney.mo +0 -0
- followthemoney/translations/pt_BR/LC_MESSAGES/followthemoney.po +3784 -0
- followthemoney/translations/ru/LC_MESSAGES/followthemoney.mo +0 -0
- followthemoney/translations/ru/LC_MESSAGES/followthemoney.po +2837 -539
- followthemoney/translations/ru/followthemoney.po +4221 -0
- followthemoney/translations/tr/LC_MESSAGES/followthemoney.mo +0 -0
- followthemoney/translations/tr/LC_MESSAGES/followthemoney.po +2073 -491
- followthemoney/types/__init__.py +35 -17
- followthemoney/types/address.py +41 -21
- followthemoney/types/checksum.py +25 -0
- followthemoney/types/common.py +233 -88
- followthemoney/types/country.py +89 -56
- followthemoney/types/date.py +59 -76
- followthemoney/types/email.py +66 -35
- followthemoney/types/entity.py +66 -13
- followthemoney/types/gender.py +66 -0
- followthemoney/types/iban.py +47 -28
- followthemoney/types/identifier.py +49 -22
- followthemoney/types/ip.py +35 -21
- followthemoney/types/json.py +58 -0
- followthemoney/types/language.py +124 -37
- followthemoney/types/mimetype.py +44 -0
- followthemoney/types/name.py +56 -12
- followthemoney/types/number.py +30 -0
- followthemoney/types/phone.py +92 -34
- followthemoney/types/registry.py +52 -0
- followthemoney/types/string.py +43 -0
- followthemoney/types/topic.py +94 -0
- followthemoney/types/url.py +39 -17
- followthemoney/util.py +139 -45
- followthemoney-3.8.0.dist-info/METADATA +153 -0
- followthemoney-3.8.0.dist-info/RECORD +157 -0
- {followthemoney-1.3.7.dist-info → followthemoney-3.8.0.dist-info}/WHEEL +1 -2
- followthemoney-3.8.0.dist-info/entry_points.txt +17 -0
- followthemoney-1.3.7.dist-info/LICENSE.txt → followthemoney-3.8.0.dist-info/licenses/LICENSE +1 -1
- followthemoney/link.py +0 -75
- followthemoney/schema/Associate.yml +0 -19
- followthemoney/schema/Family.yml +0 -19
- followthemoney/schema/Land.yml +0 -9
- followthemoney/schema/Relationship.yaml +0 -26
- followthemoney/types/domain.py +0 -50
- followthemoney-1.3.7.dist-info/DESCRIPTION.rst +0 -3
- followthemoney-1.3.7.dist-info/METADATA +0 -39
- followthemoney-1.3.7.dist-info/RECORD +0 -108
- followthemoney-1.3.7.dist-info/entry_points.txt +0 -3
- followthemoney-1.3.7.dist-info/metadata.json +0 -1
- followthemoney-1.3.7.dist-info/namespace_packages.txt +0 -1
- followthemoney-1.3.7.dist-info/top_level.txt +0 -3
- ns/ontology.py +0 -128
- tests/types/test_addresses.py +0 -24
- tests/types/test_common.py +0 -32
- tests/types/test_countries.py +0 -27
- tests/types/test_dates.py +0 -73
- tests/types/test_domains.py +0 -23
- tests/types/test_emails.py +0 -32
- tests/types/test_entity.py +0 -19
- tests/types/test_iban.py +0 -109
- tests/types/test_identifiers.py +0 -27
- tests/types/test_ip.py +0 -29
- tests/types/test_languages.py +0 -23
- tests/types/test_names.py +0 -33
- tests/types/test_phones.py +0 -24
- tests/types/test_registry.py +0 -14
- tests/types/test_urls.py +0 -23
- {ns → followthemoney/export}/__init__.py +0 -0
- /tests/types/__init__.py → /followthemoney/py.typed +0 -0
tests/types/test_ip.py
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import unittest
|
|
2
|
-
|
|
3
|
-
from followthemoney.types import ips
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
class IPsTest(unittest.TestCase):
|
|
7
|
-
|
|
8
|
-
def test_ip_validate(self):
|
|
9
|
-
self.assertTrue(ips.validate('172.16.254.1'))
|
|
10
|
-
self.assertFalse(ips.validate('355.16.254.1'))
|
|
11
|
-
self.assertFalse(ips.validate('16.254.1'))
|
|
12
|
-
self.assertFalse(ips.validate('172.162541'))
|
|
13
|
-
self.assertFalse(ips.validate(None))
|
|
14
|
-
|
|
15
|
-
self.assertTrue(ips.validate('2001:db8:0:1234:0:567:8:1'))
|
|
16
|
-
self.assertFalse(ips.validate('2001:zz8:0:1234:0:567:8:1'))
|
|
17
|
-
self.assertFalse(ips.validate('20001:db8:0:1234:0:567:8:1'))
|
|
18
|
-
self.assertFalse(ips.validate(None))
|
|
19
|
-
|
|
20
|
-
def test_ip_clean(self):
|
|
21
|
-
self.assertEqual(ips.clean('172.16.254.1'), '172.16.254.1')
|
|
22
|
-
self.assertEqual(ips.clean(None), None)
|
|
23
|
-
self.assertEqual(ips.clean('-1'), None)
|
|
24
|
-
|
|
25
|
-
def test_funcs(self):
|
|
26
|
-
self.assertEqual(str(ips.rdf('172.16.254.1')), 'ip:172.16.254.1')
|
|
27
|
-
|
|
28
|
-
def test_specificity(self):
|
|
29
|
-
self.assertEqual(ips.specificity('172.16.254.1'), 1)
|
tests/types/test_languages.py
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import unittest
|
|
2
|
-
|
|
3
|
-
from followthemoney.types import languages
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
class LanguagesTest(unittest.TestCase):
|
|
7
|
-
|
|
8
|
-
def test_validate(self):
|
|
9
|
-
self.assertTrue(languages.validate('de'))
|
|
10
|
-
self.assertTrue(languages.validate('en'))
|
|
11
|
-
self.assertFalse(languages.validate('us'))
|
|
12
|
-
self.assertFalse(languages.validate(None))
|
|
13
|
-
|
|
14
|
-
def test_cleam(self):
|
|
15
|
-
self.assertEquals(languages.clean('de'), 'de')
|
|
16
|
-
self.assertEquals(languages.clean('xx'), None)
|
|
17
|
-
self.assertEquals(languages.clean(None), None)
|
|
18
|
-
|
|
19
|
-
def test_funcs(self):
|
|
20
|
-
self.assertEqual(str(languages.rdf('de')), 'iso-639:de')
|
|
21
|
-
|
|
22
|
-
def test_specificity(self):
|
|
23
|
-
self.assertEqual(languages.specificity('de'), 0)
|
tests/types/test_names.py
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import unittest
|
|
2
|
-
|
|
3
|
-
from followthemoney.types import names
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
class NamesTest(unittest.TestCase):
|
|
7
|
-
|
|
8
|
-
def test_repr(self):
|
|
9
|
-
self.assertEqual(repr(names), '<NameType()>')
|
|
10
|
-
|
|
11
|
-
def test_parse(self):
|
|
12
|
-
self.assertEqual(names.clean('Hans Well'), 'Hans Well')
|
|
13
|
-
self.assertEqual(names.clean('Hans Well '), 'Hans Well')
|
|
14
|
-
self.assertEqual(names.clean('"Hans Well"'), 'Hans Well')
|
|
15
|
-
|
|
16
|
-
def test_normalize(self):
|
|
17
|
-
self.assertEqual(names.normalize('FOO'), ['FOO'])
|
|
18
|
-
self.assertEqual(names.normalize('xx '), ['xx'])
|
|
19
|
-
self.assertEqual(names.normalize(' '), [])
|
|
20
|
-
|
|
21
|
-
def test_domain_validity(self):
|
|
22
|
-
self.assertTrue(names.validate('huhu'))
|
|
23
|
-
self.assertFalse(names.validate(''))
|
|
24
|
-
|
|
25
|
-
def test_normalize_set(self):
|
|
26
|
-
self.assertEqual(names.normalize_set('FOO'), ['FOO'])
|
|
27
|
-
self.assertEqual(names.normalize_set(['FOO', '']), ['FOO'])
|
|
28
|
-
self.assertEqual(names.normalize_set(['FOO', 'FOO']), ['FOO'])
|
|
29
|
-
self.assertEqual(len(names.normalize_set(['FOO', 'BAR'])), 2)
|
|
30
|
-
|
|
31
|
-
def test_specificity(self):
|
|
32
|
-
self.assertEqual(names.specificity('bo'), 0)
|
|
33
|
-
self.assertGreater(names.specificity('boban'), 0)
|
tests/types/test_phones.py
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import unittest
|
|
2
|
-
|
|
3
|
-
from followthemoney.types import phones
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
class PhonesTest(unittest.TestCase):
|
|
7
|
-
|
|
8
|
-
def test_us_number(self):
|
|
9
|
-
self.assertEqual(phones.clean('+1-800-784-2433'), '+18007842433')
|
|
10
|
-
self.assertEqual(phones.clean('+1 800 784 2433'), '+18007842433')
|
|
11
|
-
self.assertEqual(phones.clean('+18007842433'), '+18007842433')
|
|
12
|
-
self.assertEqual(phones.clean('+1 555 8379'), None)
|
|
13
|
-
|
|
14
|
-
def test_de_number(self):
|
|
15
|
-
self.assertEqual(phones.clean('017623423980'), None)
|
|
16
|
-
self.assertEqual(phones.clean('017623423980', countries='DE'),
|
|
17
|
-
'+4917623423980')
|
|
18
|
-
|
|
19
|
-
def test_specificity(self):
|
|
20
|
-
self.assertEqual(phones.specificity('+4917623423980'), 1)
|
|
21
|
-
|
|
22
|
-
def test_country_hint(self):
|
|
23
|
-
self.assertEqual(phones.country_hint('+4917623423980'), 'de')
|
|
24
|
-
self.assertEqual(phones.country_hint(None), None)
|
tests/types/test_registry.py
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import unittest
|
|
2
|
-
|
|
3
|
-
from followthemoney.types import registry
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
class RegistryTest(unittest.TestCase):
|
|
7
|
-
|
|
8
|
-
def test_ref(self):
|
|
9
|
-
assert registry.entity == registry.get('entity')
|
|
10
|
-
assert registry.get('banana') is None
|
|
11
|
-
assert registry.entity.ref('banana') == 'e:banana'
|
|
12
|
-
t, v = registry.deref('e:banana')
|
|
13
|
-
assert t == registry.entity
|
|
14
|
-
assert v == 'banana'
|
tests/types/test_urls.py
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import unittest
|
|
2
|
-
|
|
3
|
-
from followthemoney.types import urls
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
class UrlsTest(unittest.TestCase):
|
|
7
|
-
|
|
8
|
-
def test_is_url(self):
|
|
9
|
-
self.assertTrue(urls.validate('http://foo.org'))
|
|
10
|
-
self.assertFalse(urls.validate(None))
|
|
11
|
-
self.assertFalse(urls.validate('hello'))
|
|
12
|
-
|
|
13
|
-
def test_parse_url(self):
|
|
14
|
-
self.assertEqual(urls.clean('http://foo.com'), 'http://foo.com/')
|
|
15
|
-
self.assertEqual(urls.clean('http://foo.com/#lala'), 'http://foo.com/')
|
|
16
|
-
|
|
17
|
-
self.assertEqual(urls.clean('http://foo.com?b=1&a=2'),
|
|
18
|
-
'http://foo.com/?a=2&b=1')
|
|
19
|
-
self.assertEqual(urls.clean('http://FOO.com'), 'http://foo.com/')
|
|
20
|
-
self.assertEqual(urls.clean('http://FOO.com/A'), 'http://foo.com/A')
|
|
21
|
-
|
|
22
|
-
def test_specificity(self):
|
|
23
|
-
self.assertEqual(urls.specificity('http://foo.com/'), 1)
|
|
File without changes
|
|
File without changes
|