Skip to content

Commit

Permalink
FI-3648 Add metadata and make platform deployable (#17)
Browse files Browse the repository at this point in the history
* remove gem file from git

* inferno_core upgrade; add shared rspec; add metadata

* fix spec.files

* rm version from suite

* add standard links to suite

* rm fetch_all_bundled_resources

* fix generated links

* debug

* bump ruby in ci

* clean
  • Loading branch information
Shaumik-Ashraf authored Feb 11, 2025
1 parent 10231de commit 170717a
Show file tree
Hide file tree
Showing 16 changed files with 145 additions and 120 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ruby.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
ruby-version: ['3.1.2']
ruby-version: ['3.3.6']

steps:
- uses: actions/checkout@v2
Expand All @@ -26,7 +26,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
ruby-version: ['3.1.2']
ruby-version: ['3.3.6']
steps:
- uses: actions/checkout@v2
- name: Set up Ruby
Expand Down
2 changes: 1 addition & 1 deletion .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.1.2
3.3.6
2 changes: 1 addition & 1 deletion .tool-versions
Original file line number Diff line number Diff line change
@@ -1 +1 @@
ruby 3.1.2
ruby 3.3.6
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ruby:3.1.2
FROM ruby:3.3.6

ENV INSTALL_PATH=/opt/inferno/
ENV APP_ENV=production
Expand Down
11 changes: 6 additions & 5 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,15 @@ gemspec

group :development, :test do
gem 'debug'
end

gem "rubocop", "~> 1.56"
gem 'rubocop-rspec', require: false

gem "rubocop-rake", "~> 0.6.0"
gem "rubocop", "~> 1.56"
gem 'rubocop-rspec', require: false
gem "rubocop-rake", "~> 0.6.0"
end

group :test do
gem 'simplecov', require: false
gem 'simplecov-cobertura'

gem 'rack-test'
end
76 changes: 39 additions & 37 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ PATH
remote: .
specs:
davinci_us_drug_formulary_test_kit (0.10.4)
inferno_core (~> 0.5.0)
tls_test_kit (~> 0.2.0)
inferno_core (~> 0.6.2)
tls_test_kit (~> 0.3.0)

GEM
remote: https://rubygems.org/
specs:
activesupport (6.1.7.8)
activesupport (6.1.7.10)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 1.6, < 2)
minitest (>= 5.1)
Expand All @@ -21,12 +21,12 @@ GEM
base64 (0.2.0)
bcp47 (0.3.3)
i18n
bigdecimal (3.1.8)
bigdecimal (3.1.9)
blueprinter (0.25.2)
byebug (11.1.3)
coderay (1.1.3)
concurrent-ruby (1.3.3)
connection_pool (2.4.1)
concurrent-ruby (1.3.4)
connection_pool (2.5.0)
crack (1.0.0)
bigdecimal
rexml
Expand Down Expand Up @@ -79,8 +79,8 @@ GEM
faraday-em_synchrony (1.0.0)
faraday-excon (1.1.0)
faraday-httpclient (1.0.1)
faraday-multipart (1.0.4)
multipart-post (~> 2)
faraday-multipart (1.1.0)
multipart-post (~> 2.0)
faraday-net_http (1.0.2)
faraday-net_http_persistent (1.2.0)
faraday-patron (1.0.0)
Expand Down Expand Up @@ -131,14 +131,15 @@ GEM
hansi (0.2.1)
hashdiff (1.1.0)
http-accept (1.7.0)
http-cookie (1.0.7)
http-cookie (1.0.8)
domain_name (~> 0.5)
i18n (1.14.5)
i18n (1.14.7)
concurrent-ruby (~> 1.0)
inferno_core (0.5.0)
inferno_core (0.6.2)
activesupport (~> 6.1.7.5)
base62-rb (= 0.3.1)
blueprinter (= 0.25.2)
concurrent-ruby (= 1.3.4)
dotenv (~> 2.7)
dry-configurable (= 1.0.0)
dry-container (= 0.10.0)
Expand Down Expand Up @@ -167,19 +168,19 @@ GEM
rdoc (>= 4.0.0)
reline (>= 0.4.2)
json (2.7.2)
jwt (2.9.3)
jwt (2.10.1)
base64
kramdown (2.4.0)
rexml
kramdown (2.5.1)
rexml (>= 3.3.9)
language_server-protocol (3.17.0.3)
logger (1.6.1)
logger (1.6.5)
method_source (1.1.0)
mime-types (3.6.0)
logger
mime-types-data (~> 3.2015)
mime-types-data (3.2024.1105)
mini_portile2 (2.8.7)
minitest (5.24.1)
mime-types-data (3.2025.0204)
mini_portile2 (2.8.8)
minitest (5.25.4)
multi_json (1.15.0)
multi_xml (0.7.1)
bigdecimal (~> 3.1)
Expand All @@ -191,14 +192,14 @@ GEM
mustermann (= 1.1.2)
netrc (0.11.0)
nio4r (2.7.4)
nokogiri (1.16.7)
nokogiri (1.18.2)
mini_portile2 (~> 2.8.2)
racc (~> 1.4)
nokogiri (1.16.7-arm64-darwin)
nokogiri (1.18.2-arm64-darwin)
racc (~> 1.4)
nokogiri (1.16.7-x86_64-darwin)
nokogiri (1.18.2-x86_64-darwin)
racc (~> 1.4)
nokogiri (1.16.7-x86_64-linux)
nokogiri (1.18.2-x86_64-linux-gnu)
racc (~> 1.4)
oauth2 (1.4.11)
faraday (>= 0.17.3, < 3.0)
Expand All @@ -213,24 +214,26 @@ GEM
racc
pastel (0.8.0)
tty-color (~> 0.5)
pry (0.14.2)
pry (0.15.2)
coderay (~> 1.1)
method_source (~> 1.0)
pry-byebug (3.10.1)
pry-byebug (3.8.0)
byebug (~> 11.0)
pry (>= 0.13, < 0.15)
pry (~> 0.10)
psych (5.1.2)
stringio
public_suffix (6.0.0)
public_suffix (6.0.1)
puma (5.6.9)
nio4r (~> 2.0)
racc (1.8.0)
racc (1.8.1)
rack (2.2.10)
rack-test (2.2.0)
rack (>= 1.3)
rainbow (3.1.1)
rake (13.2.1)
rdoc (6.7.0)
psych (>= 4.0.0)
redis-client (0.22.2)
redis-client (0.23.2)
connection_pool
regexp_parser (2.9.2)
reline (0.5.9)
Expand All @@ -240,9 +243,8 @@ GEM
http-cookie (>= 1.0.2, < 2.0)
mime-types (>= 1.16, < 4.0)
netrc (~> 0.8)
rexml (3.3.1)
strscan
rouge (4.4.0)
rexml (3.4.0)
rouge (4.5.1)
rspec (3.13.0)
rspec-core (~> 3.13.0)
rspec-expectations (~> 3.13.0)
Expand Down Expand Up @@ -301,11 +303,10 @@ GEM
unicode-display_width (>= 1.5, < 3.0)
unicode_utils (~> 1.4)
strings-ansi (0.2.0)
strscan (3.1.0)
thor (1.2.2)
tilt (2.4.0)
tls_test_kit (0.2.3)
inferno_core (>= 0.4.2)
tilt (2.6.0)
tls_test_kit (0.3.0)
inferno_core (>= 0.6.2)
tty-color (0.6.0)
tty-markdown (0.7.2)
kramdown (>= 1.16.2, < 3.0)
Expand All @@ -317,13 +318,13 @@ GEM
tty-screen (0.8.2)
tzinfo (2.0.6)
concurrent-ruby (~> 1.0)
unicode-display_width (2.5.0)
unicode-display_width (2.6.0)
unicode_utils (1.4.0)
webmock (3.23.1)
addressable (>= 2.8.0)
crack (>= 0.3.2)
hashdiff (>= 0.4.0, < 2.0.0)
zeitwerk (2.6.16)
zeitwerk (2.7.1)

