Skip to content

Commit b7e05ad

Browse files
committed
backed out of relationships for now but fixed broken tests around isGranule
1 parent 6b04ba1 commit b7e05ad

File tree

4 files changed

+4
-60
lines changed

4 files changed

+4
-60
lines changed

schemas-analyze/src/main/java/org/cedar/schemas/analyze/Analyzers.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,6 @@ public static Analysis analyze(Discovery discovery) {
6464
}
6565
return Analysis.newBuilder()
6666
.setIdentification(analyzeIdentifiers(discovery))
67-
//.setRelationships(analyzeRelationships()) // FIXME -- this would require access to the larger ParsedRecord + substantial code changes
6867
.setTemporalBounding(analyzeTemporalBounding(discovery))
6968
.setSpatialBounding(analyzeSpatialBounding(discovery))
7069
.setTitles(analyzeTitles(discovery))

schemas-analyze/src/test/groovy/org/cedar/schemas/analyze/AnalyzersSpec.groovy

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ class AnalyzersSpec extends Specification {
253253
!result.parentIdentifierExists
254254
result.parentIdentifierString == null
255255
!result.hierarchyLevelNameExists
256-
result.matchesIdentifiers
256+
!result.isGranule
257257
}
258258

259259
def "detects mismatch between metadata type and corresponding identifiers"() {
@@ -275,7 +275,7 @@ class AnalyzersSpec extends Specification {
275275
!result.parentIdentifierExists
276276
result.parentIdentifierString == null
277277
result.hierarchyLevelNameExists
278-
!result.matchesIdentifiers
278+
!result.isGranule
279279
}
280280

281281
def 'handles analysis of #testCase strings'() {

schemas-core/src/main/resources/avro/psi/analysis.avsc

Lines changed: 0 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -90,61 +90,6 @@
9090
],
9191
"default": null
9292
},
93-
{
94-
"name": "relationships",
95-
"doc": "Assessment of the relationships identified in the metadata.",
96-
"type": [
97-
"null",
98-
{
99-
"type": "record",
100-
"name": "RelationshipAnalysis",
101-
"fields": [
102-
{
103-
"name": "hasRelationships",
104-
"type": [
105-
"null",
106-
"boolean"
107-
],
108-
"default": null,
109-
"doc": "Indicates if a record has any identified relationships"
110-
},
111-
{
112-
"name": "relationships",
113-
"doc": "Summary of associated relationship RecordTypes and corresponding counts",
114-
"type": {
115-
"type": "array",
116-
"items": {
117-
"name": "RelationshipAnalysisElement",
118-
"type": "record",
119-
"fields": [
120-
{
121-
"name": "type",
122-
"type": [
123-
"null",
124-
"RelationshipType"
125-
],
126-
"default": null,
127-
"doc": "RecordType of associated relationship(s)."
128-
},
129-
{
130-
"name": "count",
131-
"type": [
132-
"null",
133-
"int"
134-
],
135-
"default": null,
136-
"doc": "Count of associated relationships for the given RecordType."
137-
}
138-
]
139-
}
140-
},
141-
"default": []
142-
}
143-
]
144-
}
145-
],
146-
"default": null
147-
},
14893
{
14994
"name": "titles",
15095
"doc": "Assessment of the titles in the metadata.",

schemas-core/src/test/resources/example-record-avro.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -470,8 +470,8 @@
470470
"hierarchyLevelNameExists": {
471471
"boolean": false
472472
},
473-
"matchesIdentifiers": {
474-
"boolean": true
473+
"isGranule": {
474+
"boolean": false
475475
}
476476
}
477477
},

0 commit comments

Comments
 (0)