Skip to content

Commit dae91d4

Browse files
committed
feat: add code
0 parents  commit dae91d4

File tree

1,438 files changed

+161564
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,438 files changed

+161564
-0
lines changed

.gitignore

+44
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# Created by .ignore support plugin
2+
### Example user template template
3+
### Example user template
4+
5+
# IntelliJ project files
6+
.idea
7+
*.iws
8+
*.iml
9+
*.ipr
10+
*.html
11+
out
12+
gen
13+
# Binaries for programs and plugins
14+
*.exe
15+
*.exe~
16+
*.dll
17+
*.so2
18+
*.dylib
19+
20+
# Test binary
21+
*.test
22+
# Output, specifically when used with LiteIDE
23+
*.out
24+
*.DS_Store
25+
*.log
26+
target
27+
log
28+
site
29+
.settings
30+
.project
31+
.classpath
32+
bin
33+
# Polaris cache after Test
34+
**/polaris/backup/*.yaml
35+
**/polaris/backup/*.lock
36+
**/pom.xml.versionsBackup
37+
trpc-selector/trpc-selector-open-polaris/polaris
38+
**/target
39+
40+
# Codecc
41+
.codecc
42+
.vscode
43+
build.yml
44+
test.py

.resources/overall.png

1.13 MB
Loading

CODE-OF-CONDUCT.md

+52
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
English | [中文](CODE-OF-CONDUCT.zh_CN.md)
2+
3+
# Community Code of Conduct
4+
5+
Welcome to our open source project!
6+
7+
We are committed to creating a friendly, respectful, and inclusive community.
8+
To ensure a positive experience in our project, we have established the following code of conduct, which we require all participants to abide by, and provide a safe and inclusive environment for all community members.
9+
10+
## Our Pledge
11+
12+
As participants, contributors, and maintainers of our community, we pledge to:
13+
- Treat everyone with openness, inclusivity, and collaboration;
14+
- Respect individuals with different backgrounds and viewpoints, regardless of gender, sexual orientation, disability, race, ethnicity, religion, age, or any other factor;
15+
- Focus on contributing and improving the project, rather than attacking or criticizing individuals;
16+
- Build trust with community members and promote our project through constructive feedback;
17+
- Provide a safe, supportive, and encouraging environment for community members to promote learning and personal growth.
18+
19+
## Our standards
20+
21+
Our community members should adhere to the following standards:
22+
- Respect the opinions, viewpoints, and experiences of others;
23+
- Avoid using insulting, discriminatory, or harmful language;
24+
- Do not harass, intimidate, or threaten others;
25+
- Do not publicly or privately disclose others' private information, such as contact information or addresses;
26+
- Respect the privacy of others;
27+
- Establish a safe, inclusive, and respectful environment for community members.
28+
29+
## Our responsibility
30+
31+
Project maintainers have a responsibility to create a friendly, respectful, and inclusive environment for our community members.
32+
They should:
33+
- Clearly and publicly explain the community guidelines;
34+
- Handle reports of guideline violations and resolve disputes appropriately;
35+
- Protect the privacy and security of all community members;
36+
- Maintain a fair, transparent, and responsible attitude.
37+
38+
39+
## Scope
40+
41+
This code of conduct applies to all project spaces, including GitHub, mailing lists, forums, social media, gatherings, and conferences.
42+
Violations of the code of conduct will be dealt with, including but not limited to warnings, temporary or permanent bans, revocation of contribution rights, and revocation of project access rights.
43+
44+
## Implementation guidelines
45+
46+
If you encounter behavior that violates this code of conduct, you can:
47+
- Communicate privately with the relevant person to try to resolve the issue;
48+
- Report the violation to the project maintainers(maintainer mailing list), who will take necessary action based on the situation;
49+
- If you are not satisfied with the way the maintainers handle the situation, you can seek help from higher-level organizations or institutions.
50+
51+
Our community is a diverse, open, and inclusive community, and we welcome everyone's participation and contribution.
52+
We believe that only in a safe, respectful, and inclusive environment can we create the best project together.

CODE-OF-CONDUCT.zh_CN.md

