Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pydantic integration 2.4.1 #140

Merged
merged 151 commits into from
Jan 4, 2024
Merged

Pydantic integration 2.4.1 #140

merged 151 commits into from
Jan 4, 2024

Conversation

Mograbi
Copy link
Contributor

@Mograbi Mograbi commented May 9, 2023

pydantic baseline for 2.4.1:
BP-1001 - create Callback pydantic class
BP-1002 - create Configuration pydantic class
BP-999 - create Flow pydantic class
BP-1110 - create Message pydantic class
BP-1000 - create Node pydantic class
BP-1009 - create Ports pydantic class
BP-1114 - create System pydantic class

@Mograbi Mograbi marked this pull request as draft May 9, 2023 10:15
dal/new_models/role.py Outdated Show resolved Hide resolved
dal/new_models/var.py Outdated Show resolved Hide resolved
tags Outdated Show resolved Hide resolved
@erezz-mov-ai erezz-mov-ai marked this pull request as ready for review January 3, 2024 18:01
dal/tools/migrate_tool.py Outdated Show resolved Hide resolved
dal/new_models/flow/flow.py Outdated Show resolved Hide resolved
dal/new_models/flow/flow.py Outdated Show resolved Hide resolved
dal/new_models/flow/flow.py Outdated Show resolved Hide resolved
dal/models/nodeinst.py Outdated Show resolved Hide resolved
Copy link

sonarcloud bot commented Jan 4, 2024

Quality Gate Failed Quality Gate failed

Failed conditions

3 Security Hotspots
12.8% Duplication on New Code (required ≤ 10%)

See analysis details on SonarCloud

@erezz-mov-ai erezz-mov-ai merged commit 59144af into dev Jan 4, 2024
7 of 9 checks passed
erezz-mov-ai added a commit that referenced this pull request Jan 4, 2024
* added basic Callback Model

* final Callback POC

* added flow and node, modified callback

* moved common parts to base, new class MovaiBaseMod

* added annotation, reorder files

* added graphicscene

* new implementation

* minor fixes

* working callback

* major changes, created PrimaryKey class

* used PrimaryKey the proper way

* name fix, fix key pattern

* added flow, modify save function

* added annotation, graphicscene

* better primary keys in code

* reorder files in new folders

* added Layout

* added application

* added Ports

* used pydantic callback in backup

* added support for old classes fetch.

* organised better, fixed project key

* changed module name to new_model

* added Node functions from old Model, redis version pump

* fixed models, used new models

* removed logs, fixed default values for model

* fixed pk in objects, removed cache and use only in base.py in new-models

* added documentation, added proper cache system for Models

* fixed Flows

* fixed LastUpdate, added Configuration, fixed Flows again

* added ports, fixed configuration, fixed cache

* added Flow, fixed some bugs

* added flowlinks, container, fixed flow

* added annotation

* added annotation, robot, layout

* added TODO comments

* fixed robot object initialization

* fixed Annotation functions

* run black formatter

* added basic Callback Model

* final Callback POC

* added flow and node, modified callback

* moved common parts to base, new class MovaiBaseMod

* added annotation, reorder files

* added graphicscene

* new implementation

* minor fixes

* working callback

* major changes, created PrimaryKey class

* used PrimaryKey the proper way

* name fix, fix key pattern

* added flow, modify save function

* added annotation, graphicscene

* better primary keys in code

* reorder files in new folders

* added Layout

* added application

* added Ports

* used pydantic callback in backup

* added support for old classes fetch.

* organised better, fixed project key

* changed module name to new_model

* added Node functions from old Model, redis version pump

* fixed models, used new models

* removed logs, fixed default values for model

* fixed pk in objects, removed cache and use only in base.py in new-models

* added documentation, added proper cache system for Models

* fixed Flows

* fixed LastUpdate, added Configuration, fixed Flows again

* added ports, fixed configuration, fixed cache

* added Flow, fixed some bugs

* added flowlinks, container, fixed flow

* added annotation

* added annotation, robot, layout

* added TODO comments

* fixed robot object initialization

* fixed Annotation functions

* run black formatter

* Pydantic v2 changes

* pydantic V2 fix

* pydantic V2 fixes

* fixes for pydantic v2

* matching schema 1.0 to pydantic

* fixed json_schema, moved enterprise classes

* solving circular import

* project and version issues fix for models

* added message, package, role, system, migrate_tool

* circular import errors fix

* fixed package

* system fix, db local/global fix, select fix

* fix permission error

* system fixes, updated backup tool, circular import fix

* write fix

* not my last commit in here, will be back :p

* version 2.50-0

* run format

* add comment about pydantic

* add option for db number

* change func names and reorganize code

* update migrate.py script

* wip: migrate tool

* update tags

* add Robot

* add docstring and remove validate func

* udpate function name and add logger

* rename class Var_Subscriber to VarSubscriber

* reorganize imports on parsers

* add missing models

* missing permissions

* update get_dict

* update MovaiBaseModel

* nodeinst fixes

* fix imports add module docstring

* add missing import and convert method to classmethod

* convert Config to be based on Configuration from pydantic

* add module docstring

* fix mehod name error

* formatting and fix imports

* handle exception

* fix script to be able to handle System object

* remove unused files

* add missing packages

* fix code review changes, fix imports, run formatting and use annotaion from scopes

* migrate_tool: wip - only convert works

* change migrate to use functions

* fix Parameter field

* fix code review comments

* black formatting

* remove unused code

* minor fix for migrate_tool

---------

Co-authored-by: M Mograbi <[email protected]>
Co-authored-by: Otto Mation <[email protected]>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@diasdm diasdm deleted the pydantic branch April 17, 2024 09:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants