From d0ba1b96763a6d631bde7d301605be55f4f1f064 Mon Sep 17 00:00:00 2001 From: Chunel Date: Wed, 28 May 2025 23:52:32 +0800 Subject: [PATCH] [doc] add PyCGraph-example. no upload to pypi in linux release version --- .github/workflows/pip4linux.yml | 10 ---------- README.md | 7 ++++--- src/GraphCtrl/GraphElement/GElement.cpp | 2 +- .../_GEngine/GDynamicEngine/GDynamicEngine.cpp | 2 +- 4 files changed, 6 insertions(+), 15 deletions(-) diff --git a/.github/workflows/pip4linux.yml b/.github/workflows/pip4linux.yml index d706111b..5007d65b 100644 --- a/.github/workflows/pip4linux.yml +++ b/.github/workflows/pip4linux.yml @@ -43,13 +43,3 @@ jobs: run: | cd python python setup.py bdist_wheel --plat-name manylinux2014_x86_64 - - - name: Upload to pypi when release - if: github.event_name == 'release' && github.event.action == 'published' - env: - TWINE_USERNAME: __token__ - TWINE_PASSWORD: ${{ secrets.PYPI_PYCGRAPH_TOKEN }} - run: | - cd python - twine check dist/* - twine upload --verbose --skip-existing dist/* diff --git a/README.md b/README.md index 357cbccc..ecc38b13 100644 --- a/README.md +++ b/README.md @@ -17,8 +17,8 @@ >CGraph is a cross-platform Directed Acyclic Graph framework based on pure C++ without any 3rd-party dependencies.

->You, with it, can build your own operators simply, and describe any running schedules as you need, such as dependence, parallelling, aggregation, conditional and so on. Python APIs are also supported to build your pipeline.

->Tutorials and contact information are show as follows. Please get in touch with us for free if you need more about this repository. +>You, with it, can build your own operators simply, and describe any running schedules as you need, such as dependence, parallelling, aggregation, conditional and so on. Python APIs are also supported to build your pipeline.

+>Tutorials and contact information are shown as follows. Please get in touch with us for free if you need more about this repository. ## 一. 简介 @@ -31,7 +31,7 @@ ![CGraph Skeleton](https://github.com/ChunelFeng/CGraph/blob/main/doc/image/CGraph%20Skeleton.jpg)
-本工程使用纯C++11标准库编写,无任何第三方依赖,并且提供`Python`版本。兼容`MacOS`、`Linux`、`Windows`和`Android`系统,支持通过 `CLion`、`VSCode`、`Xcode`、`Visual Studio`、`Code::Blocks`、`Qt Creator`等多款IDE进行本地编译和二次开发,具体编译方式请参考 [CGraph 编译说明](https://github.com/ChunelFeng/CGraph/blob/main/COMPILE.md )
+本工程使用纯C++11标准库编写,无任何第三方依赖,并且提供`Python`版本:`PyCGraph`。兼容`MacOS`、`Linux`、`Windows`和`Android`系统,支持本地编译和二次开发。编译方法和`PyCGraph`安装方法,请参考 [CGraph 编译说明](https://github.com/ChunelFeng/CGraph/blob/main/COMPILE.md )
详细功能介绍和用法,请参考 [一面之猿网](http://www.chunel.cn/) 中的文章内容。相关视频在B站持续更新中,欢迎观看和交流:
* [【B站视频】CGraph 入门篇](https://www.bilibili.com/video/BV1mk4y1v7XJ)
@@ -165,6 +165,7 @@ if __name__ == '__main__': * [GraphANNS](https://github.com/whenever5225/GraphANNS) : Graph-based Approximate Nearest Neighbor Search Working off CGraph * [CThreadPool](https://github.com/ChunelFeng/CThreadPool) : 一个简单好用、功能强大、性能优异、跨平台的C++线程池 * [CGraph-lite](https://github.com/ChunelFeng/CGraph-lite) : head-only, simplest CGraph, with DAG executor and param translate function +* [PyCGraph-example](https://github.com/ChunelFeng/PyCGraph-example) : A useful list of how cool to use PyCGraph * [awesome-cpp](https://github.com/fffaraz/awesome-cpp) : A curated list of awesome C++ (or C) frameworks, libraries, resources, and shiny things. Inspired by awesome-... stuff. * [awesome-workflow-engines](https://github.com/meirwah/awesome-workflow-engines) : A curated list of awesome open source workflow engines * [taskflow](https://github.com/taskflow/taskflow) : A General-purpose Parallel and Heterogeneous Task Programming System diff --git a/src/GraphCtrl/GraphElement/GElement.cpp b/src/GraphCtrl/GraphElement/GElement.cpp index fc3535d6..8310fa77 100644 --- a/src/GraphCtrl/GraphElement/GElement.cpp +++ b/src/GraphCtrl/GraphElement/GElement.cpp @@ -160,7 +160,7 @@ CStatus GElement::addDependGElements(const GElementPtrSet& elements) { for (GElementPtr element: elements) { CGRAPH_ASSERT_NOT_NULL(element) - CGRAPH_RETURN_ERROR_STATUS_BY_CONDITION((element->belong_ != this->belong_), \ + CGRAPH_RETURN_ERROR_STATUS_BY_CONDITION((element->belong_ != this->belong_), \ element->getName() + " cannot depend because not same belong info") if (this == element) { continue; diff --git a/src/GraphCtrl/GraphElement/_GEngine/GDynamicEngine/GDynamicEngine.cpp b/src/GraphCtrl/GraphElement/_GEngine/GDynamicEngine/GDynamicEngine.cpp index 1684b3ae..ab1193c9 100644 --- a/src/GraphCtrl/GraphElement/_GEngine/GDynamicEngine/GDynamicEngine.cpp +++ b/src/GraphCtrl/GraphElement/_GEngine/GDynamicEngine/GDynamicEngine.cpp @@ -125,7 +125,7 @@ CVoid GDynamicEngine::afterElementRun(GElementPtr element) { element->done_ = true; if (!element->run_before_.empty() && cur_status_.isOK()) { if (internal::GElementShape::LINKABLE == element->shape_) { - process(*(element->run_before_.begin()), true); + process(element->run_before_.front(), true); } else if (internal::GElementShape::ROOT == element->shape_) { for (CSize i = 0; i < element->run_before_.size(); i++) { process(element->run_before_[i], i == element->run_before_.size() - 1);