+51
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
[English](CODE-OF-CONDUCT.md) | 中文
2+
3+
# 社区行为准则
4+
5+
欢迎来到我们的开源项目!
6+
7+
我们致力于创建一个友好、尊重和包容的社区,我们希望所有人都能为此做出贡献。
8+
为了确保在我们的项目中有一个积极的体验,我们制定了以下行为准则,我们要求所有参与者遵守这些准则,并向所有社区成员提供一个安全和包容的环境。
9+
10+
## 我们的承诺
11+
12+
作为我们社区的参与者、贡献者和维护者,我们承诺:
13+
- 以开放、包容和合作的态度对待所有人;
14+
- 尊重不同背景和观点的人,不论是性别、性取向、残疾、种族、民族、宗教、年龄或任何其他因素;
15+
- 专注于对项目的贡献和改进,而不是对个人的攻击或抨击;
16+
- 与社区成员建立互信关系,通过积极的反馈来推动我们的项目发展;
17+
- 为社区成员提供一个安全、支持和鼓励的环境,以促进学习和个人成长。
18+
19+
## 我们的标准
20+
21+
我们的社区成员应该遵守以下标准:
22+
- 尊重他人的意见、观点和经验;
23+
- 避免使用侮辱性、歧视性或有损的语言;
24+
- 不要骚扰、恐吓或威胁他人;
25+
- 不要公开或私下发布他人的私人信息,例如联系方式或地址;
26+
- 尊重他人的隐私权;
27+
- 为社区成员建立安全、包容和尊重的环境。
28+
29+
## 我们的责任
30+
31+
项目维护者有责任为我们的社区成员创造一个友好、尊重和包容的环境。
32+
他们应该:
33+
- 明确和公开地说明社区准则;
34+
- 处理准则违规行为的举报,通过适当的方式解决纠纷;
35+
- 保护所有社区成员的隐私和安全;
36+
- 保持公正、透明和负责任的态度。
37+
38+
## 管理范围
39+
40+
本行为准则适用于所有的项目空间,包括GitHub、邮件列表、论坛、社交媒体、聚会和会议等。
41+
违反准则的行为将受到处理,包括但不限于警告、暂时或永久禁言、撤销贡献权、撤销项目访问权等。
42+
43+
## 实施指南
44+
45+
如果你遇到了违反本准则的行为,你可以:
46+
- 私下与相关人员沟通,以尝试解决问题;
47+
- 向项目维护者报告违规行为,维护者会根据情况采取必要的行动;
48+
- 如果你不满意维护者的处理方式,你可以向更高级别的机构或组织寻求帮助。
49+
50+
我们的社区是一个多样化、开放和包容的社区,我们欢迎所有人的参与和贡献。
51+
我们相信,只有在一个安全、尊重和包容的环境中,我们才能共同创造出最优秀的项目。

CONTRIBUTING.md

