inferno_core 0.6.9 → 0.6.11

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.
Files changed (53) hide show
  1. checksums.yaml +4 -4
  2. data/lib/inferno/apps/cli/evaluate/database.yml +15 -0
  3. data/lib/inferno/apps/cli/evaluate/docker-compose.evaluate.yml +16 -0
  4. data/lib/inferno/apps/cli/evaluate.rb +52 -4
  5. data/lib/inferno/apps/cli/execute.rb +17 -21
  6. data/lib/inferno/apps/cli/main.rb +5 -1
  7. data/lib/inferno/apps/cli/requirements.rb +28 -0
  8. data/lib/inferno/apps/cli/requirements_exporter.rb +194 -0
  9. data/lib/inferno/apps/cli/suite.rb +21 -0
  10. data/lib/inferno/apps/cli/templates/lib/%library_name%/example_suite/patient_group.rb.tt +141 -0
  11. data/lib/inferno/apps/cli/templates/lib/%library_name%/example_suite.rb.tt +128 -0
  12. data/lib/inferno/apps/cli/templates/lib/%library_name%/metadata.rb.tt +65 -3
  13. data/lib/inferno/apps/cli/templates/lib/%library_name%/version.rb.tt +1 -0
  14. data/lib/inferno/apps/cli/templates/lib/%library_name%.rb.tt +1 -1
  15. data/lib/inferno/apps/web/router.rb +10 -5
  16. data/lib/inferno/apps/web/serializers/input.rb +1 -0
  17. data/lib/inferno/apps/web/serializers/serializer.rb +7 -0
  18. data/lib/inferno/apps/web/serializers/test.rb +1 -0
  19. data/lib/inferno/apps/web/serializers/test_group.rb +1 -0
  20. data/lib/inferno/apps/web/serializers/test_suite.rb +2 -1
  21. data/lib/inferno/config/boot/suites.rb +3 -0
  22. data/lib/inferno/dsl/fhir_evaluation/default.yml +68 -0
  23. data/lib/inferno/dsl/fhir_evaluation/evaluator.rb +3 -5
  24. data/lib/inferno/dsl/fhir_evaluation/rules/all_defined_extensions_have_examples.rb +2 -2
  25. data/lib/inferno/dsl/fhir_evaluation/rules/all_extensions_used.rb +2 -2
  26. data/lib/inferno/dsl/fhir_evaluation/rules/all_must_supports_present.rb +1 -1
  27. data/lib/inferno/dsl/fhir_evaluation/rules/all_profiles_have_examples.rb +1 -1
  28. data/lib/inferno/dsl/fhir_evaluation/rules/all_references_resolve.rb +2 -2
  29. data/lib/inferno/dsl/fhir_evaluation/rules/all_resources_reachable.rb +2 -2
  30. data/lib/inferno/dsl/fhir_evaluation/rules/all_search_parameters_have_examples.rb +22 -11
  31. data/lib/inferno/dsl/fhir_evaluation/rules/differential_content_has_examples.rb +2 -2
  32. data/lib/inferno/dsl/fhir_evaluation/rules/value_sets_demonstrate.rb +4 -4
  33. data/lib/inferno/dsl/fhir_resource_validation.rb +25 -3
  34. data/lib/inferno/dsl/fhirpath_evaluation.rb +25 -1
  35. data/lib/inferno/dsl/input_output_handling.rb +1 -0
  36. data/lib/inferno/dsl/runnable.rb +5 -0
  37. data/lib/inferno/dsl/short_id_manager.rb +55 -0
  38. data/lib/inferno/entities/input.rb +14 -5
  39. data/lib/inferno/entities/requirement.rb +15 -3
  40. data/lib/inferno/entities/test.rb +3 -1
  41. data/lib/inferno/entities/test_group.rb +3 -1
  42. data/lib/inferno/entities/test_suite.rb +2 -0
  43. data/lib/inferno/exceptions.rb +6 -0
  44. data/lib/inferno/feature.rb +9 -0
  45. data/lib/inferno/public/237.bundle.js +1 -1
  46. data/lib/inferno/public/bundle.js +54 -54
  47. data/lib/inferno/public/bundle.js.LICENSE.txt +3 -36
  48. data/lib/inferno/repositories/requirements.rb +6 -2
  49. data/lib/inferno/version.rb +1 -1
  50. data/spec/shared/test_kit_examples.rb +32 -0
  51. metadata +25 -4
  52. data/lib/inferno/apps/cli/templates/lib/%library_name%/patient_group.rb.tt +0 -44
  53. data/spec/features_helper.rb +0 -12
