cornflow 1.0.10a1__tar.gz → 1.0.11__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.0.10a1/cornflow.egg-info → cornflow-1.0.11}/PKG-INFO +1 -1
- {cornflow-1.0.10a1 → cornflow-1.0.11}/cornflow/models/base_data_model.py +3 -0
- {cornflow-1.0.10a1 → cornflow-1.0.11}/cornflow/models/case.py +48 -3
- {cornflow-1.0.10a1 → cornflow-1.0.11}/cornflow/models/execution.py +1 -1
- {cornflow-1.0.10a1 → cornflow-1.0.11}/cornflow/models/instance.py +6 -4
- {cornflow-1.0.10a1 → cornflow-1.0.11/cornflow.egg-info}/PKG-INFO +1 -1
- {cornflow-1.0.10a1 → cornflow-1.0.11}/cornflow.egg-info/requires.txt +2 -2
- {cornflow-1.0.10a1 → cornflow-1.0.11}/setup.py +1 -1
- {cornflow-1.0.10a1 → cornflow-1.0.11}/MANIFEST.in +0 -0
- {cornflow-1.0.10a1 → cornflow-1.0.11}/README.rst +0 -0
- {cornflow-1.0.10a1 → cornflow-1.0.11}/airflow_config/__init__.py +0 -0
- {cornflow-1.0.10a1 → cornflow-1.0.11}/airflow_config/airflow_local_settings.py +0 -0
- {cornflow-1.0.10a1 → cornflow-1.0.11}/airflow_config/plugins/XCom/__init__.py +0 -0
- {cornflow-1.0.10a1 → cornflow-1.0.11}/airflow_config/plugins/XCom/gce_xcom_backend.py +0 -0
- {cornflow-1.0.10a1 → cornflow-1.0.11}/airflow_config/plugins/__init__.py +0 -0
- {cornflow-1.0.10a1 → cornflow-1.0.11}/airflow_config/webserver_ldap.py +0 -0
- {cornflow-1.0.10a1 → cornflow-1.0.11}/cornflow/__init__.py +0 -0
- {cornflow-1.0.10a1 → cornflow-1.0.11}/cornflow/app.py +0 -0
- {cornflow-1.0.10a1 → cornflow-1.0.11}/cornflow/cli/__init__.py +0 -0
- {cornflow-1.0.10a1 → cornflow-1.0.11}/cornflow/cli/actions.py +0 -0
- {cornflow-1.0.10a1 → cornflow-1.0.11}/cornflow/cli/arguments.py +0 -0
- {cornflow-1.0.10a1 → cornflow-1.0.11}/cornflow/cli/config.py +0 -0
- {cornflow-1.0.10a1 → cornflow-1.0.11}/cornflow/cli/migrations.py +0 -0
- {cornflow-1.0.10a1 → cornflow-1.0.11}/cornflow/cli/permissions.py +0 -0
- {cornflow-1.0.10a1 → cornflow-1.0.11}/cornflow/cli/roles.py +0 -0
- {cornflow-1.0.10a1 → cornflow-1.0.11}/cornflow/cli/schemas.py +0 -0
- {cornflow-1.0.10a1 → cornflow-1.0.11}/cornflow/cli/service.py +0 -0
- {cornflow-1.0.10a1 → cornflow-1.0.11}/cornflow/cli/tools/__init__.py +0 -0
- {cornflow-1.0.10a1 → cornflow-1.0.11}/cornflow/cli/tools/api_generator.py +0 -0
- {cornflow-1.0.10a1 → cornflow-1.0.11}/cornflow/cli/tools/endpoint_tools.py +0 -0
- {cornflow-1.0.10a1 → cornflow-1.0.11}/cornflow/cli/tools/models_tools.py +0 -0
- {cornflow-1.0.10a1 → cornflow-1.0.11}/cornflow/cli/tools/schema_generator.py +0 -0
- {cornflow-1.0.10a1 → cornflow-1.0.11}/cornflow/cli/tools/schemas_tools.py +0 -0
- {cornflow-1.0.10a1 → cornflow-1.0.11}/cornflow/cli/tools/tools.py +0 -0
- {cornflow-1.0.10a1 → cornflow-1.0.11}/cornflow/cli/users.py +0 -0
- {cornflow-1.0.10a1 → cornflow-1.0.11}/cornflow/cli/utils.py +0 -0
- {cornflow-1.0.10a1 → cornflow-1.0.11}/cornflow/cli/views.py +0 -0
- {cornflow-1.0.10a1 → cornflow-1.0.11}/cornflow/commands/__init__.py +0 -0
- {cornflow-1.0.10a1 → cornflow-1.0.11}/cornflow/commands/access.py +0 -0
- {cornflow-1.0.10a1 → cornflow-1.0.11}/cornflow/commands/actions.py +0 -0
- {cornflow-1.0.10a1 → cornflow-1.0.11}/cornflow/commands/cleanup.py +0 -0
- {cornflow-1.0.10a1 → cornflow-1.0.11}/cornflow/commands/dag.py +0 -0
- {cornflow-1.0.10a1 → cornflow-1.0.11}/cornflow/commands/permissions.py +0 -0
- {cornflow-1.0.10a1 → cornflow-1.0.11}/cornflow/commands/roles.py +0 -0
- {cornflow-1.0.10a1 → cornflow-1.0.11}/cornflow/commands/schemas.py +0 -0
- {cornflow-1.0.10a1 → cornflow-1.0.11}/cornflow/commands/users.py +0 -0
- {cornflow-1.0.10a1 → cornflow-1.0.11}/cornflow/commands/views.py +0 -0
- {cornflow-1.0.10a1 → cornflow-1.0.11}/cornflow/config.py +0 -0
- {cornflow-1.0.10a1 → cornflow-1.0.11}/cornflow/endpoints/__init__.py +0 -0
- {cornflow-1.0.10a1 → cornflow-1.0.11}/cornflow/endpoints/action.py +0 -0
- {cornflow-1.0.10a1 → cornflow-1.0.11}/cornflow/endpoints/alarms.py +0 -0
- {cornflow-1.0.10a1 → cornflow-1.0.11}/cornflow/endpoints/apiview.py +0 -0
- {cornflow-1.0.10a1 → cornflow-1.0.11}/cornflow/endpoints/case.py +0 -0
- {cornflow-1.0.10a1 → cornflow-1.0.11}/cornflow/endpoints/dag.py +0 -0
- {cornflow-1.0.10a1 → cornflow-1.0.11}/cornflow/endpoints/data_check.py +0 -0
- {cornflow-1.0.10a1 → cornflow-1.0.11}/cornflow/endpoints/example_data.py +0 -0
- {cornflow-1.0.10a1 → cornflow-1.0.11}/cornflow/endpoints/execution.py +0 -0
- {cornflow-1.0.10a1 → cornflow-1.0.11}/cornflow/endpoints/health.py +0 -0
- {cornflow-1.0.10a1 → cornflow-1.0.11}/cornflow/endpoints/instance.py +0 -0
- {cornflow-1.0.10a1 → cornflow-1.0.11}/cornflow/endpoints/licenses.py +0 -0
- {cornflow-1.0.10a1 → cornflow-1.0.11}/cornflow/endpoints/login.py +0 -0
- {cornflow-1.0.10a1 → cornflow-1.0.11}/cornflow/endpoints/main_alarms.py +0 -0
- {cornflow-1.0.10a1 → cornflow-1.0.11}/cornflow/endpoints/meta_resource.py +0 -0
- {cornflow-1.0.10a1 → cornflow-1.0.11}/cornflow/endpoints/permission.py +0 -0
- {cornflow-1.0.10a1 → cornflow-1.0.11}/cornflow/endpoints/roles.py +0 -0
- {cornflow-1.0.10a1 → cornflow-1.0.11}/cornflow/endpoints/schemas.py +0 -0
- {cornflow-1.0.10a1 → cornflow-1.0.11}/cornflow/endpoints/signup.py +0 -0
- {cornflow-1.0.10a1 → cornflow-1.0.11}/cornflow/endpoints/tables.py +0 -0
- {cornflow-1.0.10a1 → cornflow-1.0.11}/cornflow/endpoints/token.py +0 -0
- {cornflow-1.0.10a1 → cornflow-1.0.11}/cornflow/endpoints/user.py +0 -0
- {cornflow-1.0.10a1 → cornflow-1.0.11}/cornflow/endpoints/user_role.py +0 -0
- {cornflow-1.0.10a1 → cornflow-1.0.11}/cornflow/gunicorn.py +0 -0
- {cornflow-1.0.10a1 → cornflow-1.0.11}/cornflow/migrations/README +0 -0
- {cornflow-1.0.10a1 → cornflow-1.0.11}/cornflow/migrations/alembic.ini +0 -0
- {cornflow-1.0.10a1 → cornflow-1.0.11}/cornflow/migrations/env.py +0 -0
- {cornflow-1.0.10a1 → cornflow-1.0.11}/cornflow/migrations/script.py.mako +0 -0
- {cornflow-1.0.10a1 → cornflow-1.0.11}/cornflow/migrations/versions/00757b557b02_.py +0 -0
- {cornflow-1.0.10a1 → cornflow-1.0.11}/cornflow/migrations/versions/1af47a419bbd_.py +0 -0
- {cornflow-1.0.10a1 → cornflow-1.0.11}/cornflow/migrations/versions/4aac5e0c6e66_.py +0 -0
- {cornflow-1.0.10a1 → cornflow-1.0.11}/cornflow/migrations/versions/7c3ea5ab5501_.py +0 -0
- {cornflow-1.0.10a1 → cornflow-1.0.11}/cornflow/migrations/versions/a472b5ad50b7_.py +0 -0
- {cornflow-1.0.10a1 → cornflow-1.0.11}/cornflow/migrations/versions/c2db9409cb5f_.py +0 -0
- {cornflow-1.0.10a1 → cornflow-1.0.11}/cornflow/migrations/versions/c8a6c762e818_.py +0 -0
- {cornflow-1.0.10a1 → cornflow-1.0.11}/cornflow/migrations/versions/ca449af8034c_.py +0 -0
- {cornflow-1.0.10a1 → cornflow-1.0.11}/cornflow/migrations/versions/d0e0700dcd8e_.py +0 -0
- {cornflow-1.0.10a1 → cornflow-1.0.11}/cornflow/migrations/versions/d1b5be1f0549_.py +0 -0
- {cornflow-1.0.10a1 → cornflow-1.0.11}/cornflow/migrations/versions/e1a50dae1ac9_.py +0 -0
- {cornflow-1.0.10a1 → cornflow-1.0.11}/cornflow/migrations/versions/e937a5234ce4_.py +0 -0
- {cornflow-1.0.10a1 → cornflow-1.0.11}/cornflow/migrations/versions/ebdd955fcc5e_.py +0 -0
- {cornflow-1.0.10a1 → cornflow-1.0.11}/cornflow/migrations/versions/f3bee20314a2_.py +0 -0
- {cornflow-1.0.10a1 → cornflow-1.0.11}/cornflow/models/__init__.py +0 -0
- {cornflow-1.0.10a1 → cornflow-1.0.11}/cornflow/models/action.py +0 -0
- {cornflow-1.0.10a1 → cornflow-1.0.11}/cornflow/models/alarms.py +0 -0
- {cornflow-1.0.10a1 → cornflow-1.0.11}/cornflow/models/dag.py +0 -0
- {cornflow-1.0.10a1 → cornflow-1.0.11}/cornflow/models/dag_permissions.py +0 -0
- {cornflow-1.0.10a1 → cornflow-1.0.11}/cornflow/models/main_alarms.py +0 -0
- {cornflow-1.0.10a1 → cornflow-1.0.11}/cornflow/models/meta_models.py +0 -0
- {cornflow-1.0.10a1 → cornflow-1.0.11}/cornflow/models/permissions.py +0 -0
- {cornflow-1.0.10a1 → cornflow-1.0.11}/cornflow/models/role.py +0 -0
- {cornflow-1.0.10a1 → cornflow-1.0.11}/cornflow/models/user.py +0 -0
- {cornflow-1.0.10a1 → cornflow-1.0.11}/cornflow/models/user_role.py +0 -0
- {cornflow-1.0.10a1 → cornflow-1.0.11}/cornflow/models/view.py +0 -0
- {cornflow-1.0.10a1 → cornflow-1.0.11}/cornflow/schemas/__init__.py +0 -0
- {cornflow-1.0.10a1 → cornflow-1.0.11}/cornflow/schemas/action.py +0 -0
- {cornflow-1.0.10a1 → cornflow-1.0.11}/cornflow/schemas/alarms.py +0 -0
- {cornflow-1.0.10a1 → cornflow-1.0.11}/cornflow/schemas/case.py +0 -0
- {cornflow-1.0.10a1 → cornflow-1.0.11}/cornflow/schemas/common.py +0 -0
- {cornflow-1.0.10a1 → cornflow-1.0.11}/cornflow/schemas/dag.py +0 -0
- {cornflow-1.0.10a1 → cornflow-1.0.11}/cornflow/schemas/example_data.py +0 -0
- {cornflow-1.0.10a1 → cornflow-1.0.11}/cornflow/schemas/execution.py +0 -0
- {cornflow-1.0.10a1 → cornflow-1.0.11}/cornflow/schemas/health.py +0 -0
- {cornflow-1.0.10a1 → cornflow-1.0.11}/cornflow/schemas/instance.py +0 -0
- {cornflow-1.0.10a1 → cornflow-1.0.11}/cornflow/schemas/main_alarms.py +0 -0
- {cornflow-1.0.10a1 → cornflow-1.0.11}/cornflow/schemas/model_json.py +0 -0
- {cornflow-1.0.10a1 → cornflow-1.0.11}/cornflow/schemas/patch.py +0 -0
- {cornflow-1.0.10a1 → cornflow-1.0.11}/cornflow/schemas/permissions.py +0 -0
- {cornflow-1.0.10a1 → cornflow-1.0.11}/cornflow/schemas/query.py +0 -0
- {cornflow-1.0.10a1 → cornflow-1.0.11}/cornflow/schemas/role.py +0 -0
- {cornflow-1.0.10a1 → cornflow-1.0.11}/cornflow/schemas/schemas.py +0 -0
- {cornflow-1.0.10a1 → cornflow-1.0.11}/cornflow/schemas/solution_log.py +0 -0
- {cornflow-1.0.10a1 → cornflow-1.0.11}/cornflow/schemas/tables.py +0 -0
- {cornflow-1.0.10a1 → cornflow-1.0.11}/cornflow/schemas/user.py +0 -0
- {cornflow-1.0.10a1 → cornflow-1.0.11}/cornflow/schemas/user_role.py +0 -0
- {cornflow-1.0.10a1 → cornflow-1.0.11}/cornflow/schemas/view.py +0 -0
- {cornflow-1.0.10a1 → cornflow-1.0.11}/cornflow/shared/__init__.py +0 -0
- {cornflow-1.0.10a1 → cornflow-1.0.11}/cornflow/shared/authentication/__init__.py +0 -0
- {cornflow-1.0.10a1 → cornflow-1.0.11}/cornflow/shared/authentication/auth.py +0 -0
- {cornflow-1.0.10a1 → cornflow-1.0.11}/cornflow/shared/authentication/decorators.py +0 -0
- {cornflow-1.0.10a1 → cornflow-1.0.11}/cornflow/shared/authentication/ldap.py +0 -0
- {cornflow-1.0.10a1 → cornflow-1.0.11}/cornflow/shared/compress.py +0 -0
- {cornflow-1.0.10a1 → cornflow-1.0.11}/cornflow/shared/const.py +0 -0
- {cornflow-1.0.10a1 → cornflow-1.0.11}/cornflow/shared/email.py +0 -0
- {cornflow-1.0.10a1 → cornflow-1.0.11}/cornflow/shared/exceptions.py +0 -0
- {cornflow-1.0.10a1 → cornflow-1.0.11}/cornflow/shared/licenses.py +0 -0
- {cornflow-1.0.10a1 → cornflow-1.0.11}/cornflow/shared/log_config.py +0 -0
- {cornflow-1.0.10a1 → cornflow-1.0.11}/cornflow/shared/query_tools.py +0 -0
- {cornflow-1.0.10a1 → cornflow-1.0.11}/cornflow/shared/utils.py +0 -0
- {cornflow-1.0.10a1 → cornflow-1.0.11}/cornflow/shared/utils_tables.py +0 -0
- {cornflow-1.0.10a1 → cornflow-1.0.11}/cornflow/shared/validators.py +0 -0
- {cornflow-1.0.10a1 → cornflow-1.0.11}/cornflow/tests/__init__.py +0 -0
- {cornflow-1.0.10a1 → cornflow-1.0.11}/cornflow/tests/const.py +0 -0
- {cornflow-1.0.10a1 → cornflow-1.0.11}/cornflow/tests/custom_liveServer.py +0 -0
- {cornflow-1.0.10a1 → cornflow-1.0.11}/cornflow/tests/custom_test_case.py +0 -0
- {cornflow-1.0.10a1 → cornflow-1.0.11}/cornflow/tests/integration/__init__.py +0 -0
- {cornflow-1.0.10a1 → cornflow-1.0.11}/cornflow/tests/integration/test_commands.py +0 -0
- {cornflow-1.0.10a1 → cornflow-1.0.11}/cornflow/tests/integration/test_cornflowclient.py +0 -0
- {cornflow-1.0.10a1 → cornflow-1.0.11}/cornflow/tests/ldap/__init__.py +0 -0
- {cornflow-1.0.10a1 → cornflow-1.0.11}/cornflow/tests/ldap/test_ldap_authentication.py +0 -0
- {cornflow-1.0.10a1 → cornflow-1.0.11}/cornflow/tests/unit/__init__.py +0 -0
- {cornflow-1.0.10a1 → cornflow-1.0.11}/cornflow/tests/unit/test_actions.py +0 -0
- {cornflow-1.0.10a1 → cornflow-1.0.11}/cornflow/tests/unit/test_alarms.py +0 -0
- {cornflow-1.0.10a1 → cornflow-1.0.11}/cornflow/tests/unit/test_apiview.py +0 -0
- {cornflow-1.0.10a1 → cornflow-1.0.11}/cornflow/tests/unit/test_cases.py +0 -0
- {cornflow-1.0.10a1 → cornflow-1.0.11}/cornflow/tests/unit/test_cli.py +0 -0
- {cornflow-1.0.10a1 → cornflow-1.0.11}/cornflow/tests/unit/test_commands.py +0 -0
- {cornflow-1.0.10a1 → cornflow-1.0.11}/cornflow/tests/unit/test_dags.py +0 -0
- {cornflow-1.0.10a1 → cornflow-1.0.11}/cornflow/tests/unit/test_data_checks.py +0 -0
- {cornflow-1.0.10a1 → cornflow-1.0.11}/cornflow/tests/unit/test_example_data.py +0 -0
- {cornflow-1.0.10a1 → cornflow-1.0.11}/cornflow/tests/unit/test_executions.py +0 -0
- {cornflow-1.0.10a1 → cornflow-1.0.11}/cornflow/tests/unit/test_generate_from_schema.py +0 -0
- {cornflow-1.0.10a1 → cornflow-1.0.11}/cornflow/tests/unit/test_health.py +0 -0
- {cornflow-1.0.10a1 → cornflow-1.0.11}/cornflow/tests/unit/test_instances.py +0 -0
- {cornflow-1.0.10a1 → cornflow-1.0.11}/cornflow/tests/unit/test_instances_file.py +0 -0
- {cornflow-1.0.10a1 → cornflow-1.0.11}/cornflow/tests/unit/test_licenses.py +0 -0
- {cornflow-1.0.10a1 → cornflow-1.0.11}/cornflow/tests/unit/test_log_in.py +0 -0
- {cornflow-1.0.10a1 → cornflow-1.0.11}/cornflow/tests/unit/test_main_alarms.py +0 -0
- {cornflow-1.0.10a1 → cornflow-1.0.11}/cornflow/tests/unit/test_permissions.py +0 -0
- {cornflow-1.0.10a1 → cornflow-1.0.11}/cornflow/tests/unit/test_roles.py +0 -0
- {cornflow-1.0.10a1 → cornflow-1.0.11}/cornflow/tests/unit/test_schema_from_models.py +0 -0
- {cornflow-1.0.10a1 → cornflow-1.0.11}/cornflow/tests/unit/test_schemas.py +0 -0
- {cornflow-1.0.10a1 → cornflow-1.0.11}/cornflow/tests/unit/test_sign_up.py +0 -0
- {cornflow-1.0.10a1 → cornflow-1.0.11}/cornflow/tests/unit/test_tables.py +0 -0
- {cornflow-1.0.10a1 → cornflow-1.0.11}/cornflow/tests/unit/test_token.py +0 -0
- {cornflow-1.0.10a1 → cornflow-1.0.11}/cornflow/tests/unit/test_users.py +0 -0
- {cornflow-1.0.10a1 → cornflow-1.0.11}/cornflow/tests/unit/tools.py +0 -0
- {cornflow-1.0.10a1 → cornflow-1.0.11}/cornflow.egg-info/SOURCES.txt +0 -0
- {cornflow-1.0.10a1 → cornflow-1.0.11}/cornflow.egg-info/dependency_links.txt +0 -0
- {cornflow-1.0.10a1 → cornflow-1.0.11}/cornflow.egg-info/entry_points.txt +0 -0
- {cornflow-1.0.10a1 → cornflow-1.0.11}/cornflow.egg-info/top_level.txt +0 -0
- {cornflow-1.0.10a1 → cornflow-1.0.11}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 1.2
|
2
2
|
Name: cornflow
|
3
|
-
Version: 1.0.
|
3
|
+
Version: 1.0.11
|
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
|
@@ -28,6 +28,9 @@ class BaseDataModel(TraceAttributesModel):
|
|
28
28
|
|
29
29
|
@declared_attr
|
30
30
|
def user_id(self):
|
31
|
+
"""
|
32
|
+
The foreign key for the user (:class:`UserModel<cornflow.models.UserModel>`).
|
33
|
+
"""
|
31
34
|
return db.Column(db.Integer, db.ForeignKey("users.id"), nullable=False)
|
32
35
|
|
33
36
|
@declared_attr
|
@@ -34,10 +34,40 @@ SEPARATOR = "/"
|
|
34
34
|
|
35
35
|
|
36
36
|
class CaseModel(BaseDataModel):
|
37
|
+
"""
|
38
|
+
Model class for the Cases.
|
39
|
+
It inherits from :class:`BaseDataModel<cornflow.models.base_data_model.BaseDataModel>` to have the trace fields and user field.
|
40
|
+
|
41
|
+
- **id**: int, the primary key for the cases, is an autoincrement.
|
42
|
+
- **path**: str, the path for the case, by default it would be the "root folder" (empty string).
|
43
|
+
- **name**: str, the name of the case given by the user.
|
44
|
+
- **description**: str, the description of the case given by the user. It is optional.
|
45
|
+
- **data**: dict (JSON), the data of the instance of the case.
|
46
|
+
- **checks**: dict (JSON), the checks of instance of the case.
|
47
|
+
- **data_hash**: str, the hash of the data of the instance of the case.
|
48
|
+
- **solution**: dict (JSON), the solution of the instance of the case.
|
49
|
+
- **solution_hash**: str, the hash of the solution of the instance of the case.
|
50
|
+
- **solution_checks**: dict (JSON), the checks of the solution of the instance of the case.
|
51
|
+
- **schema**: str, the schema of the instance of the case.
|
52
|
+
- **user_id**: int, the foreign key for the user (:class:`UserModel<cornflow.models.UserModel>`). It links the case to its owner.
|
53
|
+
- **created_at**: datetime, the datetime when the case was created (in UTC).
|
54
|
+
This datetime is generated automatically, the user does not need to provide it.
|
55
|
+
- **updated_at**: datetime, the datetime when the case was last updated (in UTC).
|
56
|
+
This datetime is generated automatically, the user does not need to provide it.
|
57
|
+
- **deleted_at**: datetime, the datetime when the case was deleted (in UTC). Even though it is deleted, actually, it is not deleted from the database, in order to have a command that cleans up deleted data after a certain time of its deletion.
|
58
|
+
|
59
|
+
"""
|
60
|
+
|
61
|
+
|
37
62
|
__tablename__ = "cases"
|
38
63
|
|
39
64
|
id = db.Column(db.Integer, primary_key=True, autoincrement=True)
|
40
65
|
path = db.Column(db.String(500), nullable=False, index=True)
|
66
|
+
solution = db.Column(JSON, nullable=True)
|
67
|
+
solution_hash = db.Column(db.String(256), nullable=False)
|
68
|
+
solution_checks = db.Column(JSON, nullable=True)
|
69
|
+
|
70
|
+
|
41
71
|
# To find the descendants of this node, we look for nodes whose path
|
42
72
|
# starts with this node's path.
|
43
73
|
# c_path =
|
@@ -49,9 +79,7 @@ class CaseModel(BaseDataModel):
|
|
49
79
|
path.concat(id).concat(SEPARATOR + "%")
|
50
80
|
),
|
51
81
|
)
|
52
|
-
|
53
|
-
solution_hash = db.Column(db.String(256), nullable=False)
|
54
|
-
solution_checks = db.Column(JSON, nullable=True)
|
82
|
+
|
55
83
|
|
56
84
|
# TODO: maybe implement this while making it compatible with sqlite:
|
57
85
|
# Finding the ancestors is a little bit trickier. We need to create a fake
|
@@ -100,6 +128,17 @@ class CaseModel(BaseDataModel):
|
|
100
128
|
|
101
129
|
@classmethod
|
102
130
|
def from_parent_id(cls, user, data):
|
131
|
+
"""
|
132
|
+
Class method to create a new case from an already existing case.
|
133
|
+
|
134
|
+
:param user: the user that is creating the case.
|
135
|
+
:type user: :class:`UserModel<cornflow.models.UserModel>`
|
136
|
+
:param data: the data of the case
|
137
|
+
:type data: dict
|
138
|
+
:return: the new case
|
139
|
+
:rtype: :class:`CaseModel<cornflow.models.CaseModel>`
|
140
|
+
"""
|
141
|
+
|
103
142
|
if data.get("parent_id") is None:
|
104
143
|
# we assume at root
|
105
144
|
return cls(data, parent=None)
|
@@ -195,6 +234,12 @@ class CaseModel(BaseDataModel):
|
|
195
234
|
return patched_data, hash_json_256(patched_data)
|
196
235
|
|
197
236
|
def move_to(self, new_parent=None):
|
237
|
+
"""
|
238
|
+
Method to move the case to a new path based on a new parent case
|
239
|
+
|
240
|
+
:param new_parent: the new parent case
|
241
|
+
:type new_parent: :class:`CaseModel<cornflow.models.CaseModel>`
|
242
|
+
"""
|
198
243
|
if new_parent is None:
|
199
244
|
new_path = ""
|
200
245
|
else:
|
@@ -15,7 +15,7 @@ from cornflow.shared.const import DEFAULT_EXECUTION_CODE, EXECUTION_STATE_MESSAG
|
|
15
15
|
class ExecutionModel(BaseDataModel):
|
16
16
|
"""
|
17
17
|
Model class for the Executions.
|
18
|
-
It inherits from :class:`BaseDataModel
|
18
|
+
It inherits from :class:`BaseDataModel<cornflow.models.base_data_model.BaseDataModel>` to have the trace fields and user field.
|
19
19
|
|
20
20
|
- **id**: str, the primary key for the executions, a hash generated upon creation of the execution
|
21
21
|
and the id given back to the user.
|
@@ -11,7 +11,7 @@ from cornflow.shared import db
|
|
11
11
|
class InstanceModel(BaseDataModel):
|
12
12
|
"""
|
13
13
|
Model class for the Instances
|
14
|
-
It inherits from :class:`BaseDataModel
|
14
|
+
It inherits from :class:`BaseDataModel<cornflow.models.base_data_model.BaseDataModel>` to have the trace fields and user field
|
15
15
|
|
16
16
|
The :class:`InstanceModel` has the following fields:
|
17
17
|
|
@@ -58,12 +58,14 @@ class InstanceModel(BaseDataModel):
|
|
58
58
|
(str(self.created_at) + " " + str(self.user_id)).encode()
|
59
59
|
).hexdigest()
|
60
60
|
|
61
|
-
def update(self, data):
|
61
|
+
def update(self, data: dict):
|
62
62
|
"""
|
63
|
-
Method used to update an instance from the database
|
63
|
+
Method used to update an instance from the database.
|
64
|
+
|
65
|
+
This method is mainly used on PUT requests to update the instance.
|
64
66
|
|
65
67
|
:param dict data: the data of the object
|
66
|
-
:return:
|
68
|
+
:return: Nothing, it will update the instance in-place and on the database
|
67
69
|
:rtype: None
|
68
70
|
"""
|
69
71
|
# Delete the checks if the data has been modified since they are probably not valid anymore
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 1.2
|
2
2
|
Name: cornflow
|
3
|
-
Version: 1.0.
|
3
|
+
Version: 1.0.11
|
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
|
@@ -8,7 +8,7 @@ Flask==2.3.2
|
|
8
8
|
flask-apispec<=0.11.4
|
9
9
|
Flask-Bcrypt<=1.0.1
|
10
10
|
Flask-Compress<=1.13
|
11
|
-
flask-cors<=
|
11
|
+
flask-cors<=4.0.1
|
12
12
|
flask-inflate<=0.3
|
13
13
|
Flask-Migrate<=4.0.4
|
14
14
|
Flask-RESTful<=0.3.9
|
@@ -25,7 +25,7 @@ pytups>=0.86.2
|
|
25
25
|
requests<=2.31.0
|
26
26
|
SQLAlchemy==1.3.21
|
27
27
|
webargs<=8.2.0
|
28
|
-
Werkzeug<=
|
28
|
+
Werkzeug<=3.0.3
|
29
29
|
|
30
30
|
[:python_version < "3.11"]
|
31
31
|
greenlet<=2.0.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.0.
|
12
|
+
version="1.0.11",
|
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
|