turbot-runner 0.0.16 → 0.0.17
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/turbot_runner/version.rb +1 -1
- data/schema/schemas/company-schema.json +12 -0
- data/schema/schemas/financial-payment-schema.json +27 -0
- data/schema/schemas/includes/alternative_name.json +13 -0
- data/schema/schemas/includes/company.json +2 -0
- data/schema/schemas/includes/financial-payment-data-object.json +60 -0
- data/schema/schemas/includes/industry_code.json +13 -0
- data/schema/schemas/includes/{licence-data.json → licence-data-object.json} +9 -2
- data/schema/schemas/includes/subsidiary-relationship-data.json +4 -9
- data/schema/schemas/licence-schema.json +21 -15
- data/schema/schemas/subsidiary-relationship-schema.json +21 -13
- metadata +20 -14
- checksums.yaml +0 -15
- data/schema/schemas/includes/base-statement.json +0 -27
@@ -59,12 +59,24 @@
|
|
59
59
|
"$ref": "includes/filing.json"
|
60
60
|
}
|
61
61
|
},
|
62
|
+
"industry_codes": {
|
63
|
+
"type": "array",
|
64
|
+
"items": {
|
65
|
+
"$ref": "includes/industry_code.json"
|
66
|
+
}
|
67
|
+
},
|
62
68
|
"previous_names": {
|
63
69
|
"type": "array",
|
64
70
|
"items": {
|
65
71
|
"$ref": "includes/previous_name.json"
|
66
72
|
}
|
67
73
|
},
|
74
|
+
"alternative_names": {
|
75
|
+
"type": "array",
|
76
|
+
"items": {
|
77
|
+
"$ref": "includes/alternative_name.json"
|
78
|
+
}
|
79
|
+
},
|
68
80
|
"branch": {
|
69
81
|
"type": ["string","null"],
|
70
82
|
"description": "A flag to denote whether a company is a branch entity. This should only be set if the company is a type of branch (otherwise should be null). In general the only option here is 'F' for a 'Foreign' branch, i.e. an out-of-jurisdiction entity that has registered as having a presence in the jurisdiction. In the US this is sometimes called a Foreign Corporation",
|
@@ -0,0 +1,27 @@
|
|
1
|
+
{
|
2
|
+
"title": "Financial-Payment",
|
3
|
+
"description": "A Financial-Payment is a payment from government to a recipient",
|
4
|
+
"$schema": "http://json-schema.org/draft-04/schema#",
|
5
|
+
"type": "object",
|
6
|
+
"properties": {
|
7
|
+
"source_jurisdiction": {
|
8
|
+
"description": "Jurisdiction of the source of the data",
|
9
|
+
"type": "string"
|
10
|
+
},
|
11
|
+
"company": {
|
12
|
+
"$ref": "includes/company.json"
|
13
|
+
},
|
14
|
+
"data": {
|
15
|
+
"type": "array",
|
16
|
+
"description": "This is an array of data objects, that is the objects which actually contain the data about the datum. Generally there will only be one element in this, although in for some types of data_types there may naturally be several releated to the same company, e.g. shareholders",
|
17
|
+
"items": {
|
18
|
+
"$ref": "includes/financial-payment-data-object.json"
|
19
|
+
},
|
20
|
+
"additionalItems": false
|
21
|
+
}
|
22
|
+
},
|
23
|
+
"required": [
|
24
|
+
"company",
|
25
|
+
"data"
|
26
|
+
]
|
27
|
+
}
|
@@ -0,0 +1,13 @@
|
|
1
|
+
{
|
2
|
+
"name": "AlternativeName",
|
3
|
+
"description": "An alternative name of a company, e.g. abbreviation, trading (including dba or doing business as), legal. As well as trading names etc, it can be used for storing alternative language representations of the legal name, in which case the language should be represented as two-letter ISO-639 code",
|
4
|
+
"type": "object",
|
5
|
+
"properties": { "company_name": { "type": "string", "minLength": 1 },
|
6
|
+
"start_date": { "type": "date" },
|
7
|
+
"end_date": { "type": "date" },
|
8
|
+
"language": { "type": "string", "minLength": 2, "maxLength": 2 },
|
9
|
+
"type": { "type": "string", "enum": ["trading", "abbreviation", "legal"] }
|
10
|
+
},
|
11
|
+
"required": [ "company_name" ]
|
12
|
+
}
|
13
|
+
|
@@ -5,8 +5,10 @@
|
|
5
5
|
"properties": {
|
6
6
|
"name": { "type": "string" },
|
7
7
|
"jurisdiction": { "type": "string" },
|
8
|
+
"company_number": { "type": "string" },
|
8
9
|
"identifier": {
|
9
10
|
"type": "string",
|
11
|
+
"description": "An official identifier paired with a code for the issuer of the identifier, e.g sec/12345",
|
10
12
|
"pattern": "^[^/]+/[^/]+$"
|
11
13
|
}
|
12
14
|
},
|
@@ -0,0 +1,60 @@
|
|
1
|
+
{
|
2
|
+
"name": "Financial Payment Datum",
|
3
|
+
"type": "object",
|
4
|
+
"properties": {
|
5
|
+
"data_type": { "enum": [ "financial_payment" ] },
|
6
|
+
"source_url": {
|
7
|
+
"type": "string"},
|
8
|
+
"confidence": {
|
9
|
+
"type": "string"},
|
10
|
+
"properties": {
|
11
|
+
"type": "object",
|
12
|
+
"properties": {
|
13
|
+
"value": {
|
14
|
+
"description": "The regulating body that issued the licence",
|
15
|
+
"type": "string"},
|
16
|
+
"payee_name": {
|
17
|
+
"description": "The name of the payee (the entity that received the money)",
|
18
|
+
"type": "string"},
|
19
|
+
"currency": {
|
20
|
+
"description": "The currency of the payment (three letter symbol, e.g. USD, GBP, EUR)",
|
21
|
+
"type": "string"},
|
22
|
+
"date": {
|
23
|
+
"description": "The date on which the payment was made",
|
24
|
+
"type": "date"},
|
25
|
+
"transaction_number": {
|
26
|
+
"description": "The unique identifier for the transaction, scoped to this bot",
|
27
|
+
"type": "string"},
|
28
|
+
"jurisdiction": {
|
29
|
+
"description": "The jurisdiction of the body that made the payment, eg. UK, France, Delaware, Manchester",
|
30
|
+
"type": "string"},
|
31
|
+
"more_details_url": {
|
32
|
+
"description": "A url from which more details can be seen (may be the same as the source_url)",
|
33
|
+
"type": ["string",null]},
|
34
|
+
"description": {
|
35
|
+
"description": "The description of the transaction as given in the raw data",
|
36
|
+
"type": ["string",null]},
|
37
|
+
"expense_type": {
|
38
|
+
"description": "The type of expense -- can be either capital, revenue (i.e. current expenditure) or null",
|
39
|
+
"enum": ["capital","revenue",null]},
|
40
|
+
"expense_area": {
|
41
|
+
"description": "category (in words) of the expenditure",
|
42
|
+
"type": ["string",null]},
|
43
|
+
"entity_name": {
|
44
|
+
"description": "The name of the government entity that made the payment, e.g. Environment Agency",
|
45
|
+
"type": "string"},
|
46
|
+
"entity_uri": {
|
47
|
+
"description": "A unique URL (ideally a dereferencable URI) for the government entity",
|
48
|
+
"type": ["string",null]},
|
49
|
+
"department_name": {
|
50
|
+
"description": "The name of the government department which the entity belongs to (if relevant), e.g. Department of Health",
|
51
|
+
"type": ["string",null]},
|
52
|
+
"csv_line_number": {
|
53
|
+
"description": "If the source for the data is a CSV file, you can optionally include the line number of the CSV from which this data was retrieved",
|
54
|
+
"type": ["string",null]}
|
55
|
+
},
|
56
|
+
"required": [ "value", "payee_name", "date","currency" ]
|
57
|
+
}
|
58
|
+
},
|
59
|
+
"required": [ "data_type", "properties","source_url","confidence" ]
|
60
|
+
}
|
@@ -0,0 +1,13 @@
|
|
1
|
+
{
|
2
|
+
"name": "IndustryCode",
|
3
|
+
"description": "An industry code from a standard code list (e.g. NAICS 2007 or NACE 2)",
|
4
|
+
"type": "object",
|
5
|
+
"properties": { "name": { "type": "string" },
|
6
|
+
"code": { "type": "string" },
|
7
|
+
"code_scheme_id": { "type": "string", "enum": ["eu_nace_2", "uk_sic_2003", "uk_sic_2007", "us_naics_2002", "us_naics_2007", "be_nace_2008"] },
|
8
|
+
"start_date": { "type": "date" },
|
9
|
+
"end_date": { "type": "date" }
|
10
|
+
},
|
11
|
+
"required": [ "code", "code_scheme_id" ]
|
12
|
+
}
|
13
|
+
|
@@ -3,12 +3,19 @@
|
|
3
3
|
"type": "object",
|
4
4
|
"properties": {
|
5
5
|
"data_type": { "enum": [ "licence" ] },
|
6
|
+
"source_url": {
|
7
|
+
"type": "string"},
|
8
|
+
"confidence": {
|
9
|
+
"type": "string"},
|
6
10
|
"properties": {
|
7
11
|
"type": "object",
|
8
12
|
"properties": {
|
9
13
|
"regulator": {
|
10
14
|
"description": "The regulating body that issued the licence",
|
11
15
|
"type": "string"},
|
16
|
+
"category": {
|
17
|
+
"description": "The category of licence. Current possible values are: 'Financial','Business'",
|
18
|
+
"enum": [ "Financial", "Business" ]},
|
12
19
|
"jurisdiction_code": {
|
13
20
|
"description": "The jurisdiction for which licence was issued",
|
14
21
|
"type": "string"},
|
@@ -21,8 +28,8 @@
|
|
21
28
|
"oc_classification": {
|
22
29
|
"type": "array"}
|
23
30
|
},
|
24
|
-
"required": [ "jurisdiction_code", "jurisdiction_classification" ]
|
31
|
+
"required": [ "jurisdiction_code", "jurisdiction_classification", "category" ]
|
25
32
|
}
|
26
33
|
},
|
27
|
-
"required": [ "data_type", "properties" ]
|
34
|
+
"required": [ "data_type", "properties","source_url","confidence" ]
|
28
35
|
}
|
@@ -11,6 +11,9 @@
|
|
11
11
|
"direct": {
|
12
12
|
"description": "If the control is direct (if via an intermediary, this value should be false; if unknown, left blank)",
|
13
13
|
"type": "boolean"},
|
14
|
+
"percentage_controlled": {
|
15
|
+
"description": "Percentage controlled, either directly or indirectly",
|
16
|
+
"type": "number"},
|
14
17
|
"significant": {
|
15
18
|
"description": "Does the source define the control as somehow significant?",
|
16
19
|
"type": "boolean"},
|
@@ -33,15 +36,7 @@
|
|
33
36
|
"type": "string"
|
34
37
|
},
|
35
38
|
"identifier": {
|
36
|
-
"description": "Unique identifier of
|
37
|
-
"type": "string"
|
38
|
-
},
|
39
|
-
"address": {
|
40
|
-
"description": "Address given for owner of parcel",
|
41
|
-
"type": "string"
|
42
|
-
},
|
43
|
-
"address_country": {
|
44
|
-
"description": "Country part of owner's address",
|
39
|
+
"description": "Unique identifier of company",
|
45
40
|
"type": "string"
|
46
41
|
}
|
47
42
|
}
|
@@ -1,21 +1,27 @@
|
|
1
1
|
{
|
2
|
-
"$schema": "http://json-schema.org/draft-04/schema#",
|
3
2
|
"title": "Licence Schema",
|
3
|
+
"description": "A Licence is a permission for an entity to do something that would otherwise not be permitted. An example is a 'Financial' licence to operate as a bank, or an financial advisor, for example, or a 'Business' Licence to sell alcohol, or operate an amusement arcade. Future licence types (extractives, pollution) will be added later",
|
4
|
+
"$schema": "http://json-schema.org/draft-04/schema#",
|
4
5
|
"type": "object",
|
5
|
-
"
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
}
|
6
|
+
"properties": {
|
7
|
+
"source_jurisdiction": {
|
8
|
+
"description": "Jurisdiction of the source of the data",
|
9
|
+
"type": "string"
|
10
|
+
},
|
11
|
+
"company": {
|
12
|
+
"$ref": "includes/company.json"
|
13
|
+
},
|
14
|
+
"data": {
|
15
|
+
"type": "array",
|
16
|
+
"description": "This is an array of data objects, that is the objects which actually contain the data about the datum. Generally there will only be one element in this, although in for some types of data_types there may naturally be several releated to the same company, e.g. shareholders",
|
17
|
+
"items": {
|
18
|
+
"$ref": "includes/licence-data-object.json"
|
19
|
+
},
|
20
|
+
"additionalItems": false
|
19
21
|
}
|
22
|
+
},
|
23
|
+
"required": [
|
24
|
+
"company",
|
25
|
+
"data"
|
20
26
|
]
|
21
27
|
}
|
@@ -1,19 +1,27 @@
|
|
1
1
|
{
|
2
|
+
"title": "Subsidiary Relationship",
|
3
|
+
"description": "A relationship of control between two companies",
|
2
4
|
"$schema": "http://json-schema.org/draft-04/schema#",
|
3
|
-
"title": "Subsidiary Relationship Schema",
|
4
5
|
"type": "object",
|
5
|
-
"
|
6
|
-
|
7
|
-
|
8
|
-
"
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
6
|
+
"properties": {
|
7
|
+
"source_jurisdiction": {
|
8
|
+
"description": "Jurisdiction of the source of the data",
|
9
|
+
"type": "string"
|
10
|
+
},
|
11
|
+
"company": {
|
12
|
+
"$ref": "includes/company.json"
|
13
|
+
},
|
14
|
+
"data": {
|
15
|
+
"type": "array",
|
16
|
+
"description": "This is an array of data objects, that is the objects which actually contain the data about the datum. Generally there will only be one element in this, although in for some types of data_types there may naturally be several releated to the same company, e.g. shareholders",
|
17
|
+
"items": {
|
18
|
+
"$ref": "includes/subsidiary-relationship-data.json"
|
19
|
+
},
|
20
|
+
"additionalItems": false
|
17
21
|
}
|
22
|
+
},
|
23
|
+
"required": [
|
24
|
+
"company",
|
25
|
+
"data"
|
18
26
|
]
|
19
27
|
}
|
metadata
CHANGED
@@ -1,7 +1,8 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: turbot-runner
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.17
|
5
|
+
prerelease:
|
5
6
|
platform: ruby
|
6
7
|
authors:
|
7
8
|
- OpenCorporates
|
@@ -13,6 +14,7 @@ dependencies:
|
|
13
14
|
- !ruby/object:Gem::Dependency
|
14
15
|
name: json-schema
|
15
16
|
requirement: !ruby/object:Gem::Requirement
|
17
|
+
none: false
|
16
18
|
requirements:
|
17
19
|
- - '='
|
18
20
|
- !ruby/object:Gem::Version
|
@@ -20,6 +22,7 @@ dependencies:
|
|
20
22
|
type: :runtime
|
21
23
|
prerelease: false
|
22
24
|
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
23
26
|
requirements:
|
24
27
|
- - '='
|
25
28
|
- !ruby/object:Gem::Version
|
@@ -34,12 +37,22 @@ files:
|
|
34
37
|
- lib/prerun.rb
|
35
38
|
- lib/turbot_runner.rb
|
36
39
|
- lib/turbot_runner/version.rb
|
40
|
+
- spec/dummy-bot-python/manifest.json
|
41
|
+
- spec/dummy-bot-python/scraper.py
|
42
|
+
- spec/dummy-bot-python/transformer.py
|
43
|
+
- spec/dummy-bot-ruby/manifest.json
|
44
|
+
- spec/dummy-bot-ruby/scraper.rb
|
45
|
+
- spec/dummy-bot-ruby/transformer.rb
|
46
|
+
- spec/turbot_runner_spec.rb
|
37
47
|
- schema/schemas/company-schema.json
|
48
|
+
- schema/schemas/financial-payment-schema.json
|
38
49
|
- schema/schemas/includes/address.json
|
39
|
-
- schema/schemas/includes/
|
50
|
+
- schema/schemas/includes/alternative_name.json
|
40
51
|
- schema/schemas/includes/company.json
|
41
52
|
- schema/schemas/includes/filing.json
|
42
|
-
- schema/schemas/includes/
|
53
|
+
- schema/schemas/includes/financial-payment-data-object.json
|
54
|
+
- schema/schemas/includes/industry_code.json
|
55
|
+
- schema/schemas/includes/licence-data-object.json
|
43
56
|
- schema/schemas/includes/officer.json
|
44
57
|
- schema/schemas/includes/previous_name.json
|
45
58
|
- schema/schemas/includes/share-parcel-data.json
|
@@ -51,36 +64,29 @@ files:
|
|
51
64
|
- schema/schemas/share-parcel-schema.json
|
52
65
|
- schema/schemas/simple-licence-schema.json
|
53
66
|
- schema/schemas/subsidiary-relationship-schema.json
|
54
|
-
- spec/dummy-bot-python/manifest.json
|
55
|
-
- spec/dummy-bot-python/scraper.py
|
56
|
-
- spec/dummy-bot-python/transformer.py
|
57
|
-
- spec/dummy-bot-ruby/manifest.json
|
58
|
-
- spec/dummy-bot-ruby/scraper.rb
|
59
|
-
- spec/dummy-bot-ruby/transformer.rb
|
60
|
-
- spec/turbot_runner_spec.rb
|
61
67
|
homepage: http://turbot.opencorporates.com/
|
62
68
|
licenses:
|
63
69
|
- MIT
|
64
|
-
metadata: {}
|
65
70
|
post_install_message:
|
66
71
|
rdoc_options: []
|
67
72
|
require_paths:
|
68
73
|
- lib
|
69
74
|
required_ruby_version: !ruby/object:Gem::Requirement
|
75
|
+
none: false
|
70
76
|
requirements:
|
71
77
|
- - ! '>='
|
72
78
|
- !ruby/object:Gem::Version
|
73
79
|
version: 1.9.2
|
74
80
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
81
|
+
none: false
|
75
82
|
requirements:
|
76
83
|
- - ! '>='
|
77
84
|
- !ruby/object:Gem::Version
|
78
85
|
version: '0'
|
79
86
|
requirements: []
|
80
87
|
rubyforge_project:
|
81
|
-
rubygems_version:
|
88
|
+
rubygems_version: 1.8.23
|
82
89
|
signing_key:
|
83
|
-
specification_version:
|
90
|
+
specification_version: 3
|
84
91
|
summary: Utilities for running bots with Turbot
|
85
92
|
test_files: []
|
86
|
-
has_rdoc:
|
checksums.yaml
DELETED
@@ -1,15 +0,0 @@
|
|
1
|
-
---
|
2
|
-
!binary "U0hBMQ==":
|
3
|
-
metadata.gz: !binary |-
|
4
|
-
NjhhZjM2MGFkMTI5NGE3MjE3MDVmZjM3MDIwODczMDNlMGUwNzQ5Yg==
|
5
|
-
data.tar.gz: !binary |-
|
6
|
-
NjExYmExZjJmZDhhMGI2YjJmYWI1OTIzOWRlMTg0YzUxYTE3MjdhYw==
|
7
|
-
SHA512:
|
8
|
-
metadata.gz: !binary |-
|
9
|
-
YzMyNjI0ZDdlZDcxMTI5MjgxN2ZhMjQyOTBmZjA1MjMwN2VjMGM0MmUzNjk2
|
10
|
-
MTU5ZDJjOTc0YzBlMzZjY2Y0MjZlYWM0Mzk2ZjFkYTZiNWQyMTM1MThlZmM5
|
11
|
-
ODI4MDMyMmU1NTRkYzVkMzkxZjEwYzI2ZTlkYTRhYWI1MDZiNTE=
|
12
|
-
data.tar.gz: !binary |-
|
13
|
-
ZGU0OTk2MTNiMmFmZjU5ZTc0M2RhYjZkMTE5NTdiMzcxNzRlMDMzMWViOGIw
|
14
|
-
MTE5ZjkzZjVjOTA1YjcxNGJhNjljYTQxMGI4MWNkMDVkMzkyYTA4ODkzZTE2
|
15
|
-
YjVkYjNlNjJhOTY0MmU4MWMwOTUzNjcwZjc1N2UzOGE3MWQxYjQ=
|
@@ -1,27 +0,0 @@
|
|
1
|
-
{
|
2
|
-
"name": "Base statement",
|
3
|
-
"description": "A base statement which must be extended by a schema to be used in OpenCorporates",
|
4
|
-
"type": "object",
|
5
|
-
"properties": {
|
6
|
-
"source_url": {
|
7
|
-
"description": "Place where this fact can be verified",
|
8
|
-
"type": "string"
|
9
|
-
},
|
10
|
-
"source_jurisdiction": {
|
11
|
-
"description": "Jurisdiction of the source of the data",
|
12
|
-
"type": "string"
|
13
|
-
},
|
14
|
-
"sample_date": {
|
15
|
-
"description": "Date on which this fact was known to be true",
|
16
|
-
"type": "string"
|
17
|
-
},
|
18
|
-
"company": {
|
19
|
-
"$ref" : "../includes/company.json"
|
20
|
-
},
|
21
|
-
"data": {
|
22
|
-
"type": "array",
|
23
|
-
"additionalItems": false
|
24
|
-
}
|
25
|
-
},
|
26
|
-
"required": ["source_url", "data", "sample_date", "company"]
|
27
|
-
}
|