tangogql 2.2.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.
- tangogql-2.2.1/.dockerignore +2 -0
- tangogql-2.2.1/.gitignore +169 -0
- tangogql-2.2.1/.gitlab-ci.yml +28 -0
- tangogql-2.2.1/.graphqlconfig +15 -0
- tangogql-2.2.1/.pre-commit-config.yaml +10 -0
- tangogql-2.2.1/Dockerfile +40 -0
- tangogql-2.2.1/LICENSE.txt +674 -0
- tangogql-2.2.1/PKG-INFO +848 -0
- tangogql-2.2.1/README.md +147 -0
- tangogql-2.2.1/logging.ini +48 -0
- tangogql-2.2.1/logging_dev.ini +54 -0
- tangogql-2.2.1/pyproject.toml +78 -0
- tangogql-2.2.1/requirements.txt +56 -0
- tangogql-2.2.1/setup.cfg +4 -0
- tangogql-2.2.1/tangogql/__init__.py +3 -0
- tangogql-2.2.1/tangogql/_version.py +34 -0
- tangogql-2.2.1/tangogql/auth.py +64 -0
- tangogql-2.2.1/tangogql/common.py +66 -0
- tangogql-2.2.1/tangogql/dev.py +22 -0
- tangogql-2.2.1/tangogql/loaders.py +243 -0
- tangogql-2.2.1/tangogql/main.py +49 -0
- tangogql-2.2.1/tangogql/mutation.py +131 -0
- tangogql-2.2.1/tangogql/query/__init__.py +19 -0
- tangogql-2.2.1/tangogql/query/device.py +127 -0
- tangogql-2.2.1/tangogql/query/device_attribute.py +133 -0
- tangogql-2.2.1/tangogql/query/device_command.py +45 -0
- tangogql-2.2.1/tangogql/query/device_property.py +21 -0
- tangogql-2.2.1/tangogql/query/metrics.py +35 -0
- tangogql-2.2.1/tangogql/query/query.py +98 -0
- tangogql-2.2.1/tangogql/query/server.py +81 -0
- tangogql-2.2.1/tangogql/schema.py +12 -0
- tangogql-2.2.1/tangogql/settings.py +66 -0
- tangogql-2.2.1/tangogql/subscription/__init__.py +3 -0
- tangogql-2.2.1/tangogql/subscription/attributes.py +111 -0
- tangogql-2.2.1/tangogql/subscription/listener.py +607 -0
- tangogql-2.2.1/tangogql/subscription/subscription.py +36 -0
- tangogql-2.2.1/tangogql/subscription/taurus_attributes.py +115 -0
- tangogql-2.2.1/tangogql/tangogql.graphql +202 -0
- tangogql-2.2.1/tangogql/utils.py +147 -0
- tangogql-2.2.1/tangogql.egg-info/PKG-INFO +848 -0
- tangogql-2.2.1/tangogql.egg-info/SOURCES.txt +62 -0
- tangogql-2.2.1/tangogql.egg-info/dependency_links.txt +1 -0
- tangogql-2.2.1/tangogql.egg-info/requires.txt +17 -0
- tangogql-2.2.1/tangogql.egg-info/top_level.txt +1 -0
- tangogql-2.2.1/tests/__init__.py +0 -0
- tangogql-2.2.1/tests/conftest.py +21 -0
- tangogql-2.2.1/tests/integration/__init__.py +8 -0
- tangogql-2.2.1/tests/integration/conftest.py +163 -0
- tangogql-2.2.1/tests/integration/dummy.py +54 -0
- tangogql-2.2.1/tests/integration/test_mutation.py +421 -0
- tangogql-2.2.1/tests/integration/test_query.py +359 -0
- tangogql-2.2.1/tests/integration/test_query_info.py +38 -0
- tangogql-2.2.1/tests/integration/test_subscription.py +348 -0
- tangogql-2.2.1/tests/integration/testclient.py +361 -0
- tangogql-2.2.1/tests/unit/__init__.py +0 -0
- tangogql-2.2.1/tests/unit/conftest.py +28 -0
- tangogql-2.2.1/tests/unit/test_common.py +165 -0
- tangogql-2.2.1/tests/unit/test_listener.py +389 -0
- tangogql-2.2.1/tests/unit/test_loaders.py +199 -0
- tangogql-2.2.1/tests/unit/test_main.py +37 -0
- tangogql-2.2.1/tests/unit/test_query_resolvers.py +22 -0
- tangogql-2.2.1/tests/unit/test_settings.py +48 -0
- tangogql-2.2.1/tests/unit/test_utils.py +21 -0
- tangogql-2.2.1/tests/unit/test_version.py +68 -0
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
# Byte-compiled / optimized / DLL files
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
4
|
+
*$py.class
|
|
5
|
+
|
|
6
|
+
# C extensions
|
|
7
|
+
*.so
|
|
8
|
+
|
|
9
|
+
# Distribution / packaging
|
|
10
|
+
.Python
|
|
11
|
+
build/
|
|
12
|
+
develop-eggs/
|
|
13
|
+
dist/
|
|
14
|
+
downloads/
|
|
15
|
+
eggs/
|
|
16
|
+
.eggs/
|
|
17
|
+
lib/
|
|
18
|
+
lib64/
|
|
19
|
+
parts/
|
|
20
|
+
sdist/
|
|
21
|
+
var/
|
|
22
|
+
wheels/
|
|
23
|
+
share/python-wheels/
|
|
24
|
+
*.egg-info/
|
|
25
|
+
.installed.cfg
|
|
26
|
+
*.egg
|
|
27
|
+
MANIFEST
|
|
28
|
+
|
|
29
|
+
# PyInstaller
|
|
30
|
+
# Usually these files are written by a python script from a template
|
|
31
|
+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
|
32
|
+
*.manifest
|
|
33
|
+
*.spec
|
|
34
|
+
|
|
35
|
+
# Installer logs
|
|
36
|
+
pip-log.txt
|
|
37
|
+
pip-delete-this-directory.txt
|
|
38
|
+
|
|
39
|
+
# Unit test / coverage reports
|
|
40
|
+
htmlcov/
|
|
41
|
+
.tox/
|
|
42
|
+
.nox/
|
|
43
|
+
.coverage
|
|
44
|
+
.coverage.*
|
|
45
|
+
.cache
|
|
46
|
+
nosetests.xml
|
|
47
|
+
coverage.xml
|
|
48
|
+
*.cover
|
|
49
|
+
*.py,cover
|
|
50
|
+
.hypothesis/
|
|
51
|
+
.pytest_cache/
|
|
52
|
+
cover/
|
|
53
|
+
|
|
54
|
+
# Translations
|
|
55
|
+
*.mo
|
|
56
|
+
*.pot
|
|
57
|
+
|
|
58
|
+
# Django stuff:
|
|
59
|
+
*.log
|
|
60
|
+
local_settings.py
|
|
61
|
+
db.sqlite3
|
|
62
|
+
db.sqlite3-journal
|
|
63
|
+
|
|
64
|
+
# Flask stuff:
|
|
65
|
+
instance/
|
|
66
|
+
.webassets-cache
|
|
67
|
+
|
|
68
|
+
# Scrapy stuff:
|
|
69
|
+
.scrapy
|
|
70
|
+
|
|
71
|
+
# Sphinx documentation
|
|
72
|
+
docs/_build/
|
|
73
|
+
|
|
74
|
+
# PyBuilder
|
|
75
|
+
.pybuilder/
|
|
76
|
+
target/
|
|
77
|
+
|
|
78
|
+
# Jupyter Notebook
|
|
79
|
+
.ipynb_checkpoints
|
|
80
|
+
|
|
81
|
+
# IPython
|
|
82
|
+
profile_default/
|
|
83
|
+
ipython_config.py
|
|
84
|
+
|
|
85
|
+
# pyenv
|
|
86
|
+
# For a library or package, you might want to ignore these files since the code is
|
|
87
|
+
# intended to run in multiple environments; otherwise, check them in:
|
|
88
|
+
# .python-version
|
|
89
|
+
|
|
90
|
+
# pipenv
|
|
91
|
+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
|
92
|
+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
|
93
|
+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
|
|
94
|
+
# install all needed dependencies.
|
|
95
|
+
#Pipfile.lock
|
|
96
|
+
|
|
97
|
+
# poetry
|
|
98
|
+
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
|
|
99
|
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
|
100
|
+
# commonly ignored for libraries.
|
|
101
|
+
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
|
|
102
|
+
#poetry.lock
|
|
103
|
+
|
|
104
|
+
# pdm
|
|
105
|
+
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
|
|
106
|
+
#pdm.lock
|
|
107
|
+
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
|
|
108
|
+
# in version control.
|
|
109
|
+
# https://pdm.fming.dev/latest/usage/project/#working-with-version-control
|
|
110
|
+
.pdm.toml
|
|
111
|
+
.pdm-python
|
|
112
|
+
.pdm-build/
|
|
113
|
+
|
|
114
|
+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
|
|
115
|
+
__pypackages__/
|
|
116
|
+
|
|
117
|
+
# Celery stuff
|
|
118
|
+
celerybeat-schedule
|
|
119
|
+
celerybeat.pid
|
|
120
|
+
|
|
121
|
+
# SageMath parsed files
|
|
122
|
+
*.sage.py
|
|
123
|
+
|
|
124
|
+
# Environments
|
|
125
|
+
.env
|
|
126
|
+
.venv
|
|
127
|
+
env/
|
|
128
|
+
venv/
|
|
129
|
+
ENV/
|
|
130
|
+
env.bak/
|
|
131
|
+
venv.bak/
|
|
132
|
+
|
|
133
|
+
# Spyder project settings
|
|
134
|
+
.spyderproject
|
|
135
|
+
.spyproject
|
|
136
|
+
|
|
137
|
+
# Rope project settings
|
|
138
|
+
.ropeproject
|
|
139
|
+
|
|
140
|
+
# mkdocs documentation
|
|
141
|
+
/site
|
|
142
|
+
|
|
143
|
+
# mypy
|
|
144
|
+
.mypy_cache/
|
|
145
|
+
.dmypy.json
|
|
146
|
+
dmypy.json
|
|
147
|
+
|
|
148
|
+
# Pyre type checker
|
|
149
|
+
.pyre/
|
|
150
|
+
|
|
151
|
+
# pytype static type analyzer
|
|
152
|
+
.pytype/
|
|
153
|
+
|
|
154
|
+
# Cython debug symbols
|
|
155
|
+
cython_debug/
|
|
156
|
+
|
|
157
|
+
# PyCharm
|
|
158
|
+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
|
|
159
|
+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
|
|
160
|
+
# and can be added to the global gitignore or merged into this file. For a more nuclear
|
|
161
|
+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
|
|
162
|
+
#.idea/
|
|
163
|
+
|
|
164
|
+
# -------
|
|
165
|
+
|
|
166
|
+
# Project specific stuff
|
|
167
|
+
tangogql/_version.py
|
|
168
|
+
.direnv/
|
|
169
|
+
.envrc
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
---
|
|
2
|
+
stages:
|
|
3
|
+
- check
|
|
4
|
+
- build
|
|
5
|
+
- test
|
|
6
|
+
- release
|
|
7
|
+
- deploy
|
|
8
|
+
|
|
9
|
+
include:
|
|
10
|
+
- project: 'tango-controls/gitlab-ci-templates'
|
|
11
|
+
file: 'PythonPublic.gitlab-ci.yml'
|
|
12
|
+
- project: 'MaxIV/gitlab-ci-templates'
|
|
13
|
+
file: 'Taranta.gitlab-ci.yml'
|
|
14
|
+
|
|
15
|
+
run-pytest:
|
|
16
|
+
parallel:
|
|
17
|
+
matrix:
|
|
18
|
+
- PYTHON_VERSION: ["3.10", "3.11", "3.12"]
|
|
19
|
+
|
|
20
|
+
variables:
|
|
21
|
+
DEPLOY_BACKEND: 'true'
|
|
22
|
+
IMAGE_REPOSITORY_VAR: 'TANGOQL_ARIADNE_IMAGE_REPOSITORY'
|
|
23
|
+
IMAGE_TAG_VAR: 'TANGOQL_ARIADNE_IMAGE_TAG'
|
|
24
|
+
TRUSTED_PUBLISHER_ENABLED: "true"
|
|
25
|
+
|
|
26
|
+
build-image:
|
|
27
|
+
stage: build
|
|
28
|
+
when: manual
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "TangoGQL",
|
|
3
|
+
"schemaPath": "tangogql.graphql",
|
|
4
|
+
"extensions": {
|
|
5
|
+
"endpoints": {
|
|
6
|
+
"TangoGQL Endpoint": {
|
|
7
|
+
"url": "http://localhost:5004/graphiql",
|
|
8
|
+
"headers": {
|
|
9
|
+
"user-agent": "JS GraphQL"
|
|
10
|
+
},
|
|
11
|
+
"introspect": true
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# Use uv image from ghcr.io
|
|
2
|
+
# Avoid using image from dockerhub to prevent rate limiting
|
|
3
|
+
FROM ghcr.io/astral-sh/uv:python3.11-bookworm-slim
|
|
4
|
+
|
|
5
|
+
# Install git as it's required for setuptools-scm to generate the version
|
|
6
|
+
# Curl is used by some k8s liveness probe
|
|
7
|
+
RUN apt-get update && apt-get install --no-install-recommends -y \
|
|
8
|
+
git curl \
|
|
9
|
+
&& rm -rf /var/lib/apt/lists/*
|
|
10
|
+
|
|
11
|
+
# Set the working directory inside the container
|
|
12
|
+
WORKDIR /tangogql
|
|
13
|
+
|
|
14
|
+
# Copy only the requirements so this layer can be cached
|
|
15
|
+
# and updated only when they change
|
|
16
|
+
COPY requirements.txt /requirements.txt
|
|
17
|
+
# uv uses $HOME/.cache/uv to cache downloads
|
|
18
|
+
# We don't want to store that in the docker image
|
|
19
|
+
# Use a cache mount to specify a persistent location (on the host) to be used during builds
|
|
20
|
+
RUN --mount=type=cache,target=/root/.cache \
|
|
21
|
+
uv venv && uv pip install -r /requirements.txt
|
|
22
|
+
|
|
23
|
+
# Copy all files from the current directory to the working directory in the container
|
|
24
|
+
COPY . .
|
|
25
|
+
|
|
26
|
+
# Install application
|
|
27
|
+
RUN --mount=type=cache,target=/root/.cache \
|
|
28
|
+
uv pip install -e .
|
|
29
|
+
|
|
30
|
+
# Expose port 5004 to allow external access to the application
|
|
31
|
+
EXPOSE 5004
|
|
32
|
+
|
|
33
|
+
ENV PYTHONUNBUFFERED 1
|
|
34
|
+
|
|
35
|
+
ENV PATH=/tangogql/.venv/bin:$PATH
|
|
36
|
+
|
|
37
|
+
# Use CMD to run uvicorn with the required arguments
|
|
38
|
+
# using the recommended exec form
|
|
39
|
+
# See https://docs.docker.com/reference/build-checks/json-args-recommended/
|
|
40
|
+
CMD ["uvicorn", "tangogql.main:app", "--host", "0.0.0.0", "--port", "5004"]
|