Skip to content

Add add_unstaged_mds to stage new files during pre-commit#4

Merged
LOGIC-10 merged 2 commits intoOpenBMB:mainfrom
Umpire2018:fix/pre-commit-fail
Dec 16, 2023
Merged

Add add_unstaged_mds to stage new files during pre-commit#4
LOGIC-10 merged 2 commits intoOpenBMB:mainfrom
Umpire2018:fix/pre-commit-fail

Conversation

@Umpire2018
Copy link
Copy Markdown
Collaborator

@Umpire2018 Umpire2018 commented Dec 15, 2023

Run test

python -m tests.test_change_detector
test_get_unstaged_mds: Unstaged Markdown files: ['test_file.md']

test_add_unstaged_mds: Number of remaining unstaged Markdown files after add: 0
.
test_get_staged_pys: Staged Python files: {'new_test_file.py': True}
.
test_get_unstaged_mds: Unstaged Markdown files: ['test_file.md']
.
----------------------------------------------------------------------
Ran 3 tests in 0.142s

OK

Use runner

python -m ai_doc.runner
2023-12-15 11:58:13,016 - INFO - 检测到暂存区中变更的文件:{'test.py': False}
2023-12-15 11:58:13,026 - INFO - 检测到变更对象:
{'added': {('create_directory', None)}, 'removed': set()}
2023-12-15 11:58:13,051 - INFO - 正在生成 test.py中的create_directory 对象文档...
2023-12-15 11:58:19,227 - INFO - HTTP Request: POST https://api.chatanywhere.tech/v1/chat/completions "HTTP/1.1 200 OK"
2023-12-15 11:58:19,234 - INFO - 已更新test.py文件的json结构信息。
2023-12-15 11:58:19,234 - INFO - 已更新test.py文件的Markdown文档。
2023-12-15 11:58:19,283 - INFO - 添加了 ['.project_hierachy.json', 'Markdown_Docs/test.md'] 到暂存区
2023-12-15 11:58:19,283 - INFO - 文档任务完成。

… pre-commit

- Remove deprecated functions and optimize code style.
- Reorganize project structure for execution with python -m approach
- fix PermissionError in #3
@LOGIC-10 LOGIC-10 merged commit 2a949d2 into OpenBMB:main Dec 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

PermissionError raised in ai_doc/file_handler.py write_file function pre-commit运行异常的解决方案设计

2 participants