PLATFORMS
arm64-darwin-21
Expand All @@ -336,6 +337,7 @@ DEPENDENCIES
davinci_us_drug_formulary_test_kit!
debug
factory_bot (~> 6.1)
rack-test
rspec (~> 3.10)
rubocop (~> 1.56)
rubocop-rake (~> 0.6.0)
Expand Down
Binary file removed davinci_us_drug_formulary_test_kit-0.10.3.gem
Binary file not shown.
16 changes: 5 additions & 11 deletions davinci_us_drug_formulary_test_kit.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -9,22 +9,16 @@ Gem::Specification.new do |spec|
spec.description = 'DaVinci US Drug Formulary Test Kit'
spec.homepage = 'https://github.com/inferno-framework/davinci-us-drug-formulary-test-kit'
spec.license = 'Apache-2.0'
spec.add_runtime_dependency 'inferno_core', '~> 0.5.0'
spec.add_runtime_dependency 'tls_test_kit', '~> 0.2.0'
spec.add_runtime_dependency 'inferno_core', '~> 0.6.2'
spec.add_runtime_dependency 'tls_test_kit', '~> 0.3.0'
spec.add_development_dependency 'database_cleaner-sequel', '~> 1.8'
spec.add_development_dependency 'factory_bot', '~> 6.1'
spec.add_development_dependency 'rspec', '~> 3.10'
spec.add_development_dependency 'webmock', '~> 3.11'
spec.required_ruby_version = Gem::Requirement.new('>= 3.1.2')
spec.required_ruby_version = Gem::Requirement.new('>= 3.3.6')
spec.metadata['homepage_uri'] = spec.homepage
spec.metadata['source_code_uri'] = spec.homepage
spec.files = [
Dir['lib/**/*.rb'],
Dir['lib/**/*.json'],
Dir['lib/**/*.tgz'],
Dir['lib/**/*.yml'],
'LICENSE'
].flatten