+145
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,145 @@
1+
English | [中文](CONTRIBUTING.zh_CN.md)
2+
3+
# How to Contribute
4+
5+
Thank you for your interest and support in tRPC!
6+
7+
We welcome and appreciate any form of contribution, including but not limited to submitting issues,
8+
providing improvement suggestions, improving documentation, fixing bugs, and adding features. This
9+
document aims to provide you with a detailed contribution guide to help you better participate in
10+
the project. Please read this guide carefully before contributing and make sure to follow the rules
11+
here. We look forward to working with you to make this project better together!
12+
13+
## Before contributing code
14+
15+
The project welcomes code patches, but to make sure things are well coordinated you should discuss
16+
any significant change before starting the work. It's recommended that you signal your intention to
17+
contribute in the issue tracker, either by claiming
18+
an [existing one](https://github.com/trpc-group/trpc-java/issues) or
19+
by [opening a new issue](https://github.com/trpc-group/trpc-java/issues/new).
20+
21+
### Checking the issue tracker
22+
23+
Whether you already know what contribution to make, or you are searching for an idea,
24+
the [issue tracker](https://github.com/trpc-group/trpc-java/issues) is always the first place to go.
25+
Issues are triaged to categorize them and manage the workflow.
26+
27+
Most issues will be marked with one of the following workflow labels:
28+
29+
- **NeedsInvestigation**: The issue is not fully understood and requires analysis to understand the
30+
root cause.
31+
- **NeedsDecision**: The issue is relatively well understood, but the tRPC-Java team hasn't yet
32+
decided the best way to address it. It would be better to wait for a decision before writing code.
33+
If you are interested in working on an issue in this state, feel free to "ping" maintainers in the
34+
issue's comments if some time has passed without a decision.
35+
- **NeedsFix**: The issue is fully understood and code can be written to fix it.
36+
37+
### Opening an issue for any new problem
38+
39+
Excluding very trivial changes, all contributions should be connected to an existing issue. Feel
40+
free to open one and discuss your plans. This process gives everyone a chance to validate the
41+
design, helps prevent duplication of effort, and ensures that the idea fits inside the goals for the
42+
language and tools. It also checks that the design is sound before code is written; the code review
43+
tool is not the place for high-level discussions.
44+
45+
When opening an issue, make sure to answer these five questions:
46+
47+
1. What version of tRPC-Java are you using?
48+
2. What version of JDK are you using?
49+
3. What operating system and processor architecture are you using?
50+
4. What did you do?
51+
5. What did you expect to see?
52+
6. What did you see instead?
53+
54+
For change proposals, see Proposing Changes
55+
To [tRPC-Proposals](https://github.com/trpc-group/trpc/tree/main/proposal).
56+
57+
## Contributing code
58+
59+
Follow the [GitHub flow](https://docs.github.com/en/get-started/quickstart/github-flow)
60+
to [create a GitHub pull request](https://docs.github.com/en/get-started/quickstart/github-flow#create-a-pull-request)
61+
. If this is your first time submitting a PR to the tRPC-Java project, you will be reminded in the "
62+
Conversation" tab of the PR to sign and submit
63+
the [Contributor License Agreement](https://github.com/trpc-group/cla-database/blob/main/Tencent-Contributor-License-Agreement.md)
64+
. Only when you have signed the Contributor License Agreement, your submitted PR has the possibility
65+
of being accepted.
66+
67+
Some things to keep in mind:
68+
69+
- Ensure that your code conforms to the project's code specifications. This includes but is not
70+
limited to code style, comment specifications, etc. This helps us to maintain the cleanliness and
71+
consistency of the project.
72+
- Before submitting a PR, please make sure that you have tested your code locally(`mvn test`).
73+
Ensure that the code has no obvious errors and can run normally.
74+
- To update the pull request with new code, just push it to the branch; you can either add more
75+
commits, or rebase and force-push (both styles are accepted).
76+
- If the request is accepted, all commits will be squashed, and the final commit description will be
77+
composed by concatenating the pull request's title and description. The individual commits'
78+
descriptions will be discarded. See following "Write good commit messages" for some suggestions.
79+
80+
### Writing good commit messages
81+
82+
Commit messages in tRPC-Java follow a specific set of conventions, which we discuss in this section.
83+
84+
Here is an example of a good one:
85+
86+
87+
> math: improve Sin, Cos and Tan precision for very large arguments
88+
>
89+
> The existing implementation has poor numerical properties for
90+
> large arguments, so use the McGillicutty algorithm to improve
91+
> accuracy above 1e10.
92+
>
93+
> The algorithm is described at https://wikipedia.org/wiki/McGillicutty_Algorithm
94+
>
95+
> Fixes #159
96+
97+
#### First line
98+
99+
The first line of the change description is conventionally a short one-line summary of the change,
100+
prefixed by the primary affected package.
101+
102+
A rule of thumb is that it should be written so to complete the sentence "This change modifies
103+
tRPC-Java to _____."
104+
That means it does not start with a capital letter, is not a complete sentence, and actually
105+
summarizes the result of the change.
106+
107+
Follow the first line by a blank line.
108+
109+
#### Main content
110+
111+
The rest of the description elaborates and should provide context for the change and explain what it
112+
does. Write in complete sentences with correct punctuation, just like for your comments in
113+
tRPC-Java. Don't use HTML, Markdown, or any other markup language. Add any relevant information,
114+
such as benchmark data if the change affects performance.
115+
116+
#### Referencing issues
117+
118+
The special notation "Fixes #12345" associates the change with issue 12345 in the tRPC-Java issue
119+
tracker. When this change is eventually applied, the issue tracker will automatically mark the issue
120+
as fixed.
121+
122+
## Miscellaneous topics
123+
124+
### Copyright headers
125+
126+
Files in the tRPC-Java repository don't list author names, both to avoid clutter and to avoid having
127+
to keep the lists up to date. Instead, your name will appear in the change log.
128+
129+
New files that you contribute should use the standard copyright header:
130+
131+
```java
132+
/**
133+
* Tencent is pleased to support the open source community by making tRPC available.
134+
*
135+
* Copyright (C) 2023 THL A29 Limited, a Tencent company.
136+
* All rights reserved.
137+
*
138+
* If you have downloaded a copy of the tRPC source code from Tencent,
139+
* please note that tRPC source code is licensed under the Apache 2.0 License,
140+
* A copy of the Apache 2.0 License can be found in the LICENSE file.
141+
*/
142+
```
143+
144+
Files in the repository are copyrighted the year they are added. Do not update the copyright year on
145+
files that you change.

0 commit comments

Comments
 (0)