Skip to content

Commit 6329f33

Browse files
authored
feat: init wizard v2 improvements (#5)
* chore: wip * chore: test * chore: aligning names for launch configs * chore: removing orchestrator changes * chore: minor tweaks * refactor: restructure and simplify tests * chore: minor tweaks * chore: minor tweaks * chore: using algokit from preview branch * chore: refining preset question * chore: minor tweaks * chore: minor tweaks * chore: minor tweaks in copier * chore: remove zendesk actions * refactor: addressing pr comments * chore: patching ci * chore: merge conflicts * chore: patching copier conditional for jest/pytest * chore: minor polishing; adding code tours * chore: refining ci dependencies
1 parent 9230397 commit 6329f33

File tree

249 files changed

+2762
-399
lines changed

Some content is hidden

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

249 files changed

+2762
-399
lines changed

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
---
2+
name: "\U0001F41C Bug report"
3+
about: Report a reproducible bug.
4+
title: ''
5+
labels: bug
6+
assignees: ''
7+
---
8+
9+
### Subject of the issue
10+
11+
<!-- Describe your issue here. -->
12+
13+
### Your environment
14+
15+
<!--
16+
* Please provide the output of `algokit doctor` command response,
17+
* This will give us a good idea about your environment
18+
-->
19+
20+
### Steps to reproduce
21+
22+
1.
23+
2.
24+
25+
### Expected behaviour
26+
27+
### Actual behaviour
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
---
2+
name: "\U0001F514 Feature Request"
3+
about: Suggestions for how we can improve the algorand platform.
4+
title: ''
5+
labels: enhancement
6+
assignees: ''
7+
---
8+
9+
## Problem
10+
11+
<!-- What is the problem that we’re trying to solve? -->
12+
13+
## Solution
14+
15+
<!-- Do you have a potential/suggested solution? Document more than one if possible. -->
16+
17+
### Proposal
18+
19+
<!-- Describe the solution you’d like in detail. -->
20+
21+
### Pros and Cons
22+
23+
<!-- What are the advantages and disadvantages of this solution? -->
24+
25+
## Dependencies
26+
27+
<!-- Does the solution have any team or design dependencies? -->

.github/workflows/cd.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
needs: ci-check-python
1818
steps:
1919
- name: Checkout source code
20-
uses: actions/checkout@v3
20+
uses: actions/checkout@v4
2121

2222
- name: Tag release
2323
id: tag
@@ -26,7 +26,7 @@ jobs:
2626
skip-commit: "true"
2727
tag-prefix: ""
2828
skip-on-empty: "false"
29-
29+
3030
- name: Create Release
3131
uses: softprops/action-gh-release@v1
3232
if: ${{ steps.tag.outputs.skipped == 'false' }}

.github/workflows/check-python.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,16 @@ jobs:
88
runs-on: "ubuntu-latest"
99
steps:
1010
- name: Checkout source code
11-
uses: actions/checkout@v3
11+
uses: actions/checkout@v4
1212

1313
- name: Install poetry
1414
run: pipx install poetry
1515

1616
- name: Install algokit
17-
run: pipx install algokit
17+
run: pipx install git+https://github.com/algorandfoundation/algokit-cli@feat/init_wizard_v2 --force
1818

1919
- name: Set up Python 3.12
20-
uses: actions/setup-python@v4
20+
uses: actions/setup-python@v5
2121
with:
2222
python-version: "3.12"
2323
cache: "poetry"
@@ -51,6 +51,6 @@ jobs:
5151
shell: bash
5252
run: |
5353
# Add untracked files as empty so they come up in diff
54-
git add -N ./tests_generated
54+
git add -N ./examples
5555
# Look for changes in generated templates and error if there are any
56-
git diff --exit-code --minimal ./tests_generated
56+
git diff --exit-code --minimal ./examples

.github/workflows/issue_closed.yml

Lines changed: 0 additions & 12 deletions
This file was deleted.

.github/workflows/issue_commented.yml

Lines changed: 0 additions & 12 deletions
This file was deleted.

.github/workflows/issue_labelled.yml

Lines changed: 0 additions & 12 deletions
This file was deleted.

.github/workflows/zendesk_github_add_comment.yml

Lines changed: 0 additions & 11 deletions
This file was deleted.

.github/workflows/zendesk_github_close_issue.yml

Lines changed: 0 additions & 11 deletions
This file was deleted.

.gitignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,3 +169,11 @@ cython_debug/
169169

170170
# NPM
171171
node_modules
172+
173+
# Ignore lockfiles in all directories and subdirectories under examples, recursively
174+
examples/**/package-lock.json
175+
examples/**/poetry.lock
176+
177+
# playground folder for previewing templates
178+
.playground/*
179+
!.playground/.gitkeep

CONTRIBUTING.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# AlgoKit Official Template for contributors
2+
3+
This repository is a template for creating new AlgoKit projects. It includes a basic structure for creating a puya based smart contract project.
4+
5+
## Pre-requisites
6+
7+
`poetry install` - Install the dependencies for the project.
8+
9+
## Testing
10+
11+
```bash
12+
poetry run pytest
13+
```
14+
15+
This will regenerate the tests for default `starter` and `production` presets as well as default tests for `generators` available on the template.
16+
17+
## Development
18+
19+
```bash
20+
poetry run copier copy . .playground/{some_dummy_folder_name} --vcs-ref=HEAD --trust
21+
```
22+
23+
To generate a dummy project into the `.playground` folder. This is useful for testing the template to quickly preview the output of the template before testing via `pytest`.
24+
25+
## Contributing
26+
27+
### Commits
28+
29+
We are using the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/#summary) standard for commit messages. This allows us to automatically generate release notes and version numbers. We do this via [Python Semantic Release](https://python-semantic-release.readthedocs.io/en/latest/) and [GitHub actions](.github/workflows/cd.yaml).
30+
31+
### Guiding Principles
32+
33+
AlgoKit development is done within the [AlgoKit Guiding Principles](https://github.com/algorandfoundation/algokit-cli/blob/main/docs/algokit.md#guiding-principles).
34+
35+
### Pull Requests
36+
37+
1. Submit a pull request to the `main` branch. Fork the repo if you are an external contributor.
38+
2. Ensure that the pull request is up to date with the `main` branch.
39+
3. Ensure that the pull request has a clear title and description.
40+
4. Pass PR reviews and wait for approval.

README.md

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<a target="_blank" href="https://github.com/algorandfoundation/algokit-cli"><img src="https://img.shields.io/badge/docs-repository-00dc94?logo=github&style=flat.svg" /></a>
77
<a target="_blank" href="https://developer.algorand.org/algokit/"><img src="https://img.shields.io/badge/learn-AlgoKit-00dc94?logo=algorand&mac=flat.svg" /></a>
88
<a target="_blank" href="https://github.com/algorandfoundation/algokit-puya-template"><img src="https://img.shields.io/github/stars/algorandfoundation/algokit-puya-template?color=00dc94&logo=star&style=flat" /></a>
9-
<a target="_blank" href="https://developer.algorand.org/algokit/"><img src="https://vbr.wocr.tk/badge?page_id=algorandfoundation%2Falgokit-puya-template&color=%2300dc94&style=flat" /></a>
9+
<a target="_blank" href="https://developer.algorand.org/algokit/"><img src="https://api.visitorbadge.io/api/visitors?path=https%3A%2F%2Fgithub.com%2Falgorandfoundation%2Falgokit-react-puya-template&countColor=%2300dc94&style=flat" /></a>
1010
</p>
1111

1212
---
@@ -38,6 +38,20 @@ This template supports the following features:
3838
- CI/CD pipeline using GitHub Actions:
3939
- - Optionally pick deployments to Netlify or Vercel
4040

41-
# Getting started
41+
## Getting started
4242

4343
Once the template is instantiated you can follow the [README.md](template_content/README.md.jinja) file to see instructions for how to use the template.
44+
45+
### Interactive Wizard
46+
47+
**To initialize using the `algokit` CLI**:
48+
49+
- Execute the command `algokit init`. This initiates an interactive wizard that assists in selecting the most appropriate template for your project requirements.
50+
51+
**To initialize within GitHub Codespaces**:
52+
53+
- Follow these steps to leverage GitHub Codespaces for template selection:
54+
55+
1. Go to the [algokit-base-template](https://github.com/algorandfoundation/algokit-base-template) repository.
56+
2. Initiate a new codespace by selecting the `Create codespace on main` option. This can be found by clicking the `Code` button, then navigating to the `Codespaces` tab.
57+
3. Upon codespace preparation, `algokit` will automatically start `LocalNet` and present a prompt with the next steps. Executing `algokit init` will initiate the interactive wizard.

0 commit comments

Comments
 (0)