Skip to content

Commit

Permalink
docs: improve onboarding experience
Browse files Browse the repository at this point in the history
- Update README to make the requirement for an activated poetry virtual-env clearer.
- Update debug module to run --version command if there is no args.in
- Update VSCode launch to use debugpy
  • Loading branch information
PatrickDinh authored Feb 5, 2024
1 parent 8477886 commit a4d6bb5
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"configurations": [
{
"name": "Python: Module",
"type": "python",
"type": "debugpy",
"cwd": "${workspaceFolder}",
"request": "launch",
"module": "debug",
Expand Down
8 changes: 4 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,17 @@ AlgoKit development is done within the [AlgoKit Guiding Principles](./docs/algok
- Manually:
- Install `Python` - [Link](https://www.python.org/downloads/): The minimum required version is `3.10`, but `3.11` is recommended.)
- Install `Poetry` - [Link](https://python-poetry.org/docs/#installation): The minimum required version is `1.2`.
- If you're not using PyCharm, then run `poetry install` in the root directory (this should set up `.venv` and install all Python dependencies - PyCharm will do this for you on startup)
- If you're not using PyCharm, then run `poetry install` in the repository root directory (this should set up `.venv` and install all Python dependencies - PyCharm will do this for you on startup)
- Via AlgoKit CLI:

- [Install AlgoKit CLI](./README.md#install) and run `algokit bootstrap poetry` in the root directory
- Install `tealer` - by running `pipx install git+https://github.com/algorandfoundation/tealer@3-12`. This is a prerequisite to running `pytest`, tealer is a third party tool for static analysis of TEAL code, algokit uses it in `task analyse` command. AlgoKit uses `pytest-xdist` to speed up the test suite execution by running tests in parallel, this requires `tealer` to be installed globally to avoid race conditions.

3. Install pre-commit hooks (optional but recommended):

[pre-commit](https://pre-commit.com/) is configured in this repository, so once `poetry install` has been run,
execute `pre-commit install` inside the virtual-env, and git will ensure formatting, linting, and static typing (via `mypy`)
is correct when you perform a commit.
[pre-commit](https://pre-commit.com/) is configured in this repository. To enable it, make sure that `poetry install` has been run and the virtual-env is activated by running `poetry shell`. Then execute `pre-commit install` to install the git hook scripts.

Once it is done, git will ensure formatting, linting, and static typing (via `mypy`) is correct when you perform a commit.

4. Open the project and start debugging / developing via:

Expand Down
1 change: 1 addition & 0 deletions debug.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
err=True,
)
args_file.touch(exist_ok=False)
args_file.write_text("--version")

commands_sequence = args_file.read_text().splitlines()

Expand Down

1 comment on commit a4d6bb5

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Coverage

Coverage Report
FileStmtsMissCoverMissing
src/algokit
   __init__.py15753%6–13, 17–24, 32–34
   __main__.py220%1–3
src/algokit/cli
   completions.py108298%83, 98
   deploy.py72790%44, 46, 92–94, 158, 182
   dispenser.py121199%77
   doctor.py48394%142–144
   explore.py501276%34–39, 41–46
   generate.py67396%74–75, 140
   goal.py44198%71
   init.py1901692%277–278, 328, 331–333, 344, 388, 414, 454, 463–465, 468–473, 486
   localnet.py1191587%74–78, 111, 123, 138–148, 161, 206, 227–228
   task.py34391%25–28
src/algokit/cli/common
   utils.py26292%120, 123
src/algokit/cli/tasks
   analyze.py81199%81
   assets.py821384%65–66, 72, 74–75, 105, 119, 125–126, 132, 134, 136–137
   ipfs.py51884%52, 80, 92, 94–95, 105–107
   mint.py66494%48, 70, 91, 250
   send_transaction.py651085%52–53, 57, 89, 158, 170–174
   sign_transaction.py59886%21, 28–30, 71–72, 109, 123
   transfer.py39392%26, 90, 117
   utils.py994555%26–34, 40–43, 75–76, 100–101, 125–133, 152–162, 209, 258–259, 279–290, 297–299
   vanity_address.py561082%41, 45–48, 112, 114, 121–123
   wallet.py79495%21, 66, 136, 162
src/algokit/core
   bootstrap.py1171091%101–102, 124, 151, 180–185
   conf.py54885%12, 24, 28, 36, 38, 71–73
   deploy.py691184%61–64, 73–75, 79, 84, 91–93
   dispenser.py2022687%91, 123–124, 141–149, 191–192, 198–200, 218–219, 259–260, 318, 332–334, 345–346, 356, 369, 384
   doctor.py65789%67–69, 92–94, 134
   generate.py41295%69, 87
   goal.py60395%30–31, 41
   log_handlers.py68790%50–51, 63, 112–116, 125
   proc.py45198%98
   sandbox.py2181892%62, 73–75, 96, 142–149, 160, 456, 472, 497, 505
   typed_client_generation.py80594%55–57, 70, 75
   utils.py1043170%44–45, 49–68, 129, 132, 138–152
   version_prompt.py72889%26–27, 39, 58–61, 79, 108
src/algokit/core/tasks
   analyze.py94397%106–113, 188
   ipfs.py63789%58–64, 140, 144, 146, 152
   nfd.py491373%25, 31, 34–41, 70–72, 99–101
   vanity_address.py903462%49–50, 54, 59–75, 92–108, 128–131
   wallet.py71593%37, 129, 155–157
src/algokit/core/tasks/mint
   mint.py781087%123–133, 187
   models.py901188%50, 52, 57, 71–74, 85–88
TOTAL347340088% 

Tests Skipped Failures Errors Time
399 0 💤 0 ❌ 0 🔥 20.664s ⏱️

Please sign in to comment.