Skip to content

Commit

Permalink
Format the YAML test file so round tripped version will match
Browse files Browse the repository at this point in the history
  • Loading branch information
JeremyMcCormick committed Feb 24, 2025
1 parent 98a16fa commit 1af26bc
Showing 1 changed file with 76 additions and 71 deletions.
147 changes: 76 additions & 71 deletions tests/data/test_serialization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,77 +3,82 @@ name: test_serialization
description: Schema for testing serialization
version:
current: v1
compatible: ['v1', 'v2']
read_compatible: ['v1', 'v2', 'v3']
compatible:
- v1
- v2
read_compatible:
- v1
- v2
- v3
tables:
- name: test_table
"@id": "#test_table"
description: Test table
primaryKey: "#test_table.id"
- name: test_table
'@id': '#test_table'
description: Test table
primaryKey: '#test_table.id'
columns:
- name: id
'@id': '#test_table.id'
description: id column
datatype: int
- name: test_column
'@id': '#test_table.test_column'
description: Test column's description
datatype: string
length: 64
ivoa:ucd: meta
ivoa:unit: ''
tap:column_index: 999
tap:principal: 1
votable:arraysize: 64*
- name: test_column2
'@id': '#test_table.test_column2'
description: Test column 2
datatype: double
ivoa:unit: m
- name: test_column3
'@id': '#test_table.test_column3'
description: Test column 3
datatype: int
columnGroups:
- name: test_column_group
'@id': '#test_table.test_column_group'
description: Test column group
votable:utype: stc:CatalogEntryLocation
columns:
- name: id
'@id': '#test_table.id'
datatype: int
description: id column
- name: test_column
'@id': '#test_table.test_column'
datatype: string
length: 64
description: Test column's description
votable:arraysize: 64*
ivoa:ucd: meta
tap:principal: 1
tap:column_index: 999
ivoa:unit: ''
- name: test_column2
'@id': '#test_table.test_column2'
datatype: double
description: Test column 2
ivoa:unit: m
- name: test_column3
'@id': '#test_table.test_column3'
datatype: int
description: Test column 3
columnGroups:
- name: test_column_group
'@id': '#test_table.test_column_group'
description: Test column group
votable:utype: stc:CatalogEntryLocation
columns:
- '#test_table.test_column'
constraints:
- name: test_unique_constraint
'@type': Unique
'@id': '#test_table.test_constraint'
description: Test unique constraint
columns:
- '#test_table.test_column'
- name: test_fk_constraint
'@type': ForeignKey
'@id': '#test_table.test_fk_constraint'
description: Test foreign key constraint
columns:
- '#test_table.test_column'
referencedColumns:
- '#test_table2.id'
- name: test_check_constraint
'@type': Check
'@id': '#test_table.test_check_constraint'
description: Test check constraint
expression: test_column2 > 0
deferrable: true
initially: IMMEDIATE
indexes:
- name: test_index
'@id': '#test_table.test_index'
description: Test index
columns:
- '#test_table.test_column'
- name: test_table2
"@id": "#test_table2"
description: Test table 2
primaryKey: "#test_table2.id"
- '#test_table.test_column'
constraints:
- name: test_unique_constraint
'@id': '#test_table.test_constraint'
description: Test unique constraint
'@type': Unique
columns:
- name: id
'@id': '#test_table2.test_column2'
datatype: int
- '#test_table.test_column'
- name: test_fk_constraint
'@id': '#test_table.test_fk_constraint'
description: Test foreign key constraint
'@type': ForeignKey
columns:
- '#test_table.test_column'
referencedColumns:
- '#test_table2.id'
- name: test_check_constraint
'@id': '#test_table.test_check_constraint'
description: Test check constraint
deferrable: true
initially: IMMEDIATE
'@type': Check
expression: test_column2 > 0
indexes:
- name: test_index
'@id': '#test_table.test_index'
description: Test index
columns:
- '#test_table.test_column'
- name: test_table2
'@id': '#test_table2'
description: Test table 2
primaryKey: '#test_table2.id'
columns:
- name: id
'@id': '#test_table2.test_column2'
datatype: int

0 comments on commit 1af26bc

Please sign in to comment.