-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #302 from sneakers-the-rat/bugfix-schemaview-impor…
…t-order Fix `Schemaview.import_closure` order
- Loading branch information
Showing
18 changed files
with
511 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
A tree of imports like: | ||
|
||
``` | ||
main | ||
|- linkml:types | ||
|- s1 | ||
| |- s1_1 | ||
| |- s1_2 | ||
| |- s1_2_1 | ||
| |- s1_2_1_1 | ||
| |- s1_2_1_1_1 | ||
| |- s1_2_1_1_2 | ||
|- s2 | ||
| |- s2_1 | ||
| |- s2_2 | ||
|- s3 | ||
|- s3_1 | ||
|- s3_2 | ||
``` | ||
|
||
This is used to test SchemaView's logic for complex import hierarchies, | ||
eg. | ||
- overrides | ||
- imports closure completeness | ||
- (at some point) monotonicity | ||
- etc. | ||
|
||
Currently, each schema... | ||
- Contains one `Main` class with a value whose default is overridden to indicate which module defined it, this is used to test overrides. | ||
- Contains a class like `S2` that carries the name of the module to ensure that unique classes are gotten from the whole tree | ||
- Each node in the tree outwards from `main` will carry the 'special classes' from the parents, overriding them as with `main` to | ||
get a more detailed picture of override order: eg. `s1_2_1` will also define `S1_2` and override its `ifabsent` field, | ||
which `S1_2` should override since it's the importing schema. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
id: main | ||
name: main | ||
title: main | ||
imports: | ||
- linkml:types | ||
- s1 | ||
- s2 | ||
- s3 | ||
classes: | ||
Main: | ||
description: "The class we use to test overrides on imports!" | ||
attributes: | ||
value: | ||
range: string | ||
ifabsent: "Main" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
id: s1 | ||
name: s1 | ||
title: s1 | ||
imports: | ||
- linkml:types | ||
- s1_1 | ||
- s1_2 | ||
classes: | ||
Main: | ||
description: "The class we use to test overrides on imports!" | ||
attributes: | ||
value: | ||
range: string | ||
ifabsent: "S1" | ||
S1: | ||
description: "A class from one of the imported classes!" | ||
attributes: | ||
value: | ||
range: string | ||
ifabsent: "S1" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
id: s1_1 | ||
name: s1_1 | ||
title: s1_1 | ||
imports: | ||
- linkml:types | ||
classes: | ||
Main: | ||
description: "The class we use to test overrides on imports!" | ||
attributes: | ||
value: | ||
range: string | ||
ifabsent: "S1_1" | ||
S1: | ||
description: "A class from one of the imported classes!" | ||
attributes: | ||
value: | ||
range: string | ||
ifabsent: "S1_1" | ||
S1_1: | ||
description: "A class from one of the imported classes!" | ||
attributes: | ||
value: | ||
range: string | ||
ifabsent: "S1_1" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
id: s1_2 | ||
name: s1_2 | ||
title: s1_2 | ||
imports: | ||
- linkml:types | ||
- s1_2_1 | ||
classes: | ||
Main: | ||
description: "The class we use to test overrides on imports!" | ||
attributes: | ||
value: | ||
range: string | ||
ifabsent: "S1_2" | ||
S1: | ||
description: "A class from one of the imported classes!" | ||
attributes: | ||
value: | ||
range: string | ||
ifabsent: "S1_2" | ||
S1_2: | ||
description: "A class from one of the imported classes!" | ||
attributes: | ||
value: | ||
range: string | ||
ifabsent: "S1_2" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
id: s1_2_1 | ||
name: s1_2_1 | ||
title: s1_2_1 | ||
imports: | ||
- linkml:types | ||
- s1_2_1_1 | ||
classes: | ||
Main: | ||
description: "The class we use to test overrides on imports!" | ||
attributes: | ||
value: | ||
range: string | ||
ifabsent: "S1_2_1" | ||
S1: | ||
description: "A class from one of the imported classes!" | ||
attributes: | ||
value: | ||
range: string | ||
ifabsent: "S1_2_1" | ||
S1_2: | ||
description: "A class from one of the imported classes!" | ||
attributes: | ||
value: | ||
range: string | ||
ifabsent: "S1_2_1" | ||
S1_2_1: | ||
description: "A class from one of the imported classes!" | ||
attributes: | ||
value: | ||
range: string | ||
ifabsent: "S1_2_1" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
id: s1_2_1_1 | ||
name: s1_2_1_1 | ||
title: s1_2_1_1 | ||
imports: | ||
- linkml:types | ||
- s1_2_1_1_1 | ||
- s1_2_1_1_2 | ||
classes: | ||
Main: | ||
description: "The class we use to test overrides on imports!" | ||
attributes: | ||
value: | ||
range: string | ||
ifabsent: "S1_2_1_1" | ||
S1: | ||
description: "A class from one of the imported classes!" | ||
attributes: | ||
value: | ||
range: string | ||
ifabsent: "S1_2_1_1" | ||
S1_2: | ||
description: "A class from one of the imported classes!" | ||
attributes: | ||
value: | ||
range: string | ||
ifabsent: "S1_2_1_1" | ||
S1_2_1: | ||
description: "A class from one of the imported classes!" | ||
attributes: | ||
value: | ||
range: string | ||
ifabsent: "S1_2_1_1" | ||
S1_2_1_1: | ||
description: "A class from one of the imported classes!" | ||
attributes: | ||
value: | ||
range: string | ||
ifabsent: "S1_2_1_1" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
id: s1_2_1_1_1 | ||
name: s1_2_1_1_1 | ||
title: s1_2_1_1_1 | ||
imports: | ||
- linkml:types | ||
classes: | ||
Main: | ||
description: "The class we use to test overrides on imports!" | ||
attributes: | ||
value: | ||
range: string | ||
ifabsent: "S1_2_1_1_1" | ||
S1: | ||
description: "A class from one of the imported classes!" | ||
attributes: | ||
value: | ||
range: string | ||
ifabsent: "S1_2_1_1_1" | ||
S1_2: | ||
description: "A class from one of the imported classes!" | ||
attributes: | ||
value: | ||
range: string | ||
ifabsent: "S1_2_1_1_1" | ||
S1_2_1: | ||
description: "A class from one of the imported classes!" | ||
attributes: | ||
value: | ||
range: string | ||
ifabsent: "S1_2_1_1_1" | ||
S1_2_1_1: | ||
description: "A class from one of the imported classes!" | ||
attributes: | ||
value: | ||
range: string | ||
ifabsent: "S1_2_1_1_1" | ||
S1_2_1_1_1: | ||
description: "A class from one of the imported classes!" | ||
attributes: | ||
value: | ||
range: string | ||
ifabsent: "S1_2_1_1_1" |
Oops, something went wrong.