cornflow 1.3.6__tar.gz → 1.3.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.
- {cornflow-1.3.6/cornflow.egg-info → cornflow-1.3.7}/PKG-INFO +2 -2
- {cornflow-1.3.6 → cornflow-1.3.7}/cornflow/endpoints/data_check.py +3 -1
- {cornflow-1.3.6 → cornflow-1.3.7}/cornflow/endpoints/execution.py +3 -2
- {cornflow-1.3.6 → cornflow-1.3.7}/cornflow/endpoints/instance.py +4 -2
- {cornflow-1.3.6 → cornflow-1.3.7}/cornflow/models/base_data_model.py +10 -2
- {cornflow-1.3.6 → cornflow-1.3.7}/cornflow/models/case.py +16 -0
- {cornflow-1.3.6 → cornflow-1.3.7}/cornflow/models/execution.py +18 -0
- {cornflow-1.3.6 → cornflow-1.3.7}/cornflow/models/instance.py +28 -0
- {cornflow-1.3.6 → cornflow-1.3.7}/cornflow/schemas/execution.py +7 -0
- {cornflow-1.3.6 → cornflow-1.3.7}/cornflow/shared/const.py +1 -1
- {cornflow-1.3.6 → cornflow-1.3.7/cornflow.egg-info}/PKG-INFO +2 -2
- {cornflow-1.3.6 → cornflow-1.3.7}/cornflow.egg-info/requires.txt +1 -1
- {cornflow-1.3.6 → cornflow-1.3.7}/requirements.txt +1 -1
- {cornflow-1.3.6 → cornflow-1.3.7}/setup.py +1 -1
- {cornflow-1.3.6 → cornflow-1.3.7}/MANIFEST.in +0 -0
- {cornflow-1.3.6 → cornflow-1.3.7}/README.rst +0 -0
- {cornflow-1.3.6 → cornflow-1.3.7}/airflow_config/__init__.py +0 -0
- {cornflow-1.3.6 → cornflow-1.3.7}/airflow_config/airflow_local_settings.py +0 -0
- {cornflow-1.3.6 → cornflow-1.3.7}/airflow_config/plugins/XCom/__init__.py +0 -0
- {cornflow-1.3.6 → cornflow-1.3.7}/airflow_config/plugins/XCom/gce_xcom_backend.py +0 -0
- {cornflow-1.3.6 → cornflow-1.3.7}/airflow_config/plugins/__init__.py +0 -0
- {cornflow-1.3.6 → cornflow-1.3.7}/airflow_config/webserver_ldap.py +0 -0
- {cornflow-1.3.6 → cornflow-1.3.7}/cornflow/__init__.py +0 -0
- {cornflow-1.3.6 → cornflow-1.3.7}/cornflow/app.py +0 -0
- {cornflow-1.3.6 → cornflow-1.3.7}/cornflow/cli/__init__.py +0 -0
- {cornflow-1.3.6 → cornflow-1.3.7}/cornflow/cli/actions.py +0 -0
- {cornflow-1.3.6 → cornflow-1.3.7}/cornflow/cli/arguments.py +0 -0
- {cornflow-1.3.6 → cornflow-1.3.7}/cornflow/cli/config.py +0 -0
- {cornflow-1.3.6 → cornflow-1.3.7}/cornflow/cli/migrations.py +0 -0
- {cornflow-1.3.6 → cornflow-1.3.7}/cornflow/cli/permissions.py +0 -0
- {cornflow-1.3.6 → cornflow-1.3.7}/cornflow/cli/roles.py +0 -0
- {cornflow-1.3.6 → cornflow-1.3.7}/cornflow/cli/schemas.py +0 -0
- {cornflow-1.3.6 → cornflow-1.3.7}/cornflow/cli/service.py +0 -0
- {cornflow-1.3.6 → cornflow-1.3.7}/cornflow/cli/tools/__init__.py +0 -0
- {cornflow-1.3.6 → cornflow-1.3.7}/cornflow/cli/tools/api_generator.py +0 -0
- {cornflow-1.3.6 → cornflow-1.3.7}/cornflow/cli/tools/endpoint_tools.py +0 -0
- {cornflow-1.3.6 → cornflow-1.3.7}/cornflow/cli/tools/models_tools.py +0 -0
- {cornflow-1.3.6 → cornflow-1.3.7}/cornflow/cli/tools/schema_generator.py +0 -0
- {cornflow-1.3.6 → cornflow-1.3.7}/cornflow/cli/tools/schemas_tools.py +0 -0
- {cornflow-1.3.6 → cornflow-1.3.7}/cornflow/cli/tools/tools.py +0 -0
- {cornflow-1.3.6 → cornflow-1.3.7}/cornflow/cli/users.py +0 -0
- {cornflow-1.3.6 → cornflow-1.3.7}/cornflow/cli/utils.py +0 -0
- {cornflow-1.3.6 → cornflow-1.3.7}/cornflow/cli/views.py +0 -0
- {cornflow-1.3.6 → cornflow-1.3.7}/cornflow/commands/__init__.py +0 -0
- {cornflow-1.3.6 → cornflow-1.3.7}/cornflow/commands/access.py +0 -0
- {cornflow-1.3.6 → cornflow-1.3.7}/cornflow/commands/actions.py +0 -0
- {cornflow-1.3.6 → cornflow-1.3.7}/cornflow/commands/auxiliar.py +0 -0
- {cornflow-1.3.6 → cornflow-1.3.7}/cornflow/commands/cleanup.py +0 -0
- {cornflow-1.3.6 → cornflow-1.3.7}/cornflow/commands/dag.py +0 -0
- {cornflow-1.3.6 → cornflow-1.3.7}/cornflow/commands/permissions.py +0 -0
- {cornflow-1.3.6 → cornflow-1.3.7}/cornflow/commands/roles.py +0 -0
- {cornflow-1.3.6 → cornflow-1.3.7}/cornflow/commands/schemas.py +0 -0
- {cornflow-1.3.6 → cornflow-1.3.7}/cornflow/commands/users.py +0 -0
- {cornflow-1.3.6 → cornflow-1.3.7}/cornflow/commands/views.py +0 -0
- {cornflow-1.3.6 → cornflow-1.3.7}/cornflow/config.py +0 -0
- {cornflow-1.3.6 → cornflow-1.3.7}/cornflow/endpoints/__init__.py +0 -0
- {cornflow-1.3.6 → cornflow-1.3.7}/cornflow/endpoints/action.py +0 -0
- {cornflow-1.3.6 → cornflow-1.3.7}/cornflow/endpoints/alarms.py +0 -0
- {cornflow-1.3.6 → cornflow-1.3.7}/cornflow/endpoints/apiview.py +0 -0
- {cornflow-1.3.6 → cornflow-1.3.7}/cornflow/endpoints/case.py +0 -0
- {cornflow-1.3.6 → cornflow-1.3.7}/cornflow/endpoints/dag.py +0 -0
- {cornflow-1.3.6 → cornflow-1.3.7}/cornflow/endpoints/example_data.py +0 -0
- {cornflow-1.3.6 → cornflow-1.3.7}/cornflow/endpoints/health.py +0 -0
- {cornflow-1.3.6 → cornflow-1.3.7}/cornflow/endpoints/licenses.py +0 -0
- {cornflow-1.3.6 → cornflow-1.3.7}/cornflow/endpoints/login.py +0 -0
- {cornflow-1.3.6 → cornflow-1.3.7}/cornflow/endpoints/main_alarms.py +0 -0
- {cornflow-1.3.6 → cornflow-1.3.7}/cornflow/endpoints/meta_resource.py +0 -0
- {cornflow-1.3.6 → cornflow-1.3.7}/cornflow/endpoints/permission.py +0 -0
- {cornflow-1.3.6 → cornflow-1.3.7}/cornflow/endpoints/roles.py +0 -0
- {cornflow-1.3.6 → cornflow-1.3.7}/cornflow/endpoints/schemas.py +0 -0
- {cornflow-1.3.6 → cornflow-1.3.7}/cornflow/endpoints/signup.py +0 -0
- {cornflow-1.3.6 → cornflow-1.3.7}/cornflow/endpoints/tables.py +0 -0
- {cornflow-1.3.6 → cornflow-1.3.7}/cornflow/endpoints/token.py +0 -0
- {cornflow-1.3.6 → cornflow-1.3.7}/cornflow/endpoints/user.py +0 -0
- {cornflow-1.3.6 → cornflow-1.3.7}/cornflow/endpoints/user_role.py +0 -0
- {cornflow-1.3.6 → cornflow-1.3.7}/cornflow/gunicorn.py +0 -0
- {cornflow-1.3.6 → cornflow-1.3.7}/cornflow/migrations/README +0 -0
- {cornflow-1.3.6 → cornflow-1.3.7}/cornflow/migrations/alembic.ini +0 -0
- {cornflow-1.3.6 → cornflow-1.3.7}/cornflow/migrations/env.py +0 -0
- {cornflow-1.3.6 → cornflow-1.3.7}/cornflow/migrations/script.py.mako +0 -0
- {cornflow-1.3.6 → cornflow-1.3.7}/cornflow/migrations/versions/00757b557b02_.py +0 -0
- {cornflow-1.3.6 → cornflow-1.3.7}/cornflow/migrations/versions/1af47a419bbd_.py +0 -0
- {cornflow-1.3.6 → cornflow-1.3.7}/cornflow/migrations/versions/4729cd156460_.py +0 -0
- {cornflow-1.3.6 → cornflow-1.3.7}/cornflow/migrations/versions/4aac5e0c6e66_.py +0 -0
- {cornflow-1.3.6 → cornflow-1.3.7}/cornflow/migrations/versions/509d280698e4_.py +0 -0
- {cornflow-1.3.6 → cornflow-1.3.7}/cornflow/migrations/versions/7c3ea5ab5501_.py +0 -0
- {cornflow-1.3.6 → cornflow-1.3.7}/cornflow/migrations/versions/991b98e24225_.py +0 -0
- {cornflow-1.3.6 → cornflow-1.3.7}/cornflow/migrations/versions/999b98e24225.py +0 -0
- {cornflow-1.3.6 → cornflow-1.3.7}/cornflow/migrations/versions/9cacf194fa1c_.py +0 -0
- {cornflow-1.3.6 → cornflow-1.3.7}/cornflow/migrations/versions/a472b5ad50b7_.py +0 -0
- {cornflow-1.3.6 → cornflow-1.3.7}/cornflow/migrations/versions/c2db9409cb5f_.py +0 -0
- {cornflow-1.3.6 → cornflow-1.3.7}/cornflow/migrations/versions/c8a6c762e818_.py +0 -0
- {cornflow-1.3.6 → cornflow-1.3.7}/cornflow/migrations/versions/ca449af8034c_.py +0 -0
- {cornflow-1.3.6 → cornflow-1.3.7}/cornflow/migrations/versions/cef1df240b27_.py +0 -0
- {cornflow-1.3.6 → cornflow-1.3.7}/cornflow/migrations/versions/d0e0700dcd8e_.py +0 -0
- {cornflow-1.3.6 → cornflow-1.3.7}/cornflow/migrations/versions/d1b5be1f0549_.py +0 -0
- {cornflow-1.3.6 → cornflow-1.3.7}/cornflow/migrations/versions/e1a50dae1ac9_.py +0 -0
- {cornflow-1.3.6 → cornflow-1.3.7}/cornflow/migrations/versions/e937a5234ce4_.py +0 -0
- {cornflow-1.3.6 → cornflow-1.3.7}/cornflow/migrations/versions/ebdd955fcc5e_.py +0 -0
- {cornflow-1.3.6 → cornflow-1.3.7}/cornflow/migrations/versions/f3bee20314a2_.py +0 -0
- {cornflow-1.3.6 → cornflow-1.3.7}/cornflow/models/__init__.py +0 -0
- {cornflow-1.3.6 → cornflow-1.3.7}/cornflow/models/action.py +0 -0
- {cornflow-1.3.6 → cornflow-1.3.7}/cornflow/models/alarms.py +0 -0
- {cornflow-1.3.6 → cornflow-1.3.7}/cornflow/models/dag.py +0 -0
- {cornflow-1.3.6 → cornflow-1.3.7}/cornflow/models/dag_permissions.py +0 -0
- {cornflow-1.3.6 → cornflow-1.3.7}/cornflow/models/main_alarms.py +0 -0
- {cornflow-1.3.6 → cornflow-1.3.7}/cornflow/models/meta_models.py +0 -0
- {cornflow-1.3.6 → cornflow-1.3.7}/cornflow/models/permissions.py +0 -0
- {cornflow-1.3.6 → cornflow-1.3.7}/cornflow/models/role.py +0 -0
- {cornflow-1.3.6 → cornflow-1.3.7}/cornflow/models/user.py +0 -0
- {cornflow-1.3.6 → cornflow-1.3.7}/cornflow/models/user_role.py +0 -0
- {cornflow-1.3.6 → cornflow-1.3.7}/cornflow/models/view.py +0 -0
- {cornflow-1.3.6 → cornflow-1.3.7}/cornflow/schemas/__init__.py +0 -0
- {cornflow-1.3.6 → cornflow-1.3.7}/cornflow/schemas/action.py +0 -0
- {cornflow-1.3.6 → cornflow-1.3.7}/cornflow/schemas/alarms.py +0 -0
- {cornflow-1.3.6 → cornflow-1.3.7}/cornflow/schemas/case.py +0 -0
- {cornflow-1.3.6 → cornflow-1.3.7}/cornflow/schemas/common.py +0 -0
- {cornflow-1.3.6 → cornflow-1.3.7}/cornflow/schemas/dag.py +0 -0
- {cornflow-1.3.6 → cornflow-1.3.7}/cornflow/schemas/example_data.py +0 -0
- {cornflow-1.3.6 → cornflow-1.3.7}/cornflow/schemas/health.py +0 -0
- {cornflow-1.3.6 → cornflow-1.3.7}/cornflow/schemas/instance.py +0 -0
- {cornflow-1.3.6 → cornflow-1.3.7}/cornflow/schemas/main_alarms.py +0 -0
- {cornflow-1.3.6 → cornflow-1.3.7}/cornflow/schemas/model_json.py +0 -0
- {cornflow-1.3.6 → cornflow-1.3.7}/cornflow/schemas/patch.py +0 -0
- {cornflow-1.3.6 → cornflow-1.3.7}/cornflow/schemas/permissions.py +0 -0
- {cornflow-1.3.6 → cornflow-1.3.7}/cornflow/schemas/query.py +0 -0
- {cornflow-1.3.6 → cornflow-1.3.7}/cornflow/schemas/role.py +0 -0
- {cornflow-1.3.6 → cornflow-1.3.7}/cornflow/schemas/schemas.py +0 -0
- {cornflow-1.3.6 → cornflow-1.3.7}/cornflow/schemas/solution_log.py +0 -0
- {cornflow-1.3.6 → cornflow-1.3.7}/cornflow/schemas/tables.py +0 -0
- {cornflow-1.3.6 → cornflow-1.3.7}/cornflow/schemas/user.py +0 -0
- {cornflow-1.3.6 → cornflow-1.3.7}/cornflow/schemas/user_role.py +0 -0
- {cornflow-1.3.6 → cornflow-1.3.7}/cornflow/schemas/view.py +0 -0
- {cornflow-1.3.6 → cornflow-1.3.7}/cornflow/shared/__init__.py +0 -0
- {cornflow-1.3.6 → cornflow-1.3.7}/cornflow/shared/authentication/__init__.py +0 -0
- {cornflow-1.3.6 → cornflow-1.3.7}/cornflow/shared/authentication/auth.py +0 -0
- {cornflow-1.3.6 → cornflow-1.3.7}/cornflow/shared/authentication/decorators.py +0 -0
- {cornflow-1.3.6 → cornflow-1.3.7}/cornflow/shared/authentication/ldap.py +0 -0
- {cornflow-1.3.6 → cornflow-1.3.7}/cornflow/shared/compress.py +0 -0
- {cornflow-1.3.6 → cornflow-1.3.7}/cornflow/shared/email.py +0 -0
- {cornflow-1.3.6 → cornflow-1.3.7}/cornflow/shared/exceptions.py +0 -0
- {cornflow-1.3.6 → cornflow-1.3.7}/cornflow/shared/licenses.py +0 -0
- {cornflow-1.3.6 → cornflow-1.3.7}/cornflow/shared/log_config.py +0 -0
- {cornflow-1.3.6 → cornflow-1.3.7}/cornflow/shared/query_tools.py +0 -0
- {cornflow-1.3.6 → cornflow-1.3.7}/cornflow/shared/utils.py +0 -0
- {cornflow-1.3.6 → cornflow-1.3.7}/cornflow/shared/utils_tables.py +0 -0
- {cornflow-1.3.6 → cornflow-1.3.7}/cornflow/shared/validators.py +0 -0
- {cornflow-1.3.6 → cornflow-1.3.7}/cornflow/tests/__init__.py +0 -0
- {cornflow-1.3.6 → cornflow-1.3.7}/cornflow/tests/base_test_execution.py +0 -0
- {cornflow-1.3.6 → cornflow-1.3.7}/cornflow/tests/const.py +0 -0
- {cornflow-1.3.6 → cornflow-1.3.7}/cornflow/tests/custom_liveServer.py +0 -0
- {cornflow-1.3.6 → cornflow-1.3.7}/cornflow/tests/custom_test_case.py +0 -0
- {cornflow-1.3.6 → cornflow-1.3.7}/cornflow/tests/integration/__init__.py +0 -0
- {cornflow-1.3.6 → cornflow-1.3.7}/cornflow/tests/integration/test_commands.py +0 -0
- {cornflow-1.3.6 → cornflow-1.3.7}/cornflow/tests/integration/test_cornflowclient.py +0 -0
- {cornflow-1.3.6 → cornflow-1.3.7}/cornflow/tests/integration/test_data_checks_kpis.py +0 -0
- {cornflow-1.3.6 → cornflow-1.3.7}/cornflow/tests/ldap/__init__.py +0 -0
- {cornflow-1.3.6 → cornflow-1.3.7}/cornflow/tests/ldap/test_ldap_authentication.py +0 -0
- {cornflow-1.3.6 → cornflow-1.3.7}/cornflow/tests/unit/__init__.py +0 -0
- {cornflow-1.3.6 → cornflow-1.3.7}/cornflow/tests/unit/test_actions.py +0 -0
- {cornflow-1.3.6 → cornflow-1.3.7}/cornflow/tests/unit/test_alarms.py +0 -0
- {cornflow-1.3.6 → cornflow-1.3.7}/cornflow/tests/unit/test_apiview.py +0 -0
- {cornflow-1.3.6 → cornflow-1.3.7}/cornflow/tests/unit/test_application.py +0 -0
- {cornflow-1.3.6 → cornflow-1.3.7}/cornflow/tests/unit/test_cases.py +0 -0
- {cornflow-1.3.6 → cornflow-1.3.7}/cornflow/tests/unit/test_cli.py +0 -0
- {cornflow-1.3.6 → cornflow-1.3.7}/cornflow/tests/unit/test_commands.py +0 -0
- {cornflow-1.3.6 → cornflow-1.3.7}/cornflow/tests/unit/test_dags.py +0 -0
- {cornflow-1.3.6 → cornflow-1.3.7}/cornflow/tests/unit/test_data_checks.py +0 -0
- {cornflow-1.3.6 → cornflow-1.3.7}/cornflow/tests/unit/test_example_data.py +0 -0
- {cornflow-1.3.6 → cornflow-1.3.7}/cornflow/tests/unit/test_executions.py +0 -0
- {cornflow-1.3.6 → cornflow-1.3.7}/cornflow/tests/unit/test_external_role_creation.py +0 -0
- {cornflow-1.3.6 → cornflow-1.3.7}/cornflow/tests/unit/test_generate_from_schema.py +0 -0
- {cornflow-1.3.6 → cornflow-1.3.7}/cornflow/tests/unit/test_get_resources.py +0 -0
- {cornflow-1.3.6 → cornflow-1.3.7}/cornflow/tests/unit/test_health.py +0 -0
- {cornflow-1.3.6 → cornflow-1.3.7}/cornflow/tests/unit/test_instances.py +0 -0
- {cornflow-1.3.6 → cornflow-1.3.7}/cornflow/tests/unit/test_instances_file.py +0 -0
- {cornflow-1.3.6 → cornflow-1.3.7}/cornflow/tests/unit/test_licenses.py +0 -0
- {cornflow-1.3.6 → cornflow-1.3.7}/cornflow/tests/unit/test_log_in.py +0 -0
- {cornflow-1.3.6 → cornflow-1.3.7}/cornflow/tests/unit/test_main_alarms.py +0 -0
- {cornflow-1.3.6 → cornflow-1.3.7}/cornflow/tests/unit/test_permissions.py +0 -0
- {cornflow-1.3.6 → cornflow-1.3.7}/cornflow/tests/unit/test_roles.py +0 -0
- {cornflow-1.3.6 → cornflow-1.3.7}/cornflow/tests/unit/test_schema_from_models.py +0 -0
- {cornflow-1.3.6 → cornflow-1.3.7}/cornflow/tests/unit/test_schemas.py +0 -0
- {cornflow-1.3.6 → cornflow-1.3.7}/cornflow/tests/unit/test_sign_up.py +0 -0
- {cornflow-1.3.6 → cornflow-1.3.7}/cornflow/tests/unit/test_tables.py +0 -0
- {cornflow-1.3.6 → cornflow-1.3.7}/cornflow/tests/unit/test_token.py +0 -0
- {cornflow-1.3.6 → cornflow-1.3.7}/cornflow/tests/unit/test_users.py +0 -0
- {cornflow-1.3.6 → cornflow-1.3.7}/cornflow/tests/unit/tools.py +0 -0
- {cornflow-1.3.6 → cornflow-1.3.7}/cornflow.egg-info/SOURCES.txt +0 -0
- {cornflow-1.3.6 → cornflow-1.3.7}/cornflow.egg-info/dependency_links.txt +0 -0
- {cornflow-1.3.6 → cornflow-1.3.7}/cornflow.egg-info/entry_points.txt +0 -0
- {cornflow-1.3.6 → cornflow-1.3.7}/cornflow.egg-info/top_level.txt +0 -0
- {cornflow-1.3.6 → cornflow-1.3.7}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: cornflow
|
|
3
|
-
Version: 1.3.
|
|
3
|
+
Version: 1.3.7
|
|
4
4
|
Summary: cornflow is an open source multi-solver optimization server with a REST API built using flask.
|
|
5
5
|
Home-page: https://github.com/baobabsoluciones/cornflow
|
|
6
6
|
Author: baobab soluciones
|
|
@@ -14,7 +14,7 @@ Requires-Dist: alembic==1.9.2
|
|
|
14
14
|
Requires-Dist: apispec==6.3.0
|
|
15
15
|
Requires-Dist: cachetools==5.3.3
|
|
16
16
|
Requires-Dist: click==8.1.7
|
|
17
|
-
Requires-Dist: cornflow-client==1.3.
|
|
17
|
+
Requires-Dist: cornflow-client==1.3.7
|
|
18
18
|
Requires-Dist: cryptography==48.0.1
|
|
19
19
|
Requires-Dist: disposable-email-domains==0.0.162
|
|
20
20
|
Requires-Dist: Flask==2.3.2
|
|
@@ -219,7 +219,9 @@ class DataCheckInstanceEndpoint(BaseMetaResource):
|
|
|
219
219
|
user = self.get_user()
|
|
220
220
|
context_str = f"instance {idx}"
|
|
221
221
|
|
|
222
|
-
instance = InstanceModel.get_one_object(
|
|
222
|
+
instance = InstanceModel.get_one_object(
|
|
223
|
+
user=self.get_user(), idx=idx, defer_data=True
|
|
224
|
+
)
|
|
223
225
|
if instance is None:
|
|
224
226
|
err = "The instance to check does not exist"
|
|
225
227
|
raise ObjectDoesNotExist(
|
|
@@ -24,6 +24,7 @@ from cornflow.models import InstanceModel, DeployedWorkflow, ExecutionModel
|
|
|
24
24
|
from cornflow.schemas.execution import (
|
|
25
25
|
ExecutionDetailsEndpointResponse,
|
|
26
26
|
ExecutionDetailsEndpointWithIndicatorsResponse,
|
|
27
|
+
ExecutionDetailsEndpointNoDataResponse,
|
|
27
28
|
ExecutionDataEndpointResponse,
|
|
28
29
|
ExecutionLogEndpointResponse,
|
|
29
30
|
ExecutionStatusEndpointResponse,
|
|
@@ -497,7 +498,7 @@ class ExecutionDetailsEndpointBase(OrchestratorMixin):
|
|
|
497
498
|
class ExecutionDetailsEndpoint(ExecutionDetailsEndpointBase):
|
|
498
499
|
@doc(description="Get details of an execution", tags=["Executions"], inherit=False)
|
|
499
500
|
@authenticate(auth_class=Auth())
|
|
500
|
-
@marshal_with(
|
|
501
|
+
@marshal_with(ExecutionDetailsEndpointNoDataResponse)
|
|
501
502
|
@BaseMetaResource.get_data_or_404
|
|
502
503
|
def get(self, idx):
|
|
503
504
|
"""
|
|
@@ -513,7 +514,7 @@ class ExecutionDetailsEndpoint(ExecutionDetailsEndpointBase):
|
|
|
513
514
|
current_app.logger.info(
|
|
514
515
|
f"User {self.get_user()} gets details of execution {idx}"
|
|
515
516
|
)
|
|
516
|
-
return self.get_detail(user=self.get_user(), idx=idx)
|
|
517
|
+
return self.get_detail(user=self.get_user(), idx=idx, defer_data=True)
|
|
517
518
|
|
|
518
519
|
@doc(description="Edit an execution", tags=["Executions"], inherit=False)
|
|
519
520
|
@authenticate(auth_class=Auth())
|
|
@@ -139,7 +139,7 @@ class InstanceDetailsEndpointBase(BaseMetaResource):
|
|
|
139
139
|
:rtype: Tuple(dict, integer)
|
|
140
140
|
"""
|
|
141
141
|
current_app.logger.info(f"User {self.get_user()} gets instance {idx}")
|
|
142
|
-
return self.get_detail(user=self.get_user(), idx=idx)
|
|
142
|
+
return self.get_detail(user=self.get_user(), idx=idx, defer_data=True)
|
|
143
143
|
|
|
144
144
|
|
|
145
145
|
class InstanceDetailsEndpoint(InstanceDetailsEndpointBase):
|
|
@@ -157,7 +157,9 @@ class InstanceDetailsEndpoint(InstanceDetailsEndpointBase):
|
|
|
157
157
|
:return: A dictionary with a confirmation message and an integer with the HTTP status code.
|
|
158
158
|
:rtype: Tuple(dict, integer)
|
|
159
159
|
"""
|
|
160
|
-
schema = InstanceModel.get_one_object(
|
|
160
|
+
schema = InstanceModel.get_one_object(
|
|
161
|
+
user=self.get_user(), idx=idx, defer_data=True
|
|
162
|
+
).schema
|
|
161
163
|
|
|
162
164
|
if kwargs.get("data") is not None and schema is not None:
|
|
163
165
|
if schema == "pulp":
|
|
@@ -58,6 +58,7 @@ class BaseDataModel(TraceAttributesModel):
|
|
|
58
58
|
offset=0,
|
|
59
59
|
limit=10,
|
|
60
60
|
user=None,
|
|
61
|
+
options=None,
|
|
61
62
|
):
|
|
62
63
|
"""
|
|
63
64
|
Query to get all objects from a user
|
|
@@ -72,10 +73,13 @@ class BaseDataModel(TraceAttributesModel):
|
|
|
72
73
|
:param string update_date_lte: update_at needs to be smaller or equal to this
|
|
73
74
|
:param int offset: query offset for pagination
|
|
74
75
|
:param int limit: query size limit
|
|
76
|
+
:param list options: extra SQLAlchemy loader options (e.g. defer()) to apply to the query
|
|
75
77
|
:return: The objects
|
|
76
78
|
:rtype: list(:class:`BaseDataModel`)
|
|
77
79
|
"""
|
|
78
80
|
query = cls.query.filter(cls.deleted_at == None)
|
|
81
|
+
if options:
|
|
82
|
+
query = query.options(*options)
|
|
79
83
|
user_access = int(current_app.config["USER_ACCESS_ALL_OBJECTS"])
|
|
80
84
|
if (
|
|
81
85
|
user is not None
|
|
@@ -103,19 +107,23 @@ class BaseDataModel(TraceAttributesModel):
|
|
|
103
107
|
return query.order_by(desc(cls.created_at)).offset(offset).limit(limit).all()
|
|
104
108
|
|
|
105
109
|
@classmethod
|
|
106
|
-
def get_one_object(cls, user=None, idx=None, **kwargs):
|
|
110
|
+
def get_one_object(cls, user=None, idx=None, options=None, **kwargs):
|
|
107
111
|
"""
|
|
108
112
|
Query to get one object from the user and the id.
|
|
109
113
|
|
|
110
114
|
:param UserModel user: user object performing the query
|
|
111
115
|
:param str or int idx: ID from the object to get
|
|
116
|
+
:param list options: extra SQLAlchemy loader options (e.g. defer()) to apply to the query
|
|
112
117
|
:return: The object or None if it does not exist
|
|
113
118
|
:rtype: :class:`BaseDataModel`
|
|
114
119
|
"""
|
|
115
120
|
user_access = int(current_app.config["USER_ACCESS_ALL_OBJECTS"])
|
|
116
121
|
if user is None:
|
|
117
122
|
return super().get_one_object(idx=idx)
|
|
118
|
-
query = cls.query
|
|
123
|
+
query = cls.query
|
|
124
|
+
if options:
|
|
125
|
+
query = query.options(*options)
|
|
126
|
+
query = query.filter_by(id=idx, deleted_at=None)
|
|
119
127
|
if not user.is_admin() and not user.is_service_user() and user_access == USER_ACCESS_ALL_OBJECTS_NO:
|
|
120
128
|
query = query.filter_by(user_id=user.id)
|
|
121
129
|
return query.first()
|
|
@@ -7,6 +7,7 @@ import jsonpatch
|
|
|
7
7
|
from flask import current_app
|
|
8
8
|
from sqlalchemy.dialects.postgresql import JSON
|
|
9
9
|
from sqlalchemy.exc import DBAPIError, IntegrityError
|
|
10
|
+
from sqlalchemy.orm import defer
|
|
10
11
|
|
|
11
12
|
# Import from internal modules
|
|
12
13
|
from cornflow.models.base_data_model import BaseDataModel
|
|
@@ -126,6 +127,21 @@ class CaseModel(BaseDataModel):
|
|
|
126
127
|
self.solution_checks = data.get("solution_checks", None)
|
|
127
128
|
self.kpis = data.get("kpis", None)
|
|
128
129
|
|
|
130
|
+
@classmethod
|
|
131
|
+
def get_all_objects(cls, *args, **kwargs):
|
|
132
|
+
"""
|
|
133
|
+
Query to get all cases from a user, deferring the checks/solution_checks/kpis
|
|
134
|
+
columns since the list endpoint does not serialize them (only data and solution
|
|
135
|
+
are used, for the is_dir flag and the indicators).
|
|
136
|
+
|
|
137
|
+
:return: The objects
|
|
138
|
+
:rtype: list(:class:`CaseModel`)
|
|
139
|
+
"""
|
|
140
|
+
kwargs.setdefault(
|
|
141
|
+
"options", [defer(cls.checks), defer(cls.solution_checks), defer(cls.kpis)]
|
|
142
|
+
)
|
|
143
|
+
return super().get_all_objects(*args, **kwargs)
|
|
144
|
+
|
|
129
145
|
@classmethod
|
|
130
146
|
def from_parent_id(cls, user, data):
|
|
131
147
|
"""
|
|
@@ -162,6 +162,24 @@ class ExecutionModel(BaseDataModel):
|
|
|
162
162
|
self.log_text = txt
|
|
163
163
|
super().update({})
|
|
164
164
|
|
|
165
|
+
@classmethod
|
|
166
|
+
def get_one_object(cls, user=None, idx=None, defer_data=False, **kwargs):
|
|
167
|
+
"""
|
|
168
|
+
Query to get one object from the user and the id.
|
|
169
|
+
|
|
170
|
+
:param UserModel user: user object performing the query
|
|
171
|
+
:param str or int idx: ID from the object to get
|
|
172
|
+
:param bool defer_data: whether to defer loading the heavy data/log columns
|
|
173
|
+
:return: The object or None if it does not exist
|
|
174
|
+
:rtype: :class:`ExecutionModel`
|
|
175
|
+
"""
|
|
176
|
+
options = (
|
|
177
|
+
[defer(cls.data), defer(cls.log_text), defer(cls.log_json)]
|
|
178
|
+
if defer_data
|
|
179
|
+
else None
|
|
180
|
+
)
|
|
181
|
+
return super().get_one_object(user=user, idx=idx, options=options, **kwargs)
|
|
182
|
+
|
|
165
183
|
@classmethod
|
|
166
184
|
def get_all_objects(
|
|
167
185
|
cls,
|
|
@@ -3,6 +3,8 @@
|
|
|
3
3
|
# Import from libraries
|
|
4
4
|
import hashlib
|
|
5
5
|
|
|
6
|
+
from sqlalchemy.orm import defer
|
|
7
|
+
|
|
6
8
|
# Imported from internal models
|
|
7
9
|
from cornflow.models.base_data_model import BaseDataModel
|
|
8
10
|
from cornflow.shared import db
|
|
@@ -78,6 +80,32 @@ class InstanceModel(BaseDataModel):
|
|
|
78
80
|
|
|
79
81
|
super().update(data)
|
|
80
82
|
|
|
83
|
+
@classmethod
|
|
84
|
+
def get_all_objects(cls, *args, **kwargs):
|
|
85
|
+
"""
|
|
86
|
+
Query to get all instances from a user, deferring the heavy data/checks
|
|
87
|
+
columns since the list endpoints do not serialize them.
|
|
88
|
+
|
|
89
|
+
:return: The objects
|
|
90
|
+
:rtype: list(:class:`InstanceModel`)
|
|
91
|
+
"""
|
|
92
|
+
kwargs.setdefault("options", [defer(cls.data), defer(cls.checks)])
|
|
93
|
+
return super().get_all_objects(*args, **kwargs)
|
|
94
|
+
|
|
95
|
+
@classmethod
|
|
96
|
+
def get_one_object(cls, user=None, idx=None, defer_data=False, **kwargs):
|
|
97
|
+
"""
|
|
98
|
+
Query to get one instance from the user and the id.
|
|
99
|
+
|
|
100
|
+
:param UserModel user: user object performing the query
|
|
101
|
+
:param str or int idx: ID from the object to get
|
|
102
|
+
:param bool defer_data: whether to defer loading the heavy data/checks columns
|
|
103
|
+
:return: The object or None if it does not exist
|
|
104
|
+
:rtype: :class:`InstanceModel`
|
|
105
|
+
"""
|
|
106
|
+
options = [defer(cls.data), defer(cls.checks)] if defer_data else None
|
|
107
|
+
return super().get_one_object(user=user, idx=idx, options=options, **kwargs)
|
|
108
|
+
|
|
81
109
|
def __repr__(self):
|
|
82
110
|
"""
|
|
83
111
|
Method to represent the class :class:`InstanceModel`
|
|
@@ -156,6 +156,13 @@ class ExecutionDetailsWithIndicatorsAndLogResponse(
|
|
|
156
156
|
exclude = ("indicators",)
|
|
157
157
|
|
|
158
158
|
|
|
159
|
+
class ExecutionDetailsEndpointNoDataResponse(ExecutionDetailsEndpointWithIndicatorsResponse):
|
|
160
|
+
class Meta:
|
|
161
|
+
# Exclude 'indicators': data/log_text/log_json are deferred in get_one_object,
|
|
162
|
+
# so accessing obj.data here would trigger an extra load of those columns.
|
|
163
|
+
exclude = ("indicators",)
|
|
164
|
+
|
|
165
|
+
|
|
159
166
|
class ExecutionStatusEndpointResponse(Schema):
|
|
160
167
|
id = fields.Str()
|
|
161
168
|
state = fields.Int()
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: cornflow
|
|
3
|
-
Version: 1.3.
|
|
3
|
+
Version: 1.3.7
|
|
4
4
|
Summary: cornflow is an open source multi-solver optimization server with a REST API built using flask.
|
|
5
5
|
Home-page: https://github.com/baobabsoluciones/cornflow
|
|
6
6
|
Author: baobab soluciones
|
|
@@ -14,7 +14,7 @@ Requires-Dist: alembic==1.9.2
|
|
|
14
14
|
Requires-Dist: apispec==6.3.0
|
|
15
15
|
Requires-Dist: cachetools==5.3.3
|
|
16
16
|
Requires-Dist: click==8.1.7
|
|
17
|
-
Requires-Dist: cornflow-client==1.3.
|
|
17
|
+
Requires-Dist: cornflow-client==1.3.7
|
|
18
18
|
Requires-Dist: cryptography==48.0.1
|
|
19
19
|
Requires-Dist: disposable-email-domains==0.0.162
|
|
20
20
|
Requires-Dist: Flask==2.3.2
|
|
@@ -9,7 +9,7 @@ with open("requirements.txt", "r") as fh:
|
|
|
9
9
|
|
|
10
10
|
setuptools.setup(
|
|
11
11
|
name="cornflow",
|
|
12
|
-
version="1.3.
|
|
12
|
+
version="1.3.7",
|
|
13
13
|
author="baobab soluciones",
|
|
14
14
|
author_email="cornflow@baobabsoluciones.es",
|
|
15
15
|
description="cornflow is an open source multi-solver optimization server with a REST API built using flask.",
|
|
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
|
|
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
|