Skip to content

Commit

Permalink
python3.11.10依赖升级 (#241)
Browse files Browse the repository at this point in the history
* bugfix: 取消signal()的providing_args参数传入 #238

* bugfix: ugettext_lazy导入修改为gettext_lazy #238

* feature: 修改pyproject文件 #238

* bugfix: 修改github workflows相关文件python版本 #238

* bugfix: 修改pyproject、tox.ini文件 #238

* bugfix: 修改pyproject、pr_check文件 #238

* bugfix: 修改pr_check文件uses引用 #238

* bugfix: 代码格式化 #238

* bugfix: bool_切换小写比对lower() #238

* bugfix: ugettext_lazy替换成gettext_lazy #238

* bugfix: test_data_for_execution_lack_of_inputs取消多个传参测试 #238

* bugfix: 代码格式化 #238

* bugfix: 代码格式化 #238

* bugfix: 修改action配置文件 #238

* bugfix: 修改tox.ini文件 #238

* bugfix: 代码格式化 #238

* bugfix: 修改poetry和pyproject文件 #238

* bugfix: 修改python版本 #238

* bugfix: 格式化代码 #238

* bugfix: 修改两个poetry.lock文件 #238

* bugfix: 修改bamboo-engine依赖版本 #238

* bugfix: 修改pyproject版本号 #238

* bugfix: 修改bamboo-engine导入的方式 #238
  • Loading branch information
huangpixu authored Jan 15, 2025
1 parent 96dbb2e commit 6e79dcd
Show file tree
Hide file tree
Showing 95 changed files with 2,159 additions and 1,207 deletions.
3 changes: 2 additions & 1 deletion .flake8
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ ignore =
;This behaviour may raise E203 whitespace before ':' warnings in style guide enforcement tools like Flake8.
;Since E203 is not PEP 8 compliant, you should tell Flake8 to ignore these warnings.
E203,
C901
C901,
F405

max-line-length = 120
max-complexity = 25
Expand Down
14 changes: 7 additions & 7 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
default_stages: [ commit ]
default_stages: [ pre-commit ]
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.1.0
hooks:
- id: check-merge-conflict
- repo: https://github.com/psf/black
rev: 22.3.0
rev: 24.10.0
hooks:
- id: black
language_version: python3
language_version: python3.11.10
- repo: https://github.com/pycqa/isort
rev: 5.6.4
rev: 5.12.0
hooks:
- id: isort
args: ["--profile", "black", "--filter-files"]
- repo: https://github.com/pycqa/flake8
rev: 5.0.4
rev: 6.1.0
hooks:
- id: flake8
language_version: python3
language_version: python3.11.10
- repo: https://github.com/alessandrojcm/commitlint-pre-commit-hook
rev: v2.2.0
hooks:
- id: commitlint
stages: [ commit-msg ]
additional_dependencies: [ '@commitlint/config-conventional' ]
additional_dependencies: [ '@commitlint/config-conventional' ]
4 changes: 2 additions & 2 deletions bamboo_engine/utils/boolrule/boolrule.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ def get_bool_expression():
realNumber.setParseAction(lambda toks: float(toks[0]))
| integer.setParseAction(lambda toks: int(toks[0]))
| str_
| bool_.setParseAction(lambda toks: toks[0] == "true")
| bool_.setParseAction(lambda toks: toks[0].lower() == "true")
| propertyPath.setParseAction(lambda toks: SubstituteVal(toks))
) # need to add support for alg expressions

Expand Down Expand Up @@ -209,7 +209,7 @@ def _compile(self):
self._compiled = True

def _expand_val(self, val, context):
if type(val) == list:
if isinstance(val, list):
val = [self._expand_val(v, context) for v in val]

if isinstance(val, SubstituteVal):
Expand Down
4 changes: 3 additions & 1 deletion bamboo_engine/utils/mako_utils/checker.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ def check_mako_template_safety(text: str, node_visitor: ast.NodeVisitor, code_ex
try:
lexer_template = Lexer(text).parse()
except MakoException as mako_error:
raise ForbiddenMakoTemplateException("非mako模板,解析失败, {err_msg}".format(err_msg=mako_error.__class__.__name__))
raise ForbiddenMakoTemplateException(
"非mako模板,解析失败, {err_msg}".format(err_msg=mako_error.__class__.__name__)
)
parse_template_nodes(lexer_template.nodes, node_visitor, code_extractor)
return True
5 changes: 4 additions & 1 deletion bamboo_engine/validator/gateway.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
import queue

from bamboo_engine import exceptions

from .utils import get_node_for_sequence, get_nodes_dict

STREAM = "stream"
Expand Down Expand Up @@ -144,7 +145,9 @@ def match_converge(
target[i] = None
break
else:
raise exceptions.ConvergeMatchError(cur_index, "并行网关中的分支网关必须将所有分支汇聚到一个汇聚网关")
raise exceptions.ConvergeMatchError(
cur_index, "并行网关中的分支网关必须将所有分支汇聚到一个汇聚网关"
)

converge_id, shared = match_converge(
converges=converges,
Expand Down
10 changes: 5 additions & 5 deletions docs/user_guide/signals.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ pipeline runtime 提供了以下 django signal,可作为流程运行生命周
### post_set_state

```python
post_set_state = Signal(providing_args=["node_id", "to_state", "version", "root_id", "parent_id", "loop"])
post_set_state = Signal() # providing_args=["node_id", "to_state", "version", "root_id", "parent_id", "loop"]
```

某个节点的状态修改后触发的信号
Expand All @@ -27,7 +27,7 @@ sender 为 `pipeline.eri.models.State`
### execute_interrupt

```python
execute_interrupt = Signal(providing_args=["event"])
execute_interrupt = Signal() # providing_args=["event"]
```

发生 execute 中断后触发的信号
Expand All @@ -41,7 +41,7 @@ sender 为 `bamboo_engine.eri.models.ExecuteInterruptEvent` 的实例
### schedule_interrupt

```python
schedule_interrupt = Signal(providing_args=["event"])
schedule_interrupt = Signal() # providing_args=["event"]
```

发生 schedule 中断后触发的信号
Expand All @@ -55,7 +55,7 @@ sender 为 `bamboo_engine.eri.models.ScheduleInterruptEvent` 的实例
### pre_service_execute

```python
pre_service_execute = Signal(providing_args=["service", "data", "parent_data"])
pre_service_execute = Signal() # providing_args=["service", "data", "parent_data"]
```

ServiceActivity 对应的 Service execute 前触发的信号
Expand All @@ -71,7 +71,7 @@ sender 为 `pipeline.eri.imp.service.ServiceWrapper`
### pre_service_schedule

```python
pre_service_schedule = Signal(providing_args=["service", "data", "parent_data", "callback_data"])
pre_service_schedule = Signal() # providing_args=["service", "data", "parent_data", "callback_data"]
```

ServiceActivity 对应的 Service schedule 前触发的信号
Expand Down
Loading

0 comments on commit 6e79dcd

Please sign in to comment.