Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: GitHub Codespaces support in LocalNet command group #456

Merged
merged 33 commits into from
Jun 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
bf66492
chore: wip codespaces
aorumbayev Mar 18, 2024
3f5e697
feat: algokit localnet + github codespaces integration
aorumbayev Mar 18, 2024
20ca7d7
chore: minor tweaks
aorumbayev Mar 26, 2024
60eef51
chore: minor refinements
aorumbayev Mar 26, 2024
bac27ea
chore: minor refinements
aorumbayev Mar 26, 2024
28ec6d6
docs: regen docs
aorumbayev Mar 28, 2024
d20290b
chore: minor tweaks
aorumbayev Mar 28, 2024
3621e15
feat: initial implementation and first batch of snapshot tests
aorumbayev Apr 3, 2024
f2e6db1
chore: minor typo fixes
aorumbayev Apr 3, 2024
7f3169a
docs: regen docs
aorumbayev Apr 3, 2024
04763c5
refactor: further refinements
aorumbayev Apr 4, 2024
beaf310
chore: minor refinements
aorumbayev Apr 4, 2024
daa219e
chore: reverting to 60 seconds for extra buffer
aorumbayev Apr 5, 2024
d3021cf
chore: apply suggestions from code review
aorumbayev Apr 8, 2024
36dcc34
chore: patch snapshot
aorumbayev Jun 1, 2024
00b6851
chore: minor tweaks
aorumbayev Jun 1, 2024
7045cf9
refactor: adding podman integration; refreshing tests and docs
aorumbayev Jun 3, 2024
4699bee
chore: adding podman ci workflow
aorumbayev Jun 3, 2024
9f2af80
chore: testing ci
aorumbayev Jun 3, 2024
aa3a450
docs: update docs/features/localnet.md
aorumbayev Jun 4, 2024
60f22be
docs: update docs/features/localnet.md
aorumbayev Jun 4, 2024
07b2ce7
refactor: addressing pr comments; refining retry mechanism
aorumbayev Jun 4, 2024
cf3420b
chore: patching print
aorumbayev Jun 4, 2024
7ed9578
chore: patching tests
aorumbayev Jun 5, 2024
374038d
chore: patching tests; adding idle timeout option
aorumbayev Jun 6, 2024
7abf286
chore: patching tests
aorumbayev Jun 6, 2024
ac70b08
refactor: windows behaviour; port forwarding max execution timeout
aorumbayev Jun 6, 2024
84e8695
chore: update docs
aorumbayev Jun 6, 2024
cf5cda3
docs: update localnet.md
aorumbayev Jun 6, 2024
4b00e5b
refactor: auto creating goal mount if podman is active engine; refini…
aorumbayev Jun 7, 2024
1a4225c
chore: pr comments
aorumbayev Jun 7, 2024
5284e15
fix: use the supplied timeout correctly
neilcampbell Jun 10, 2024
36aa6ef
chore: set a corresponding timeout in the codespace
neilcampbell Jun 10, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
name: Pull Request validation
name: Codebase validation

on: [pull_request]
on:
pull_request:
schedule:
- cron: "0 8 * * 1" # Each monday 8 AM UTC
Copy link
Collaborator Author

@aorumbayev aorumbayev Jun 5, 2024

Choose a reason for hiding this comment

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

Fyi @robdmoore @neilcampbell this for now is manually set on the repo but I mentioned to @Loedn that if there will be a github app available on foundation's org account we can use that later on to securely auth requests to trigger these checks from a single pipeline that we can place on the https://github.com/algorandfoundation/algokit repo (without the need to deal with PATs, but obv this would not be the only advantage, can simplify cross repo communication by a great extent, we can also properly use branch protection rules that way). @Loedn for the time being though this will be set as a manual cron only covering the cli repo, as soon as the bot is available for use to auth just let me know


concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ repos:
- id: ruff
name: ruff
description: "Run 'ruff' for extremely fast Python linting"
entry: poetry run ruff
entry: poetry run ruff check
language: system
"types": [python]
args: [--fix, --no-cache]
Expand Down
202 changes: 155 additions & 47 deletions docs/cli/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,48 +24,53 @@
- [Options](#options-3)
- [--shell ](#--shell--1)
- [config](#config)
- [version-prompt](#version-prompt)
- [container-engine](#container-engine)
- [Options](#options-4)
- [-f, --force](#-f---force)
- [Arguments](#arguments-2)
- [ENGINE](#engine)
- [version-prompt](#version-prompt)
- [Arguments](#arguments-3)
- [ENABLE](#enable)
- [dispenser](#dispenser)
- [fund](#fund)
- [Options](#options-4)
- [Options](#options-5)
- [-r, --receiver ](#-r---receiver-)
- [-a, --amount ](#-a---amount-)
- [--whole-units](#--whole-units)
- [limit](#limit)
- [Options](#options-5)
- [Options](#options-6)
- [--whole-units](#--whole-units-1)
- [login](#login)
- [Options](#options-6)
- [Options](#options-7)
- [--ci](#--ci)
- [-o, --output ](#-o---output-)
- [-f, --file ](#-f---file-)
- [logout](#logout)
- [refund](#refund)
- [Options](#options-7)
- [Options](#options-8)
- [-t, --txID ](#-t---txid-)
- [doctor](#doctor)
- [Options](#options-8)
- [Options](#options-9)
- [-c, --copy-to-clipboard](#-c---copy-to-clipboard)
- [explore](#explore)
- [Arguments](#arguments-3)
- [Arguments](#arguments-4)
- [NETWORK](#network)
- [generate](#generate)
- [client](#client)
- [Options](#options-9)
- [Options](#options-10)
- [-o, --output ](#-o---output--1)
- [-l, --language ](#-l---language-)
- [-v, --version ](#-v---version--1)
- [Arguments](#arguments-4)
- [Arguments](#arguments-5)
- [APP_SPEC_PATH_OR_DIR](#app_spec_path_or_dir)
- [goal](#goal)
- [Options](#options-10)
- [Options](#options-11)
- [--console](#--console)
- [Arguments](#arguments-5)
- [Arguments](#arguments-6)
- [GOAL_ARGS](#goal_args)
- [init](#init)
- [Options](#options-11)
- [Options](#options-12)
- [-n, --name ](#-n---name-)
- [-t, --template ](#-t---template-)
- [--template-url ](#--template-url-)
Expand All @@ -78,67 +83,82 @@
- [--workspace, --no-workspace](#--workspace---no-workspace)
- [-a, --answer ](#-a---answer--)
- [localnet](#localnet)
- [codespace](#codespace)
- [Options](#options-13)
- [-m, --machine ](#-m---machine-)
- [-a, --algod-port ](#-a---algod-port-)
- [-i, --indexer-port ](#-i---indexer-port-)
- [-k, --kmd-port ](#-k---kmd-port-)
- [-n, --codespace-name ](#-n---codespace-name-)
- [-r, --repo-url ](#-r---repo-url-)
- [-t, --timeout ](#-t---timeout-)
- [-f, --force](#-f---force-1)
- [config](#config-1)
- [Options](#options-14)
- [-f, --force](#-f---force-2)
- [Arguments](#arguments-7)
- [ENGINE](#engine-1)
- [console](#console)
- [explore](#explore-1)
- [logs](#logs)
- [Options](#options-12)
- [Options](#options-15)
- [--follow, -f](#--follow--f)
- [--tail ](#--tail-)
- [reset](#reset)
- [Options](#options-13)
- [Options](#options-16)
- [--update, --no-update](#--update---no-update)
- [start](#start)
- [Options](#options-14)
- [Options](#options-17)
- [-n, --name ](#-n---name--1)
- [status](#status)
- [stop](#stop)
- [project](#project)
- [bootstrap](#bootstrap)
- [Options](#options-15)
- [Options](#options-18)
- [--force](#--force)
- [Options](#options-16)
- [Options](#options-19)
- [--interactive, --non-interactive, --ci](#--interactive---non-interactive---ci)
- [-p, --project-name ](#-p---project-name-)
- [-t, --type ](#-t---type-)
- [Options](#options-17)
- [Options](#options-20)
- [--interactive, --non-interactive, --ci](#--interactive---non-interactive---ci-1)
- [deploy](#deploy)
- [Options](#options-18)
- [Options](#options-21)
- [-C, --command ](#-c---command-)
- [--interactive, --non-interactive, --ci](#--interactive---non-interactive---ci-2)
- [-P, --path ](#-p---path-)
- [--deployer ](#--deployer-)
- [--dispenser ](#--dispenser-)
- [-p, --project-name ](#-p---project-name--1)
- [Arguments](#arguments-6)
- [Arguments](#arguments-8)
- [ENVIRONMENT_NAME](#environment_name)
- [link](#link)
- [Options](#options-19)
- [Options](#options-22)
- [-p, --project-name ](#-p---project-name--2)
- [-l, --language ](#-l---language--1)
- [-a, --all](#-a---all)
- [-f, --fail-fast](#-f---fail-fast)
- [-v, --version ](#-v---version--2)
- [list](#list)
- [Arguments](#arguments-7)
- [Arguments](#arguments-9)
- [WORKSPACE_PATH](#workspace_path)
- [run](#run)
- [task](#task)
- [analyze](#analyze)
- [Options](#options-20)
- [Options](#options-23)
- [-r, --recursive](#-r---recursive)
- [--force](#--force-1)
- [--diff](#--diff)
- [-o, --output ](#-o---output--2)
- [-e, --exclude ](#-e---exclude-)
- [Arguments](#arguments-8)
- [Arguments](#arguments-10)
- [INPUT_PATHS](#input_paths)
- [ipfs](#ipfs)
- [Options](#options-21)
- [Options](#options-24)
- [-f, --file ](#-f---file--1)
- [-n, --name ](#-n---name--2)
- [mint](#mint)
- [Options](#options-22)
- [Options](#options-25)
- [--creator ](#--creator-)
- [-n, --name ](#-n---name--3)
- [-u, --unit ](#-u---unit-)
Expand All @@ -150,67 +170,67 @@
- [--nft, --ft](#--nft---ft)
- [-n, --network ](#-n---network-)
- [nfd-lookup](#nfd-lookup)
- [Options](#options-23)
- [Options](#options-26)
- [-o, --output ](#-o---output--3)
- [Arguments](#arguments-9)
- [Arguments](#arguments-11)
- [VALUE](#value)
- [opt-in](#opt-in)
- [Options](#options-24)
- [Options](#options-27)
- [-a, --account ](#-a---account-)
- [-n, --network ](#-n---network--1)
- [Arguments](#arguments-10)
- [Arguments](#arguments-12)
- [ASSET_IDS](#asset_ids)
- [opt-out](#opt-out)
- [Options](#options-25)
- [Options](#options-28)
- [-a, --account ](#-a---account--1)
- [--all](#--all)
- [-n, --network ](#-n---network--2)
- [Arguments](#arguments-11)
- [Arguments](#arguments-13)
- [ASSET_IDS](#asset_ids-1)
- [send](#send)
- [Options](#options-26)
- [Options](#options-29)
- [-f, --file ](#-f---file--2)
- [-t, --transaction ](#-t---transaction-)
- [-n, --network ](#-n---network--3)
- [sign](#sign)
- [Options](#options-27)
- [Options](#options-30)
- [-a, --account ](#-a---account--2)
- [-f, --file ](#-f---file--3)
- [-t, --transaction ](#-t---transaction--1)
- [-o, --output ](#-o---output--4)
- [--force](#--force-2)
- [transfer](#transfer)
- [Options](#options-28)
- [Options](#options-31)
- [-s, --sender ](#-s---sender-)
- [-r, --receiver ](#-r---receiver--1)
- [--asset, --id ](#--asset---id-)
- [-a, --amount ](#-a---amount--1)
- [--whole-units](#--whole-units-2)
- [-n, --network ](#-n---network--4)
- [vanity-address](#vanity-address)
- [Options](#options-29)
- [Options](#options-32)
- [-m, --match ](#-m---match-)
- [-o, --output ](#-o---output--5)
- [-a, --alias ](#-a---alias-)
- [--file-path ](#--file-path-)
- [-f, --force](#-f---force)
- [Arguments](#arguments-12)
- [-f, --force](#-f---force-3)
- [Arguments](#arguments-14)
- [KEYWORD](#keyword)
- [wallet](#wallet)
- [Options](#options-30)
- [Options](#options-33)
- [-a, --address ](#-a---address-)
- [-m, --mnemonic](#-m---mnemonic)
- [-f, --force](#-f---force-1)
- [Arguments](#arguments-13)
- [-f, --force](#-f---force-4)
- [Arguments](#arguments-15)
- [ALIAS_NAME](#alias_name)
- [Arguments](#arguments-14)
- [Arguments](#arguments-16)
- [ALIAS](#alias)
- [Options](#options-31)
- [-f, --force](#-f---force-2)
- [Arguments](#arguments-15)
- [Options](#options-34)
- [-f, --force](#-f---force-5)
- [Arguments](#arguments-17)
- [ALIAS](#alias-1)
- [Options](#options-32)
- [-f, --force](#-f---force-3)
- [Options](#options-35)
- [-f, --force](#-f---force-6)

# algokit

Expand Down Expand Up @@ -342,6 +362,26 @@ Configure settings used by AlgoKit
algokit config [OPTIONS] COMMAND [ARGS]...
```

### container-engine

Set the default container engine for use by AlgoKit CLI to run LocalNet images.

```shell
algokit config container-engine [OPTIONS] [[docker|podman]]
```

### Options


### -f, --force
Skip confirmation prompts. Defaults to 'yes' to all prompts.

### Arguments


### ENGINE
Optional argument

### version-prompt

Controls whether AlgoKit checks and prompts for new versions.
Expand Down Expand Up @@ -636,6 +676,74 @@ Manage the AlgoKit LocalNet.
algokit localnet [OPTIONS] COMMAND [ARGS]...
```

### codespace

Manage the AlgoKit LocalNet in GitHub Codespaces.

```shell
algokit localnet codespace [OPTIONS]
```

### Options


### -m, --machine <machine>
The GitHub Codespace machine type to use. Defaults to base tier.


* **Options**

basicLinux32gb | standardLinux32gb | premiumLinux | largePremiumLinux



### -a, --algod-port <algod_port>
The port for the Algorand daemon. Defaults to 4001.


### -i, --indexer-port <indexer_port>
The port for the Algorand indexer. Defaults to 8980.


### -k, --kmd-port <kmd_port>
The port for the Algorand kmd. Defaults to 4002.


### -n, --codespace-name <codespace_name>
The name of the codespace. Defaults to 'algokit-localnet_timestamp'.


### -r, --repo-url <repo_url>
The URL of the repository. Defaults to algokit base template repo.


### -t, --timeout <timeout_minutes>
Default max runtime timeout in minutes. Upon hitting the timeout a codespace will be shutdown to prevent accidental spending over GitHub Codespaces quota. Defaults to 4 hours.


### -f, --force
Force delete previously used codespaces with {CODESPACE_NAME_PREFIX}\* name prefix and skip prompts. Defaults to explicitly prompting for confirmation.

### config

Set the default container engine for use by AlgoKit CLI to run LocalNet images.

```shell
algokit localnet config [OPTIONS] [[docker|podman]]
```

### Options


### -f, --force
Skip confirmation prompts. Defaults to 'yes' to all prompts.

### Arguments


### ENGINE
Optional argument

### console

Run the Algorand goal CLI against the AlgoKit LocalNet via a Bash console so you can execute multiple goal commands and/or interact with a filesystem.
Expand Down
Loading