Class: Rafflesia::DatasetReleaseManifest

Inherits:
Types::BaseModel
  • Object
show all
Defined in:
lib/rafflesia/foundry/dataset_release_manifest.rb

Constant Summary collapse

HASH_ATTRS =
{
  benchmark_cohorts: :benchmark_cohorts,
  byte_count: :byte_count,
  configs: :configs,
  evidence_sets: :evidence_sets,
  evidence_status: :evidence_status,
  formats: :formats,
  license: :license,
  modality: :modality,
  molecule_type: :molecule_type,
  profiles: :profiles,
  record_count: :record_count,
  relations: :relations,
  residue_count: :residue_count,
  row_count: :row_count,
  schema_digest: :schema_digest,
  shards: :shards,
  source_snapshots: :source_snapshots,
  splits: :splits
}.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ DatasetReleaseManifest

Returns a new instance of DatasetReleaseManifest.



49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
# File 'lib/rafflesia/foundry/dataset_release_manifest.rb', line 49

def initialize(json)
  super()
  hash = self.class.normalize(json)
  @benchmark_cohorts = (hash[:benchmark_cohorts] || []).map { |item| item ? Rafflesia::DatasetBenchmarkCohort.new(item) : nil }
  @byte_count = hash[:byte_count]
  @configs = (hash[:configs] || []).map { |item| item ? Rafflesia::DatasetConfigRef.new(item) : nil }
  @evidence_sets = (hash[:evidence_sets] || []).map { |item| item ? Rafflesia::RegistryEvidenceSet.new(item) : nil }
  @evidence_status = hash[:evidence_status]
  @formats = (hash[:formats] || [])
  @license = hash[:license]
  @modality = (hash[:modality] || [])
  @molecule_type = hash[:molecule_type]
  @profiles = (hash[:profiles] || []).map { |item| item ? Rafflesia::DatasetProfileRef.new(item) : nil }
  @record_count = hash[:record_count]
  @relations = (hash[:relations] || []).map { |item| item ? Rafflesia::DatasetRelationRef.new(item) : nil }
  @residue_count = hash[:residue_count]
  @row_count = hash[:row_count]
  @schema_digest = hash[:schema_digest]
  @shards = (hash[:shards] || []).map { |item| item ? Rafflesia::DatasetShardRef.new(item) : nil }
  @source_snapshots = (hash[:source_snapshots] || []).map { |item| item ? Rafflesia::RegistrySourceSnapshot.new(item) : nil }
  @splits = (hash[:splits] || []).map { |item| item ? Rafflesia::DatasetSplitRef.new(item) : nil }
end

Instance Attribute Details

#benchmark_cohortsObject

Returns the value of attribute benchmark_cohorts.



29
30
31
# File 'lib/rafflesia/foundry/dataset_release_manifest.rb', line 29

def benchmark_cohorts
  @benchmark_cohorts
end

#byte_countObject

Returns the value of attribute byte_count.



29
30
31
# File 'lib/rafflesia/foundry/dataset_release_manifest.rb', line 29

def byte_count
  @byte_count
end

#configsObject

Returns the value of attribute configs.



29
30
31
# File 'lib/rafflesia/foundry/dataset_release_manifest.rb', line 29

def configs
  @configs
end

#evidence_setsObject

Returns the value of attribute evidence_sets.



29
30
31
# File 'lib/rafflesia/foundry/dataset_release_manifest.rb', line 29

def evidence_sets
  @evidence_sets
end

#evidence_statusObject

Returns the value of attribute evidence_status.



29
30
31
# File 'lib/rafflesia/foundry/dataset_release_manifest.rb', line 29

def evidence_status
  @evidence_status
end

#formatsObject

Returns the value of attribute formats.



29
30
31
# File 'lib/rafflesia/foundry/dataset_release_manifest.rb', line 29

def formats
  @formats
end

#licenseObject

Returns the value of attribute license.



29
30
31
# File 'lib/rafflesia/foundry/dataset_release_manifest.rb', line 29

def license
  @license
end

#modalityObject

Returns the value of attribute modality.



29
30
31
# File 'lib/rafflesia/foundry/dataset_release_manifest.rb', line 29

def modality
  @modality
end

#molecule_typeObject

Returns the value of attribute molecule_type.



29
30
31
# File 'lib/rafflesia/foundry/dataset_release_manifest.rb', line 29

def molecule_type
  @molecule_type
end

#profilesObject

Returns the value of attribute profiles.



29
30
31
# File 'lib/rafflesia/foundry/dataset_release_manifest.rb', line 29

def profiles
  @profiles
end

#record_countObject

Returns the value of attribute record_count.



29
30
31
# File 'lib/rafflesia/foundry/dataset_release_manifest.rb', line 29

def record_count
  @record_count
end

#relationsObject

Returns the value of attribute relations.



29
30
31
# File 'lib/rafflesia/foundry/dataset_release_manifest.rb', line 29

def relations
  @relations
end

#residue_countObject

Returns the value of attribute residue_count.



29
30
31
# File 'lib/rafflesia/foundry/dataset_release_manifest.rb', line 29

def residue_count
  @residue_count
end

#row_countObject

Returns the value of attribute row_count.



29
30
31
# File 'lib/rafflesia/foundry/dataset_release_manifest.rb', line 29

def row_count
  @row_count
end

#schema_digestObject

Returns the value of attribute schema_digest.



29
30
31
# File 'lib/rafflesia/foundry/dataset_release_manifest.rb', line 29

def schema_digest
  @schema_digest
end

#shardsObject

Returns the value of attribute shards.



29
30
31
# File 'lib/rafflesia/foundry/dataset_release_manifest.rb', line 29

def shards
  @shards
end

#source_snapshotsObject

Returns the value of attribute source_snapshots.



29
30
31
# File 'lib/rafflesia/foundry/dataset_release_manifest.rb', line 29

def source_snapshots
  @source_snapshots
end

#splitsObject

Returns the value of attribute splits.



29
30
31
# File 'lib/rafflesia/foundry/dataset_release_manifest.rb', line 29

def splits
  @splits
end