-
Notifications
You must be signed in to change notification settings - Fork 48
feat: add configuration files for project setup with Poetry and pre-c… #23
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
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
giegie,请查收
@@ -0,0 +1,35 @@ | |||
[[tool.poetry.source]] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个poertry和pip是否冲突,我的目的是不想因为引用新技术而抬高用户的使用门槛,如果这个跟pip本身不冲突那没关系(当然也担心这些奇怪文件吓跑新手)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pip 可以继续使用,二者不冲突。
用 poetry 只是方便装了 isort 等,其实也可以不用 poetry
- repo: local | ||
hooks: | ||
- id: system | ||
name: isort |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个isort是需要把tushare那个库给ignore掉,因为默认导入tushare会有默认logging格式冲突的问题(reader那个目录)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👌🏻
- repo: local | ||
hooks: | ||
- id: system | ||
name: ruff |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ruff跟isort是不是功能有重叠,保留一个就行?
- repo: local | ||
hooks: | ||
- id: system | ||
name: pylint |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pylint这个会强制开发者执行么?毕竟fork的人比较多,让他们提交不了估计要炸毛
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
只有执行过 pre-commit install
的用户在 commit 后才会进行 pre-commit-config 中的检查,否则不会检查
- repo: local | ||
hooks: | ||
- id: system | ||
name: mypy |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
那个xtquant文件夹是复制进来的第三方库,需要ignore掉
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👌🏻
package-mode = false | ||
|
||
[tool.poetry.dependencies] | ||
python = "^3.12" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
3.10
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👌🏻
…ommit hooks