turbot-runner 0.1.41 → 0.1.42

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- M2M0ZmMwZjkxYjkyNWRiNDQ5Nzc3Y2VlYTE5ZmYyMTZkMWEwMDg2OA==
4
+ ZWFhZGI3ZjRjNmFhOWQ0MWZjZWMyM2QyNzgzM2JkZDYzNjQzNTlkZg==
5
5
  data.tar.gz: !binary |-
6
- NGZiOTEwZGQ5ZjhjZTdhMmY4ZWZmZjI0NjljMGI3MTI4NWYzOGEwYw==
6
+ NjIyYTdjM2QwZTc5YTNmMjMxZmM4ZDJiMTI0NTU3ZTAwNmQ2OGQ5Nw==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- MzgwNWE3OGM0YWZjNGQ0NjIyNTU3YjllYjVkY2I0YjBlNzZlZDY4NDIyZjU4
10
- NmQyNTg1ZDhhNmE5NjkyM2Q4YWVkYWQ5ZTljYzRlNDRjYjIxNDhhMTM5ZjIw
11
- NDcwYTJhNjYxYmRiNzE2MmEyZmJmNjliMzk5YjNhMDUxMzAwZGQ=
9
+ YjlhNmMzY2UzZGQ0N2M1ZmE5YzUyNTllMzE0MzNjY2Y3NmI3NmQxN2IzMTRh
10
+ ZmQ0NWE2ZTY4NDg2ZDdhYmQyZjU5MDkxYTRlYWY0ZjJlOWEwZWI0ZmVjZmJi
11
+ OGY5ODZmNTViNDI0OTFhYWVkN2ExZDkyOWNhN2VkYWYwODAzM2E=
12
12
  data.tar.gz: !binary |-
13
- M2MwNGYyNTZmODc4YzRhODNiOTY3NTIwZGRiMWVkZmMwMDEzZGY3ZmVhYjYx
14
- M2QzMDgzMWExMWMyOTYyZjlmNjVkYmJmODlkODZjODFmZDM2MjUxYmVhN2Zh
15
- NzcyZDVhZmFlYTA2YjU3M2YzODhmYWE4NWI0MzE2ZWExOGYzYjQ=
13
+ ZmU0ZWQyYTEzZWE3NjNmMGExZGJlNmYxNzkxMzdmNjlmOGJhOTEwNWRiMTky
14
+ YmM1ZDQ4ZjlmYjU0MDYwOGRmZGUwM2E0N2IyNWZiNDkzNTNkZmEwZDU0N2Nj
15
+ OWZlZjQ2MzI0Mjg3NTMwZDZiMDJjMDFmYTVjNTc4YzcxMjliMDU=
@@ -1,3 +1,3 @@
1
1
  module TurbotRunner
2
- VERSION = '0.1.41'
2
+ VERSION = '0.1.42'
3
3
  end
