diracx-db 0.0.1a16__tar.gz → 0.0.1a17__tar.gz
Sign up to get free protection for your applications and to get access to all the features.
- {diracx_db-0.0.1a16 → diracx_db-0.0.1a17}/PKG-INFO +3 -3
- {diracx_db-0.0.1a16 → diracx_db-0.0.1a17}/pyproject.toml +2 -2
- {diracx_db-0.0.1a16 → diracx_db-0.0.1a17}/src/diracx/db/sql/jobs/status_utility.py +1 -1
- {diracx_db-0.0.1a16 → diracx_db-0.0.1a17}/src/diracx/db/sql/utils.py +4 -2
- {diracx_db-0.0.1a16 → diracx_db-0.0.1a17}/src/diracx_db.egg-info/PKG-INFO +3 -3
- {diracx_db-0.0.1a16 → diracx_db-0.0.1a17}/src/diracx_db.egg-info/requires.txt +2 -2
- {diracx_db-0.0.1a16 → diracx_db-0.0.1a17}/tests/test_sandbox_metadata.py +5 -2
- {diracx_db-0.0.1a16 → diracx_db-0.0.1a17}/README.md +0 -0
- {diracx_db-0.0.1a16 → diracx_db-0.0.1a17}/setup.cfg +0 -0
- {diracx_db-0.0.1a16 → diracx_db-0.0.1a17}/src/diracx/db/__init__.py +0 -0
- {diracx_db-0.0.1a16 → diracx_db-0.0.1a17}/src/diracx/db/__main__.py +0 -0
- {diracx_db-0.0.1a16 → diracx_db-0.0.1a17}/src/diracx/db/exceptions.py +0 -0
- {diracx_db-0.0.1a16 → diracx_db-0.0.1a17}/src/diracx/db/os/__init__.py +0 -0
- {diracx_db-0.0.1a16 → diracx_db-0.0.1a17}/src/diracx/db/os/job_parameters.py +0 -0
- {diracx_db-0.0.1a16 → diracx_db-0.0.1a17}/src/diracx/db/os/utils.py +0 -0
- {diracx_db-0.0.1a16 → diracx_db-0.0.1a17}/src/diracx/db/py.typed +0 -0
- {diracx_db-0.0.1a16 → diracx_db-0.0.1a17}/src/diracx/db/sql/__init__.py +0 -0
- {diracx_db-0.0.1a16 → diracx_db-0.0.1a17}/src/diracx/db/sql/auth/__init__.py +0 -0
- {diracx_db-0.0.1a16 → diracx_db-0.0.1a17}/src/diracx/db/sql/auth/db.py +0 -0
- {diracx_db-0.0.1a16 → diracx_db-0.0.1a17}/src/diracx/db/sql/auth/schema.py +0 -0
- {diracx_db-0.0.1a16 → diracx_db-0.0.1a17}/src/diracx/db/sql/dummy/__init__.py +0 -0
- {diracx_db-0.0.1a16 → diracx_db-0.0.1a17}/src/diracx/db/sql/dummy/db.py +0 -0
- {diracx_db-0.0.1a16 → diracx_db-0.0.1a17}/src/diracx/db/sql/dummy/schema.py +0 -0
- {diracx_db-0.0.1a16 → diracx_db-0.0.1a17}/src/diracx/db/sql/jobs/__init__.py +0 -0
- {diracx_db-0.0.1a16 → diracx_db-0.0.1a17}/src/diracx/db/sql/jobs/db.py +0 -0
- {diracx_db-0.0.1a16 → diracx_db-0.0.1a17}/src/diracx/db/sql/jobs/schema.py +0 -0
- {diracx_db-0.0.1a16 → diracx_db-0.0.1a17}/src/diracx/db/sql/sandbox_metadata/__init__.py +0 -0
- {diracx_db-0.0.1a16 → diracx_db-0.0.1a17}/src/diracx/db/sql/sandbox_metadata/db.py +0 -0
- {diracx_db-0.0.1a16 → diracx_db-0.0.1a17}/src/diracx/db/sql/sandbox_metadata/schema.py +0 -0
- {diracx_db-0.0.1a16 → diracx_db-0.0.1a17}/src/diracx_db.egg-info/SOURCES.txt +0 -0
- {diracx_db-0.0.1a16 → diracx_db-0.0.1a17}/src/diracx_db.egg-info/dependency_links.txt +0 -0
- {diracx_db-0.0.1a16 → diracx_db-0.0.1a17}/src/diracx_db.egg-info/entry_points.txt +0 -0
- {diracx_db-0.0.1a16 → diracx_db-0.0.1a17}/src/diracx_db.egg-info/top_level.txt +0 -0
- {diracx_db-0.0.1a16 → diracx_db-0.0.1a17}/tests/auth/test_authorization_flow.py +0 -0
- {diracx_db-0.0.1a16 → diracx_db-0.0.1a17}/tests/auth/test_device_flow.py +0 -0
- {diracx_db-0.0.1a16 → diracx_db-0.0.1a17}/tests/auth/test_refresh_token.py +0 -0
- {diracx_db-0.0.1a16 → diracx_db-0.0.1a17}/tests/jobs/test_jobDB.py +0 -0
- {diracx_db-0.0.1a16 → diracx_db-0.0.1a17}/tests/jobs/test_jobLoggingDB.py +0 -0
- {diracx_db-0.0.1a16 → diracx_db-0.0.1a17}/tests/opensearch/test_connection.py +0 -0
- {diracx_db-0.0.1a16 → diracx_db-0.0.1a17}/tests/opensearch/test_index_template.py +0 -0
- {diracx_db-0.0.1a16 → diracx_db-0.0.1a17}/tests/opensearch/test_search.py +0 -0
- {diracx_db-0.0.1a16 → diracx_db-0.0.1a17}/tests/test_dummyDB.py +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: diracx-db
|
3
|
-
Version: 0.0.
|
3
|
+
Version: 0.0.1a17
|
4
4
|
Summary: TODO
|
5
5
|
License: GPL-3.0-only
|
6
6
|
Classifier: Intended Audience :: Science/Research
|
@@ -14,7 +14,7 @@ Requires-Dist: dirac
|
|
14
14
|
Requires-Dist: diracx-core
|
15
15
|
Requires-Dist: fastapi
|
16
16
|
Requires-Dist: opensearch-py[async]
|
17
|
-
Requires-Dist: pydantic
|
18
|
-
Requires-Dist: sqlalchemy[aiomysql,aiosqlite]
|
17
|
+
Requires-Dist: pydantic>=2.4
|
18
|
+
Requires-Dist: sqlalchemy[aiomysql,aiosqlite]>=2
|
19
19
|
Provides-Extra: testing
|
20
20
|
Requires-Dist: diracx-testing; extra == "testing"
|
@@ -41,7 +41,7 @@ async def set_job_status(
|
|
41
41
|
# transform JobStateUpdate objects into dicts
|
42
42
|
statusDict = {}
|
43
43
|
for key, value in status.items():
|
44
|
-
statusDict[key] = {k: v for k, v in value.
|
44
|
+
statusDict[key] = {k: v for k, v in value.model_dump().items() if v is not None}
|
45
45
|
|
46
46
|
_, res = await job_db.search(
|
47
47
|
parameters=["Status", "StartExecTime", "EndExecTime"],
|
@@ -11,7 +11,7 @@ from datetime import datetime, timedelta, timezone
|
|
11
11
|
from functools import partial
|
12
12
|
from typing import TYPE_CHECKING, AsyncIterator, Self, cast
|
13
13
|
|
14
|
-
from pydantic import
|
14
|
+
from pydantic import TypeAdapter
|
15
15
|
from sqlalchemy import Column as RawColumn
|
16
16
|
from sqlalchemy import DateTime, Enum, MetaData, select
|
17
17
|
from sqlalchemy.exc import OperationalError
|
@@ -123,7 +123,9 @@ class BaseSQLDB(metaclass=ABCMeta):
|
|
123
123
|
if db_url == "sqlite+aiosqlite:///:memory:":
|
124
124
|
db_urls[db_name] = db_url
|
125
125
|
else:
|
126
|
-
db_urls[db_name] =
|
126
|
+
db_urls[db_name] = str(
|
127
|
+
TypeAdapter(SqlalchemyDsn).validate_python(db_url)
|
128
|
+
)
|
127
129
|
except Exception:
|
128
130
|
logger.error("Error loading URL for %s", db_name)
|
129
131
|
raise
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: diracx-db
|
3
|
-
Version: 0.0.
|
3
|
+
Version: 0.0.1a17
|
4
4
|
Summary: TODO
|
5
5
|
License: GPL-3.0-only
|
6
6
|
Classifier: Intended Audience :: Science/Research
|
@@ -14,7 +14,7 @@ Requires-Dist: dirac
|
|
14
14
|
Requires-Dist: diracx-core
|
15
15
|
Requires-Dist: fastapi
|
16
16
|
Requires-Dist: opensearch-py[async]
|
17
|
-
Requires-Dist: pydantic
|
18
|
-
Requires-Dist: sqlalchemy[aiomysql,aiosqlite]
|
17
|
+
Requires-Dist: pydantic>=2.4
|
18
|
+
Requires-Dist: sqlalchemy[aiomysql,aiosqlite]>=2
|
19
19
|
Provides-Extra: testing
|
20
20
|
Requires-Dist: diracx-testing; extra == "testing"
|
@@ -26,13 +26,16 @@ def test_get_pfn(sandbox_metadata_db: SandboxMetadataDB):
|
|
26
26
|
sub="vo:sub", preferred_username="user1", dirac_group="group1", vo="vo"
|
27
27
|
)
|
28
28
|
sandbox_info = SandboxInfo(
|
29
|
-
checksum="
|
29
|
+
checksum="90e0ba6763c91a905bb9fd6e025aac1952ae742e6d756a31a0963aa7df7cd7b1",
|
30
30
|
checksum_algorithm="sha256",
|
31
31
|
format="tar.bz2",
|
32
32
|
size=100,
|
33
33
|
)
|
34
34
|
pfn = sandbox_metadata_db.get_pfn("bucket1", user_info, sandbox_info)
|
35
|
-
assert pfn ==
|
35
|
+
assert pfn == (
|
36
|
+
"/S3/bucket1/vo/group1/user1/"
|
37
|
+
"sha256:90e0ba6763c91a905bb9fd6e025aac1952ae742e6d756a31a0963aa7df7cd7b1.tar.bz2"
|
38
|
+
)
|
36
39
|
|
37
40
|
|
38
41
|
async def test_insert_sandbox(sandbox_metadata_db: SandboxMetadataDB):
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|