Hi there! We're thrilled that you'd like to contribute to this project. Your help is essential for keeping it great.
Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.
If you have suggestions for how this project could be improved, or want to report a bug, open an issue! We'd love all and any contributions. If you have questions, too, we'd love to hear them.
We'd also love PRs. If you're thinking of a large PR, we advise opening up an issue first to talk about it, though! Look at the links below if you're not sure how to open a PR.
- Fork and clone the repository.
- Use pdm Configure and install the dependencies:
pdm install
. - Make sure the tests pass on your machine:
pdm run test
orpytest -c pytest.ini
- Create a new branch:
git checkout -b your-branch-name
. - Make your change, add tests, and make sure the tests still pass.
- Sign your commits with a GPG key, or use the Github online editor to sign commits automatically.
- Push to your fork and submit a pull request.
- Pat your self on the back and wait for your pull request to be reviewed and merged.
Here are a few things you can do that will increase the likelihood of your pull request being accepted:
- Follow the PEP8 style guide and adding type hints (PEP 484) for your code (the minimum requirement)
- For more strict linting (not necessary, but we hope you do so), use
pdm run all_lint
. It may be takes a few seconds. - Write and update tests.
- Keep your changes as focused as possible. If there are multiple changes you would like to make that are not dependent upon each other, consider submitting them as separate pull requests.
- Write a clear commit message, should including necessary comments.
Work in Progress pull requests are also welcome to get feedback early on, or if there is something blocked you.
您好!我们很高兴您愿意为这个项目做出贡献。您的帮助对于保持该项目的良好发展至关重要。
请注意,该项目发布时附带贡献者行为准则。参与该项目即表示您同意遵守其条款。
如果您对如何改进该项目有任何建议,或者想要报告错误,请打开 Issues!我们欢迎所有贡献。如果您有疑问,我们也乐意听取。
我们也喜欢 PR。不过,如果您正在考虑大型 PR,我们建议您先打开一个问题来讨论它!如果您不确定如何进行 PR,请查看下面的链接。
- Fork 并克隆存储库
- 使用 pdm 配置并安装依赖项:
pdm install
- 确保测试在您的机器上通过:
pdm run test
或pytest -c pytest.ini
- 创建新分支:
git checkout -b your-branch-name
- 进行更改,添加测试,并确保测试仍然通过
- 使用 GPG 密钥签名您的提交,或使用 Github 在线编辑器来对提交自动签名
- 推送到您的 fork 并 提交拉取请求
- 等待您的拉取请求被审核和合并
以下几件事可以增加您的拉取请求被接受的可能性:
- 遵循 PEP8 样式指南 并为您的代码添加类型提示 (PEP 484)(最低要求)
- 对于更严格的 linting(不是必需的,但我们希望您这样做),请使用
pdm run all_lint
。这可能需要几秒钟。 - 编写和更新测试。
- 尽可能集中您的更改。如果您想提交多个不相互依赖的更改,请考虑将它们作为单独的拉取请求提交。
- 填写清晰的提交消息,应该包含必要的解释说明。
我们也欢迎您使用“仍在进行的拉取请求”,以便尽早获得反馈,或使您被一些情况困住时获得反馈。