Skip to content
This repository was archived by the owner on Nov 27, 2024. It is now read-only.

Commit 659a10c

Browse files
feat: add jetbrains compatibility (#43)
* feat: add question on copier * feat: add idea configuration * feat: update tests copier-answers * chore: test * chore: refining tests; fixing os specific path issue * chore: updating gitattributes * feat: add configuration files * feat: update unit test * fix: the sdk name reference * fix: configuration * fix: configuration * fix: configuration files to read env files * feat: add required plugins * fix: configuration files * fix: pr review * fix: unit tests change * chore: testing wip * chore: refining terminology regarding which jetbrain ide its aimed for * build: updating beaker/algokit-utils dependencies * chore: adding note on windows compatibility * chore: adding xdist; removing redundant tests --------- Co-authored-by: Altynbek Orumbayev <altynbek.orumbayev@makerx.com.au>
1 parent fd70bcc commit 659a10c

File tree

278 files changed

+884
-3459
lines changed

Some content is hidden

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

278 files changed

+884
-3459
lines changed

.gitattributes

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
* text=lf
1+
* text=auto eol=lf

.github/workflows/check-python.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ jobs:
4545
shell: bash
4646
run: |
4747
set -o pipefail
48-
poetry run pytest --junitxml=pytest-junit.xml
48+
poetry run pytest --junitxml=pytest-junit.xml -n auto
4949
5050
- name: Check generated templates have been reviewed
5151
shell: bash

.gitignore

+4-2
Original file line numberDiff line numberDiff line change
@@ -156,8 +156,10 @@ dmypy.json
156156
cython_debug/
157157

158158
# PyCharm
159-
.idea/
160-
!.idea/runConfigurations
159+
.idea
160+
!.idea/
161+
.idea/*
162+
!.idea/runConfigurations/
161163

162164
# macOS
163165
.DS_Store

copier.yaml

+158-152
Original file line numberDiff line numberDiff line change
@@ -1,152 +1,158 @@
1-
_subdirectory: template_content
2-
_templates_suffix: ".jinja"
3-
4-
# questions
5-
# project_name should never get prompted, AlgoKit should always pass it by convention
6-
project_name:
7-
type: str
8-
help: Name for this project.
9-
placeholder: "algorand-app"
10-
11-
preset_name:
12-
type: str
13-
help: Name of the preset to use. Starter is optimal for simpler projects, Production is optimal for more complex projects that require CI/CD and other features.
14-
choices:
15-
Starter: "starter"
16-
Production: "production"
17-
default: "starter"
18-
19-
contract_name:
20-
type: str
21-
help: Name of the default smart contract app.
22-
placeholder: "hello_world"
23-
default: "hello_world"
24-
validator: >-
25-
{% if not (contract_name | regex_search('^[a-z]+(?:_[a-z]+)*$')) %}
26-
contract_name must be formatted in snake case.
27-
{% endif %}
28-
29-
author_name:
30-
type: str
31-
help: Package author name
32-
placeholder: "Your Name"
33-
34-
author_email:
35-
type: str
36-
help: Package author email
37-
placeholder: "your@email.tld"
38-
39-
ide_vscode:
40-
type: bool
41-
help: Do you want to add VSCode configuration?
42-
default: yes
43-
44-
deployment_language:
45-
type: str
46-
help: What programming language do you want to use for your contract deployment code?
47-
choices:
48-
Python: "python"
49-
TypeScript: "typescript"
50-
default: "python"
51-
52-
python_linter:
53-
type: str
54-
help: Do you want to use a Python linter?
55-
when: "{{ preset_name == 'production' }}"
56-
choices:
57-
Ruff: "ruff"
58-
Flake8: "flake8"
59-
No thanks: "none"
60-
default: |-
61-
{% if preset_name == 'production' -%}
62-
ruff
63-
{%- else -%}
64-
none
65-
{%- endif %}
66-
67-
use_python_black:
68-
type: bool
69-
help: Do you want to use a Python formatter (via Black)?
70-
default: yes
71-
72-
use_python_mypy:
73-
type: bool
74-
when: "{{ preset_name == 'production' }}"
75-
help: Do you want to use a Python type checker (via mypy)?
76-
default: |-
77-
{% if preset_name == 'production' -%}
78-
yes
79-
{%- else -%}
80-
no
81-
{%- endif %}
82-
83-
use_python_pytest:
84-
type: bool
85-
help: Do you want to include unit tests (via pytest)?
86-
default: yes
87-
88-
use_python_pip_audit:
89-
type: bool
90-
when: "{{ preset_name == 'production' }}"
91-
help: Do you want to include Python dependency vulnerability scanning (via pip-audit)?
92-
default: yes
93-
94-
use_github_actions:
95-
type: bool
96-
when: "{{ preset_name == 'production' }}"
97-
help: Do you want to include Github Actions workflows for build and testnet deployment?
98-
default: |-
99-
{% if preset_name == 'production' -%}
100-
yes
101-
{%- else -%}
102-
no
103-
{%- endif %}
104-
105-
use_pre_commit:
106-
type: bool
107-
when: "{{ preset_name == 'production' }}"
108-
help: Do you want to include pre-commit for linting, type checking and formatting?
109-
default: |-
110-
{% if preset_name == 'production' -%}
111-
yes
112-
{%- else -%}
113-
no
114-
{%- endif %}
115-
116-
use_dispenser:
117-
type: bool
118-
when: "{{ preset_name == 'production' }}"
119-
help: Do you want to fund your deployment account using an optional dispenser account?
120-
default: no
121-
122-
# The following should never get prompted; algokit should always pass these values through by convention
123-
124-
algod_token:
125-
type: str
126-
help: Default Algod Token
127-
default: "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
128-
129-
algod_server:
130-
type: str
131-
help: Default Algod server
132-
default: "http://localhost"
133-
134-
algod_port:
135-
type: int
136-
help: Default Algod port
137-
default: 4001
138-
139-
indexer_token:
140-
type: str
141-
help: Default Indexer token
142-
default: "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
143-
144-
indexer_server:
145-
type: str
146-
help: Default Indexer server
147-
default: "http://localhost"
148-
149-
indexer_port:
150-
type: int
151-
help: Default Indexer port
152-
default: 8980
1+
_subdirectory: template_content
2+
_templates_suffix: ".jinja"
3+
4+
# questions
5+
# project_name should never get prompted, AlgoKit should always pass it by convention
6+
project_name:
7+
type: str
8+
help: Name for this project.
9+
placeholder: "algorand-app"
10+
11+
preset_name:
12+
type: str
13+
help: Name of the preset to use. Starter is optimal for simpler projects, Production is optimal for more complex projects that require CI/CD and other features.
14+
choices:
15+
Starter: "starter"
16+
Production: "production"
17+
default: "starter"
18+
19+
contract_name:
20+
type: str
21+
help: Name of the default smart contract app.
22+
placeholder: "hello_world"
23+
default: "hello_world"
24+
validator: >-
25+
{% if not (contract_name | regex_search('^[a-z]+(?:_[a-z]+)*$')) %}
26+
contract_name must be formatted in snake case.
27+
{% endif %}
28+
29+
author_name:
30+
type: str
31+
help: Package author name
32+
placeholder: "Your Name"
33+
34+
author_email:
35+
type: str
36+
help: Package author email
37+
placeholder: "your@email.tld"
38+
39+
ide_vscode:
40+
type: bool
41+
help: Do you want to add VSCode configuration?
42+
default: yes
43+
44+
ide_jetbrains:
45+
type: bool
46+
help: Do you want to add JetBrains configuration (primarily optimized for PyCharm CE)?
47+
when: "{{ ide_vscode == false }}"
48+
default: no
49+
50+
deployment_language:
51+
type: str
52+
help: What programming language do you want to use for your contract deployment code?
53+
choices:
54+
Python: "python"
55+
TypeScript: "typescript"
56+
default: "python"
57+
58+
python_linter:
59+
type: str
60+
help: Do you want to use a Python linter?
61+
when: "{{ preset_name == 'production' }}"
62+
choices:
63+
Ruff: "ruff"
64+
Flake8: "flake8"
65+
No thanks: "none"
66+
default: |-
67+
{% if preset_name == 'production' -%}
68+
ruff
69+
{%- else -%}
70+
none
71+
{%- endif %}
72+
73+
use_python_black:
74+
type: bool
75+
help: Do you want to use a Python formatter (via Black)?
76+
default: yes
77+
78+
use_python_mypy:
79+
type: bool
80+
when: "{{ preset_name == 'production' }}"
81+
help: Do you want to use a Python type checker (via mypy)?
82+
default: |-
83+
{% if preset_name == 'production' -%}
84+
yes
85+
{%- else -%}
86+
no
87+
{%- endif %}
88+
89+
use_python_pytest:
90+
type: bool
91+
help: Do you want to include unit tests (via pytest)?
92+
default: yes
93+
94+
use_python_pip_audit:
95+
type: bool
96+
when: "{{ preset_name == 'production' }}"
97+
help: Do you want to include Python dependency vulnerability scanning (via pip-audit)?
98+
default: yes
99+
100+
use_github_actions:
101+
type: bool
102+
when: "{{ preset_name == 'production' }}"
103+
help: Do you want to include Github Actions workflows for build and testnet deployment?
104+
default: |-
105+
{% if preset_name == 'production' -%}
106+
yes
107+
{%- else -%}
108+
no
109+
{%- endif %}
110+
111+
use_pre_commit:
112+
type: bool
113+
when: "{{ preset_name == 'production' }}"
114+
help: Do you want to include pre-commit for linting, type checking and formatting?
115+
default: |-
116+
{% if preset_name == 'production' -%}
117+
yes
118+
{%- else -%}
119+
no
120+
{%- endif %}
121+
122+
use_dispenser:
123+
type: bool
124+
when: "{{ preset_name == 'production' }}"
125+
help: Do you want to fund your deployment account using an optional dispenser account?
126+
default: no
127+
128+
# The following should never get prompted; algokit should always pass these values through by convention
129+
130+
algod_token:
131+
type: str
132+
help: Default Algod Token
133+
default: "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
134+
135+
algod_server:
136+
type: str
137+
help: Default Algod server
138+
default: "http://localhost"
139+
140+
algod_port:
141+
type: int
142+
help: Default Algod port
143+
default: 4001
144+
145+
indexer_token:
146+
type: str
147+
help: Default Indexer token
148+
default: "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
149+
150+
indexer_server:
151+
type: str
152+
help: Default Indexer server
153+
default: "http://localhost"
154+
155+
indexer_port:
156+
type: int
157+
help: Default Indexer port
158+
default: 8980

0 commit comments

Comments
 (0)