arrakis-schema 0.1.0__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.
- arrakis_schema-0.1.0/.gitignore +9 -0
- arrakis_schema-0.1.0/PKG-INFO +102 -0
- arrakis_schema-0.1.0/README.md +53 -0
- arrakis_schema-0.1.0/arrakis_schema/__init__.py +38 -0
- arrakis_schema-0.1.0/arrakis_schema/_version.py +1 -0
- arrakis_schema-0.1.0/arrakis_schema/count.json +52 -0
- arrakis_schema-0.1.0/arrakis_schema/describe.json +30 -0
- arrakis_schema-0.1.0/arrakis_schema/descriptor.json +25 -0
- arrakis_schema-0.1.0/arrakis_schema/find.json +52 -0
- arrakis_schema-0.1.0/arrakis_schema/partition.json +27 -0
- arrakis_schema-0.1.0/arrakis_schema/publish.json +27 -0
- arrakis_schema-0.1.0/arrakis_schema/stream.json +38 -0
- arrakis_schema-0.1.0/pyproject.toml +205 -0
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: arrakis-schema
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Schemas for the Arrakis API
|
|
5
|
+
Project-URL: Homepage, https://git.ligo.org/ngdd/arrakis-schema
|
|
6
|
+
Project-URL: Documentation, https://docs.ligo.org/ngdd/arrakis-schema
|
|
7
|
+
Project-URL: Issue Tracker, https://git.ligo.org/ngdd/arrakis-schema/issues
|
|
8
|
+
Project-URL: Source Code, https://git.ligo.org/ngdd/arrakis-schema.git
|
|
9
|
+
Author-email: Patrick Godwin <patrick.godwin@ligo.org>, Jameson Graef Rollins <jameson.rollins@ligo.org>
|
|
10
|
+
Maintainer-email: Patrick Godwin <patrick.godwin@ligo.org>
|
|
11
|
+
License-Expression: LGPL-3.0-or-later
|
|
12
|
+
Classifier: Development Status :: 3 - Alpha
|
|
13
|
+
Classifier: Intended Audience :: Developers
|
|
14
|
+
Classifier: Intended Audience :: Science/Research
|
|
15
|
+
Classifier: License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)
|
|
16
|
+
Classifier: Natural Language :: English
|
|
17
|
+
Classifier: Operating System :: POSIX
|
|
18
|
+
Classifier: Operating System :: POSIX :: Linux
|
|
19
|
+
Classifier: Programming Language :: Python
|
|
20
|
+
Classifier: Programming Language :: Python :: 3
|
|
21
|
+
Classifier: Topic :: Scientific/Engineering
|
|
22
|
+
Classifier: Topic :: Scientific/Engineering :: Astronomy
|
|
23
|
+
Classifier: Topic :: Scientific/Engineering :: Physics
|
|
24
|
+
Requires-Python: >=3.10
|
|
25
|
+
Provides-Extra: dev
|
|
26
|
+
Requires-Dist: arrakis[docs]; extra == 'dev'
|
|
27
|
+
Requires-Dist: arrakis[lint]; extra == 'dev'
|
|
28
|
+
Requires-Dist: arrakis[test]; extra == 'dev'
|
|
29
|
+
Provides-Extra: docs
|
|
30
|
+
Requires-Dist: markdown-callouts>=0.2; extra == 'docs'
|
|
31
|
+
Requires-Dist: markdown-exec>=0.5; extra == 'docs'
|
|
32
|
+
Requires-Dist: mkdocs-coverage>=0.2; extra == 'docs'
|
|
33
|
+
Requires-Dist: mkdocs-gen-files>=0.3; extra == 'docs'
|
|
34
|
+
Requires-Dist: mkdocs-literate-nav>=0.4; extra == 'docs'
|
|
35
|
+
Requires-Dist: mkdocs-material-igwn; extra == 'docs'
|
|
36
|
+
Requires-Dist: mkdocs-section-index>=0.3; extra == 'docs'
|
|
37
|
+
Requires-Dist: mkdocs>=1.3; extra == 'docs'
|
|
38
|
+
Requires-Dist: mkdocstrings[python]; extra == 'docs'
|
|
39
|
+
Requires-Dist: toml>=0.10; extra == 'docs'
|
|
40
|
+
Provides-Extra: lint
|
|
41
|
+
Requires-Dist: mypy; extra == 'lint'
|
|
42
|
+
Requires-Dist: mypy-extensions; extra == 'lint'
|
|
43
|
+
Requires-Dist: pip; extra == 'lint'
|
|
44
|
+
Requires-Dist: ruff; extra == 'lint'
|
|
45
|
+
Provides-Extra: test
|
|
46
|
+
Requires-Dist: pytest; extra == 'test'
|
|
47
|
+
Requires-Dist: pytest-cov; extra == 'test'
|
|
48
|
+
Description-Content-Type: text/markdown
|
|
49
|
+
|
|
50
|
+
<h1 align="center">arrakis-schema</h1>
|
|
51
|
+
|
|
52
|
+
<p align="center">Schemas for the Arrakis API</p>
|
|
53
|
+
|
|
54
|
+
<p align="center">
|
|
55
|
+
</p>
|
|
56
|
+
|
|
57
|
+
---
|
|
58
|
+
|
|
59
|
+
## Endpoints
|
|
60
|
+
|
|
61
|
+
The Arrakis server responds to API requests corresponding to the four
|
|
62
|
+
main actions exposed by the client API:
|
|
63
|
+
|
|
64
|
+
* **stream**
|
|
65
|
+
* **describe**
|
|
66
|
+
* **find**
|
|
67
|
+
* **count**
|
|
68
|
+
|
|
69
|
+
as well as two actions which aid in publication:
|
|
70
|
+
|
|
71
|
+
* **partition**
|
|
72
|
+
* **publish**
|
|
73
|
+
|
|
74
|
+
All API requests are done in a two-stage approach by first sending an
|
|
75
|
+
Arrow Flight descriptor to the server, returning back a Flight info object
|
|
76
|
+
which contains the request and the server to contact, contained within
|
|
77
|
+
a Flight ticket. This ticket is then sent to receive back the expected
|
|
78
|
+
payload with a specific Arrow flight schema dependent on the request,
|
|
79
|
+
serialized in the Arrow
|
|
80
|
+
.
|
|
81
|
+
|
|
82
|
+
The Flight descriptors sent to the server in the first stage are all
|
|
83
|
+
specified here as JSON packets which are UTF-8-encoded, using the command
|
|
84
|
+
variant of the Flight descriptor, which can be used to specify any
|
|
85
|
+
application-specific command.
|
|
86
|
+
|
|
87
|
+
## Schemas
|
|
88
|
+
|
|
89
|
+
The generic Flight descriptor schema is described within each endpoint in
|
|
90
|
+
`{endpoint}.json`. In addition, a generic descriptor specification for all
|
|
91
|
+
endpoints is described in `descriptor.json`.
|
|
92
|
+
|
|
93
|
+
## Usage
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
```python
|
|
97
|
+
|
|
98
|
+
from arrakis_schema import load_schema
|
|
99
|
+
|
|
100
|
+
schema = load_schema("count.json")
|
|
101
|
+
|
|
102
|
+
```
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
<h1 align="center">arrakis-schema</h1>
|
|
2
|
+
|
|
3
|
+
<p align="center">Schemas for the Arrakis API</p>
|
|
4
|
+
|
|
5
|
+
<p align="center">
|
|
6
|
+
</p>
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
## Endpoints
|
|
11
|
+
|
|
12
|
+
The Arrakis server responds to API requests corresponding to the four
|
|
13
|
+
main actions exposed by the client API:
|
|
14
|
+
|
|
15
|
+
* **stream**
|
|
16
|
+
* **describe**
|
|
17
|
+
* **find**
|
|
18
|
+
* **count**
|
|
19
|
+
|
|
20
|
+
as well as two actions which aid in publication:
|
|
21
|
+
|
|
22
|
+
* **partition**
|
|
23
|
+
* **publish**
|
|
24
|
+
|
|
25
|
+
All API requests are done in a two-stage approach by first sending an
|
|
26
|
+
Arrow Flight descriptor to the server, returning back a Flight info object
|
|
27
|
+
which contains the request and the server to contact, contained within
|
|
28
|
+
a Flight ticket. This ticket is then sent to receive back the expected
|
|
29
|
+
payload with a specific Arrow flight schema dependent on the request,
|
|
30
|
+
serialized in the Arrow
|
|
31
|
+
.
|
|
32
|
+
|
|
33
|
+
The Flight descriptors sent to the server in the first stage are all
|
|
34
|
+
specified here as JSON packets which are UTF-8-encoded, using the command
|
|
35
|
+
variant of the Flight descriptor, which can be used to specify any
|
|
36
|
+
application-specific command.
|
|
37
|
+
|
|
38
|
+
## Schemas
|
|
39
|
+
|
|
40
|
+
The generic Flight descriptor schema is described within each endpoint in
|
|
41
|
+
`{endpoint}.json`. In addition, a generic descriptor specification for all
|
|
42
|
+
endpoints is described in `descriptor.json`.
|
|
43
|
+
|
|
44
|
+
## Usage
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
```python
|
|
48
|
+
|
|
49
|
+
from arrakis_schema import load_schema
|
|
50
|
+
|
|
51
|
+
schema = load_schema("count.json")
|
|
52
|
+
|
|
53
|
+
```
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# Copyright (c) 2025, California Institute of Technology and contributors
|
|
2
|
+
#
|
|
3
|
+
# You should have received a copy of the licensing terms for this
|
|
4
|
+
# software included in the file "LICENSE" located in the top-level
|
|
5
|
+
# directory of this package. If you did not, you can view a copy at
|
|
6
|
+
# https://git.ligo.org/ngdd/arrakis-python/-/raw/main/LICENSE
|
|
7
|
+
|
|
8
|
+
from __future__ import annotations
|
|
9
|
+
|
|
10
|
+
import json
|
|
11
|
+
from importlib import resources
|
|
12
|
+
from typing import Any, TypedDict
|
|
13
|
+
|
|
14
|
+
from ._version import __version__
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
class Request(TypedDict):
|
|
18
|
+
request: str
|
|
19
|
+
args: dict[str, Any]
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
def load_schema(filename: str) -> Request:
|
|
23
|
+
"""Load the schema associated with the filename.
|
|
24
|
+
|
|
25
|
+
Parameters
|
|
26
|
+
----------
|
|
27
|
+
filename : str
|
|
28
|
+
The schema file to load.
|
|
29
|
+
|
|
30
|
+
Returns
|
|
31
|
+
-------
|
|
32
|
+
Request
|
|
33
|
+
The descriptor schema.
|
|
34
|
+
|
|
35
|
+
"""
|
|
36
|
+
resource = resources.files().joinpath(filename)
|
|
37
|
+
with resources.as_file(resource) as path:
|
|
38
|
+
return json.loads(path.read_text())
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.1.0"
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"title": "arrakis-api-count",
|
|
4
|
+
"description": "v0.1",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"properties": {
|
|
7
|
+
"request": {
|
|
8
|
+
"type": "string",
|
|
9
|
+
"const": "Count"
|
|
10
|
+
},
|
|
11
|
+
"args": {
|
|
12
|
+
"type": "object",
|
|
13
|
+
"properties": {
|
|
14
|
+
"pattern": {
|
|
15
|
+
"type": "string"
|
|
16
|
+
},
|
|
17
|
+
"data_type": {
|
|
18
|
+
"type": "array",
|
|
19
|
+
"items": {
|
|
20
|
+
"type": "string",
|
|
21
|
+
"enum": ["uint32", "uint64", "int32", "int64", "float32", "float64"]
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
"min_rate": {
|
|
25
|
+
"type": "integer",
|
|
26
|
+
"minimum": 0
|
|
27
|
+
},
|
|
28
|
+
"max_rate": {
|
|
29
|
+
"type": "integer",
|
|
30
|
+
"exclusiveminimum": 0
|
|
31
|
+
},
|
|
32
|
+
"publisher": {
|
|
33
|
+
"type": "array",
|
|
34
|
+
"items": {
|
|
35
|
+
"type": "string"
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
"required": [
|
|
40
|
+
"pattern",
|
|
41
|
+
"data_type",
|
|
42
|
+
"min_rate",
|
|
43
|
+
"max_rate",
|
|
44
|
+
"publisher"
|
|
45
|
+
]
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
"required": [
|
|
49
|
+
"request",
|
|
50
|
+
"args"
|
|
51
|
+
]
|
|
52
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"title": "arrakis-api-describe",
|
|
4
|
+
"description": "v0.1",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"properties": {
|
|
7
|
+
"request": {
|
|
8
|
+
"type": "string",
|
|
9
|
+
"const": "Describe"
|
|
10
|
+
},
|
|
11
|
+
"args": {
|
|
12
|
+
"type": "object",
|
|
13
|
+
"properties": {
|
|
14
|
+
"channels": {
|
|
15
|
+
"type": "array",
|
|
16
|
+
"items": {
|
|
17
|
+
"type": "string"
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
"required": [
|
|
22
|
+
"channels"
|
|
23
|
+
]
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
"required": [
|
|
27
|
+
"request",
|
|
28
|
+
"args"
|
|
29
|
+
]
|
|
30
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"title": "arrakis-api-descriptor",
|
|
4
|
+
"description": "v0.1",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"properties": {
|
|
7
|
+
"request": {
|
|
8
|
+
"enum": [
|
|
9
|
+
"Count",
|
|
10
|
+
"Describe",
|
|
11
|
+
"Find",
|
|
12
|
+
"Publish",
|
|
13
|
+
"Partition",
|
|
14
|
+
"Stream"
|
|
15
|
+
]
|
|
16
|
+
},
|
|
17
|
+
"args": {
|
|
18
|
+
"type": "object"
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
"required": [
|
|
22
|
+
"request",
|
|
23
|
+
"args"
|
|
24
|
+
]
|
|
25
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"title": "arrakis-api-find",
|
|
4
|
+
"description": "v0.1",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"properties": {
|
|
7
|
+
"request": {
|
|
8
|
+
"type": "string",
|
|
9
|
+
"const": "Find"
|
|
10
|
+
},
|
|
11
|
+
"args": {
|
|
12
|
+
"type": "object",
|
|
13
|
+
"properties": {
|
|
14
|
+
"pattern": {
|
|
15
|
+
"type": "string"
|
|
16
|
+
},
|
|
17
|
+
"data_type": {
|
|
18
|
+
"type": "array",
|
|
19
|
+
"items": {
|
|
20
|
+
"type": "string",
|
|
21
|
+
"enum": ["uint32", "uint64", "int32", "int64", "float32", "float64"]
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
"min_rate": {
|
|
25
|
+
"type": "integer",
|
|
26
|
+
"minimum": 0
|
|
27
|
+
},
|
|
28
|
+
"max_rate": {
|
|
29
|
+
"type": "integer",
|
|
30
|
+
"exclusiveminimum": 0
|
|
31
|
+
},
|
|
32
|
+
"publisher": {
|
|
33
|
+
"type": "array",
|
|
34
|
+
"items": {
|
|
35
|
+
"type": "string"
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
"required": [
|
|
40
|
+
"pattern",
|
|
41
|
+
"data_type",
|
|
42
|
+
"min_rate",
|
|
43
|
+
"max_rate",
|
|
44
|
+
"publisher"
|
|
45
|
+
]
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
"required": [
|
|
49
|
+
"request",
|
|
50
|
+
"args"
|
|
51
|
+
]
|
|
52
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"title": "arrakis-api-partition",
|
|
4
|
+
"description": "v0.1",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"properties": {
|
|
7
|
+
"request": {
|
|
8
|
+
"type": "string",
|
|
9
|
+
"const": "Partition"
|
|
10
|
+
},
|
|
11
|
+
"args": {
|
|
12
|
+
"type": "object",
|
|
13
|
+
"properties": {
|
|
14
|
+
"publisher_id": {
|
|
15
|
+
"type": "string"
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
"required": [
|
|
19
|
+
"publisher_id"
|
|
20
|
+
]
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
"required": [
|
|
24
|
+
"request",
|
|
25
|
+
"args"
|
|
26
|
+
]
|
|
27
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"title": "arrakis-api-publish",
|
|
4
|
+
"description": "v0.1",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"properties": {
|
|
7
|
+
"request": {
|
|
8
|
+
"type": "string",
|
|
9
|
+
"const": "Publish"
|
|
10
|
+
},
|
|
11
|
+
"args": {
|
|
12
|
+
"type": "object",
|
|
13
|
+
"properties": {
|
|
14
|
+
"publisher_id": {
|
|
15
|
+
"type": "string"
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
"required": [
|
|
19
|
+
"publisher_id"
|
|
20
|
+
]
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
"required": [
|
|
24
|
+
"request",
|
|
25
|
+
"args"
|
|
26
|
+
]
|
|
27
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"title": "arrakis-api-stream",
|
|
4
|
+
"description": "v0.1",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"properties": {
|
|
7
|
+
"request": {
|
|
8
|
+
"type": "string",
|
|
9
|
+
"const": "Stream"
|
|
10
|
+
},
|
|
11
|
+
"args": {
|
|
12
|
+
"type": "object",
|
|
13
|
+
"properties": {
|
|
14
|
+
"channels": {
|
|
15
|
+
"type": "array",
|
|
16
|
+
"items": {
|
|
17
|
+
"type": "string"
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
"start": {
|
|
21
|
+
"type": ["integer", "null"]
|
|
22
|
+
},
|
|
23
|
+
"end": {
|
|
24
|
+
"type": ["integer", "null"]
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
"required": [
|
|
28
|
+
"channels",
|
|
29
|
+
"start",
|
|
30
|
+
"end"
|
|
31
|
+
]
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
"required": [
|
|
35
|
+
"request",
|
|
36
|
+
"args"
|
|
37
|
+
]
|
|
38
|
+
}
|
|
@@ -0,0 +1,205 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = [
|
|
3
|
+
"hatchling",
|
|
4
|
+
]
|
|
5
|
+
build-backend = "hatchling.build"
|
|
6
|
+
|
|
7
|
+
[project]
|
|
8
|
+
name = "arrakis-schema"
|
|
9
|
+
authors = [
|
|
10
|
+
{ name = "Patrick Godwin", email = "patrick.godwin@ligo.org" },
|
|
11
|
+
{ name = "Jameson Graef Rollins", email = "jameson.rollins@ligo.org" },
|
|
12
|
+
]
|
|
13
|
+
maintainers = [
|
|
14
|
+
{ name = "Patrick Godwin", email = "patrick.godwin@ligo.org" },
|
|
15
|
+
]
|
|
16
|
+
description = "Schemas for the Arrakis API"
|
|
17
|
+
readme = "README.md"
|
|
18
|
+
license = "LGPL-3.0-or-later"
|
|
19
|
+
classifiers = [
|
|
20
|
+
"Development Status :: 3 - Alpha",
|
|
21
|
+
"Intended Audience :: Science/Research",
|
|
22
|
+
"Intended Audience :: Developers",
|
|
23
|
+
"License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)",
|
|
24
|
+
"Natural Language :: English",
|
|
25
|
+
"Operating System :: POSIX",
|
|
26
|
+
"Operating System :: POSIX :: Linux",
|
|
27
|
+
"Programming Language :: Python",
|
|
28
|
+
"Programming Language :: Python :: 3",
|
|
29
|
+
"Topic :: Scientific/Engineering",
|
|
30
|
+
"Topic :: Scientific/Engineering :: Astronomy",
|
|
31
|
+
"Topic :: Scientific/Engineering :: Physics",
|
|
32
|
+
]
|
|
33
|
+
dynamic = ["version"]
|
|
34
|
+
requires-python = ">=3.10"
|
|
35
|
+
|
|
36
|
+
[project.optional-dependencies]
|
|
37
|
+
test = [
|
|
38
|
+
"pytest",
|
|
39
|
+
"pytest-cov",
|
|
40
|
+
]
|
|
41
|
+
docs = [
|
|
42
|
+
"mkdocs >= 1.3",
|
|
43
|
+
"mkdocs-coverage >= 0.2",
|
|
44
|
+
"mkdocs-gen-files >= 0.3",
|
|
45
|
+
"mkdocs-literate-nav >= 0.4",
|
|
46
|
+
"mkdocs-material-igwn",
|
|
47
|
+
"mkdocs-section-index >= 0.3",
|
|
48
|
+
"mkdocstrings[python]",
|
|
49
|
+
"markdown-callouts >= 0.2",
|
|
50
|
+
"markdown-exec >= 0.5",
|
|
51
|
+
"toml >= 0.10",
|
|
52
|
+
]
|
|
53
|
+
lint = [
|
|
54
|
+
"mypy",
|
|
55
|
+
"mypy-extensions",
|
|
56
|
+
"pip", # mypy requires pip to install type stubs
|
|
57
|
+
"ruff",
|
|
58
|
+
]
|
|
59
|
+
dev = [
|
|
60
|
+
"arrakis[docs]",
|
|
61
|
+
"arrakis[lint]",
|
|
62
|
+
"arrakis[test]",
|
|
63
|
+
]
|
|
64
|
+
|
|
65
|
+
[project.urls]
|
|
66
|
+
Homepage = "https://git.ligo.org/ngdd/arrakis-schema"
|
|
67
|
+
Documentation = "https://docs.ligo.org/ngdd/arrakis-schema"
|
|
68
|
+
"Issue Tracker" = "https://git.ligo.org/ngdd/arrakis-schema/issues"
|
|
69
|
+
"Source Code" = "https://git.ligo.org/ngdd/arrakis-schema.git"
|
|
70
|
+
|
|
71
|
+
[tool.hatch.version]
|
|
72
|
+
path = "arrakis_schema/_version.py"
|
|
73
|
+
|
|
74
|
+
[tool.hatch.build.targets.sdist.force-include]
|
|
75
|
+
"../../endpoints/descriptor.json" = "arrakis_schema/descriptor.json"
|
|
76
|
+
"../../endpoints/count/descriptor.json" = "arrakis_schema/count.json"
|
|
77
|
+
"../../endpoints/describe/descriptor.json" = "arrakis_schema/describe.json"
|
|
78
|
+
"../../endpoints/find/descriptor.json" = "arrakis_schema/find.json"
|
|
79
|
+
"../../endpoints/partition/descriptor.json" = "arrakis_schema/partition.json"
|
|
80
|
+
"../../endpoints/publish/descriptor.json" = "arrakis_schema/publish.json"
|
|
81
|
+
"../../endpoints/stream/descriptor.json" = "arrakis_schema/stream.json"
|
|
82
|
+
|
|
83
|
+
[tool.hatch.build.targets.wheel.force-include]
|
|
84
|
+
"../../endpoints/descriptor.json" = "arrakis_schema/descriptor.json"
|
|
85
|
+
"../../endpoints/count/descriptor.json" = "arrakis_schema/count.json"
|
|
86
|
+
"../../endpoints/describe/descriptor.json" = "arrakis_schema/describe.json"
|
|
87
|
+
"../../endpoints/find/descriptor.json" = "arrakis_schema/find.json"
|
|
88
|
+
"../../endpoints/partition/descriptor.json" = "arrakis_schema/partition.json"
|
|
89
|
+
"../../endpoints/publish/descriptor.json" = "arrakis_schema/publish.json"
|
|
90
|
+
"../../endpoints/stream/descriptor.json" = "arrakis_schema/stream.json"
|
|
91
|
+
|
|
92
|
+
[tool.hatch.envs.default]
|
|
93
|
+
features = ["dev"]
|
|
94
|
+
installer = "uv"
|
|
95
|
+
|
|
96
|
+
[tool.hatch.envs.default.scripts]
|
|
97
|
+
check = "mypy --install-types --non-interactive arrakis_schema"
|
|
98
|
+
|
|
99
|
+
[tool.hatch.envs.docs]
|
|
100
|
+
features = ["docs"]
|
|
101
|
+
scripts.build = "mkdocs build --clean --strict"
|
|
102
|
+
scripts.serve = "mkdocs serve"
|
|
103
|
+
|
|
104
|
+
[tool.hatch.envs.hatch-static-analysis]
|
|
105
|
+
config-path = "none"
|
|
106
|
+
|
|
107
|
+
[tool.hatch.envs.hatch-test]
|
|
108
|
+
features = ["test"]
|
|
109
|
+
default-args = ["arrakis_schema/tests"]
|
|
110
|
+
extra-args = ["-ra", "-v", "-s"]
|
|
111
|
+
|
|
112
|
+
[[tool.hatch.envs.hatch-test.matrix]]
|
|
113
|
+
python = ["3.10", "3.11", "3.12"]
|
|
114
|
+
|
|
115
|
+
[tool.coverage.run]
|
|
116
|
+
source = ["arrakis_schema"]
|
|
117
|
+
omit = [
|
|
118
|
+
"arrakis_schema/tests/*",
|
|
119
|
+
"*/_version.py",
|
|
120
|
+
]
|
|
121
|
+
|
|
122
|
+
[tool.coverage.report]
|
|
123
|
+
# print report with one decimal point
|
|
124
|
+
precision = 1
|
|
125
|
+
show_missing = true
|
|
126
|
+
omit = [
|
|
127
|
+
"_version.py",
|
|
128
|
+
"tests/*",
|
|
129
|
+
]
|
|
130
|
+
|
|
131
|
+
[tool.mypy]
|
|
132
|
+
check_untyped_defs = true
|
|
133
|
+
ignore_missing_imports = true
|
|
134
|
+
exclude = [
|
|
135
|
+
"docs",
|
|
136
|
+
]
|
|
137
|
+
|
|
138
|
+
[tool.ruff]
|
|
139
|
+
line-length = 88
|
|
140
|
+
indent-width = 4
|
|
141
|
+
|
|
142
|
+
[tool.ruff.lint]
|
|
143
|
+
select = [
|
|
144
|
+
# pycodestyle
|
|
145
|
+
"E",
|
|
146
|
+
"W",
|
|
147
|
+
# pyflakes
|
|
148
|
+
"F",
|
|
149
|
+
# isort
|
|
150
|
+
"I",
|
|
151
|
+
# pep8-naming
|
|
152
|
+
"N",
|
|
153
|
+
# flake8-bandit
|
|
154
|
+
"S",
|
|
155
|
+
# flake8-blind-except
|
|
156
|
+
"BLE",
|
|
157
|
+
# flake8-boolean-trap
|
|
158
|
+
"FBT",
|
|
159
|
+
# flake8-bugbear
|
|
160
|
+
"B",
|
|
161
|
+
# flake8-builtins
|
|
162
|
+
"A",
|
|
163
|
+
# flake8-comprehensions
|
|
164
|
+
"C4",
|
|
165
|
+
# flake8-datetimez
|
|
166
|
+
"DTZ",
|
|
167
|
+
# flake8-errmsg
|
|
168
|
+
"EM",
|
|
169
|
+
# flake8-executable
|
|
170
|
+
"EXE",
|
|
171
|
+
# flake8-future-annotations
|
|
172
|
+
"FA",
|
|
173
|
+
# flake8-logging
|
|
174
|
+
"LOG",
|
|
175
|
+
# flake8-logging-format
|
|
176
|
+
"G",
|
|
177
|
+
# flake8-pytest-style
|
|
178
|
+
"PT",
|
|
179
|
+
# flake8-return
|
|
180
|
+
"RET",
|
|
181
|
+
# flake8-self
|
|
182
|
+
"SLF",
|
|
183
|
+
# flake8-simplify
|
|
184
|
+
"SIM",
|
|
185
|
+
# flake8-slots
|
|
186
|
+
"SLOT",
|
|
187
|
+
# flake8-type-checking
|
|
188
|
+
"TCH",
|
|
189
|
+
# tryceratops
|
|
190
|
+
"TRY",
|
|
191
|
+
# refurb
|
|
192
|
+
"FURB",
|
|
193
|
+
# ruff-specific rules
|
|
194
|
+
"RUF",
|
|
195
|
+
]
|
|
196
|
+
ignore = [
|
|
197
|
+
"E203", # flags whitespace on slicing
|
|
198
|
+
"S101", # assert statements
|
|
199
|
+
"B905", # strict zip
|
|
200
|
+
"C414", # unnecessary double-cast
|
|
201
|
+
"PT011", # pytest generic raises
|
|
202
|
+
]
|
|
203
|
+
|
|
204
|
+
[tool.ruff.lint.per-file-ignores]
|
|
205
|
+
"__init__.py" = ["F401"]
|