nexosis_api 1.1.1 → 1.1.2

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 39c45114fbc2c2566b4b0f7962a22c17ce00d5bd
4
- data.tar.gz: 356110f9cad638e3c144b114ae7ae7879bff4b59
3
+ metadata.gz: babec4e434789fc5e16d0aebaf206b09245d46a5
4
+ data.tar.gz: 7f7c90dfea83768cc956929d650292fe14c7f63a
5
5
  SHA512:
6
- metadata.gz: 5423c7ce18dae1ebcb53f9a554f02b92bccc46dfd6fb4dff4bc519546f1d801d5a562aaef36d84750c333a8af14b7fad428bc69b60149a316c84caed126b6b9d
7
- data.tar.gz: 813881c20e3e2629595d2c0d9bad0fff831dc1ef9ccb3a4060ab4b300f4c07bc3caae83d6ebabf9914af4ce7afc57de41744d6403cd0a879fbd5cc0fce2a0bed
6
+ metadata.gz: 01d35de5a51e9d863e909ec0973147a0870b37d62faa1e3fe6f6b956204591dd97f9fe752a561d176a135223d9908a67aafe651397cf3637db39abaa470750a1
7
+ data.tar.gz: ab7f428b1ca8d396d79c5c449be6bba536999daac704ceedf3724c83a79e8ce3a21e867fdf1226c3e886a0fdf9c1ce1dc1365b41646fc675b6714b0611538a31
@@ -9,5 +9,7 @@ module NexosisApi
9
9
  LOGICAL = :logical
10
10
  # contains ISO-8601 compatible date
11
11
  DATE = :date
12
+ # Indicates a number which is not countable, or is not 'ordinal scaled' but 'ratio' or 'interval' scaled - i.e. a device measurement
13
+ NUMERICMEASURE = :numericmeasure
12
14
  end
13
15
  end
@@ -3,8 +3,10 @@ module NexosisApi
3
3
  class DatasetColumn
4
4
  def initialize(column_name, value_hash)
5
5
  @name = column_name
6
- @type = NexosisApi::ColumnType.const_get(value_hash["dataType"].upcase) unless value_hash["dataType"].nil?
7
- @role = NexosisApi::ColumnRole.const_get(value_hash["role"].upcase) unless value_hash["role"].nil?
6
+ @type = NexosisApi::ColumnType.const_get(value_hash['dataType'].upcase) unless value_hash['dataType'].nil?
7
+ @role = NexosisApi::ColumnRole.const_get(value_hash['role'].upcase) unless value_hash['role'].nil?
8
+ @imputation = value_hash['imputation'] unless value_hash['imputation'].nil?
9
+ @aggregation = value_hash['aggregation'] unless value_hash['aggregation'].nil?
8
10
  end
9
11
  # The column header, label, or name
10
12
  # @return [String]
@@ -21,9 +23,19 @@ module NexosisApi
21
23
  # @return [NexosisApi::ColumnRole]
22
24
  attr_accessor :role
23
25
 
26
+ # The strategy used to imput missing values
27
+ # @note Either Zeroes, Mean, Median, or Mode
28
+ # @return [String]
29
+ attr_accessor :imputation
30
+
31
+ # The strategy used to aggregate data if requested prediction period is greater than observation period
32
+ # @note Either Sum, Mean, Median, or Mode
33
+ # @return [String]
34
+ attr_accessor :aggregation
35
+
24
36
  # utility method to format a column description in the way it is expected on input
25
37
  def to_hash
26
- { self.name => { "dataType" => self.type.to_s, "role" => self.role.to_s }}
38
+ { self.name => { 'dataType' => self.type.to_s, 'role' => self.role.to_s }}
27
39
  end
28
40
 
29
41
  def self.to_json(column_array)
@@ -1,6 +1,6 @@
1
1
  module NexosisApi
2
- # Class for parsing the results of a session based request
3
- class Session
2
+ # Class for parsing the results of a session based request
3
+ class Session
4
4
  def initialize(sessionHash)
5
5
  sessionHash.each do |k,v|
6
6
  if(k == "links")
@@ -22,60 +22,59 @@ module NexosisApi
22
22
  instance_variable_set("@#{k}", v) unless v.nil?
23
23
  end
24
24
  end
25
- end
25
+ end
26
26
 
