Skip to content

Commit

Permalink
Merge branch 'releases/2-20-0' into feature/acquisition-mdjson-writer
Browse files Browse the repository at this point in the history
  • Loading branch information
J-Oliveros committed May 7, 2024
2 parents 09012f3 + ed3421d commit 46272dd
Show file tree
Hide file tree
Showing 5 changed files with 50 additions and 38 deletions.
70 changes: 40 additions & 30 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ PATH
remote: .
specs:
adiwg-mdtranslator (2.20.0.pre.beta.0)
adiwg-mdcodes (= 2.9.3.pre.beta.3)
adiwg-mdjson_schemas (= 2.9.2.pre.beta.7)
adiwg-mdcodes (= 2.9.3)
adiwg-mdjson_schemas (= 2.9.2)
builder (~> 3.2)
coderay (~> 1.1)
jbuilder (~> 2.5)
Expand All @@ -17,59 +17,69 @@ PATH
GEM
remote: https://rubygems.org/
specs:
actionview (5.2.8.1)
activesupport (= 5.2.8.1)
actionview (7.1.3.2)
activesupport (= 7.1.3.2)
builder (~> 3.1)
erubi (~> 1.4)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.0.3)
activesupport (5.2.8.1)
erubi (~> 1.11)
rails-dom-testing (~> 2.2)
rails-html-sanitizer (~> 1.6)
activesupport (7.1.3.2)
base64
bigdecimal
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 0.7, < 2)
minitest (~> 5.1)
tzinfo (~> 1.1)
addressable (2.8.5)
connection_pool (>= 2.2.5)
drb
i18n (>= 1.6, < 2)
minitest (>= 5.1)
mutex_m
tzinfo (~> 2.0)
addressable (2.8.6)
public_suffix (>= 2.0.2, < 6.0)
adiwg-mdcodes (2.9.3.pre.beta.3)
adiwg-mdcodes (2.9.3)
json (~> 2.0)
adiwg-mdjson_schemas (2.9.2.pre.beta.7)
adiwg-mdjson_schemas (2.9.2)
base64 (0.2.0)
bigdecimal (3.1.8)
builder (3.2.4)
coderay (1.1.3)
concurrent-ruby (1.2.2)
concurrent-ruby (1.2.3)
connection_pool (2.4.1)
crass (1.0.6)
drb (2.2.1)
erubi (1.12.0)
i18n (1.14.1)
i18n (1.14.5)
concurrent-ruby (~> 1.0)
jbuilder (2.11.5)
jbuilder (2.12.0)
actionview (>= 5.0.0)
activesupport (>= 5.0.0)
json (2.6.3)
json (2.7.2)
json-schema (2.8.1)
addressable (>= 2.4)
kramdown (2.4.0)
rexml
loofah (2.21.1)
loofah (2.22.0)
crass (~> 1.0.2)
nokogiri (>= 1.5.9)
nokogiri (>= 1.12.0)
minitest (5.20.0)
nokogiri (1.15.5-arm64-darwin)
mutex_m (0.2.0)
nokogiri (1.15.6-arm64-darwin)
racc (~> 1.4)
nokogiri (1.15.5-x86_64-linux)
nokogiri (1.15.6-x86_64-linux)
racc (~> 1.4)
public_suffix (4.0.7)
public_suffix (5.0.5)
racc (1.7.3)
rails-dom-testing (2.1.1)
rails-dom-testing (2.2.0)
activesupport (>= 5.0.0)
minitest
nokogiri (>= 1.6)
rails-html-sanitizer (1.5.0)
loofah (~> 2.19, >= 2.19.1)
rails-html-sanitizer (1.6.0)
loofah (~> 2.21)
nokogiri (~> 1.14)
rake (13.1.0)
rexml (3.2.5)
rexml (3.2.6)
thor (0.20.3)
thread_safe (0.3.6)
tzinfo (1.2.11)
thread_safe (~> 0.1)
tzinfo (2.0.6)
concurrent-ruby (~> 1.0)
uuidtools (2.2.0)

PLATFORMS
Expand Down
4 changes: 2 additions & 2 deletions adiwg-mdtranslator.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ Gem::Specification.new do |spec|
spec.add_runtime_dependency "thor", "~> 0.19"
spec.add_runtime_dependency "uuidtools", "~> 2.1"
spec.add_runtime_dependency "json-schema", "~> 2.7"
spec.add_runtime_dependency "adiwg-mdjson_schemas", "2.9.2.pre.beta.7"
spec.add_runtime_dependency "adiwg-mdcodes", "2.9.3.pre.beta.3"
spec.add_runtime_dependency "adiwg-mdjson_schemas", "2.9.2"
spec.add_runtime_dependency "adiwg-mdcodes", "2.9.3"
spec.add_runtime_dependency "jbuilder", "~> 2.5"
spec.add_runtime_dependency "kramdown", ">= 1.13", "< 3.0"
spec.add_runtime_dependency "coderay", "~> 1.1"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def self.unpack(xDataQual, hMetadata, hDataQuality, hResponseObj)
xAccuracy = xDataQual.xpath('./attracc')
accuracyReport = xAccuracy.xpath('./attraccr').text
report = intMetadataClass.newDataQualityReport
report[:type] = 'NonQuantitativeAttributeAccuracy'
report[:type] = 'NonQuantitativeAttributeCorrectness'
descriptiveResult = intMetadataClass.newDescriptiveResult
descriptiveResult[:statement] = accuracyReport
report[:descriptiveResult] << descriptiveResult
Expand Down Expand Up @@ -68,7 +68,7 @@ def self.unpack(xDataQual, hMetadata, hDataQuality, hResponseObj)
else
complete = xComplete.text
report = intMetadataClass.newDataQualityReport
report[:type] = 'CompletenessOmission'
report[:type] = 'Omission'
descriptiveResult = intMetadataClass.newDescriptiveResult
descriptiveResult[:statement] = complete
report[:descriptiveResult] << descriptiveResult
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def writeXML(intObj)
if hDataQuality && hDataQuality[:report]
# data quality 2.1 (attracc) - attribute accuracy (not implemented)
attribute_completeness_report = hDataQuality[:report].find do |report|
report[:type] == 'NonQuantitativeAttributeCompleteness' &&
report[:type] == 'NonQuantitativeAttributeCorrectness' &&
!report.dig(:descriptiveResult, 0, :statement).nil?
end

Expand All @@ -56,7 +56,7 @@ def writeXML(intObj)

# data quality 2.3 (complete) - completion report (not implemented) (required)
completeness_report = hDataQuality[:report].find do |report|
report[:type] == 'CompletenessOmission' &&
report[:type] == 'Omission' &&
!report.dig(:descriptiveResult, 0, :statement).nil?
end

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,10 @@ def writeXML(hReport)
end
end
end
@xml.tag!('mdq:evaluationMethodType') do
codeListClass.writeXML('mcc', 'iso_evaluationMethodType', evaluationMethod[:evaluationMethodType])
unless evaluationMethod[:evaluationMethodType].nil?
@xml.tag!('mdq:evaluationMethodType') do
codeListClass.writeXML('mcc', 'iso_evaluationMethodType', evaluationMethod[:evaluationMethodType])
end
end
end
end
Expand Down

0 comments on commit 46272dd

Please sign in to comment.