Skip to content

Commit 5f92775

Browse files
author
CITnet Bamboo
committed
commit from estat bitbucket v5.0.0
1 parent aa5c2f8 commit 5f92775

File tree

244 files changed

+71648
-178527
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

244 files changed

+71648
-178527
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
/**/node_modules
22
/**/.vscode
3+
.idea

CHANGELOG.md

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# HISTORY
2+
## sdmx-tck-modules v5.0.0 (2025-06-24)
3+
- Introduce new tests for `attributes` parameter, e.g. all, none, dsd, msd, dataset, series, obs, {attribute_id} and implement semantic checks that verify whether the returned attributes aling with the specified `attributes` parameter.
4+
- Introduce new tests for the `measures` parameter (e.g., all, none, specific {measure_id}) and implement semantic checks to ensure that the measures in the returned dataset are consistent with the `measures` parameter.
5+
- Adapt SDMX 3.0 dataset reader to handle complex measures and attributes.
6+
- Parse attributeRelationship and measureRelationship from the SDMX 3.0 message; Extract the component's ID - if it's not explicitly defined - from the ConceptIdentity.
7+
8+
## sdmx-tck-modules v4.9.0 (2025-04-14)
9+
- Introduce support for REST API version v2.1.0 and data registrations. A new test index, Registration, has been created, containing 14 tests for data registration functionality.
10+
11+
## sdmx-tck-modules v4.8.0 (2024-12-05)
12+
- Introduce structure tests to support multiple values for AGENCY, ID and VERSION, using the OR separator.
13+
- Handle Geospatial specialised code lists (i.e., GeographicCodelist and GeoGridCodelist) when parsing codelists.
14+
- Support parameter value ancestors for the `references` parameter.
15+
16+
## sdmx-tck-modules v4.7.0 (2024-03-26)
17+
18+
### Details
19+
- Adapt the existing tests and introduce new ones within the "Structure Further Describing Results Parameters" category that work with REST api version 2.0.
20+
21+
## sdmx-tck-modules v4.6.0 (2024-03-07)
22+
23+
### Details
24+
25+
- Adjust data extended identification tests to support REST 2.0 and SDMX 3.0. Added support for many keys using filters for dimension values.
26+
27+
- Introduced key identifier for tests because the existing URL used as identifier was not sufficient to describe the same test for different REST api versions.
28+
29+
- Minor fix in the creation of testId for data availability tests.
30+
31+
- Organised unit tests for SDMX-ML structure parsers.
32+
33+
- Added fix for <code>/hierarchicalcodelist/agency/id/version/items</code> test, as proposed by Oleksandr Buhaiov (buhaiovos)). The test was failing because hierarchies were not parsed and the code was not able to select the two hierarchies required by the specific test in order to run.
34+
35+
- Fix handling of 406 response code for represenation tests with invalid/not supported represenation type (fix proposed by Oleksandr Buhaiov (buhaiovos)).
36+
37+
- Fixed a bug in handling of 'structure' request type parameter. The process of randomly selecting a structure based on its type was not suitable for the 'structure' resource and has been appropriately addressed.
38+
39+
- Resolved a bug affecting the semantic checking of structure identification tests specifically when the requested REST resource is 'structure'.
40+
41+
## sdmx-tck-modules v4.5.0 (2024-02-22)
42+
43+
### Details
44+
45+
//TODO
Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
@startuml StrcuctureTestExecutionManager_SequenceDiagram
2+
3+
skinparam sequence {
4+
' ArrowColor DeepSkyBlue
5+
' ActorBorderColor DeepSkyBlue
6+
LifeLineBorderColor blue
7+
LifeLineBackgroundColor #A9DCDF
8+
ParticipantBorderColor DeepSkyBlue
9+
ParticipantBackgroundColor #cfe4ff
10+
ParticipantFontName Consolas
11+
ParticipantFontSize 14
12+
' ParticipantFontColor #A9DCDF
13+
' ActorBackgroundColor aqua
14+
' ActorFontColor #A9DCDF
15+
ActorFontSize 14
16+
ActorFontName Consolas
17+
}
18+
actor User as u
19+
participant "StructureTestExecutionManager" as STM
20+
participant "StructureRequestBuilder" as SRB
21+
box sdmx-rest4js
22+
participant "UrlGenerator" as UG
23+
participant "sdmx_requestor" as SR
24+
end box
25+
participant "ResponseValidator" as RV
26+
participant "SdmxXmlParser" as SXP
27+
participant "SemanticCheckerFactory" as SCF
28+
29+
u -> STM: executeTest(test, apiVersion, endpoint)
30+
activate STM
31+
' alt testType = STRUCTURE_REFERENCE_PARTIAL
32+
' STM -> STM: identifiers = ContentConstraintTypeValidator.getContentConstraintOfAllowedType(toRun)
33+
' end
34+
35+
' TODO: prepareRequest to be further broken down.
36+
STM -> SRB: prepareRequest(endpoint, apiVersion, resource, ...)
37+
activate SRB
38+
SRB --> STM: preparedRequest
39+
deactivate SRB
40+
41+
STM -> UG: getUrl(query, service, skipDefaults=true)
42+
activate UG
43+
UG --> STM: url
44+
deactivate UG
45+
46+
STM -> SR: request2(url, preparedRequest.headers)
47+
activate SR
48+
SR --> STM: httpResponse
49+
deactivate SR
50+
51+
group HTTP Validation
52+
' validateHttpResponse to be further broken down
53+
STM -> RV: validateHttpResponse(preparedRequest.request, httpResponse)
54+
activate RV
55+
RV --> STM: HTTP Validation outcome
56+
deactivate RV
57+
break HTTP Validation failed
58+
STM --> STM: throw TckError("HTTP validation failed")
59+
end
60+
61+
alt testType == 'Structure Query Representation'
62+
STM -> RV: validateRepresentation(representation, httpResponse, apiVersion)
63+
activate RV
64+
RV --> STM: HTTP Validation outcome
65+
deactivate RV
66+
break Validation failed
67+
STM --> STM: throw TckError("HTTP validation failed")
68+
end
69+
STM --> u: Test Results
70+
end
71+
end
72+
73+
STM -> SXP: getIMObjects(httpResponse, apiVersion)
74+
activate SXP
75+
SXP --> STM: workspace
76+
deactivate SXP
77+
78+
group Workspace Validation
79+
STM -> SCF: getChecker(test).checkWorkspace(test, preparedRequest, workspace)
80+
activate SCF
81+
SCF --> STM: workspaceValidation
82+
deactivate SCF
83+
break Workspace Validation Failed
84+
STM --> STM: throw TckError("Workspace validation failed")
85+
end
86+
end
87+
STM --> u: Test Results
88+
deactivate STM
89+
@enduml
Lines changed: 209 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,209 @@
1+
@startuml "TCKManager_PackageDiagram"
2+
3+
component sdmx-tck-manager as sdmx_tck_manager #ddd {
4+
package "Package manager" as manager #fff {
5+
left to right direction
6+
class TestExecutionManagerFactory {
7+
+ getTestsManager(index) : TestExecutionManager
8+
}
9+
class StructureTestExecutionManager {
10+
+ executeTest(test, apiVersion, endpoint): Promise
11+
}
12+
class SchemaTestExecutionManager {
13+
+ executeTest(test, apiVersion, endpoint): Promise
14+
}
15+
class DataTestsExecutionManager {
16+
+ executeTest(test, apiVersion, endpoint): Promise
17+
}
18+
}
19+
' Relationships
20+
TestExecutionManagerFactory --> StructureTestExecutionManager : <<returns>>
21+
TestExecutionManagerFactory --> SchemaTestExecutionManager : <<returns>>
22+
TestExecutionManagerFactory --> DataTestsExecutionManager : <<returns>>
23+
}
24+
25+
newpage
26+
component sdmx-tck-manager #ddd {
27+
' skinparam linetype ortho
28+
skinparam linetype polyline
29+
skinparam SameClassWidth true
30+
left to right direction
31+
32+
package "Package checker" as checker #fff {
33+
class SemanticCheckerFactory {
34+
+ getChecker(test): SemanticChecker
35+
}
36+
class DataSemanticChecker {
37+
+ checkWorkspace(test, request, workspace): Promise
38+
- _checkResourceIdentification(test, query, workspace) : Object
39+
- _checkProviderIdentification(test, query, workspace) : Object
40+
- _checkIdentification(test, query, workspace) : Object
41+
- _checkExtendedResourceIdentification(test, query, workspace) : Object
42+
- _validateSeriesAgainstKey(test, query, workspace) : Object
43+
- _checkFurtherDescribingResults(test, query, workspace) : Object
44+
- _checkDimensionAtObservation(test, query, workspace) : Object
45+
- _validateAttributesPositioning(workspace, test) : Object
46+
- _validateDimAtObsTimePeriod(workspace) : Object
47+
- _validateDimAtObsDimension(workspace, dimensionAtObservationId) : Object
48+
- _validateDimAtObsAllDimensions(workspace) : Object
49+
- _validateDimAtObsNotProvided(workspace, test) : Object
50+
- _checkDetail(test, workspace) : Object
51+
- _checkPeriods(periods, workspace) : Object
52+
- _checkObservations(test, query, workspace) : Object
53+
- _checkDataAvailability(test, query, workspace) : Object
54+
- _checkModeExact(test, query, constraint) : Object
55+
- _checkModeAvailable(test, query, constraint) : Object
56+
- _checkTemporalCoverage(test, constraint) : Object
57+
- _checkMetrics(constraint) : Object
58+
- _checkSingleDimension(test, query, constraint) : Object
59+
- _checkReferences(test, query, workspace, constraint) : Object
60+
- _checkReferencedDSD(test, query, workspace, constraint) : Object
61+
- _checkReferencedDF(test, query, workspace, constraint) : Object
62+
- _checkReferencedCodelists(test, workspace, constraint) : Object
63+
- _findNotUsedCodes(allCodes, keyValues) : Array
64+
- _findParents(codelistCodes, code, parents) : Array
65+
- _checkReferencedConceptSchemes(test, query, workspace, constraint) : Object
66+
- _checkReferencedProviderScheme(test, query, workspace) : Object
67+
- _checkAllReferences(test, query, workspace, constraint) : Object
68+
}
69+
class SchemasSemanticChecker {
70+
+ checkWorkspace(test, request, workspace): Promise
71+
- checkXSDComponents(test, query, workspace) :
72+
- checkDefaultRules(dsdObject, workspace, dimensionAtObservation) : Object
73+
- checkXSDSimpleTypes(test, query, dsdObject, workspace) : Object
74+
- checkXSDSimpleTypesWithoutEnums(dsdObject, workspace) : Object
75+
- checkXSDSimpleTypesWithEnums(test, query, dsdObject, workspace) : Object
76+
- validateKeyValueAgainstSimpleTypeEnum(workspace, keyValue, constraintObj) : Object
77+
- checkXSDComplexTypes(test, dsdObject, query, workspace, dimensionAtObservation) : Object
78+
- checkXSDDataSetType(test, dsdObject, workspace, dimensionAtObservation) : Object
79+
- checkXSDSeriesType(test, dsdObject, workspace, dimensionAtObservation) : Object
80+
- checkXSDGroupType(test, dsdObject, workspace, dimensionAtObservation) : Object
81+
- checkXSDAbstractGroupType(dsdObject, workspace) : Object
82+
- checkSimpleTypeGroupID(dsdObject, workspace) : Object
83+
- checkSpecificXSDGroupType(test, dsdObject, workspace) : Object
84+
- checkXSDObsType(test, dsdObject, query, sdmxObjects, dimensionAtObservation) : Object
85+
- checkObsTypeContentModel(test, dsdObject, query, sdmxObjects, dimensionAtObservation) : Object
86+
- checkComplexTypesOfMeasureDimensionConcepts(test, dsdObject, sdmxObjects) : Object
87+
}
88+
class ContentConstraintReferencePartialChecker {
89+
+ checkWorkspace(test, request, workspace): Promise
90+
- getDataFromConstraint(workspace, constraint) : Object
91+
- constraintValuesValidation(keyValue, codesArray, constraint) : boolean
92+
- checkReferencePartialTestWorkspace(workspace, keyValueData, codeListRef, constraint) : Object
93+
- getDsdFromConstrainable(workspace, constrainableArtefactRef) : Object
94+
- referencepartialTestBuilder(test, constrainable) : Object
95+
- getRefOfSpecificStructureType(childrenRefs, structureType) : StructureReference
96+
}
97+
class StructuresSemanticChecker {
98+
+ checkWorkspace(test, request, workspace) : Promise
99+
+ checkIdentification(query, workspace) : Object
100+
- _exactlyOneArtefactWithCorrectNumOfItems(workspace, structureType, ...) : Object
101+
- _exactlyOneArtefact(workspace, structureType, agencyId, id, version) : Object
102+
- _atLeastOneArtefact(workspace, structureType, agencyId, id, version) : object
103+
+ checkReferences(query, workspace) : object
104+
- _getParents(workspace, structureObject, structureRef) : Array
105+
- _getParentsSiblings(workspace, structureObject, structureRef) : Array
106+
- _getChildren(workspace, structureObject) : Array
107+
- _getDescendants(workspace, structureObject) : Array
108+
- _getAll(workspace, structureObject, structureRef) : Array
109+
- _getParentsChildren(workspace, structureObject, structureRef) : Array
110+
+ checkDetails(query, workspace) : Object
111+
- _checkIfPartial(structureRef, itemScheme) : boolean
112+
+ checkTargetCategory(query, workspace) : Object
113+
- _checkCategorisationIds(workspace, item) : Object
114+
}
115+
class HttpResponseValidator {
116+
+ validateHttpResponse(query, httpResponse) : Promise
117+
+ validateRepresentation(requestedRepresentation, response, apiVersion) : Promise
118+
- checkEmptyRepresentationTestResponse(response) : Void
119+
- validateOtherHeaders(template, response) : Object
120+
- checkCompression(response) : Void
121+
- checkCaching(response) : Void
122+
}
123+
class ContentConstraintTypeValidator {
124+
+ getContentConstraintOfAllowedType(test) : Object
125+
+ changeContentConstraintIfNeeded(test,parentWorkspaceObj) : Object
126+
}
127+
' Relationships
128+
SemanticCheckerFactory --> StructuresSemanticChecker : <<returns>>
129+
SemanticCheckerFactory --> ContentConstraintReferencePartialChecker : <<returns>>
130+
SemanticCheckerFactory --> SchemasSemanticChecker : <<returns>>
131+
SemanticCheckerFactory --> DataSemanticChecker : <<returns>>
132+
' Hidden Relationships
133+
StructuresSemanticChecker -[hidden]- HttpResponseValidator
134+
StructuresSemanticChecker -[hidden]- ContentConstraintTypeValidator
135+
}
136+
}
137+
newpage
138+
component sdmx-tck-manager #ddd {
139+
' This class diagram contains the classes of checker package but without private methods.
140+
' skinparam linetype ortho
141+
skinparam linetype polyline
142+
skinparam SameClassWidth true
143+
left to right direction
144+
145+
package "Package checker" as checker #fff {
146+
class SemanticCheckerFactory {
147+
+ getChecker(test): SemanticChecker
148+
}
149+
class DataSemanticChecker {
150+
+ checkWorkspace(test, request, workspace): Promise
151+
}
152+
class SchemasSemanticChecker {
153+
+ checkWorkspace(test, request, workspace): Promise
154+
}
155+
class ContentConstraintReferencePartialChecker {
156+
+ checkWorkspace(test, request, workspace): Promise
157+
}
158+
class StructuresSemanticChecker {
159+
+ checkWorkspace(test, request, workspace) : Promise
160+
}
161+
class HttpResponseValidator {
162+
+ validateHttpResponse(query, httpResponse) : Promise
163+
+ validateRepresentation(requestedRepresentation, response, apiVersion) : Promise
164+
}
165+
class ContentConstraintTypeValidator {
166+
+ getContentConstraintOfAllowedType(test) : Object
167+
}
168+
' Relationships
169+
SemanticCheckerFactory --> StructuresSemanticChecker : <<returns>>
170+
SemanticCheckerFactory --> ContentConstraintReferencePartialChecker : <<returns>>
171+
SemanticCheckerFactory --> SchemasSemanticChecker : <<returns>>
172+
SemanticCheckerFactory --> DataSemanticChecker : <<returns>>
173+
' Hidden Relationships
174+
StructuresSemanticChecker -[hidden]- HttpResponseValidator
175+
StructuresSemanticChecker -[hidden]- ContentConstraintTypeValidator
176+
}
177+
}
178+
179+
' package "Package builders" as builders #fff {
180+
' left to right direction
181+
' class TestsModelBuilder {
182+
183+
' }
184+
' package "Package data-queries-builders" as data_queries_builders #fff {
185+
' class DataAvailabilityTestBuilder {
186+
' + getTests(index, x, apiVersion): []
187+
' }
188+
' class DataExtendedResourceIdentificationTestBuilder {
189+
' + getTests(index, x, apiVersion): []
190+
' }
191+
' class DataFurtherDescribingResultsTestBuilder {
192+
' + getTests(index, x, apiVersion): []
193+
' }
194+
' class DataIdentificationParametersTestBuilder {
195+
' + getTests(index, x, apiVersion): []
196+
' }
197+
' class DataOtherFeatureTestBuilder {
198+
' + getTests(index, x, apiVersion): []
199+
' }
200+
' package "Package schema-queries-builders" as schema_queries_builders #fff {
201+
202+
' }
203+
' package "Package structure-queries-builders" as structure_queries_builders #fff {
204+
205+
' }
206+
' }
207+
'manager -[hidden]right--- checker
208+
209+
@enduml

Dockerfile

Lines changed: 0 additions & 33 deletions
This file was deleted.

0 commit comments

Comments
 (0)