27
- # identifier for this sesssion
28
- # @return [String]
29
- attr_accessor :sessionId
27
+ # identifier for this sesssion
28
+ # @return [String]
29
+ attr_accessor :sessionId
30
30
 
31
- # What type of analysis was run during this session
32
- # @return [String]
33
- attr_accessor :type
31
+ # What type of analysis was run during this session
32
+ # @return [String]
33
+ attr_accessor :type
34
34
 
35
- # Is this session requested, estimated, started, or completed
36
- # @return [String]
37
- attr_accessor :status
35
+ # Is this session requested, estimated, started, or completed
36
+ # @return [String]
37
+ attr_accessor :status
38
38
 
39
- # Date and status of each status this session has entered
40
- # @return [Hash]
41
- attr_accessor :statusHistory
39
+ # Date and status of each status this session has entered
40
+ # @return [Hash]
41
+ attr_accessor :statusHistory
42
42
 
43
- # reserved for future extensions
44
- # @return [Hash]
45
- attr_accessor :extraParameters
43
+ # reserved for future extensions
44
+ # @return [Hash]
45
+ attr_accessor :extraParameters
46
+
47
+ # the dataset used in this session
48
+ # @return [String]
49
+ attr_accessor :dataSetName
46
50
 
47
- # the dataset used in this session
48
- # @return [String]
49
- attr_accessor :dataSetName
51
+ # The column in the dataset for which this session ran predictions
52
+ # @return [String]
53
+ attr_accessor :targetColumn
50
54
 
51
- # The column in the dataset for which this session ran predictions
52
- # @return [String]
53
- attr_accessor :targetColumn
55
+ # The start date of analysis in this session
56
+ # @return [DateTime]
57
+ attr_accessor :startDate
54
58
 
55
- # The start date of analysis in this session
56
- # @return [DateTime]
57
- attr_accessor :startDate
59
+ # The end date of analysis in this session
60
+ # @return [DateTime]
61
+ attr_accessor :endDate
58
62
 
59
- # The end date of analysis in this session
60
- # @return [DateTime]
61
- attr_accessor :endDate
63
+ # associated hypermedia
64
+ # @return [Array of NexosisApi::Link]
65
+ attr_accessor :links
62
66
 
63
- # associated hypermedia
64
- # @return [Array of NexosisApi::Link]
65
- attr_accessor :links
67
+ # Is this session an estimate only session
68
+ # @return [Boolean]
69
+ attr_accessor :is_estimate
66
70
 
67
- # Is this session an estimate only session
68
- # @return [Boolean]
69
- attr_accessor :is_estimate
71
+ # The column descriptors for the data in this session
72
+ # will reflect either the metadata sent in, defaults form dataset, or inferred values
73
+ # @return[Array of NexosisApi::DatasetColumn]
74
+ attr_accessor :column_metadata
70
75
 
71
- # The column descriptors for the data in this session
72
- # will reflect either the metadata sent in, defaults form dataset, or inferred values
73
- # @return[Array of NexosisApi::DatasetColumn]
74
- attr_accessor :column_metadata
75
-
76
- # The requested result interval. Default is DAY if none was requested during session creation.
77
- # @return [NexosisApi::TimeInterval]
78
- attr_accessor :result_interval
79
- end
76
+ # The requested result interval. Default is DAY if none was requested during session creation.
77
+ # @return [NexosisApi::TimeInterval]
78
+ attr_accessor :result_interval
79
+ end
80
80
  end
81
-
data/nexosisapi.gemspec CHANGED
@@ -16,6 +16,6 @@ Gem::Specification.new do |spec|
16
16
  spec.require_paths = ['lib']
17
17
  spec.required_ruby_version = '>= 2.0.0'
18
18
  spec.summary = "Ruby client for working with the Nexosis API"
19
- spec.version = '1.1.1'
19
+ spec.version = '1.1.2'
20
20
  spec.metadata["yard.run"] = "yri"
21
21
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nexosis_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.1
4
+ version: 1.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nexosis,Inc
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-07-26 00:00:00.000000000 Z
11
+ date: 2017-08-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -90,7 +90,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
90
90
  version: '0'
91
91
  requirements: []
92
92
  rubyforge_project:
93
- rubygems_version: 2.6.12
93
+ rubygems_version: 2.5.2
94
94
  signing_key:
95
95
  specification_version: 4
96
96
  summary: Ruby client for working with the Nexosis API