spec.files = `[ -d .git ] && git ls-files -z lib config/presets LICENSE`.split("\x0")
spec.require_paths = ['lib']
spec.metadata['inferno_test_kit'] = 'true'
end
1 change: 1 addition & 0 deletions lib/davinci_us_drug_formulary_test_kit.rb
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
require_relative 'davinci_us_drug_formulary_test_kit/metadata.rb'
require_relative 'davinci_us_drug_formulary_test_kit/generated/v2.0.1/usdf_test_suite'
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ class USDFTestSuite < Inferno::TestSuite
- Multiple And
- Comparators
)
version VERSION

id :davinci_us_drug_formulary_v201

Expand Down Expand Up @@ -85,9 +84,13 @@ def self.metadata
url: 'https://github.com/inferno-framework/davinci-us-drug-formulary-test-kit/issues'
},
{
label: 'Source Code',
label: 'Open Source',
url: 'https://github.com/inferno-framework/davinci-us-drug-formulary-test-kit'
},
{
label: 'Download',
url: 'https://github.com/inferno-framework/davinci-us-drug-formulary-test-kit/releases'
},
{
label: 'Implementation Guide',
url: 'https://hl7.org/fhir/us/davinci-drug-formulary/STU2.0.1/'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ module DaVinciUSDrugFormularyTestKit
- Multiple And
- Comparators
)
version VERSION

id :<%= suite_id %>

Expand Down Expand Up @@ -82,9 +81,13 @@ module DaVinciUSDrugFormularyTestKit
url: 'https://github.com/inferno-framework/davinci-us-drug-formulary-test-kit/issues'
},
{
label: 'Source Code',
label: 'Open Source',
url: 'https://github.com/inferno-framework/davinci-us-drug-formulary-test-kit'
},
{
label: 'Download',
url: 'https://github.com/inferno-framework/davinci-us-drug-formulary-test-kit/releases'
},
{
label: 'Implementation Guide',
url: '<%=ig_link%>'
Expand Down
60 changes: 60 additions & 0 deletions lib/davinci_us_drug_formulary_test_kit/metadata.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
require_relative 'version'

module DaVinciUSDrugFormularyTestKit
class Metadata < Inferno::TestKit
id :davinci_us_drug_formulary_test_kit
title 'Da Vinci US Drug Formulary Test Kit'
suite_ids ['davinci_us_drug_formulary_v201']
tags ['Da Vinci']
last_updated ::DaVinciUSDrugFormularyTestKit::LAST_UPDATED
version ::DaVinciUSDrugFormularyTestKit::VERSION
maturity 'Low'
authors ['Stephen MacVicar', 'Tom Strassner', 'Robert Passas']
repo 'https://github.com/inferno-framework/davinci-us-drug-formulary-test-kit'
description <<~DESCRIPTION
The DaVinci US Drug Formulary Test Kit validates the conformance of a server
implementation to the
[DaVinci Payer Data Exchange (PDex) US Drug Formulary Implementation Guide v2.0.1](http://hl7.org/fhir/us/davinci-drug-formulary/STU2.0.1).
<!-- break -->
These tests check the following behaviors as defined in the IG:
- FHIR Interactions
+ Capabilities
+ Read
+ Search
* Individual search parameters
* _include searches
- FHIR Data
+ Validation against IG profiles
+ Presence of all Must Support fields
* Resolution of Must Support references
The DaVinci US Drug Formulary Test Kit is built using the
[Inferno Framework](https://inferno-framework.github.io/).
The Inferno Framework is designed for reuse and aims to make it easier to
build test kits for any FHIR-based data exchange.
### Known Limitations
The following areas of the IG are not fully tested in this draft version
of the test kit:
- Must Support checks are not performed for all elements of Formulary Drug
resources due to the use of an intensional value set for slicing
`MedicationKnowledge.code.coding` elements.
- The following search features are not tested:
+ Combination searches
+ Multiple Or
+ Multiple And
+ Comparators
## Reporting Issues
Please report any issues with this set of tests in the
[GitHub Issues](https://github.com/inferno-framework/davinci-us-drug-formulary-test-kit/issues)
section of this repository.
DESCRIPTION
end
end
Loading

0 comments on commit 170717a

Please sign in to comment.