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
felis/visitor.py
DELETED
|
@@ -1,180 +0,0 @@
|
|
|
1
|
-
# This file is part of felis.
|
|
2
|
-
#
|
|
3
|
-
# Developed for the LSST Data Management System.
|
|
4
|
-
# This product includes software developed by the LSST Project
|
|
5
|
-
# (https://www.lsst.org).
|
|
6
|
-
# See the COPYRIGHT file at the top-level directory of this distribution
|
|
7
|
-
# for details of code ownership.
|
|
8
|
-
#
|
|
9
|
-
# This program is free software: you can redistribute it and/or modify
|
|
10
|
-
# it under the terms of the GNU General Public License as published by
|
|
11
|
-
# the Free Software Foundation, either version 3 of the License, or
|
|
12
|
-
# (at your option) any later version.
|
|
13
|
-
#
|
|
14
|
-
# This program is distributed in the hope that it will be useful,
|
|
15
|
-
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
16
|
-
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
17
|
-
# GNU General Public License for more details.
|
|
18
|
-
#
|
|
19
|
-
# You should have received a copy of the GNU General Public License
|
|
20
|
-
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
21
|
-
|
|
22
|
-
from __future__ import annotations
|
|
23
|
-
|
|
24
|
-
__all__ = ["Visitor"]
|
|
25
|
-
|
|
26
|
-
from abc import ABC, abstractmethod
|
|
27
|
-
from collections.abc import Iterable, Mapping
|
|
28
|
-
from typing import Any, Generic, TypeVar
|
|
29
|
-
|
|
30
|
-
_Schema = TypeVar("_Schema")
|
|
31
|
-
_SchemaVersion = TypeVar("_SchemaVersion")
|
|
32
|
-
_Table = TypeVar("_Table")
|
|
33
|
-
_Column = TypeVar("_Column")
|
|
34
|
-
_PrimaryKey = TypeVar("_PrimaryKey")
|
|
35
|
-
_Constraint = TypeVar("_Constraint")
|
|
36
|
-
_Index = TypeVar("_Index")
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
class Visitor(ABC, Generic[_Schema, _Table, _Column, _PrimaryKey, _Constraint, _Index, _SchemaVersion]):
|
|
40
|
-
"""Abstract interface for visitor classes working on a Felis tree.
|
|
41
|
-
|
|
42
|
-
Clients will only normally use `visit_schema` method, other methods
|
|
43
|
-
defined in this interface should be called by implementation of
|
|
44
|
-
`visit_schema` and the methods called from it.
|
|
45
|
-
"""
|
|
46
|
-
|
|
47
|
-
@abstractmethod
|
|
48
|
-
def visit_schema(self, schema_obj: Mapping[str, Any]) -> _Schema:
|
|
49
|
-
"""Visit Felis schema object.
|
|
50
|
-
|
|
51
|
-
Parameters
|
|
52
|
-
----------
|
|
53
|
-
schema_obj : `Mapping` [ `str`, `Any` ]
|
|
54
|
-
Felis object (mapping) representing a schema.
|
|
55
|
-
|
|
56
|
-
Returns
|
|
57
|
-
-------
|
|
58
|
-
schema : `_Schema`
|
|
59
|
-
Returns schema representation, type depends on implementation.
|
|
60
|
-
"""
|
|
61
|
-
raise NotImplementedError()
|
|
62
|
-
|
|
63
|
-
@abstractmethod
|
|
64
|
-
def visit_schema_version(
|
|
65
|
-
self, version_obj: str | Mapping[str, Any], schema_obj: Mapping[str, Any]
|
|
66
|
-
) -> _SchemaVersion:
|
|
67
|
-
"""Visit schema version object.
|
|
68
|
-
|
|
69
|
-
Parameters
|
|
70
|
-
----------
|
|
71
|
-
version_obj : `str` or `Mapping` [ `str`, `Any` ]
|
|
72
|
-
String of object describing schema version.
|
|
73
|
-
schema_obj : `Mapping` [ `str`, `Any` ]
|
|
74
|
-
Felis object (mapping) representing parent schema.
|
|
75
|
-
|
|
76
|
-
Returns
|
|
77
|
-
-------
|
|
78
|
-
schema_version : `_SchemaVersion`
|
|
79
|
-
Returns version representation, type depends on implementation.
|
|
80
|
-
"""
|
|
81
|
-
raise NotImplementedError()
|
|
82
|
-
|
|
83
|
-
@abstractmethod
|
|
84
|
-
def visit_table(self, table_obj: Mapping[str, Any], schema_obj: Mapping[str, Any]) -> _Table:
|
|
85
|
-
"""Visit Felis table object, this method is usually called from
|
|
86
|
-
`visit_schema`, clients normally do not need to call it directly.
|
|
87
|
-
|
|
88
|
-
Parameters
|
|
89
|
-
----------
|
|
90
|
-
table_obj : `Mapping` [ `str`, `Any` ]
|
|
91
|
-
Felis object (mapping) representing a table.
|
|
92
|
-
schema_obj : `Mapping` [ `str`, `Any` ]
|
|
93
|
-
Felis object (mapping) representing parent schema.
|
|
94
|
-
|
|
95
|
-
Returns
|
|
96
|
-
-------
|
|
97
|
-
table : `_Table`
|
|
98
|
-
Returns table representation, type depends on implementation.
|
|
99
|
-
"""
|
|
100
|
-
raise NotImplementedError()
|
|
101
|
-
|
|
102
|
-
@abstractmethod
|
|
103
|
-
def visit_column(self, column_obj: Mapping[str, Any], table_obj: Mapping[str, Any]) -> _Column:
|
|
104
|
-
"""Visit Felis column object, this method is usually called from
|
|
105
|
-
`visit_table`, clients normally do not need to call it directly.
|
|
106
|
-
|
|
107
|
-
Parameters
|
|
108
|
-
----------
|
|
109
|
-
column_obj : `Mapping` [ `str`, `Any` ]
|
|
110
|
-
Felis object (mapping) representing a column.
|
|
111
|
-
table_obj : `Mapping` [ `str`, `Any` ]
|
|
112
|
-
Felis object (mapping) representing parent table.
|
|
113
|
-
|
|
114
|
-
Returns
|
|
115
|
-
-------
|
|
116
|
-
column : `_Column`
|
|
117
|
-
Returns column representation, type depends on implementation.
|
|
118
|
-
"""
|
|
119
|
-
raise NotImplementedError()
|
|
120
|
-
|
|
121
|
-
@abstractmethod
|
|
122
|
-
def visit_primary_key(
|
|
123
|
-
self, primary_key_obj: str | Iterable[str], table_obj: Mapping[str, Any]
|
|
124
|
-
) -> _PrimaryKey:
|
|
125
|
-
"""Visit Felis primary key object, this method is usually called from
|
|
126
|
-
`visit_table`, clients normally do not need to call it directly.
|
|
127
|
-
|
|
128
|
-
Parameters
|
|
129
|
-
----------
|
|
130
|
-
primary_key_obj : `str` or `Mapping` [ `str`, `Any` ]
|
|
131
|
-
Felis object (mapping) representing a primary key.
|
|
132
|
-
table_obj : `Mapping` [ `str`, `Any` ]
|
|
133
|
-
Felis object (mapping) representing parent table.
|
|
134
|
-
|
|
135
|
-
Returns
|
|
136
|
-
-------
|
|
137
|
-
pk : `_PrimaryKey`
|
|
138
|
-
Returns primary key representation, type depends on implementation.
|
|
139
|
-
"""
|
|
140
|
-
raise NotImplementedError()
|
|
141
|
-
|
|
142
|
-
@abstractmethod
|
|
143
|
-
def visit_constraint(
|
|
144
|
-
self, constraint_obj: Mapping[str, Any], table_obj: Mapping[str, Any]
|
|
145
|
-
) -> _Constraint:
|
|
146
|
-
"""Visit Felis constraint object, this method is usually called from
|
|
147
|
-
`visit_table`, clients normally do not need to call it directly.
|
|
148
|
-
|
|
149
|
-
Parameters
|
|
150
|
-
----------
|
|
151
|
-
constraint_obj : `Mapping` [ `str`, `Any` ]
|
|
152
|
-
Felis object (mapping) representing a constraint.
|
|
153
|
-
table_obj : `Mapping` [ `str`, `Any` ]
|
|
154
|
-
Felis object (mapping) representing parent table.
|
|
155
|
-
|
|
156
|
-
Returns
|
|
157
|
-
-------
|
|
158
|
-
constraint : `_Constraint`
|
|
159
|
-
Returns primary key representation, type depends on implementation.
|
|
160
|
-
"""
|
|
161
|
-
raise NotImplementedError()
|
|
162
|
-
|
|
163
|
-
@abstractmethod
|
|
164
|
-
def visit_index(self, index_obj: Mapping[str, Any], table_obj: Mapping[str, Any]) -> _Index:
|
|
165
|
-
"""Visit Felis index object, this method is usually called from
|
|
166
|
-
`visit_table`, clients normally do not need to call it directly.
|
|
167
|
-
|
|
168
|
-
Parameters
|
|
169
|
-
----------
|
|
170
|
-
index_obj : `Mapping` [ `str`, `Any` ]
|
|
171
|
-
Felis object (mapping) representing an index.
|
|
172
|
-
table_obj : `Mapping` [ `str`, `Any` ]
|
|
173
|
-
Felis object (mapping) representing parent table.
|
|
174
|
-
|
|
175
|
-
Returns
|
|
176
|
-
-------
|
|
177
|
-
index : `_Index`
|
|
178
|
-
Returns index representation, type depends on implementation.
|
|
179
|
-
"""
|
|
180
|
-
raise NotImplementedError()
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.1
|
|
2
|
-
Name: lsst-felis
|
|
3
|
-
Version: 26.2024.900
|
|
4
|
-
Summary: A vocabulary for describing catalogs and acting on those descriptions
|
|
5
|
-
Author-email: Rubin Observatory Data Management <dm-admin@lists.lsst.org>
|
|
6
|
-
License: GNU General Public License v3 or later (GPLv3+)
|
|
7
|
-
Project-URL: Homepage, https://github.com/lsst/felis
|
|
8
|
-
Keywords: lsst
|
|
9
|
-
Classifier: Intended Audience :: Science/Research
|
|
10
|
-
Classifier: License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)
|
|
11
|
-
Classifier: Operating System :: OS Independent
|
|
12
|
-
Classifier: Programming Language :: Python :: 3
|
|
13
|
-
Classifier: Programming Language :: Python :: 3.11
|
|
14
|
-
Classifier: Programming Language :: Python :: 3.12
|
|
15
|
-
Classifier: Topic :: Scientific/Engineering :: Astronomy
|
|
16
|
-
Requires-Python: >=3.11.0
|
|
17
|
-
Description-Content-Type: text/markdown
|
|
18
|
-
License-File: COPYRIGHT
|
|
19
|
-
License-File: LICENSE
|
|
20
|
-
Requires-Dist: astropy >=4
|
|
21
|
-
Requires-Dist: sqlalchemy >=1.4
|
|
22
|
-
Requires-Dist: click >=7
|
|
23
|
-
Requires-Dist: pyyaml >=6
|
|
24
|
-
Requires-Dist: pyld >=2
|
|
25
|
-
Requires-Dist: pydantic <3,>=2
|
|
26
|
-
Provides-Extra: test
|
|
27
|
-
Requires-Dist: pytest >=3.2 ; extra == 'test'
|
|
28
|
-
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
felis/__init__.py,sha256=_Pw-QKMYj0WRgE8fW2N2pBXJUj-Pjv8dSKJBzykjyZU,1842
|
|
2
|
-
felis/check.py,sha256=RBxXq7XwPGIucrs1PPgPtgk8MrWAJlOmoxCNySEz9-I,13892
|
|
3
|
-
felis/cli.py,sha256=0yIDyqfBua7c8ad84udjCoja8VxoAbL7OD-m3cOQWLM,15278
|
|
4
|
-
felis/datamodel.py,sha256=6i_BtmU1c5RaIZxeA-XbnHkikJb-fnxSWrsX0zdVwwU,15648
|
|
5
|
-
felis/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
6
|
-
felis/simple.py,sha256=yzv_aoZrZhfakd1Xm7gLDeVKyJjCDZ7wAyYYp-l_Sxs,14414
|
|
7
|
-
felis/sql.py,sha256=Kq4Y7XxXDUTrzz8eIR5VLQFq0n899uZlcjIyorZqZ70,10293
|
|
8
|
-
felis/tap.py,sha256=RBwEKyU3S0oXSNIMoI2WRAuC9WB5eai9BdQQUYN5Qdc,17704
|
|
9
|
-
felis/types.py,sha256=1GL6IkHcIsIydiyw1eX98REh-lWCVIRO-9qjmaZfqvw,4440
|
|
10
|
-
felis/utils.py,sha256=tYxr0xFdPN4gDHibeAD9d5DFgU8hKlSZVKmZoDzi4e8,4164
|
|
11
|
-
felis/validation.py,sha256=f9VKvp7q-cnim2D5voTKwCdt0NRsYBpTwom1Z_3OKkc,3469
|
|
12
|
-
felis/version.py,sha256=ulBF0RYqoH1GVHAW1xKNS1cuGsU-1pNQZ9GfSDejVro,54
|
|
13
|
-
felis/visitor.py,sha256=EazU4nYbkKBj3mCZYvsTCBTNmh0qRaUNZIzCcM3dqOQ,6439
|
|
14
|
-
felis/db/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
15
|
-
felis/db/sqltypes.py,sha256=0HOEqvL0OailGP-j6Jj5tnOSu_Pt7Hi29PPof4Q5d2c,5787
|
|
16
|
-
lsst_felis-26.2024.900.dist-info/COPYRIGHT,sha256=bUmNy19uUxqITMpjeHFe69q3IzQpjxvvBw6oV7kR7ho,129
|
|
17
|
-
lsst_felis-26.2024.900.dist-info/LICENSE,sha256=jOtLnuWt7d5Hsx6XXB2QxzrSe2sWWh3NgMfFRetluQM,35147
|
|
18
|
-
lsst_felis-26.2024.900.dist-info/METADATA,sha256=NEXXwea6QIzFbk7dDOzTHbC4TeWbHVF36u_smh9ah_M,1074
|
|
19
|
-
lsst_felis-26.2024.900.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
|
|
20
|
-
lsst_felis-26.2024.900.dist-info/entry_points.txt,sha256=Gk2XFujA_Gp52VBk45g5kim8TDoMDJFPctsMqiq72EM,40
|
|
21
|
-
lsst_felis-26.2024.900.dist-info/top_level.txt,sha256=F4SvPip3iZRVyISi50CHhwTIAokAhSxjWiVcn4IVWRI,6
|
|
22
|
-
lsst_felis-26.2024.900.dist-info/zip-safe,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
|
|
23
|
-
lsst_felis-26.2024.900.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|