CloudOrc / SolidUI

one sentence generates any graph
https://cloudorc.github.io/SolidUI-Website/
Apache License 2.0
574 stars 86 forks source link

[Feature][SolidUI] Converting Java Code to Python #181

Closed dlimeng closed 9 months ago

dlimeng commented 1 year ago

Search before asking

Problem Description

Translation of all Java code modules into Python. This is a reconstruction based on the overall architecture of the Python system in version 0.8.0. If you are interested, please add comments.

Module function

solidui-bom: BOM (Bill of Materials) is usually used to manage dependency versions in a project to ensure that all modules use the same version of dependencies.

Solidui-common: This module contains common code and tools used throughout the project.

Solidui-dao: DAO (Data Access Object) module contains all the codes to interact with the database.

solidui-datasource-plugin: This module provides a way to extend the data source, so that data can be obtained from many different types of data sources.

solidui-dist: The build and distribution of this module project.

Solidui-entrance: This module is the main entry point of the project and contains the code to start and initialize the application.

Solidui-service: This module contains business logic code.

Solidui-spi: The SPI (Service Provider Interface) module provides a way to extend the functionality of the project.

soliduimodelui: module model proxy layer, used to upgrade the data model conversion of the UI layer.]

github workflow

apache python

Description

No response

Use case

No response

Solutions

No response

Anything else

No response

Are you willing to submit a PR?

github-actions[bot] commented 1 year ago

:blush: Welcome to the SolidUI community!! We are glad that you are contributing by opening this issue.

Please make sure to include all the relevant context. We will be here shortly.

If you are interested in contributing to our project, please let us know! You can check out our contributing guide on :point_right: How to Contribute.

If you have any questions or suggestions, please feel free to post them here or contact us via email at mengyoupanshan@gmail.com.

We appreciate your interest in SolidUI and look forward to working with you!

dlimeng commented 11 months ago

架构 bin 脚本 deploy 部署 solidui 包含模块 (common:This module contains common code and tools used throughout the project. model datasource_plugin: This module provides a way to extend the data source, so that data can be obtained from many different types of data sources. entrance: This module is the main entry point of the project and contains the code to start and initialize the application. spi: The SPI (Service Provider Interface) module provides a way to extend the functionality of the project. soliduimodelui: module model proxy layer, used to upgrade the data model conversion of the UI layer. )

soliduidiffusion web: web

dlimeng commented 11 months ago

主要做了以下转换:

  1. 将Java常量和工具类转换为Python常量和函数

  2. 使用bcrypt来代替DES加密,更安全

  3. 将映射关系改为Python字典

  4. 通过Flask来实现web接口

  5. 使用dataclasses和类型注解使代码更Pythonic

  6. 删除不需要的类,使代码更简洁

  7. 添加注释来说明部分实现逻辑

  8. 使用标准Python风格(如蛇形命名)

  9. 保留接口一致,便于比较对照

dlimeng commented 10 months ago

2023.12.4-2023.12.28 https://github.com/CloudOrc/SolidUI/tree/dev-python pr 提交了 整个SolidUI 代码都重写重构完了,今天开始做测试 优先级:接口测试 -> 页面功能测试 这周日会把dev-python 分支合并到dev分支 ,后续合并完会在dev分支继续0.5.0版本迭代


From December 4 to December 28, 2023, PR submissions were made at https://github.com/CloudOrc/SolidUI/tree/dev-python.

The entire SolidUI codebase has been completely rewritten and refactored, and today we will start testing. The priority is: API testing -> page functionality testing.

This Sunday, the dev-python branch will be merged into the dev branch. After the merge is complete, iteration of version 0.5.0 will continue on the dev branch.

dlimeng commented 10 months ago

旧版本代码统计 statistic

image image
dlimeng commented 10 months ago

新版本代码统计statistic

image image