Skip to content

Commit 324dd69

Browse files
feat: create 04_good_first_issue_candidate.yml (hiero-ledger#1086)
Signed-off-by: Antonio Ceppellini <[email protected]> Signed-off-by: AntonioCeppellini <[email protected]>
1 parent 2f66220 commit 324dd69

File tree

2 files changed

+282
-0
lines changed

2 files changed

+282
-0
lines changed
Lines changed: 281 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,281 @@
1+
name: Good First Issue Candidate Template
2+
description: Propose a potential Good First Issue (candidate)
3+
title: "[Good First Issue]:"
4+
labels: ["Good First Issue Candidate"]
5+
assignees: []
6+
body:
7+
- type: textarea
8+
id: intro-gfi-candidate
9+
attributes:
10+
label: ⚠️ Good First Issue — Candidate
11+
value: |
12+
> This issue is not yet a confirmed Good First Issue.
13+
> It is being evaluated for suitability and may require
14+
> clarification or refinement before it is ready to be picked up.
15+
>
16+
> Please wait for maintainer confirmation before starting work.
17+
>
18+
> Maintainers and reviewers can read more about Good First Issues:
19+
> docs/maintainers/good_first_issue_guidelines.md
20+
21+
validations:
22+
required: false
23+
24+
- type: textarea
25+
id: intro
26+
attributes:
27+
label: 🆕🐥 First Timers Only
28+
description: Who is this issue for?
29+
value: |
30+
This issue is reserved for people who have never contributed or have made minimal contributions to [Hiero Python SDK](https://hiero.org).
31+
We know that creating a pull request (PR) is a major barrier for new contributors.
32+
The goal of this issue and all other issues in [**find a good first issue**](https://github.com/issues?q=is%3Aopen+is%3Aissue+org%3Ahiero-ledger+archived%3Afalse+label%3A%22good+first+issue%22+) is to help you make your first contribution to the Hiero Python SDK.
33+
validations:
34+
required: false
35+
36+
- type: markdown
37+
attributes:
38+
value: |
39+
> [!IMPORTANT]
40+
> ### 📋 Good First Issue (GFI) Guidelines
41+
>
42+
> **What we generally consider good first issues:**
43+
>
44+
> - **Narrow changes or additions to `src` functionality** that use generic Python skills which can be tested by adding to an existing test. For example:
45+
> - `__str__` functions
46+
> - `__repr__` functions
47+
> - Typing fixes, like return type hints or basic type conflicts
48+
> - **Refactors of existing examples:**
49+
> - Separating existing examples into separate functions
50+
> - Or, conversely, taking a split example into a monolithic function
51+
> - **Improvements to documentation** in examples and source code:
52+
> - Docstrings: module docstrings, function docstrings
53+
> - Inline comments
54+
> - Addition or changes to print statements to improve clarity
55+
> - **Functional improvements to examples:**
56+
> - Additional steps that would help to illustrate functionality
57+
> - **Specific additions to existing unit or integration tests**
58+
>
59+
> **What we generally do NOT consider good first issues:**
60+
>
61+
> - Creation of new examples
62+
> - Creation of new unit and integration tests
63+
> - Changes to DLT functionality, like `to_proto` and `from_proto`
64+
> - Anything requiring knowledge of multiple areas of the codebase
65+
>
66+
> 📖 *For a more detailed explanation, refer to `docs/maintainers/good_first_issues_guidelines.md`.*
67+
68+
- type: textarea
69+
id: issue
70+
attributes:
71+
label: 👾 Description of the issue
72+
description: |
73+
DESCRIBE THE ISSUE IN A WAY THAT IS UNDERSTANDABLE TO NEW CONTRIBUTORS.
74+
YOU MUST NOT ASSUME THAT SUCH CONTRIBUTORS HAVE ANY KNOWLEDGE ABOUT THE CODEBASE OR HIERO.
75+
IT IS HELPFUL TO ADD LINKS TO THE RELEVANT DOCUMENTATION AND/OR CODE SECTIONS.
76+
BELOW IS AN EXAMPLE.
77+
value: |
78+
Edit here. Example provided below.
79+
80+
validations:
81+
required: true
82+
83+
- type: markdown
84+
attributes:
85+
value: |
86+
<!-- Example for problem (hidden in submission) -->
87+
## 👾 Description of the issue - Example
88+
89+
The example for Token Associate Transaction located at examples/tokens/token_associate_transaction.py can be improved. It correctly illustrates how to associate a token, however, it does so all from one function main()
90+
91+
As everything is grouped together in main(), it is difficult for a user to understand all the individual steps required to associate a token.
92+
93+
For example:
94+
```python
95+
96+
def run_demo():
97+
"""Monolithic token association demo."""
98+
print(f"🚀 Connecting to Hedera {network_name} network!")
99+
client = Client(Network(network_name))
100+
operator_id = AccountId.from_string(os.getenv("OPERATOR_ID", ""))
101+
operator_key = PrivateKey.from_string(os.getenv("OPERATOR_KEY", ""))
102+
client.set_operator(operator_id, operator_key)
103+
print(f"✅ Client ready (operator {operator_id})")
104+
105+
test_key = PrivateKey.generate_ed25519()
106+
receipt = (
107+
AccountCreateTransaction()
108+
.set_key(test_key.public_key())
109+
.set_initial_balance(Hbar(1))
110+
.set_account_memo("Test account for token association demo")
111+
.freeze_with(client)
112+
.sign(operator_key)
113+
.execute(client)
114+
)
115+
if receipt.status != ResponseCode.SUCCESS:
116+
raise Exception(receipt.status)
117+
account_id = receipt.account_id
118+
print(f"✅ Created test account {account_id}")
119+
120+
# Create tokens
121+
tokens = []
122+
for i in range(3):
123+
try:
124+
receipt = (
125+
TokenCreateTransaction()
126+
.set_token_name(f"DemoToken{i}")
127+
.set_token_symbol(f"DTK{i}")
128+
.set_decimals(2)
129+
.set_initial_supply(100_000)
130+
.set_treasury_account_id(operator_id)
131+
.freeze_with(client)
132+
.sign(operator_key)
133+
.execute(client)
134+
)
135+
if receipt.status != ResponseCode.SUCCESS:
136+
raise Exception(receipt.status)
137+
token_id = receipt.token_id
138+
tokens.append(token_id)
139+
print(f"✅ Created token {token_id}")
140+
except Exception as e:
141+
print(f"❌ Token creation failed: {e}")
142+
sys.exit(1)
143+
144+
# Associate first token
145+
try:
146+
TokenAssociateTransaction().set_account_id(account_id).add_token_id(tokens[0]).freeze_with(client).sign(test_key).execute(client)
147+
print(f"✅ Token {tokens[0]} associated with account {account_id}")
148+
except Exception as e:
149+
print(f"❌ Token association failed: {e}")
150+
sys.exit(1)
151+
```
152+
153+
- type: textarea
154+
id: solution
155+
attributes:
156+
label: 💡 Proposed Solution
157+
description: |
158+
AT THIS SECTION YOU NEED TO DESCRIBE THE STEPS NEEDED TO SOLVE THE ISSUE.
159+
PLEASE BREAK DOWN THE STEPS AS MUCH AS POSSIBLE AND MAKE SURE THAT THEY
160+
ARE EASY TO FOLLOW. IF POSSIBLE, ADD LINKS TO THE RELEVANT
161+
DOCUMENTATION AND/OR CODE SECTIONS.
162+
value: |
163+
Edit here. Example provided below.
164+
165+
validations:
166+
required: true
167+
168+
- type: markdown
169+
attributes:
170+
value: |
171+
<!-- Example for the solution (hidden in submission) -->
172+
## 💡 Solution - Example
173+
174+
For the TokenAssociateTransaction example, the solution is to split the monolithic main() function for illustrating TokenAssociateTransaction into separate smaller functions which are called from main().
175+
Such as:
176+
- Setting up the client
177+
- Creating an account
178+
- Creating a token
179+
- Associating the account to the token
180+
181+
- type: textarea
182+
id: implementation
183+
attributes:
184+
label: 👩‍💻 Implementation Steps
185+
description: |
186+
AT THIS SECTION YOU NEED TO DESCRIBE THE TECHNICAL STEPS NEEDED TO SOLVE THE ISSUE.
187+
PLEASE BREAK DOWN THE STEPS AS MUCH AS POSSIBLE AND MAKE SURE THAT THEY ARE EASY TO FOLLOW.
188+
IF POSSIBLE, ADD LINKS TO THE RELEVANT DOCUMENTATION AND/OR CODE.
189+
value: |
190+
Edit here. Example provided below.
191+
192+
validations:
193+
required: true
194+
195+
- type: markdown
196+
attributes:
197+
value: |
198+
<!-- Example implementation (hidden in submission) -->
199+
### 👩‍💻 Implementation - Example
200+
201+
To break down the monolithic main function, you need to:
202+
- [ ] Extract the Key Steps (set up a client, create a test account, create a token, associate the token)
203+
- [ ] Copy and paste the functionality for each key step into its own function
204+
- [ ] Pass to each function the variables you need to run it
205+
- [ ] Call each function in main()
206+
- [ ] Ensure you return the values you'll need to pass on to the next step in main
207+
- [ ] Ensure the example still runs and has the same output!
208+
209+
For example:
210+
```python
211+
212+
def setup_client():
213+
"""Initialize and set up the client with operator account."""
214+
215+
def create_test_account(client, operator_key):
216+
"""Create a new test account for demonstration."""
217+
218+
def create_fungible_token(client, operator_id, operator_key):
219+
"""Create a fungible token for association with test account."""
220+
221+
def associate_token_with_account(client, token_id, account_id, account_key):
222+
"""Associate the token with the test account."""
223+
224+
def main():
225+
client, operator_id, operator_key = setup_client()
226+
account_id, account_private_key = create_test_account(client, operator_key)
227+
token_id = create_fungible_token(client, operator_id, operator_key)
228+
associate_token_with_account(client, token_id, account_id, account_private_key)
229+
```
230+
231+
- type: textarea
232+
id: acceptance-criteria
233+
attributes:
234+
label: ✅ Acceptance Criteria
235+
description: |
236+
EDIT OR EXPAND THE CHECKLIST ON WHAT IS REQUIRED TO BE ABLE TO MERGE A PULL REQUEST FOR THIS ISSUE
237+
value: |
238+
To be able to merge a pull request for this issue, we need:
239+
- [ ] **Changelog Entry:** Correct changelog entry (please link to the documentation - [see guide](https://github.com/hiero-ledger/hiero-sdk-python/blob/main/docs/sdk_developers/changelog_entry.md))
240+
- [ ] **Signed commits:** commits must be DCO and GPG key signed ([see guide](https://github.com/hiero-ledger/hiero-sdk-python/blob/main/docs/sdk_developers/signing.md))
241+
- [ ] **All Tests Pass:** our workflow checks like unit and integration tests must pass
242+
- [ ] **Issue is Solved:** The implementation fully addresses the issue requirements as described above
243+
- [ ] **No Further Changes are Made:** Code review feedback has been addressed and no further changes are requested
244+
validations:
245+
required: true
246+
247+
- type: textarea
248+
id: contribution_steps
249+
attributes:
250+
label: 📋 Step-by-Step Contribution Guide
251+
description: Provide a contribution workflow suitable for new contributors
252+
value: |
253+
If you have never contributed to an open source project at GitHub, the following step-by-step guide will introduce you to the workflow.
254+
255+
- [ ] **Claim this issue:** Comment below that you are interested in working on the issue. Without assignment, your pull requests might be closed and the issue given to another developer.
256+
- [ ] **Wait for assignment:** A community member with the given rights will add you as an assignee of the issue
257+
- [ ] **Fork, Branch and Work on the issue:** Create a copy of the repository, create a branch for the issue and solve the problem. For instructions, please read our [Contributing guide](https://github.com/hiero-ledger/hiero-sdk-python/blob/main/CONTRIBUTING.md) file. Further help can be found at [Set-up Training](https://github.com/hiero-ledger/hiero-sdk-python/tree/main/docs/sdk_developers/training/setup) and [Workflow Training](https://github.com/hiero-ledger/hiero-sdk-python/tree/main/docs/sdk_developers/training/workflow).
258+
- [ ] **DCO and GPG key sign each commit :** each commit must be -s and -S signed. An explanation on how to do this is at [Signing Guide](https://github.com/hiero-ledger/hiero-sdk-python/blob/main/docs/sdk_developers/signing.md)
259+
- [ ] **Add a Changelog Entry :** your pull request will require a changelog. Read [Changelog Entry Guide](https://github.com/hiero-ledger/hiero-sdk-python/blob/main/docs/sdk_developers/changelog_entry.md) to learn how.
260+
- [ ] **Push and Create a Pull Request :** Once your issue is resolved, and your commits are signed, and you have a changelog entry, push your changes and create a pull request. Detailed instructions can be found at [Submit PR Training](https://github.com/hiero-ledger/hiero-sdk-python/blob/main/docs/sdk_developers/training/workflow/11_submit_pull_request.md), part of [Workflow Training](https://github.com/hiero-ledger/hiero-sdk-python/tree/main/docs/sdk_developers/training/workflow).
261+
- [ ] **You did it 🎉:** A maintainer or committer will review your pull request and provide feedback. If approved, we will merge the fix in the main branch. Thanks for being part of the Hiero community as an open-source contributor ❤️
262+
263+
***IMPORTANT*** Your pull request CANNOT BE MERGED until you add a changelog entry AND sign your commits each with `git commit -S -s -m "chore: your commit message"` with a GPG key setup.
264+
validations:
265+
required: true
266+
267+
- type: textarea
268+
id: information
269+
attributes:
270+
label: 🤔 Additional Information
271+
description: Provide any extra resources or context for contributors to solve this good first issue
272+
value: |
273+
For more help, we have extensive documentation attributes:
274+
- [SDK Developer Docs](https://github.com/hiero-ledger/hiero-sdk-python/tree/main/docs/sdk_developers)
275+
- [SDK Developer Training](https://github.com/hiero-ledger/hiero-sdk-python/tree/main/docs/sdk_developers/training)
276+
277+
Additionally, we invite you to join our community on our [Discord](https://github.com/hiero-ledger/hiero-sdk-python/blob/main/docs/discord.md) server.
278+
279+
We also invite you to attend each Wednesday, 2pm UTC our [Python SDK Office Hour and Community Calls](https://zoom-lfx.platform.linuxfoundation.org/meetings/hiero?view=week). The Python SDK Office hour is for hands-on-help and the Community Call for general community discussion.
280+
281+
You can also ask for help in a comment below!

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ This changelog is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.
3737
- Add PR inactivity reminder bot for stale pull requests `.github/workflows/pr-inactivity-reminder-bot.yml`
3838
- Add comprehensive training documentation for _Executable class `docs/sdk_developers/training/executable.md`
3939
- Added empty `docs/maintainers/good_first_issues.md` file for maintainers to write Good First Issue guidelines (#1034)
40+
-Added new `.github/ISSUE_TEMPLATE/04_good_first_issue_candidate.yml` file (1068)(https://github.com/hiero-ledger/hiero-sdk-python/issues/1068)
4041
- Enhanced `.github/ISSUE_TEMPLATE/01_good_first_issue.yml` with welcoming message and acceptance criteria sections to guide contributors in creating quality GFIs (#1052)
4142

4243
### Changed

0 commit comments

Comments
 (0)