elapi 2.4.5__tar.gz → 2.4.7__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.
- {elapi-2.4.5 → elapi-2.4.7}/PKG-INFO +2 -2
- {elapi-2.4.5 → elapi-2.4.7}/README.md +1 -1
- {elapi-2.4.5 → elapi-2.4.7}/pyproject.toml +1 -1
- elapi-2.4.7/src/elapi/VERSION +1 -0
- {elapi-2.4.5 → elapi-2.4.7}/src/elapi/api/_names.py +2 -0
- elapi-2.4.7/src/elapi/api/_supported_versions/5.3.8.json +56 -0
- elapi-2.4.7/src/elapi/api/_supported_versions/5.3.9.json +56 -0
- {elapi-2.4.5 → elapi-2.4.7}/src/elapi/configuration/validators.py +2 -1
- {elapi-2.4.5 → elapi-2.4.7}/src/elapi/plugins/bill_teams/specification.py +20 -3
- {elapi-2.4.5 → elapi-2.4.7}/src/elapi/plugins/bill_teams/validators.py +25 -2
- elapi-2.4.5/src/elapi/VERSION +0 -1
- {elapi-2.4.5 → elapi-2.4.7}/LICENSE +0 -0
- {elapi-2.4.5 → elapi-2.4.7}/src/elapi/.DS_Store +0 -0
- {elapi-2.4.5 → elapi-2.4.7}/src/elapi/__init__.py +0 -0
- {elapi-2.4.5 → elapi-2.4.7}/src/elapi/_core_init/__init__.py +0 -0
- {elapi-2.4.5 → elapi-2.4.7}/src/elapi/_core_init/_cache.py +0 -0
- {elapi-2.4.5 → elapi-2.4.7}/src/elapi/_core_init/_loggers/__init__.py +0 -0
- {elapi-2.4.5 → elapi-2.4.7}/src/elapi/_core_init/_loggers/base.py +0 -0
- {elapi-2.4.5 → elapi-2.4.7}/src/elapi/_core_init/_loggers/handlers/__init__.py +0 -0
- {elapi-2.4.5 → elapi-2.4.7}/src/elapi/_core_init/_loggers/handlers/base.py +0 -0
- {elapi-2.4.5 → elapi-2.4.7}/src/elapi/_core_init/_loggers/handlers/callback.py +0 -0
- {elapi-2.4.5 → elapi-2.4.7}/src/elapi/_core_init/_loggers/handlers/stderr.py +0 -0
- {elapi-2.4.5 → elapi-2.4.7}/src/elapi/_core_init/_utils.py +0 -0
- {elapi-2.4.5 → elapi-2.4.7}/src/elapi/_names.py +0 -0
- {elapi-2.4.5 → elapi-2.4.7}/src/elapi/_vendor/__init__.py +0 -0
- {elapi-2.4.5 → elapi-2.4.7}/src/elapi/_vendor/haggis/LICENSE +0 -0
- {elapi-2.4.5 → elapi-2.4.7}/src/elapi/_vendor/haggis/__init__.py +0 -0
- {elapi-2.4.5 → elapi-2.4.7}/src/elapi/_vendor/haggis/logs.py +0 -0
- {elapi-2.4.5 → elapi-2.4.7}/src/elapi/_vendor/haggis/version.py +0 -0
- {elapi-2.4.5 → elapi-2.4.7}/src/elapi/api/__init__.py +0 -0
- {elapi-2.4.5 → elapi-2.4.7}/src/elapi/api/_handle_unexp_response.py +0 -0
- {elapi-2.4.5 → elapi-2.4.7}/src/elapi/api/_openapi_parser.py +0 -0
- {elapi-2.4.5 → elapi-2.4.7}/src/elapi/api/_supported_versions/5.1.15.json +0 -0
- {elapi-2.4.5 → elapi-2.4.7}/src/elapi/api/_supported_versions/5.2.0.json +0 -0
- {elapi-2.4.5 → elapi-2.4.7}/src/elapi/api/_supported_versions/5.2.1.json +0 -0
- {elapi-2.4.5 → elapi-2.4.7}/src/elapi/api/_supported_versions/5.2.2.json +0 -0
- {elapi-2.4.5 → elapi-2.4.7}/src/elapi/api/_supported_versions/5.2.3.json +0 -0
- {elapi-2.4.5 → elapi-2.4.7}/src/elapi/api/_supported_versions/5.2.4.json +0 -0
- {elapi-2.4.5 → elapi-2.4.7}/src/elapi/api/_supported_versions/5.2.5.json +0 -0
- {elapi-2.4.5 → elapi-2.4.7}/src/elapi/api/_supported_versions/5.2.6.json +0 -0
- {elapi-2.4.5 → elapi-2.4.7}/src/elapi/api/_supported_versions/5.2.7.json +0 -0
- {elapi-2.4.5 → elapi-2.4.7}/src/elapi/api/_supported_versions/5.2.8.json +0 -0
- {elapi-2.4.5 → elapi-2.4.7}/src/elapi/api/_supported_versions/5.3.0.json +0 -0
- {elapi-2.4.5 → elapi-2.4.7}/src/elapi/api/_supported_versions/5.3.1.json +0 -0
- {elapi-2.4.5 → elapi-2.4.7}/src/elapi/api/_supported_versions/5.3.2.json +0 -0
- {elapi-2.4.5 → elapi-2.4.7}/src/elapi/api/_supported_versions/5.3.3.json +0 -0
- {elapi-2.4.5 → elapi-2.4.7}/src/elapi/api/_supported_versions/5.3.4.json +0 -0
- {elapi-2.4.5 → elapi-2.4.7}/src/elapi/api/_supported_versions/5.3.5.json +0 -0
- {elapi-2.4.5 → elapi-2.4.7}/src/elapi/api/_supported_versions/5.3.6.json +0 -0
- {elapi-2.4.5 → elapi-2.4.7}/src/elapi/api/_supported_versions/5.3.7.json +0 -0
- {elapi-2.4.5 → elapi-2.4.7}/src/elapi/api/api.py +0 -0
- {elapi-2.4.5 → elapi-2.4.7}/src/elapi/api/endpoint.py +0 -0
- {elapi-2.4.5 → elapi-2.4.7}/src/elapi/api/validators.py +0 -0
- {elapi-2.4.5 → elapi-2.4.7}/src/elapi/cli/__init__.py +0 -0
- {elapi-2.4.5 → elapi-2.4.7}/src/elapi/cli/__main__.py +0 -0
- {elapi-2.4.5 → elapi-2.4.7}/src/elapi/cli/_plugin_handler.py +0 -0
- {elapi-2.4.5 → elapi-2.4.7}/src/elapi/cli/_venv_state_manager.py +0 -0
- {elapi-2.4.5 → elapi-2.4.7}/src/elapi/cli/doc.py +0 -0
- {elapi-2.4.5 → elapi-2.4.7}/src/elapi/cli/elapi.py +0 -0
- {elapi-2.4.5 → elapi-2.4.7}/src/elapi/configuration/__init__.py +0 -0
- {elapi-2.4.5 → elapi-2.4.7}/src/elapi/configuration/_config_history.py +0 -0
- {elapi-2.4.5 → elapi-2.4.7}/src/elapi/configuration/_overload_history.py +0 -0
- {elapi-2.4.5 → elapi-2.4.7}/src/elapi/configuration/config.py +0 -0
- {elapi-2.4.5 → elapi-2.4.7}/src/elapi/configuration/overridable_vars.py +0 -0
- {elapi-2.4.5 → elapi-2.4.7}/src/elapi/core_validators/__init__.py +0 -0
- {elapi-2.4.5 → elapi-2.4.7}/src/elapi/core_validators/base.py +0 -0
- {elapi-2.4.5 → elapi-2.4.7}/src/elapi/core_validators/path.py +0 -0
- {elapi-2.4.5 → elapi-2.4.7}/src/elapi/loggers/__init__.py +0 -0
- {elapi-2.4.5 → elapi-2.4.7}/src/elapi/loggers/base.py +0 -0
- {elapi-2.4.5 → elapi-2.4.7}/src/elapi/loggers/handlers/__init__.py +0 -0
- {elapi-2.4.5 → elapi-2.4.7}/src/elapi/loggers/handlers/file.py +0 -0
- {elapi-2.4.5 → elapi-2.4.7}/src/elapi/loggers/log_file.py +0 -0
- {elapi-2.4.5 → elapi-2.4.7}/src/elapi/path.py +0 -0
- {elapi-2.4.5 → elapi-2.4.7}/src/elapi/plugins/.DS_Store +0 -0
- {elapi-2.4.5 → elapi-2.4.7}/src/elapi/plugins/__init__.py +0 -0
- {elapi-2.4.5 → elapi-2.4.7}/src/elapi/plugins/bill_teams/__init__.py +0 -0
- {elapi-2.4.5 → elapi-2.4.7}/src/elapi/plugins/bill_teams/_doc.py +0 -0
- {elapi-2.4.5 → elapi-2.4.7}/src/elapi/plugins/bill_teams/bill_teams.py +0 -0
- {elapi-2.4.5 → elapi-2.4.7}/src/elapi/plugins/bill_teams/cli.py +0 -0
- {elapi-2.4.5 → elapi-2.4.7}/src/elapi/plugins/bill_teams/configuration.py +0 -0
- {elapi-2.4.5 → elapi-2.4.7}/src/elapi/plugins/bill_teams/formats.py +0 -0
- {elapi-2.4.5 → elapi-2.4.7}/src/elapi/plugins/bill_teams/generate_table.py +0 -0
- {elapi-2.4.5 → elapi-2.4.7}/src/elapi/plugins/bill_teams/logger.py +0 -0
- {elapi-2.4.5 → elapi-2.4.7}/src/elapi/plugins/bill_teams/names.py +0 -0
- {elapi-2.4.5 → elapi-2.4.7}/src/elapi/plugins/bill_teams/registry.py +0 -0
- {elapi-2.4.5 → elapi-2.4.7}/src/elapi/plugins/bill_teams/utils.py +0 -0
- {elapi-2.4.5 → elapi-2.4.7}/src/elapi/plugins/commons/__init__.py +0 -0
- {elapi-2.4.5 → elapi-2.4.7}/src/elapi/plugins/commons/cli.py +0 -0
- {elapi-2.4.5 → elapi-2.4.7}/src/elapi/plugins/commons/cli_helpers.py +0 -0
- {elapi-2.4.5 → elapi-2.4.7}/src/elapi/plugins/commons/export.py +0 -0
- {elapi-2.4.5 → elapi-2.4.7}/src/elapi/plugins/commons/get_data_from_input_or_path.py +0 -0
- {elapi-2.4.5 → elapi-2.4.7}/src/elapi/plugins/commons/get_information.py +0 -0
- {elapi-2.4.5 → elapi-2.4.7}/src/elapi/plugins/commons/get_location_from_headers.py +0 -0
- {elapi-2.4.5 → elapi-2.4.7}/src/elapi/plugins/commons/get_whoami.py +0 -0
- {elapi-2.4.5 → elapi-2.4.7}/src/elapi/plugins/experiments/__init__.py +0 -0
- {elapi-2.4.5 → elapi-2.4.7}/src/elapi/plugins/experiments/_doc.py +0 -0
- {elapi-2.4.5 → elapi-2.4.7}/src/elapi/plugins/experiments/cli.py +0 -0
- {elapi-2.4.5 → elapi-2.4.7}/src/elapi/plugins/experiments/experiments.py +0 -0
- {elapi-2.4.5 → elapi-2.4.7}/src/elapi/plugins/experiments/formats.py +0 -0
- {elapi-2.4.5 → elapi-2.4.7}/src/elapi/plugins/mail/__init__.py +0 -0
- {elapi-2.4.5 → elapi-2.4.7}/src/elapi/plugins/mail/_yagmail_patch.py +0 -0
- {elapi-2.4.5 → elapi-2.4.7}/src/elapi/plugins/mail/cli.py +0 -0
- {elapi-2.4.5 → elapi-2.4.7}/src/elapi/plugins/mail/configuration.py +0 -0
- {elapi-2.4.5 → elapi-2.4.7}/src/elapi/plugins/mail/mail.py +0 -0
- {elapi-2.4.5 → elapi-2.4.7}/src/elapi/plugins/mail/names.py +0 -0
- {elapi-2.4.5 → elapi-2.4.7}/src/elapi/plugins/mail/yagmail_configuration.py +0 -0
- {elapi-2.4.5 → elapi-2.4.7}/src/elapi/plugins/show_config.py +0 -0
- {elapi-2.4.5 → elapi-2.4.7}/src/elapi/styles/__init__.py +0 -0
- {elapi-2.4.5 → elapi-2.4.7}/src/elapi/styles/_markdown_doc.py +0 -0
- {elapi-2.4.5 → elapi-2.4.7}/src/elapi/styles/_missing.py +0 -0
- {elapi-2.4.5 → elapi-2.4.7}/src/elapi/styles/base.py +0 -0
- {elapi-2.4.5 → elapi-2.4.7}/src/elapi/styles/colors.py +0 -0
- {elapi-2.4.5 → elapi-2.4.7}/src/elapi/styles/formats.py +0 -0
- {elapi-2.4.5 → elapi-2.4.7}/src/elapi/styles/highlight.py +0 -0
- {elapi-2.4.5 → elapi-2.4.7}/src/elapi/styles/rich_utils.py +0 -0
- {elapi-2.4.5 → elapi-2.4.7}/src/elapi/utils/__init__.py +0 -0
- {elapi-2.4.5 → elapi-2.4.7}/src/elapi/utils/messages.py +0 -0
- {elapi-2.4.5 → elapi-2.4.7}/src/elapi/utils/typer_patches.py +0 -0
- {elapi-2.4.5 → elapi-2.4.7}/src/elapi/utils/utils.py +0 -0
- {elapi-2.4.5 → elapi-2.4.7}/src/elapi/validators.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: elapi
|
|
3
|
-
Version: 2.4.
|
|
3
|
+
Version: 2.4.7
|
|
4
4
|
Summary: elAPI is a powerful, extensible API client for eLabFTW.
|
|
5
5
|
Keywords: elabftw,api
|
|
6
6
|
Author: Alexander Haller, Mahadi Xion
|
|
@@ -143,7 +143,7 @@ your configuration details.
|
|
|
143
143
|
|
|
144
144
|
elAPI is compatible with the following Python versions: `3.11`, `3.12`, `3.13`, `3.14`. elAPI supports
|
|
145
145
|
the [eLabFTW REST API v2](https://doc.elabftw.net/api/v2/), and can be used with the following eLabFTW
|
|
146
|
-
versions: `5.3.6`, `5.3.5`, `5.3.4`, `5.3.3`, `5.3.2`, `5.3.1`, `5.3.0`, `5.2.8`, `5.2.7`, `5.2.6`, `5.2.5`, `5.2.4`,
|
|
146
|
+
versions: `5.3.9`, `5.3.8`, `5.3.7`, ```5.3.6`, `5.3.5`, `5.3.4`, `5.3.3`, `5.3.2`, `5.3.1`, `5.3.0`, `5.2.8`, `5.2.7`, `5.2.6`, `5.2.5`, `5.2.4`,
|
|
147
147
|
`5.2.3`, `5.2.2`, `5.2.1`, `5.2.0`, `5.1.1`.
|
|
148
148
|
|
|
149
149
|
### elAPI strict version support
|
|
@@ -93,7 +93,7 @@ your configuration details.
|
|
|
93
93
|
|
|
94
94
|
elAPI is compatible with the following Python versions: `3.11`, `3.12`, `3.13`, `3.14`. elAPI supports
|
|
95
95
|
the [eLabFTW REST API v2](https://doc.elabftw.net/api/v2/), and can be used with the following eLabFTW
|
|
96
|
-
versions: `5.3.6`, `5.3.5`, `5.3.4`, `5.3.3`, `5.3.2`, `5.3.1`, `5.3.0`, `5.2.8`, `5.2.7`, `5.2.6`, `5.2.5`, `5.2.4`,
|
|
96
|
+
versions: `5.3.9`, `5.3.8`, `5.3.7`, ```5.3.6`, `5.3.5`, `5.3.4`, `5.3.3`, `5.3.2`, `5.3.1`, `5.3.0`, `5.2.8`, `5.2.7`, `5.2.6`, `5.2.5`, `5.2.4`,
|
|
97
97
|
`5.2.3`, `5.2.2`, `5.2.1`, `5.2.0`, `5.1.1`.
|
|
98
98
|
|
|
99
99
|
### elAPI strict version support
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "elapi"
|
|
3
|
-
version = "2.4.
|
|
3
|
+
version = "2.4.7"
|
|
4
4
|
description = "elAPI is a powerful, extensible API client for eLabFTW."
|
|
5
5
|
authors = [{ name = "Alexander Haller, Mahadi Xion", email = "elabftw@uni-heidelberg.de" }]
|
|
6
6
|
requires-python = ">=3.11.0,<4"
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
2.4.7
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
{
|
|
2
|
+
"apikeys": [],
|
|
3
|
+
"compounds": [],
|
|
4
|
+
"config": [],
|
|
5
|
+
"event": [],
|
|
6
|
+
"events": [],
|
|
7
|
+
"experiments": [
|
|
8
|
+
"comments",
|
|
9
|
+
"compounds",
|
|
10
|
+
"experiments_links",
|
|
11
|
+
"items_links",
|
|
12
|
+
"revisions",
|
|
13
|
+
"steps",
|
|
14
|
+
"tags",
|
|
15
|
+
"uploads"
|
|
16
|
+
],
|
|
17
|
+
"experiments_templates": [
|
|
18
|
+
"revisions",
|
|
19
|
+
"steps",
|
|
20
|
+
"tags"
|
|
21
|
+
],
|
|
22
|
+
"exports": [],
|
|
23
|
+
"extra_fields_keys": [],
|
|
24
|
+
"favtags": [],
|
|
25
|
+
"idps": [],
|
|
26
|
+
"import": [],
|
|
27
|
+
"info": [],
|
|
28
|
+
"items": [
|
|
29
|
+
"comments",
|
|
30
|
+
"compounds",
|
|
31
|
+
"experiments_links",
|
|
32
|
+
"items_links",
|
|
33
|
+
"revisions",
|
|
34
|
+
"steps",
|
|
35
|
+
"tags",
|
|
36
|
+
"uploads"
|
|
37
|
+
],
|
|
38
|
+
"items_types": [
|
|
39
|
+
"steps",
|
|
40
|
+
"tags"
|
|
41
|
+
],
|
|
42
|
+
"reports": [],
|
|
43
|
+
"teams": [
|
|
44
|
+
"experiments_categories",
|
|
45
|
+
"experiments_status",
|
|
46
|
+
"items_status",
|
|
47
|
+
"resources_categories",
|
|
48
|
+
"teamgroups"
|
|
49
|
+
],
|
|
50
|
+
"todolist": [],
|
|
51
|
+
"unfinished_steps": [],
|
|
52
|
+
"users": [
|
|
53
|
+
"notifications",
|
|
54
|
+
"uploads"
|
|
55
|
+
]
|
|
56
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
{
|
|
2
|
+
"apikeys": [],
|
|
3
|
+
"compounds": [],
|
|
4
|
+
"config": [],
|
|
5
|
+
"event": [],
|
|
6
|
+
"events": [],
|
|
7
|
+
"experiments": [
|
|
8
|
+
"comments",
|
|
9
|
+
"compounds",
|
|
10
|
+
"experiments_links",
|
|
11
|
+
"items_links",
|
|
12
|
+
"revisions",
|
|
13
|
+
"steps",
|
|
14
|
+
"tags",
|
|
15
|
+
"uploads"
|
|
16
|
+
],
|
|
17
|
+
"experiments_templates": [
|
|
18
|
+
"revisions",
|
|
19
|
+
"steps",
|
|
20
|
+
"tags"
|
|
21
|
+
],
|
|
22
|
+
"exports": [],
|
|
23
|
+
"extra_fields_keys": [],
|
|
24
|
+
"favtags": [],
|
|
25
|
+
"idps": [],
|
|
26
|
+
"import": [],
|
|
27
|
+
"info": [],
|
|
28
|
+
"items": [
|
|
29
|
+
"comments",
|
|
30
|
+
"compounds",
|
|
31
|
+
"experiments_links",
|
|
32
|
+
"items_links",
|
|
33
|
+
"revisions",
|
|
34
|
+
"steps",
|
|
35
|
+
"tags",
|
|
36
|
+
"uploads"
|
|
37
|
+
],
|
|
38
|
+
"items_types": [
|
|
39
|
+
"steps",
|
|
40
|
+
"tags"
|
|
41
|
+
],
|
|
42
|
+
"reports": [],
|
|
43
|
+
"teams": [
|
|
44
|
+
"experiments_categories",
|
|
45
|
+
"experiments_status",
|
|
46
|
+
"items_status",
|
|
47
|
+
"resources_categories",
|
|
48
|
+
"teamgroups"
|
|
49
|
+
],
|
|
50
|
+
"todolist": [],
|
|
51
|
+
"unfinished_steps": [],
|
|
52
|
+
"users": [
|
|
53
|
+
"notifications",
|
|
54
|
+
"uploads"
|
|
55
|
+
]
|
|
56
|
+
}
|
|
@@ -329,7 +329,8 @@ class ElabVersionModeWithFallbackConfigurationValidator(
|
|
|
329
329
|
f"The default value '{self.fallback_value}' will be used instead."
|
|
330
330
|
)
|
|
331
331
|
return self.fallback_value
|
|
332
|
-
if value.lower() not in ElabStrictVersionMatchModes:
|
|
332
|
+
if value.lower() not in ElabStrictVersionMatchModes.__members__.values():
|
|
333
|
+
# Python 3.11.2 doesn't support "v in ElabStrictVersionMatchModes"
|
|
333
334
|
logger.warning(
|
|
334
335
|
f"'{self.key_name.lower()}' is detected in configuration file, "
|
|
335
336
|
f"but it's value '{value}' is not valid. Valid values: "
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
from dataclasses import dataclass
|
|
2
2
|
from datetime import datetime
|
|
3
3
|
|
|
4
|
+
from ...configuration import DEFAULT_EXPORT_DATA_FORMAT
|
|
5
|
+
from ...plugins.commons.export import Export
|
|
4
6
|
from .names import (
|
|
5
7
|
REGISTRY_SUB_PLUGIN_NAME,
|
|
6
8
|
TARGET_GROUP_NAME,
|
|
7
|
-
TARGET_GROUP_OWNER_NAME,
|
|
8
9
|
TARGET_GROUP_NAME_SINGULAR,
|
|
10
|
+
TARGET_GROUP_OWNER_NAME,
|
|
9
11
|
)
|
|
10
|
-
from ...configuration import DEFAULT_EXPORT_DATA_FORMAT
|
|
11
|
-
from ...plugins.commons.export import Export
|
|
12
12
|
|
|
13
13
|
BILLING_INFO_OUTPUT_EXTENSION: str = DEFAULT_EXPORT_DATA_FORMAT
|
|
14
14
|
BILLING_INFO_OUTPUT_TEAMS_INFO_FILE_NAME_STUB: str = f"{TARGET_GROUP_NAME}_info"
|
|
@@ -59,10 +59,27 @@ class OwnersDataSpecification:
|
|
|
59
59
|
TEAM_ACRONYM_EXT: str = "team_acronymext"
|
|
60
60
|
TEAM_ACRONYM_INT: str = "team_acronymint"
|
|
61
61
|
TEAM_GONE: str = "team_gone"
|
|
62
|
+
# Mostly extra column names for completeness's sake.
|
|
63
|
+
# We will likely not need to use them in bill-teams.
|
|
62
64
|
TEAM_SPECIAL: str = "team_special"
|
|
63
65
|
TEAM_LIME_SURVEY: str = "team_limesurvey"
|
|
64
66
|
TEAM_SIGNED_CONTRACT: str = "team_signedcontract"
|
|
65
67
|
TEAM_END_DATE: str = "team_enddate"
|
|
68
|
+
TEAM_CONTRACT_2_SECT: str = "team_contracttosecretary"
|
|
69
|
+
TEAM_DOUBLE_SIGNED: str = "team_doublesignedcontract"
|
|
70
|
+
TEAM_SENT_SIGNED_CONTRACT: str = "team_sentsignedcontract"
|
|
71
|
+
TEAM_CONTRACT_NAME: str = "team_contractname"
|
|
72
|
+
TEAM_SET_EXPIRATION: str = "team_setexpiration"
|
|
73
|
+
TEAM_SET_REMINDER: str = "team_setreminder"
|
|
74
|
+
TEAM_COMMENT: str = "team_comment"
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
@dataclass
|
|
78
|
+
class TeamGoneStatus:
|
|
79
|
+
not_gone: str = "0"
|
|
80
|
+
contract_expired: str = "1"
|
|
81
|
+
deleted: str = "deleted" # team deleted from the eLabFTW server
|
|
82
|
+
pattern: str = rf"^[{not_gone}{contract_expired}]$|^{deleted}$"
|
|
66
83
|
|
|
67
84
|
|
|
68
85
|
@dataclass
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import datetime
|
|
2
2
|
import json
|
|
3
|
+
from copy import copy
|
|
3
4
|
from json import JSONDecodeError
|
|
4
5
|
from pathlib import Path
|
|
5
6
|
from types import NoneType
|
|
@@ -18,6 +19,7 @@ from .specification import (
|
|
|
18
19
|
REGISTRY_KEY_OWNERS_INFO_DATE,
|
|
19
20
|
REGISTRY_KEY_TEAMS_INFO_DATE,
|
|
20
21
|
OwnersDataSpecification,
|
|
22
|
+
TeamGoneStatus,
|
|
21
23
|
)
|
|
22
24
|
|
|
23
25
|
logger = Logger()
|
|
@@ -30,7 +32,7 @@ class OwnersInformationContainer:
|
|
|
30
32
|
def __init__(self, data: dict, /):
|
|
31
33
|
self.data = data
|
|
32
34
|
|
|
33
|
-
def get(self, team_id: Union[str, int], column_name: str) ->
|
|
35
|
+
def get(self, team_id: Union[str, int], column_name: str) -> str:
|
|
34
36
|
if not isinstance(team_id, int):
|
|
35
37
|
try:
|
|
36
38
|
team_id = int(team_id)
|
|
@@ -201,7 +203,28 @@ class OwnersInformationValidator(Validator):
|
|
|
201
203
|
# See: https://stackoverflow.com/a/48850520, https://stackoverflow.com/a/24999035
|
|
202
204
|
except (SanitizationError, FormatError) as e:
|
|
203
205
|
raise ValidationError(e)
|
|
204
|
-
|
|
206
|
+
# spec.TEAM_GONE is validated weakly
|
|
207
|
+
for owner_team_id in copy(owner_ids):
|
|
208
|
+
team_gone_status = self.owners.get(owner_team_id, spec.TEAM_GONE)
|
|
209
|
+
try:
|
|
210
|
+
formatter.format(
|
|
211
|
+
owner_team_id,
|
|
212
|
+
spec.TEAM_GONE,
|
|
213
|
+
expected_pattern=TeamGoneStatus.pattern,
|
|
214
|
+
function_to_apply=lambda x: str(x).lower(),
|
|
215
|
+
)
|
|
216
|
+
# format sets spec.TEAM_GONE to self.owners.data!
|
|
217
|
+
except (SanitizationError, FormatError):
|
|
218
|
+
logger.debug(
|
|
219
|
+
f"Column '{spec.TEAM_GONE}' has value that is unexpected: "
|
|
220
|
+
f"'{team_gone_status}'. While this column is not "
|
|
221
|
+
f"really used for the final billing output table, this issue "
|
|
222
|
+
f"should still be fixed."
|
|
223
|
+
)
|
|
224
|
+
# Regardless of the validation errors, we check for "deleted".
|
|
225
|
+
if self.owners.get(owner_team_id, spec.TEAM_GONE) == TeamGoneStatus.deleted:
|
|
226
|
+
owner_ids.discard(owner_team_id)
|
|
227
|
+
if owner_ids:
|
|
205
228
|
logger.info(
|
|
206
229
|
f"The following team IDs '{', '.join(map(str, owner_ids))}' exist in the "
|
|
207
230
|
f"metadata ('{BILLING_INFO_OUTPUT_OWNERS_INFO_FILE_NAME_STUB}') "
|
elapi-2.4.5/src/elapi/VERSION
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
2.4.5
|
|
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
|
|
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
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|