Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
16 changes: 16 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"image": "python:3.10",
"customizations": {
"vscode": {
"extensions": ["ms-python.python", "eamodio.gitlens"]
}
},
"hostRequirements": {
"cpus": 4,
"memory": "16gb",
"storage": "32gb"
},
"postCreateCommand": "/workspaces/azure-cli/.devcontainer/init.sh",
"postAttachCommand": "/workspaces/azure-cli/.devcontainer/notes.sh",
"name": "AzCLI devcontainer"
}
7 changes: 7 additions & 0 deletions .devcontainer/init.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash
cd /workspaces
pip install --upgrade pip
python3 -m venv azdev
source ./azdev/bin/activate
pip3 install azdev
azdev setup -c /workspaces/azure-cli/
12 changes: 12 additions & 0 deletions .devcontainer/notes.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/bash
echo "azdev (venv: /workspaces/azdev) and azcli (/workspaces/azure-cli) have been setup and configured."
echo "Extra manual config steps:"
echo " - config vscode python interpreter to '/workspaces/azdev/bin/python'"
echo " - run 'source /workspaces/azdev/bin/activate' (if its not loaded by default), so you have azdev/az fully setup."
echo " - run 'export VIRTUAL_ENV=/workspaces/azdev/' if you hit this error on azdev: TypeError: expected str, bytes or os.PathLike object, not NoneType"
echo "==============="
echo "Debug:"
echo " - modify .vscode/launch.json 'args' in 'Azure CLI Debug (Integrated Console)' with your own command in string array (not include az itself) "
echo " - seems python extension won't close the debug session, you would have to watch a terminal tab 'Python Debug Console' for debug output."
echo ""
echo ""
Original file line number Diff line number Diff line change
Expand Up @@ -11449,6 +11449,5 @@ def test_update_supportPlan(self):
normalClusterCalculated = noopDecorator3.update_k8s_support_plan(normalCluster)
self.assertEqual(normalClusterCalculated, normalCluster)


if __name__ == "__main__":
unittest.main()