vo-models 0.2.2.dev0__tar.gz → 0.3.1__tar.gz

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.
Files changed (29) hide show
  1. {vo-models-0.2.2.dev0/vo_models.egg-info → vo_models-0.3.1}/PKG-INFO +24 -11
  2. {vo-models-0.2.2.dev0 → vo_models-0.3.1}/README.md +13 -8
  3. {vo-models-0.2.2.dev0 → vo_models-0.3.1}/pyproject.toml +8 -5
  4. vo_models-0.3.1/vo_models/adql/__init__.py +0 -0
  5. vo_models-0.3.1/vo_models/adql/misc.py +271 -0
  6. {vo-models-0.2.2.dev0 → vo_models-0.3.1}/vo_models/uws/models.py +99 -82
  7. vo_models-0.3.1/vo_models/uws/types.py +69 -0
  8. vo_models-0.3.1/vo_models/vodataservice/__init__.py +10 -0
  9. vo_models-0.3.1/vo_models/vodataservice/models.py +311 -0
  10. {vo-models-0.2.2.dev0 → vo_models-0.3.1}/vo_models/voresource/types.py +5 -1
  11. {vo-models-0.2.2.dev0 → vo_models-0.3.1}/vo_models/vosi/availability/models.py +12 -7
  12. vo_models-0.3.1/vo_models/vosi/tables/__init__.py +3 -0
  13. vo_models-0.3.1/vo_models/vosi/tables/models.py +55 -0
  14. {vo-models-0.2.2.dev0 → vo_models-0.3.1/vo_models.egg-info}/PKG-INFO +24 -11
  15. {vo-models-0.2.2.dev0 → vo_models-0.3.1}/vo_models.egg-info/SOURCES.txt +6 -0
  16. vo_models-0.3.1/vo_models.egg-info/requires.txt +17 -0
  17. vo-models-0.2.2.dev0/vo_models/uws/types.py +0 -47
  18. vo-models-0.2.2.dev0/vo_models.egg-info/requires.txt +0 -8
  19. {vo-models-0.2.2.dev0 → vo_models-0.3.1}/LICENSE +0 -0
  20. {vo-models-0.2.2.dev0 → vo_models-0.3.1}/setup.cfg +0 -0
  21. {vo-models-0.2.2.dev0 → vo_models-0.3.1}/vo_models/__init__.py +0 -0
  22. {vo-models-0.2.2.dev0 → vo_models-0.3.1}/vo_models/uws/__init__.py +0 -0
  23. {vo-models-0.2.2.dev0 → vo_models-0.3.1}/vo_models/voresource/__init__.py +0 -0
  24. {vo-models-0.2.2.dev0 → vo_models-0.3.1}/vo_models/vosi/__init__.py +0 -0
  25. {vo-models-0.2.2.dev0 → vo_models-0.3.1}/vo_models/vosi/availability/__init__.py +0 -0
  26. {vo-models-0.2.2.dev0 → vo_models-0.3.1}/vo_models/xlink/__init__.py +0 -0
  27. {vo-models-0.2.2.dev0 → vo_models-0.3.1}/vo_models/xlink/xlink.py +0 -0
  28. {vo-models-0.2.2.dev0 → vo_models-0.3.1}/vo_models.egg-info/dependency_links.txt +0 -0
  29. {vo-models-0.2.2.dev0 → vo_models-0.3.1}/vo_models.egg-info/top_level.txt +0 -0
@@ -1,11 +1,11 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: vo-models
3
- Version: 0.2.2.dev0
4
- Summary: Data models for IVOA protocols
3
+ Version: 0.3.1
4
+ Summary: Pydantic data models for IVOA protocols
5
5
  Author-email: Joshua Fraustro <jfraustro@stsci.edu>, MAST Archive Developers <archive@stsci.edu>
6
6
  Project-URL: Homepage, https://github.com/spacetelescope/vo-models
7
7
  Project-URL: Issues, https://github.com/spacetelescope/vo-models/issues
8
- Keywords: ivoa,uws,pydantic,pydantic-xml,openapi
8
+ Keywords: ivoa,pydantic,pydantic-xml
9
9
  Classifier: Topic :: Scientific/Engineering :: Astronomy
