lsst-felis 26.2024.900__py3-none-any.whl → 29.2025.4500__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- felis/__init__.py +10 -24
- felis/cli.py +437 -341
- felis/config/tap_schema/columns.csv +33 -0
- felis/config/tap_schema/key_columns.csv +8 -0
- felis/config/tap_schema/keys.csv +8 -0
- felis/config/tap_schema/schemas.csv +2 -0
- felis/config/tap_schema/tables.csv +6 -0
- felis/config/tap_schema/tap_schema_std.yaml +273 -0
- felis/datamodel.py +1386 -193
- felis/db/dialects.py +116 -0
- felis/db/schema.py +62 -0
- felis/db/sqltypes.py +275 -48
- felis/db/utils.py +409 -0
- felis/db/variants.py +159 -0
- felis/diff.py +234 -0
- felis/metadata.py +385 -0
- felis/tap_schema.py +767 -0
- felis/tests/__init__.py +0 -0
- felis/tests/postgresql.py +134 -0
- felis/tests/run_cli.py +79 -0
- felis/types.py +57 -9
- lsst_felis-29.2025.4500.dist-info/METADATA +38 -0
- lsst_felis-29.2025.4500.dist-info/RECORD +31 -0
- {lsst_felis-26.2024.900.dist-info → lsst_felis-29.2025.4500.dist-info}/WHEEL +1 -1
- {lsst_felis-26.2024.900.dist-info → lsst_felis-29.2025.4500.dist-info/licenses}/COPYRIGHT +1 -1
- felis/check.py +0 -381
- felis/simple.py +0 -424
- felis/sql.py +0 -275
- felis/tap.py +0 -433
- felis/utils.py +0 -100
- felis/validation.py +0 -103
- felis/version.py +0 -2
- felis/visitor.py +0 -180
- lsst_felis-26.2024.900.dist-info/METADATA +0 -28
- lsst_felis-26.2024.900.dist-info/RECORD +0 -23
- {lsst_felis-26.2024.900.dist-info → lsst_felis-29.2025.4500.dist-info}/entry_points.txt +0 -0
- {lsst_felis-26.2024.900.dist-info → lsst_felis-29.2025.4500.dist-info/licenses}/LICENSE +0 -0
- {lsst_felis-26.2024.900.dist-info → lsst_felis-29.2025.4500.dist-info}/top_level.txt +0 -0
- {lsst_felis-26.2024.900.dist-info → lsst_felis-29.2025.4500.dist-info}/zip-safe +0 -0
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
table_name,column_name,utype,ucd,unit,description,datatype,arraysize,xtype,size,principal,indexed,std,column_index
|
|
2
|
+
tap_schema.columns,"""size""",\N,\N,\N,deprecated: use arraysize,int,\N,\N,\N,1,0,1,9
|
|
3
|
+
tap_schema.columns,arraysize,\N,\N,\N,lists the size of variable-length columns in the tableset,char,16*,\N,16,1,0,1,8
|
|
4
|
+
tap_schema.columns,column_index,\N,\N,\N,recommended sort order when listing columns of a table,int,\N,\N,\N,1,0,1,13
|
|
5
|
+
tap_schema.columns,column_name,\N,\N,\N,the column name,char,64*,\N,64,1,0,1,2
|
|
6
|
+
tap_schema.columns,datatype,\N,\N,\N,lists the ADQL datatype of columns in the tableset,char,64*,\N,64,1,0,1,7
|
|
7
|
+
tap_schema.columns,description,\N,\N,\N,describes the columns in the tableset,char,512*,\N,512,1,0,1,6
|
|
8
|
+
tap_schema.columns,indexed,\N,\N,\N,"an indexed column; 1 means 1, 0 means 0",int,\N,\N,\N,1,0,1,11
|
|
9
|
+
tap_schema.columns,principal,\N,\N,\N,"a principal column; 1 means 1, 0 means 0",int,\N,\N,\N,1,0,1,10
|
|
10
|
+
tap_schema.columns,std,\N,\N,\N,"a standard column; 1 means 1, 0 means 0",int,\N,\N,\N,1,0,1,12
|
|
11
|
+
tap_schema.columns,table_name,\N,\N,\N,the table this column belongs to,char,64*,\N,64,1,0,1,1
|
|
12
|
+
tap_schema.columns,ucd,\N,\N,\N,lists the UCDs of columns in the tableset,char,64*,\N,64,1,0,1,4
|
|
13
|
+
tap_schema.columns,unit,\N,\N,\N,lists the unit used for column values in the tableset,char,64*,\N,64,1,0,1,5
|
|
14
|
+
tap_schema.columns,utype,\N,\N,\N,lists the utypes of columns in the tableset,char,512*,\N,512,1,0,1,3
|
|
15
|
+
tap_schema.columns,xtype,\N,\N,\N,a DALI or custom extended type annotation,char,64*,\N,64,1,0,1,7
|
|
16
|
+
tap_schema.key_columns,from_column,\N,\N,\N,column in the from_table,char,64*,\N,64,1,0,1,2
|
|
17
|
+
tap_schema.key_columns,key_id,\N,\N,\N,key to join to tap_schema.keys,char,64*,\N,64,1,0,1,1
|
|
18
|
+
tap_schema.key_columns,target_column,\N,\N,\N,column in the target_table,char,64*,\N,64,1,0,1,3
|
|
19
|
+
tap_schema.keys,description,\N,\N,\N,describes keys in the tableset,char,512*,\N,512,1,0,1,5
|
|
20
|
+
tap_schema.keys,from_table,\N,\N,\N,the table with the foreign key,char,64*,\N,64,1,0,1,2
|
|
21
|
+
tap_schema.keys,key_id,\N,\N,\N,unique key to join to tap_schema.key_columns,char,64*,\N,64,1,0,1,1
|
|
22
|
+
tap_schema.keys,target_table,\N,\N,\N,the table with the primary key,char,64*,\N,64,1,0,1,3
|
|
23
|
+
tap_schema.keys,utype,\N,\N,\N,lists the utype of keys in the tableset,char,512*,\N,512,1,0,1,4
|
|
24
|
+
tap_schema.schemas,description,\N,\N,\N,describes schemas in the tableset,char,512*,\N,512,1,0,1,3
|
|
25
|
+
tap_schema.schemas,schema_index,\N,\N,\N,recommended sort order when listing schemas,int,\N,\N,\N,1,0,1,4
|
|
26
|
+
tap_schema.schemas,schema_name,\N,\N,\N,schema name for reference to tap_schema.schemas,char,64*,\N,64,1,0,1,1
|
|
27
|
+
tap_schema.schemas,utype,\N,\N,\N,lists the utypes of schemas in the tableset,char,512*,\N,512,1,0,1,2
|
|
28
|
+
tap_schema.tables,description,\N,\N,\N,describes tables in the tableset,char,512*,\N,512,1,0,1,5
|
|
29
|
+
tap_schema.tables,schema_name,\N,\N,\N,the schema this table belongs to,char,512*,\N,512,1,0,1,1
|
|
30
|
+
tap_schema.tables,table_index,\N,\N,\N,recommended sort order when listing tables,int,\N,\N,\N,1,0,1,6
|
|
31
|
+
tap_schema.tables,table_name,\N,\N,\N,the fully qualified table name,char,64*,\N,64,1,0,1,2
|
|
32
|
+
tap_schema.tables,table_type,\N,\N,\N,one of: table view,char,8*,\N,8,1,0,1,3
|
|
33
|
+
tap_schema.tables,utype,\N,\N,\N,lists the utype of tables in the tableset,char,512*,\N,512,1,0,1,4
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
key_id,from_table,target_table,utype,description
|
|
2
|
+
k1,tap_schema.tables,tap_schema.schemas,\N,\N
|
|
3
|
+
k2,tap_schema.columns,tap_schema.tables,\N,\N
|
|
4
|
+
k3,tap_schema.keys,tap_schema.tables,\N,\N
|
|
5
|
+
k4,tap_schema.keys,tap_schema.tables,\N,\N
|
|
6
|
+
k5,tap_schema.key_columns,tap_schema.keys,\N,\N
|
|
7
|
+
k6,tap_schema.key_columns,tap_schema.columns,\N,\N
|
|
8
|
+
k7,tap_schema.key_columns,tap_schema.columns,\N,\N
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
schema_name,table_name,table_type,utype,description,table_index
|
|
2
|
+
tap_schema,tap_schema.columns,table,\N,description of columns in this tableset,102000
|
|
3
|
+
tap_schema,tap_schema.key_columns,table,\N,description of foreign key columns in this tableset,104000
|
|
4
|
+
tap_schema,tap_schema.keys,table,\N,description of foreign keys in this tableset,103000
|
|
5
|
+
tap_schema,tap_schema.schemas,table,\N,description of schemas in this tableset,100000
|
|
6
|
+
tap_schema,tap_schema.tables,table,\N,description of tables in this tableset,101000
|
|
@@ -0,0 +1,273 @@
|
|
|
1
|
+
name: TAP_SCHEMA
|
|
2
|
+
version: "1.1"
|
|
3
|
+
description: A TAP-standard-mandated schema to describe tablesets in a TAP 1.1 service
|
|
4
|
+
tables:
|
|
5
|
+
- name: "schemas"
|
|
6
|
+
description: description of schemas in this tableset
|
|
7
|
+
primaryKey: "#schemas.schema_name"
|
|
8
|
+
tap:table_index: 100000
|
|
9
|
+
mysql:engine: "InnoDB"
|
|
10
|
+
columns:
|
|
11
|
+
- name: "schema_name"
|
|
12
|
+
datatype: "string"
|
|
13
|
+
description: schema name for reference to tap_schema.schemas
|
|
14
|
+
length: 64
|
|
15
|
+
nullable: false
|
|
16
|
+
tap:principal: 1
|
|
17
|
+
tap:std: 1
|
|
18
|
+
tap:column_index: 1
|
|
19
|
+
- name: "utype"
|
|
20
|
+
datatype: "string"
|
|
21
|
+
description: lists the utypes of schemas in the tableset
|
|
22
|
+
length: 512
|
|
23
|
+
tap:principal: 1
|
|
24
|
+
tap:std: 1
|
|
25
|
+
tap:column_index: 2
|
|
26
|
+
- name: "description"
|
|
27
|
+
datatype: "string"
|
|
28
|
+
description: describes schemas in the tableset
|
|
29
|
+
length: 512
|
|
30
|
+
tap:principal: 1
|
|
31
|
+
tap:std: 1
|
|
32
|
+
tap:column_index: 3
|
|
33
|
+
- name: "schema_index"
|
|
34
|
+
datatype: "int"
|
|
35
|
+
description: recommended sort order when listing schemas
|
|
36
|
+
tap:principal: 1
|
|
37
|
+
tap:std: 1
|
|
38
|
+
tap:column_index: 4
|
|
39
|
+
- name: "tables"
|
|
40
|
+
description: description of tables in this tableset
|
|
41
|
+
primaryKey: "#tables.table_name"
|
|
42
|
+
tap:table_index: 101000
|
|
43
|
+
mysql:engine: "InnoDB"
|
|
44
|
+
columns:
|
|
45
|
+
- name: schema_name
|
|
46
|
+
datatype: string
|
|
47
|
+
description: the schema this table belongs to
|
|
48
|
+
length: 64
|
|
49
|
+
nullable: false
|
|
50
|
+
tap:principal: 1
|
|
51
|
+
tap:std: 1
|
|
52
|
+
tap:column_index: 1
|
|
53
|
+
- name: table_name
|
|
54
|
+
datatype: string
|
|
55
|
+
description: the fully qualified table name
|
|
56
|
+
length: 128
|
|
57
|
+
nullable: false
|
|
58
|
+
tap:principal: 1
|
|
59
|
+
tap:std: 1
|
|
60
|
+
tap:column_index: 2
|
|
61
|
+
- name: table_type
|
|
62
|
+
datatype: string
|
|
63
|
+
description: "one of: table view"
|
|
64
|
+
length: 8
|
|
65
|
+
nullable: false
|
|
66
|
+
tap:principal: 1
|
|
67
|
+
tap:std: 1
|
|
68
|
+
tap:column_index: 3
|
|
69
|
+
- name: utype
|
|
70
|
+
datatype: string
|
|
71
|
+
description: lists the utype of tables in the tableset
|
|
72
|
+
length: 512
|
|
73
|
+
tap:principal: 1
|
|
74
|
+
tap:std: 1
|
|
75
|
+
tap:column_index: 4
|
|
76
|
+
- name: description
|
|
77
|
+
datatype: string
|
|
78
|
+
description: describes tables in the tableset
|
|
79
|
+
length: 512
|
|
80
|
+
tap:principal: 1
|
|
81
|
+
tap:std: 1
|
|
82
|
+
tap:column_index: 5
|
|
83
|
+
- name: table_index
|
|
84
|
+
datatype: int
|
|
85
|
+
description: recommended sort order when listing tables
|
|
86
|
+
tap:principal: 1
|
|
87
|
+
tap:std: 1
|
|
88
|
+
tap:column_index: 6
|
|
89
|
+
constraints:
|
|
90
|
+
- name: "k1"
|
|
91
|
+
"@type": ForeignKey
|
|
92
|
+
columns: ["#tables.schema_name"]
|
|
93
|
+
referencedColumns: ["#schemas.schema_name"]
|
|
94
|
+
- name: "columns"
|
|
95
|
+
description: description of columns in this tableset
|
|
96
|
+
primaryKey: ["#columns.table_name", "#columns.column_name"]
|
|
97
|
+
tap_table_index: 102000
|
|
98
|
+
mysql:engine: "InnoDB"
|
|
99
|
+
columns:
|
|
100
|
+
- name: table_name
|
|
101
|
+
datatype: string
|
|
102
|
+
description: the table this column belongs to
|
|
103
|
+
length: 128
|
|
104
|
+
nullable: false
|
|
105
|
+
tap:principal: 1
|
|
106
|
+
tap:std: 1
|
|
107
|
+
tap:column_index: 1
|
|
108
|
+
- name: column_name
|
|
109
|
+
datatype: string
|
|
110
|
+
description: the column name
|
|
111
|
+
length: 64
|
|
112
|
+
nullable: false
|
|
113
|
+
tap:principal: 1
|
|
114
|
+
tap:std: 1
|
|
115
|
+
tap:column_index: 2
|
|
116
|
+
- name: utype
|
|
117
|
+
datatype: string
|
|
118
|
+
description: lists the utypes of columns in the tableset
|
|
119
|
+
length: 512
|
|
120
|
+
tap:principal: 1
|
|
121
|
+
tap:std: 1
|
|
122
|
+
tap:column_index: 3
|
|
123
|
+
- name: ucd
|
|
124
|
+
datatype: string
|
|
125
|
+
description: lists the UCDs of columns in the tableset
|
|
126
|
+
length: 64
|
|
127
|
+
tap:principal: 1
|
|
128
|
+
tap:std: 1
|
|
129
|
+
tap:column_index: 4
|
|
130
|
+
- name: unit
|
|
131
|
+
datatype: string
|
|
132
|
+
description: lists the unit used for column values in the tableset
|
|
133
|
+
length: 64
|
|
134
|
+
tap:principal: 1
|
|
135
|
+
tap:std: 1
|
|
136
|
+
tap:column_index: 5
|
|
137
|
+
- name: description
|
|
138
|
+
datatype: string
|
|
139
|
+
description: describes the columns in the tableset
|
|
140
|
+
length: 512
|
|
141
|
+
tap:principal: 1
|
|
142
|
+
tap:std: 1
|
|
143
|
+
tap:column_index: 6
|
|
144
|
+
- name: datatype
|
|
145
|
+
datatype: string
|
|
146
|
+
description: lists the ADQL datatype of columns in the tableset
|
|
147
|
+
length: 64
|
|
148
|
+
nullable: false
|
|
149
|
+
tap:principal: 1
|
|
150
|
+
tap:std: 1
|
|
151
|
+
tap:column_index: 7
|
|
152
|
+
- name: arraysize
|
|
153
|
+
datatype: string
|
|
154
|
+
description: lists the size of variable-length columns in the tableset
|
|
155
|
+
length: 16
|
|
156
|
+
tap:principal: 1
|
|
157
|
+
tap:std: 1
|
|
158
|
+
tap:column_index: 8
|
|
159
|
+
- name: xtype
|
|
160
|
+
datatype: string
|
|
161
|
+
description: a DALI or custom extended type annotation
|
|
162
|
+
length: 64
|
|
163
|
+
tap:principal: 1
|
|
164
|
+
tap:std: 1
|
|
165
|
+
tap:column_index: 9
|
|
166
|
+
- name: size
|
|
167
|
+
datatype: int
|
|
168
|
+
description: "deprecated: use arraysize"
|
|
169
|
+
tap:principal: 1
|
|
170
|
+
tap:std: 1
|
|
171
|
+
tap:column_index: 10
|
|
172
|
+
- name: principal
|
|
173
|
+
datatype: int
|
|
174
|
+
description: a principal column; 1 means 1, 0 means 0
|
|
175
|
+
nullable: false
|
|
176
|
+
tap:principal: 1
|
|
177
|
+
tap:std: 1
|
|
178
|
+
tap:column_index: 11
|
|
179
|
+
- name: indexed
|
|
180
|
+
datatype: int
|
|
181
|
+
description: an indexed column; 1 means 1, 0 means 0
|
|
182
|
+
nullable: false
|
|
183
|
+
tap:principal: 1
|
|
184
|
+
tap:std: 1
|
|
185
|
+
tap:column_index: 12
|
|
186
|
+
- name: std
|
|
187
|
+
datatype: int
|
|
188
|
+
description: a standard column; 1 means 1, 0 means 0
|
|
189
|
+
nullable: false
|
|
190
|
+
tap:principal: 1
|
|
191
|
+
tap:std: 1
|
|
192
|
+
tap:column_index: 13
|
|
193
|
+
- name: column_index
|
|
194
|
+
datatype: int
|
|
195
|
+
description: recommended sort order when listing columns
|
|
196
|
+
tap:principal: 1
|
|
197
|
+
tap:std: 1
|
|
198
|
+
tap:column_index: 14
|
|
199
|
+
constraints:
|
|
200
|
+
- name: "k2"
|
|
201
|
+
"@type": ForeignKey
|
|
202
|
+
columns: ["#columns.table_name"]
|
|
203
|
+
referencedColumns: ["#tables.table_name"]
|
|
204
|
+
- name: "keys"
|
|
205
|
+
description: description of foreign keys in this tableset
|
|
206
|
+
primaryKey: "#keys.key_id"
|
|
207
|
+
tap:table_index: 103000
|
|
208
|
+
mysql:engine: "InnoDB"
|
|
209
|
+
columns:
|
|
210
|
+
- name: key_id
|
|
211
|
+
datatype: string
|
|
212
|
+
description: unique key to join to tap_schema.key_columns
|
|
213
|
+
length: 64
|
|
214
|
+
nullable: false
|
|
215
|
+
- name: from_table
|
|
216
|
+
datatype: string
|
|
217
|
+
description: the table with the foreign key
|
|
218
|
+
length: 128
|
|
219
|
+
nullable: false
|
|
220
|
+
- name: target_table
|
|
221
|
+
datatype: string
|
|
222
|
+
description: the table with the primary key
|
|
223
|
+
length: 128
|
|
224
|
+
nullable: false
|
|
225
|
+
- name: utype
|
|
226
|
+
datatype: string
|
|
227
|
+
description: lists the utype of keys in the tableset
|
|
228
|
+
length: 512
|
|
229
|
+
- name: description
|
|
230
|
+
datatype: string
|
|
231
|
+
description: describes keys in the tableset
|
|
232
|
+
length: 512
|
|
233
|
+
constraints:
|
|
234
|
+
- name: "k3"
|
|
235
|
+
"@type": ForeignKey
|
|
236
|
+
columns: ["#keys.from_table"]
|
|
237
|
+
referencedColumns: ["#tables.table_name"]
|
|
238
|
+
- name: "k4"
|
|
239
|
+
"@type": ForeignKey
|
|
240
|
+
columns: ["#keys.target_table"]
|
|
241
|
+
referencedColumns: ["#tables.table_name"]
|
|
242
|
+
- name: "key_columns"
|
|
243
|
+
description: description of foreign key columns in this tableset
|
|
244
|
+
tap:table_index: 104000
|
|
245
|
+
mysql:engine: "InnoDB"
|
|
246
|
+
columns:
|
|
247
|
+
- name: key_id
|
|
248
|
+
datatype: string
|
|
249
|
+
length: 64
|
|
250
|
+
nullable: false
|
|
251
|
+
- name: from_column
|
|
252
|
+
datatype: string
|
|
253
|
+
length: 64
|
|
254
|
+
nullable: false
|
|
255
|
+
- name: target_column
|
|
256
|
+
datatype: string
|
|
257
|
+
length: 64
|
|
258
|
+
nullable: false
|
|
259
|
+
constraints:
|
|
260
|
+
- name: "k5"
|
|
261
|
+
"@type": ForeignKey
|
|
262
|
+
columns: ["#key_columns.key_id"]
|
|
263
|
+
referencedColumns: ["#keys.key_id"]
|
|
264
|
+
# FIXME: These can't be defined as FK constraints, because they refer
|
|
265
|
+
# to non-unique columns, e.g., column_name from the columns table.
|
|
266
|
+
# - name: "k6"
|
|
267
|
+
# "@type": ForeignKey
|
|
268
|
+
# columns: ["#key_columns.from_column"]
|
|
269
|
+
# referencedColumns: ["#columns.column_name"]
|
|
270
|
+
# - name: "k7"
|
|
271
|
+
# "@type": ForeignKey
|
|
272
|
+
# columns: ["#key_columns.target_column"]
|
|
273
|
+
# referencedColumns: ["#columns.column_name"]
|