@@ -0,0 +1,153 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-04/schema#",
3
+ "description": "An accounts statement is a set of financials from a given accounts filing. This may be have been derived from something as extensive as an XBRL filing, or just some headline financials. The actual accounts lines are made up of arrays of accounts elements. Some, like profit or turnover are explicitly declared here, but other arbitrary ones may be added in other_attributes, and should follow the same format",
4
+ "properties": {
5
+ "filing_subject": {
6
+ "$ref": "includes/entity.json"
7
+ },
8
+ "uid": {
9
+ "description": "Unique id/reference for the filing if it has one",
10
+ "type": "string"
11
+ },
12
+ "filing_date": {
13
+ "type": "string",
14
+ "description": "Date on which the filing was made – note this is not necessarily the same date as the date on which it was published or the reporting/applicable data on the information contained within it",
15
+ "format": "date"
16
+ },
17
+ "accounts_date": {
18
+ "type": "string",
19
+ "format": "date"
20
+ },
21
+ "accounts_type": {
22
+ "description": "The type of accounts – either annual, or quarterly, or null if not known",
23
+ "enum": ["annual", "quarterly", null]
24
+ },
25
+ "profit": {
26
+ "type": "array",
27
+ "items": {
28
+ "$ref": "includes/accounts_element.json"
29
+ }
30
+ },
31
+ "revenue": {
32
+ "type": ["array","null"],
33
+ "items": {
34
+ "$ref": "includes/accounts_element.json"
35
+ }
36
+ },
37
+ "current_assets": {
38
+ "type": ["array","null"],
39
+ "items": {
40
+ "$ref": "includes/accounts_element.json"
41
+ }
42
+ },
43
+ "total_assets": {
44
+ "type": ["array","null"],
45
+ "items": {
46
+ "$ref": "includes/accounts_element.json"
47
+ }
48
+ },
49
+ "current_liabilities": {
50
+ "type": ["array","null"],
51
+ "items": {
52
+ "$ref": "includes/accounts_element.json"
53
+ }
54
+ },
55
+ "fixed_assets": {
56
+ "type": ["array","null"],
57
+ "items": {
58
+ "$ref": "includes/accounts_element.json"
59
+ }
60
+ },
61
+ "cash_at_bank": {
62
+ "type": ["array","null"],
63
+ "items": {
64
+ "$ref": "includes/accounts_element.json"
65
+ }
66
+ },
67
+ "documents": {
68
+ "type": ["array","null"],
69
+ "items": {
70
+ "$ref": "includes/filing_document.json"
71
+ }
72
+ },
73
+ "filing_type_name": {
74
+ "description": "The filing type in words, if given (e.g. 'Annual Return')",
75
+ "type": "string"
76
+ },
77
+ "filing_type_code": {
78
+ "description": "The code for filing type, if given (e.g. 'AR01')",
79
+ "type": "string"
80
+ },
81
+ "title": {
82
+ "description": "The title of the filing, if given",
83
+ "type": "string"
84
+ },
85
+ "description": {
86
+ "description": "The description or precis of the filing, if given",
87
+ "type": "string"
88
+ },
89
+ "url": {
90
+ "description": "Persistent URL for the filing, if there is one",
91
+ "type": "string"
92
+ },
93
+ "source_url": {
94
+ "description": "Source of the accounts, e.g. the URL of the XBRL statement, or the download dump",
95
+ "type": "string",
96
+ "minLength": 11
97
+ },
98
+ "confidence": {
99
+ "description": "Confidence in accuracy of data",
100
+ "type": "string",
101
+ "enum": [
102
+ "HIGH",
103
+ "MEDIUM",
104
+ "LOW"
105
+ ]
106
+ },
107
+ "sample_date": {
108
+ "description": "Date on which we know this to be true (usually date this information was retrieved from the source)",
109
+ "type": "string",
110
+ "format": "date"
111
+ },
112
+ "retrieved_at": {
113
+ "type": "string",
114
+ "format": "date-time"
115
+ },
116
+ "currency": {
117
+ "type": "string",
118
+ "description": "Standard ISO 4217 3-letter code for currency, e.g. USD, GBP, EUR"
119
+ },
120
+ "language": {
121
+ "description": "Should be represented as two-letter ISO-639 code",
122
+ "type": "string",
123
+ "minLength": 2,
124
+ "maxLength": 2
125
+ },
126
+ "source_location": {
127
+ "type": "string",
128
+ "description": "If the accounts filing has been put on sources.opencorporates.com the path to the filing"
129
+ },
130
+ "confidence": {
131
+ "description": "Confidence in accuracy of data",
132
+ "type": "string",
133
+ "enum": [
134
+ "HIGH",
135
+ "MEDIUM",
136
+ "LOW"
137
+ ]
138
+ },
139
+ "other_attributes": {
140
+ "description": "Use for other attributes for which we don't yet have curated schema attributes",
141
+ "type": "object"
142
+ }
143
+ },
144
+ "additionalProperties": false,
145
+ "required": [
146
+ "filing_subject",
147
+ "source_url",
148
+ "sample_date",
149
+ "confidence",
150
+ "filing_date",
151
+ "accounts_type"
152
+ ]
153
+ }
@@ -0,0 +1,98 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-04/schema#",
3
+ "description": "A filing is a document or set of documents published or submitted to registers or regulators by end entity. The standard example is an annual report detailing the companies activities. The filing object is for storing the meta data about the filing (e.g. filing date, filing type, title perhaps). There are also commonly associated documents with filings - often just one, but it's not unusual for there to be more than one, either because there are multiple supporting documents for the filing (e.g. SEC filings and FERC filings), or because there are multiple versions of the same file (e.g. PDF and XBRL file)",
4
+ "properties": {
5
+ "filing_subject": {
6
+ "$ref": "includes/entity.json"
7
+ },
8
+ "filing_date": {
9
+ "type": "string",
10
+ "description": "Date on which the filing was made – note this is not necessarily the same date as the date on which it was published or the reporting/applicable data on the information contained within it",
11
+ "format": "date"
12
+ },
13
+ "documents": {
14
+ "type": "array",
15
+ "items": {
16
+ "$ref": "includes/filing_document.json"
17
+ }
18
+ },
19
+ "uid": {
20
+ "description": "Unique id/reference for the filing if it has one",
21
+ "type": "string"
22
+ },
23
+ "filing_type_name": {
24
+ "description": "The filing type in words, if given (e.g. 'Annual Return')",
25
+ "type": "string"
26
+ },
27
+ "filing_type_code": {
28
+ "description": "The code for filing type, if given (e.g. 'AR01')",
29
+ "type": "string"
30
+ },
31
+ "title": {
32
+ "description": "The title of the filing, if given",
33
+ "type": "string"
34
+ },
35
+ "description": {
36
+ "description": "The description or precis of the filing, if given",
37
+ "type": "string"
38
+ },
39
+ "url": {
40
+ "description": "Persistent URL for the filing, if there is one",
41
+ "type": "string"
42
+ },
43
+ "source_url": {
44
+ "description": "Source url of the web page for the filing or if there is not persistent URL the page from which it can be found (e.g. search page). This field is required.",
45
+ "type": "string",
46
+ "minLength": 11
47
+ },
48
+ "confidence": {
49
+ "description": "Confidence in accuracy of data",
50
+ "type": "string",
51
+ "enum": [
52
+ "HIGH",
53
+ "MEDIUM",
54
+ "LOW"
55
+ ]
56
+ },
57
+ "sample_date": {
58
+ "description": "Date on which we believe the contents of this filing to be true, e.g. the reporting date, applicable date",
59
+ "type": "string",
60
+ "format": "date"
61
+ },
62
+ "retrieved_at": {
63
+ "description": "Date-time this was retrieved from the source",
64
+ "type": "string",
65
+ "format": "date-time"
66
+ },
67
+ "other_attributes": {
68
+ "description": "Use for other attributes for which we don't yet have curated schema attributes",
69
+ "type": "object"
70
+ }
71
+ },
72
+ "additionalProperties": false,
73
+ "required": [
74
+ "filing_subject",
75
+ "source_url",
76
+ "sample_date",
77
+ "confidence",
78
+ "filing_date"
79
+ ],
80
+ "anyOf": [
81
+ {
82
+ "required": [
83
+ "title"
84
+ ]
85
+ },
86
+ {
87
+ "required": [
88
+ "description"
89
+ ]
90
+ },
91
+ {
92
+ "required": [
93
+ "filing_type_name"
94
+ ]
95
+ }
96
+
97
+ ]
98
+ }
@@ -0,0 +1,45 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-04/schema#",
3
+ "description": "A representation of one particular element of an accounts statement (e.g. profit or assets). This should consist of at least a value and end_date",
4
+ "type": "object",
5
+ "properties": {
6
+ "value": {
7
+ "type": "string",
8
+ "minLength": 1
9
+ },
10
+ "date": {
11
+ "description": "If this element is an instant element, i.e. relates to a specific point in time (such as balance sheet item), then give the date this relates to, otherwise use start/end dates for element that occured over a period (e.g. Profit/Loss)",
12
+ "type": "string",
13
+ "format": "date"
14
+ },
15
+ "start_date": {
16
+ "type": "string",
17
+ "format": "date"
18
+ },
19
+ "end_date": {
20
+ "type": "string",
21
+ "format": "date"
22
+ },
23
+ "currency": {
24
+ "description": "ISO 4217 code for the currency",
25
+ "type": "string",
26
+ "minLength": 3,
27
+ "maxLength": 3
28
+ }
29
+ },
30
+ "required": [
31
+ "value"
32
+ ],
33
+ "anyOf": [
34
+ {
35
+ "required": [
36
+ "date"
37
+ ]
38
+ },
39
+ {
40
+ "required": [
41
+ "end_date"
42
+ ]
43
+ }
44
+ ]
45
+ }
@@ -0,0 +1,53 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-04/schema#",
3
+ "description": "A document of some sort (PDF, TIFF, HTML) associated with a filing",
4
+ "type": "object",
5
+ "properties": {
6
+ "uid": {
7
+ "description": "Unique id/reference for the filing if it has one",
8
+ "type": "string"
9
+ },
10
+ "file_format": {
11
+ "description": "Format of the document, if known",
12
+ "type": "string",
13
+ "enum": ["xml","pdf","html", null]
14
+ },
15
+ "original_source_url": {
16
+ "description": "Persistent URL for the document, if there is one",
17
+ "type": "string"
18
+ },
19
+ "source_url": {
20
+ "description": "Source url of the web page for the filing or if there is not persistent URL the page from which it can be found (e.g. search page)",
21
+ "type": "string",
22
+ "minLength": 11
23
+ },
24
+ "source_location": {
25
+ "type": "string",
26
+ "description": "If the accounts filing has been put on sources.opencorporates.com the path to the filing"
27
+ },
28
+ "language": {
29
+ "description": "Should be represented as two-letter ISO-639 code",
30
+ "type": "string",
31
+ "minLength": 2,
32
+ "maxLength": 2
33
+ },
34
+ "classification": {
35
+ "description": "type of document (at the moment only XBRL is the only option here)",
36
+ "type": "string",
37
+ "enum": ["xbrl", null]
38
+ }
39
+ },
40
+ "additionalProperties": false,
41
+ "anyOf": [
42
+ {
43
+ "required": [
44
+ "source_location"
45
+ ]
46
+ },
47
+ {
48
+ "required": [
49
+ "source_url"
50
+ ]
51
+ }
52
+ ]
53
+ }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: turbot-runner
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.41
4
+ version: 0.1.42
5
5
  platform: ruby
6
6
  authors:
7
7
  - OpenCorporates
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-03-24 00:00:00.000000000 Z
11
+ date: 2015-05-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -55,14 +55,18 @@ files:
55
55
  - lib/turbot_runner/utils.rb
56
56
  - lib/turbot_runner/validator.rb
57
57
  - lib/turbot_runner/version.rb
58
+ - schema/schemas/accounts-statement-schema.json
58
59
  - schema/schemas/company-schema.json
60
+ - schema/schemas/filing-schema.json
59
61
  - schema/schemas/financial-payment-schema.json
62
+ - schema/schemas/includes/accounts_element.json
60
63
  - schema/schemas/includes/address.json
61
64
  - schema/schemas/includes/alternative_name.json
62
65
  - schema/schemas/includes/company-for-nesting.json
63
66
  - schema/schemas/includes/company.json
64
67
  - schema/schemas/includes/entity.json
65
68
  - schema/schemas/includes/filing.json
69
+ - schema/schemas/includes/filing_document.json
66
70
  - schema/schemas/includes/financial-payment-data-object.json
67
71
  - schema/schemas/includes/identifier.json
68
72
  - schema/schemas/includes/industry_code.json