10
10
  Classifier: Topic :: Software Development :: Libraries :: Python Modules
11
11
  Classifier: License :: OSI Approved :: MIT License
@@ -18,10 +18,18 @@ Requires-Dist: pytest; extra == "test"
18
18
  Requires-Dist: pytest-cov; extra == "test"
19
19
  Provides-Extra: dev
20
20
  Requires-Dist: pylint; extra == "dev"
21
+ Requires-Dist: ruff; extra == "dev"
22
+ Requires-Dist: pre-commit; extra == "dev"
23
+ Provides-Extra: docs
24
+ Requires-Dist: sphinx; extra == "docs"
25
+ Requires-Dist: sphinx_design; extra == "docs"
26
+ Requires-Dist: furo; extra == "docs"
27
+ Requires-Dist: sphinx-copybutton; extra == "docs"
28
+ Requires-Dist: toml; extra == "docs"
21
29
 
22
30
  # vo-models
23
31
 
24
- `vo-models` an open-source project to provide Python models for [IVOA](https://www.ivoa.net/) service protocols.
32
+ `vo-models` is an open-source project to provide Python models for [IVOA](https://www.ivoa.net/) service protocols.
25
33
 
26
34
  The project is designed to be used by IVOA members, service implementors, and developers to help facilitate the development of IVOA-compliant services and clients.
27
35
 
@@ -29,7 +37,7 @@ The project is designed to be used by IVOA members, service implementors, and de
29
37
 
30
38
  - **Pydantic-xml Models:** The project includes Python models for IVOA protocols, using [pydantic-xml](https://github.com/dapper91/pydantic-xml). Based on [Pydantic](https://docs.pydantic.dev/latest/), these models describe transactions for an IVOA protocol, such as UWS, and feature automatic validation, parsing and serialization of XML data for use with Python clients and web frameworks.
31
39
 
32
- - **Expandability:** The project is designed with future expansion in mind. Plans include extending the schema and models to cover other IVOA standards.
40
+ - **Expandability:** The project is designed with future expansion in mind. Plans include extending the schema and models to cover other IVOA standards and future versions of existing standards where possible.
33
41
 
34
42
  ## Protocols
35
43
 
@@ -38,6 +46,17 @@ The following IVOA protocols are currently supported:
38
46
  - **UWS (Universal Worker Service) version 1.1**
39
47
  - **VOSI (IVOA Support Interfaces) version 1.1**
40
48
  - VOSI Availability
49
+ - VOSI Tables
50
+ - **VODataService version 1.2 (limited)**
51
+ - DataType
52
+ - FKColumn
53
+ - ForeignKey
54
+ - Table
55
+ - TableParam
56
+ - TableSchema
57
+ - TableSet
58
+
59
+ You can read more about using these models in our documentation: https://vo-models.readthedocs.io/
41
60
 
42
61
 
43
62
  ## Installation
@@ -67,12 +86,6 @@ For active development, install the project in development mode:
67
86
  pip install -e .[dev,test]
68
87
  ```
69
88
 
70
- ### Pydantic-XML Models
71
-
72
- Python models using [pydantic-xml](https://github.com/dapper91/pydantic-xml), a library based on [Pydantic](https://docs.pydantic.dev/latest/), are provided in the `vo/models/xml` directory.
73
-
74
- These models can be used to parse and validate XML data into Python objects, as well as serialize Python objects into XML data. These models can be used with any Python web framework, but are particularly useful when used libraries that leverage the power of Pydantic, such as [FastAPI](https://fastapi.tiangolo.com/).
75
-
76
89
  ### Contributing
77
90
 
78
91
  Contributions to the project are more than welcome. Collaboration and discussion with other IVOA members, service implementors, and developers is what started this project, and is what makes the IVOA great.
@@ -1,6 +1,6 @@
1
1
  # vo-models
2
2
 
3
- `vo-models` an open-source project to provide Python models for [IVOA](https://www.ivoa.net/) service protocols.
3
+ `vo-models` is an open-source project to provide Python models for [IVOA](https://www.ivoa.net/) service protocols.
4
4
 
5
5
  The project is designed to be used by IVOA members, service implementors, and developers to help facilitate the development of IVOA-compliant services and clients.
6
6
 
@@ -8,7 +8,7 @@ The project is designed to be used by IVOA members, service implementors, and de
8
8
 
9
9
  - **Pydantic-xml Models:** The project includes Python models for IVOA protocols, using [pydantic-xml](https://github.com/dapper91/pydantic-xml). Based on [Pydantic](https://docs.pydantic.dev/latest/), these models describe transactions for an IVOA protocol, such as UWS, and feature automatic validation, parsing and serialization of XML data for use with Python clients and web frameworks.
10
10
 
11
- - **Expandability:** The project is designed with future expansion in mind. Plans include extending the schema and models to cover other IVOA standards.
11
+ - **Expandability:** The project is designed with future expansion in mind. Plans include extending the schema and models to cover other IVOA standards and future versions of existing standards where possible.
12
12
 
13
13
  ## Protocols
14
14
 
@@ -17,6 +17,17 @@ The following IVOA protocols are currently supported:
17
17
  - **UWS (Universal Worker Service) version 1.1**
18
18
  - **VOSI (IVOA Support Interfaces) version 1.1**
19
19
  - VOSI Availability
20
+ - VOSI Tables
21
+ - **VODataService version 1.2 (limited)**
22
+ - DataType
23
+ - FKColumn
24
+ - ForeignKey
25
+ - Table
26
+ - TableParam
27
+ - TableSchema
28
+ - TableSet
29
+
30
+ You can read more about using these models in our documentation: https://vo-models.readthedocs.io/
20
31
 
21
32
 
22
33
  ## Installation
@@ -46,12 +57,6 @@ For active development, install the project in development mode:
46
57
  pip install -e .[dev,test]
47
58
  ```
48
59
 
49
- ### Pydantic-XML Models
50
-
51
- Python models using [pydantic-xml](https://github.com/dapper91/pydantic-xml), a library based on [Pydantic](https://docs.pydantic.dev/latest/), are provided in the `vo/models/xml` directory.
52
-
53
- These models can be used to parse and validate XML data into Python objects, as well as serialize Python objects into XML data. These models can be used with any Python web framework, but are particularly useful when used libraries that leverage the power of Pydantic, such as [FastAPI](https://fastapi.tiangolo.com/).
54
-
55
60
  ### Contributing
56
61
 
57
62
  Contributions to the project are more than welcome. Collaboration and discussion with other IVOA members, service implementors, and developers is what started this project, and is what makes the IVOA great.
@@ -4,12 +4,12 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "vo-models"
7
- version = "0.2.2.dev"
7
+ version = "0.3.1"
8
8
  authors = [
9
9
  {name = "Joshua Fraustro", email="jfraustro@stsci.edu"},
10
10
  {name = "MAST Archive Developers", email="archive@stsci.edu"}
11
11
  ]
12
- description = "Data models for IVOA protocols"
12
+ description = "Pydantic data models for IVOA protocols"
13
13
  readme = "README.md"
14
14
  requires-python = ">=3.10"
15
15
 
@@ -26,16 +26,19 @@ classifiers = [
26
26
  ]
27
27
  keywords = [
28
28
  "ivoa",
29
- "uws",
30
29
  "pydantic",
31
30
  "pydantic-xml",
32
- "openapi",
33
31
  ]
34
32
 
35
33
  [project.optional-dependencies]
36
34
  test = ["pytest", "pytest-cov"]
37
- dev = ["pylint"]
35
+ dev = ["pylint", "ruff", "pre-commit"]
36
+ docs = ["sphinx", "sphinx_design", "furo", "sphinx-copybutton","toml"]
38
37
 
39
38
  [project.urls]
40
39
  Homepage = "https://github.com/spacetelescope/vo-models"
41
40
  Issues = "https://github.com/spacetelescope/vo-models/issues"
41
+
42
+ [tool.ruff]
43
+ line-length = 120
44
+ extend-exclude = ["docs/conf.py"]
File without changes
@@ -0,0 +1,271 @@
1
+ """
2
+ Miscellaneous ADQL constants.
3
+ """
4
+
5
+ ADQL_SQL_KEYWORDS = [
6
+ # SQL Keywords
7
+ "ABSOLUTE",
8
+ "ACTION",
9
+ "ADD",
10
+ "ALL",
11
+ "ALLOCATE",
12
+ "ALTER",
13
+ "AND",
14
+ "ANY",
15
+ "ARE",
16
+ "AS",
17
+ "ASC",
18
+ "ASSERTION",
19
+ "AT",
20
+ "AUTHORIZATION",
21
+ "AVG",
22
+ "BEGIN",
23
+ "BETWEEN",
24
+ "BIT",
25
+ "BIT_LENGTH",
26
+ "BOTH",
27
+ "BY",
28
+ "CASCADE",
29
+ "CASCADED",
30
+ "CASE",
31
+ "CAST",
32
+ "CATALOG",
33
+ "CHAR",
34
+ "CHARACTER",
35
+ "CHARACTER_LENGTH",
36
+ "CHAR_LENGTH",
37
+ "CHECK",
38
+ "CLOSE",
39
+ "COALESCE",
40
+ "COLLATE",
41
+ "COLLATION",
42
+ "COLUMN",
43
+ "COMMIT",
44
+ "CONNECT",
45
+ "CONNECTION",
46
+ "CONSTRAINT",
47
+ "CONSTRAINTS",
48
+ "CONTINUE",
49
+ "CONVERT",
50
+ "CORRESPONDING",
51
+ "COUNT",
52
+ "CREATE",
53
+ "CROSS",
54
+ "CURRENT",
55
+ "CURRENT_DATE",
56
+ "CURRENT_TIME",
57
+ "CURRENT_TIMESTAMP",
58
+ "CURRENT_USER",
59
+ "CURSOR",
60
+ "DATE",
61
+ "DAY",
62
+ "DEALLOCATE",
63
+ "DECIMAL",
64
+ "DECLARE",
65
+ "DEFAULT",
66
+ "DEFERRABLE",
67
+ "DEFERRED",
68
+ "DELETE",
69
+ "DESC",
70
+ "DESCRIBE",
71
+ "DESCRIPTOR",
72
+ "DIAGNOSTICS",
73
+ "DISCONNECT",
74
+ "DISTINCT",
75
+ "DOMAIN",
76
+ "DOUBLE",
77
+ "DROP",
78
+ "ELSE",
79
+ "END",
80
+ "END-EXEC",
81
+ "ESCAPE",
82
+ "EXCEPT",
83
+ "EXCEPTION",
84
+ "EXEC",
85
+ "EXECUTE",
86
+ "EXISTS",
87
+ "EXTERNAL",
88
+ "EXTRACT",
89
+ "FALSE",
90
+ "FETCH",
91
+ "FIRST",
92
+ "FLOAT",
93
+ "FOR",
94
+ "FOREIGN",
95
+ "FOUND",
96
+ "FROM",
97
+ "FULL",
98
+ "GET",
99
+ "GLOBAL",
100
+ "GO",
101
+ "GOTO",
102
+ "GRANT",
103
+ "GROUP",
104
+ "HAVING",
105
+ "HOUR",
106
+ "IDENTITY",
107
+ "IMMEDIATE",
108
+ "IN",
109
+ "INDICATOR",
110
+ "INITIALLY",
111
+ "INNER",
112
+ "INPUT",
113
+ "INSENSITIVE",
114
+ "INSERT",
115
+ "INT",
116
+ "INTEGER",
117
+ "INTERSECT",
118
+ "INTERVAL",
119
+ "INTO",
120
+ "IS",
121
+ "ISOLATION",
122
+ "JOIN",
123
+ "KEY",
124
+ "LANGUAGE",
125
+ "LAST",
126
+ "LEADING",
127
+ "LEFT",
128
+ "LEVEL",
129
+ "LIKE",
130
+ "LOCAL",
131
+ "LOWER",
132
+ "MATCH",
133
+ "MAX",
134
+ "MIN",
135
+ "MINUTE",
136
+ "MODULE",
137
+ "MONTH",
138
+ "NAMES",
139
+ "NATIONAL",
140
+ "NATURAL",
141
+ "NCHAR",
142
+ "NEXT",
143
+ "NO",
144
+ "NOT",
145
+ "NULL",
146
+ "NULLIF",
147
+ "NUMERIC",
148
+ "OCTET_LENGTH",
149
+ "OF",
150
+ "ON",
151
+ "ONLY",
152
+ "OPEN",
153
+ "OPTION",
154
+ "OR",
155
+ "ORDER",
156
+ "OUTER",
157
+ "OUTPUT",
158
+ "OVERLAPS",
159
+ "PAD",
160
+ "PARTIAL",
161
+ "POSITION",
162
+ "PRECISION",
163
+ "PREPARE",
164
+ "PRESERVE",
165
+ "PRIMARY",
166
+ "PRIOR",
167
+ "PRIVILEGES",
168
+ "PROCEDURE",
169
+ "PUBLIC",
170
+ "READ",
171
+ "REAL",
172
+ "REFERENCES",
173
+ "RELATIVE",
174
+ "RESTRICT",
175
+ "REVOKE",
176
+ "RIGHT",
177
+ "ROLLBACK",
178
+ "ROWS",
179
+ "SCHEMA",
180
+ "SCROLL",
181
+ "SECOND",
182
+ "SECTION",
183
+ "SELECT",
184
+ "SESSION",
185
+ "SESSION_USER",
186
+ "SET",
187
+ "SIZE",
188
+ "SMALLINT",
189
+ "SOME",
190
+ "SPACE",
191
+ "SQL",
192
+ "SQLCODE",
193
+ "SQLERROR",
194
+ "SQLSTATE",
195
+ "SUBSTRING",
196
+ "SUM",
197
+ "SYSTEM_USER",
198
+ "TABLE",
199
+ "TEMPORARY",
200
+ "THEN",
201
+ "TIME",
202
+ "TIMESTAMP",
203
+ "TIMEZONE_HOUR",
204
+ "TIMEZONE_MINUTE",
205
+ "TO",
206
+ "TRAILING",
207
+ "TRANSACTION",
208
+ "TRANSLATE",
209
+ "TRANSLATION",
210
+ "TRIM",
211
+ "TRUE",
212
+ "UNION",
213
+ "UNIQUE",
214
+ "UNKNOWN",
215
+ "UPDATE",
216
+ "UPPER",
217
+ "USAGE",
218
+ "USER",
219
+ "USING",
220
+ "VALUE",
221
+ "VALUES",
222
+ "VARCHAR",
223
+ "VARYING",
224
+ "VIEW",
225
+ "WHEN",
226
+ "WHENEVER",
227
+ "WHERE",
228
+ "WITH",
229
+ "WORK",
230
+ "WRITE",
231
+ "YEAR",
232
+ "ZONE",
233
+ # ADQL math keywords
234
+ "ABS",
235
+ "ACOS",
236
+ "ASIN",
237
+ "ATAN",
238
+ "ATAN2",
239
+ "CEILING",
240
+ "COS",
241
+ "DEGREES",
242
+ "EXP",
243
+ "FLOOR",
244
+ "LOG",
245
+ "LOG10",
246
+ "MOD",
247
+ "PI",
248
+ "POWER",
249
+ "RADIANS",
250
+ "RAND",
251
+ "ROUND",
252
+ "SIN",
253
+ "SQRT",
254
+ "TAN",
255
+ "TOP",
256
+ "TRUNCATE",
257
+ # ADQL geometry keywords
258
+ "AREA",
259
+ "BOX",
260
+ "CENTROID",
261
+ "CIRCLE",
262
+ "CONTAINS",
263
+ "COORD1",
264
+ "COORD2",
265
+ "COORDSYS",
266
+ "DISTANCE",
267
+ "INTERSECTS",
268
+ "POINT",
269
+ "POLYGON",
270
+ "REGION",
271
+ ]