From 1af26bc873cb02e14750c6cabfc937125ede7549 Mon Sep 17 00:00:00 2001 From: Jeremy McCormick Date: Mon, 24 Feb 2025 16:42:05 -0600 Subject: [PATCH] Format the YAML test file so round tripped version will match --- tests/data/test_serialization.yaml | 147 +++++++++++++++-------------- 1 file changed, 76 insertions(+), 71 deletions(-) diff --git a/tests/data/test_serialization.yaml b/tests/data/test_serialization.yaml index 7e078c8e..cb1e46a3 100644 --- a/tests/data/test_serialization.yaml +++ b/tests/data/test_serialization.yaml @@ -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