@@ -14,9 +14,9 @@
14
14
 
15
15
  /**
16
16
  * @license React
17
- * react-is.production.min.js
17
+ * react-is.production.js
18
18
  *
19
- * Copyright (c) Facebook, Inc. and its affiliates.
19
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
20
20
  *
21
21
  * This source code is licensed under the MIT license found in the
22
22
  * LICENSE file in the root directory of this source tree.
@@ -53,46 +53,13 @@
53
53
  */
54
54
 
55
55
  /**
56
- * @mui/styled-engine v6.1.1
56
+ * @mui/styled-engine v6.4.8
57
57
  *
58
58
  * @license MIT
59
59
  * This source code is licensed under the MIT license found in the
60
60
  * LICENSE file in the root directory of this source tree.
61
61
  */
62
62
 
63
- /**
64
- * @remix-run/router v1.21.0
65
- *
66
- * Copyright (c) Remix Software Inc.
67
- *
68
- * This source code is licensed under the MIT license found in the
69
- * LICENSE.md file in the root directory of this source tree.
70
- *
71
- * @license MIT
72
- */
73
-
74
- /**
75
- * React Router DOM v6.28.1
76
- *
77
- * Copyright (c) Remix Software Inc.
78
- *
79
- * This source code is licensed under the MIT license found in the
80
- * LICENSE.md file in the root directory of this source tree.
81
- *
82
- * @license MIT
83
- */
84
-
85
- /**
86
- * React Router v6.28.1
87
- *
88
- * Copyright (c) Remix Software Inc.
89
- *
90
- * This source code is licensed under the MIT license found in the
91
- * LICENSE.md file in the root directory of this source tree.
92
- *
93
- * @license MIT
94
- */
95
-
96
63
  /** @license React v16.13.1
97
64
  * react-is.production.min.js
98
65
  *
@@ -27,7 +27,9 @@ module Inferno
27
27
  conformance: row[:conformance],
28
28
  actor: row[:actor],
29
29
  sub_requirements: sub_requirements,
30
- conditionality: row[:conditionality]&.downcase
30
+ conditionality: row[:conditionality]&.downcase,
31
+ not_tested_reason: row[:not_tested_reason],
32
+ not_tested_details: row[:not_tested_details]
31
33
  }
32
34
  end
33
35
 
@@ -69,7 +71,9 @@ module Inferno
69
71
  requirement_sets.select(&:complete?)
70
72
  .flat_map do |requirement_set|
71
73
  all.select do |requirement|
72
- requirement.requirement_set == requirement_set.identifier && requirement.actor == requirement_set.actor
74
+ requirement.requirement_set == requirement_set.identifier &&
75
+ requirement.actor == requirement_set.actor &&
76
+ requirement.tested?
73
77
  end
74
78
  end
75
79
  end
@@ -1,4 +1,4 @@
1
1
  module Inferno
2
2
  # Standard patterns for gem versions: https://guides.rubygems.org/patterns/
3
- VERSION = '0.6.9'.freeze
3
+ VERSION = '0.6.11'.freeze
4
4
  end
@@ -168,6 +168,38 @@ RSpec.shared_examples 'platform_deployable_test_kit' do
168
168
  end
169
169
  end
170
170
  end
171
+
172
+ context 'when short_id map file present' do
173
+ it 'contains a short_id for every suite test and group' do
174
+ suites.each do |suite|
175
+ short_id_map = suite.short_id_map.dup
176
+ next unless short_id_map
177
+
178
+ runnable_ids = suite.all_descendants.map(&:id)
179
+ missing_ids = runnable_ids.reject { |id| short_id_map.delete(id).present? }
180
+
181
+ expect(missing_ids).to be_empty, <<~MSG
182
+ The following runnables in #{suite.short_id_file_path} are missing short_ids:
183
+ #{missing_ids.join(', ')}
184
+ MSG
185
+ end
186
+ end
187
+
188
+ it 'does not contain any extra short ids' do
189
+ suites.each do |suite|
190
+ short_id_map = suite.short_id_map.dup
191
+ next unless short_id_map
192
+
193
+ runnable_ids = suite.all_descendants.map(&:id)
194
+ extra_ids = short_id_map.keys - runnable_ids
195
+
196
+ expect(extra_ids).to be_empty, <<~MSG
197
+ #{suite.short_id_file_path} contains the following ids which do not belong
198
+ to any runnable: #{extra_ids.join(', ')}
199
+ MSG
200
+ end
201
+ end
202
+ end
171
203
  end
172
204
 
173
205
  describe 'presets' do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: inferno_core
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.9
4
+ version: 0.6.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stephen MacVicar
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2025-04-18 00:00:00.000000000 Z
13
+ date: 2025-05-30 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: activesupport
@@ -320,6 +320,20 @@ dependencies:
320
320
  - - "~>"
321
321
  - !ruby/object:Gem::Version
322
322
  version: '13.0'
323
+ - !ruby/object:Gem::Dependency
324
+ name: roo
325
+ requirement: !ruby/object:Gem::Requirement
326
+ requirements:
327
+ - - "~>"
328
+ - !ruby/object:Gem::Version
329
+ version: 2.10.1
330
+ type: :runtime
331
+ prerelease: false
332
+ version_requirements: !ruby/object:Gem::Requirement
333
+ requirements:
334
+ - - "~>"
335
+ - !ruby/object:Gem::Version
336
+ version: 2.10.1
323
337
  - !ruby/object:Gem::Dependency
324
338
  name: sequel
325
339
  requirement: !ruby/object:Gem::Requirement
@@ -405,6 +419,8 @@ files:
405
419
  - lib/inferno/apps/cli.rb
406
420
  - lib/inferno/apps/cli/console.rb
407
421
  - lib/inferno/apps/cli/evaluate.rb
422
+ - lib/inferno/apps/cli/evaluate/database.yml
423
+ - lib/inferno/apps/cli/evaluate/docker-compose.evaluate.yml
408
424
  - lib/inferno/apps/cli/execute.rb
409
425
  - lib/inferno/apps/cli/execute/console_outputter.rb
410
426
  - lib/inferno/apps/cli/execute/json_outputter.rb
@@ -414,6 +430,8 @@ files:
414
430
  - lib/inferno/apps/cli/main.rb
415
431
  - lib/inferno/apps/cli/migration.rb
416
432
  - lib/inferno/apps/cli/new.rb
433
+ - lib/inferno/apps/cli/requirements.rb
434
+ - lib/inferno/apps/cli/requirements_exporter.rb
417
435
  - lib/inferno/apps/cli/services.rb
418
436
  - lib/inferno/apps/cli/suite.rb
419
437
  - lib/inferno/apps/cli/suite_input_template.rb
@@ -450,11 +468,12 @@ files:
450
468
  - lib/inferno/apps/cli/templates/docs/_Footer.md
451
469
  - lib/inferno/apps/cli/templates/docs/_Sidebar.md
452
470
  - lib/inferno/apps/cli/templates/lib/%library_name%.rb.tt
471
+ - lib/inferno/apps/cli/templates/lib/%library_name%/example_suite.rb.tt
472
+ - lib/inferno/apps/cli/templates/lib/%library_name%/example_suite/patient_group.rb.tt
453
473
  - lib/inferno/apps/cli/templates/lib/%library_name%/igs/.keep
454
474
  - lib/inferno/apps/cli/templates/lib/%library_name%/igs/README.md
455
475
  - lib/inferno/apps/cli/templates/lib/%library_name%/igs/put_ig_package_dot_tgz_here
456
476
  - lib/inferno/apps/cli/templates/lib/%library_name%/metadata.rb.tt
457
- - lib/inferno/apps/cli/templates/lib/%library_name%/patient_group.rb.tt
458
477
  - lib/inferno/apps/cli/templates/lib/%library_name%/suite.rb.tt
459
478
  - lib/inferno/apps/cli/templates/lib/%library_name%/version.rb.tt
460
479
  - lib/inferno/apps/cli/templates/run.sh
@@ -533,6 +552,7 @@ files:
533
552
  - lib/inferno/dsl/fhir_client_builder.rb
534
553
  - lib/inferno/dsl/fhir_evaluation/config.rb
535
554
  - lib/inferno/dsl/fhir_evaluation/dataset_loader.rb
555
+ - lib/inferno/dsl/fhir_evaluation/default.yml
536
556
  - lib/inferno/dsl/fhir_evaluation/evaluation_context.rb
537
557
  - lib/inferno/dsl/fhir_evaluation/evaluation_result.rb
538
558
  - lib/inferno/dsl/fhir_evaluation/evaluator.rb
@@ -568,6 +588,7 @@ files:
568
588
  - lib/inferno/dsl/results.rb
569
589
  - lib/inferno/dsl/resume_test_route.rb
570
590
  - lib/inferno/dsl/runnable.rb
591
+ - lib/inferno/dsl/short_id_manager.rb
571
592
  - lib/inferno/dsl/suite_endpoint.rb
572
593
  - lib/inferno/dsl/suite_option.rb
573
594
  - lib/inferno/dsl/suite_requirements.rb
@@ -598,6 +619,7 @@ files:
598
619
  - lib/inferno/ext/fhir_models.rb
599
620
  - lib/inferno/ext/json_parser.rb
600
621
  - lib/inferno/ext/rack.rb
622
+ - lib/inferno/feature.rb
601
623
  - lib/inferno/jobs.rb
602
624
  - lib/inferno/jobs/execute_test_run.rb
603
625
  - lib/inferno/jobs/invoke_validator_session.rb
@@ -653,7 +675,6 @@ files:
653
675
  - spec/factories/result.rb
654
676
  - spec/factories/test_run.rb
655
677
  - spec/factories/test_session.rb
656
- - spec/features_helper.rb
657
678
  - spec/fixtures/auth_info_constants.rb
658
679
  - spec/fixtures/basic_test_group.rb
659
680
  - spec/fixtures/basic_test_suite.rb
@@ -1,44 +0,0 @@
1
- module <%= module_name %>
2
- class PatientGroup < Inferno::TestGroup
3
- title 'Patient Tests'
4
- description 'Verify that the server makes Patient resources available'
5
- id :patient_group
6
-
7
- test do
8
- title 'Server returns requested Patient resource from the Patient read interaction'
9
- description %(
10
- Verify that Patient resources can be read from the server.
11
- )
12
-
13
- input :patient_id,
14
- title: 'Patient ID'
15
-
16
- # Named requests can be used by other tests
17
- makes_request :patient
18
-
19
- run do
20
- fhir_read(:patient, patient_id, name: :patient)
21
-
22
- assert_response_status(200)
23
- assert_resource_type(:patient)
24
- assert resource.id == patient_id,
25
- "Requested resource with id #{patient_id}, received resource with id #{resource.id}"
26
- end
27
- end
28
-
29
- test do
30
- title 'Patient resource is valid'
31
- description %(
32
- Verify that the Patient resource returned from the server is a valid FHIR resource.
33
- )
34
- # This test will use the response from the :patient request in the
35
- # previous test
36
- uses_request :patient
37
-
38
- run do
39
- assert_resource_type(:patient)
40
- assert_valid_resource
41
- end
42
- end
43
- end
44
- end
@@ -1,12 +0,0 @@
1
- # Require this file for feature tests
2
- require_relative 'spec_helper'
3
-
4
- require 'capybara'
5
- require 'capybara/rspec'
6
-
7
- RSpec.configure do |config|
8
- config.include RSpec::FeatureExampleGroup
9
-
10
- config.include Capybara::DSL, feature: true
11
- config.include Capybara::RSpecMatchers, feature: true
12
- end