Skip to content

Commit 252becb

Browse files
Format
1 parent d727223 commit 252becb

File tree

2 files changed

+29
-27
lines changed

2 files changed

+29
-27
lines changed

.devcontainer/post-start-setup.sh

Lines changed: 27 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -25,28 +25,28 @@ echo ""
2525
# ENVIRONMENT SETUP
2626
# ------------------------------
2727

28-
echo -e "1) Setting up Python environment...\n"
28+
echo -e "1/8) Setting up Python environment...\n"
2929

3030
# Ensure virtual environment is activated
3131
if [ -f "$VENV_PATH/bin/activate" ]; then
3232
source "$VENV_PATH/bin/activate"
33-
echo "✅ Virtual environment activated"
33+
echo "✅ Virtual environment activated."
3434
else
35-
echo "❌ Virtual environment not found at $VENV_PATH"
35+
echo "❌ Virtual environment not found at $VENV_PATH."
3636
exit 1
3737
fi
3838

3939
# Generate .env file using the setup script
40-
echo -e "\n2) Generating .env file...\n"
40+
echo -e "\n2/8) Generating .env file..."
4141

4242
cd "$WORKSPACE_ROOT"
4343
python setup/setup_python_path.py --generate-env
4444

4545
# Verify .env file was created
4646
if [ -f "$WORKSPACE_ROOT/.env" ]; then
4747
echo "✅ .env file created successfully"
48-
echo " Contents:"
49-
cat "$WORKSPACE_ROOT/.env" | sed 's/^/ /'
48+
# echo " Contents:"
49+
# cat "$WORKSPACE_ROOT/.env" | sed 's/^/ /'
5050
else
5151
echo "❌ Failed to create .env file"
5252
fi
@@ -55,21 +55,22 @@ fi
5555
# AZURE CLI SETUP
5656
# ------------------------------
5757

58-
echo -e "\n3) Configuring Azure CLI...\n"
58+
echo -e "\n3/8) Configuring Azure CLI...\n"
5959

6060
az config set core.login_experience_v2=off 2>/dev/null || true
6161

6262
# Install Azure CLI extensions if not already present
63-
echo -e "4) Installing Azure CLI extensions...\n"
64-
63+
echo -e "4/8) Installing Azure CLI extensions...\n"
64+
echo -e " 1/2) containerapp ..."
6565
az extension add --name containerapp --only-show-errors 2>/dev/null || true
66+
echo -e " 2/2) front-door ..."
6667
az extension add --name front-door --only-show-errors 2>/dev/null || true
6768

6869
# ------------------------------
6970
# WORKSPACE CONFIGURATION
7071
# ------------------------------
7172

72-
echo -e "5) Configuring workspace settings...\n"
73+
echo -e "\n5/8) Configuring workspace settings...\n"
7374

7475
mkdir -p .vscode
7576

@@ -88,23 +89,23 @@ if [ ! -f ".vscode/settings.json" ]; then
8889
]
8990
}
9091
EOF
91-
echo "✅ Created .vscode/settings.json"
92+
echo "✅ Created .vscode/settings.json."
9293
else
93-
echo "✅ .vscode/settings.json already exists"
94+
echo "✅ .vscode/settings.json already exists."
9495
fi
9596

9697
# ------------------------------
9798
# VERIFICATION
9899
# ------------------------------
99100

100-
echo -e "\n6) Verifying environment...\n"
101+
echo -e "\n6/8) Verifying environment...\n"
101102

102-
echo "Python version: $(python --version)"
103-
echo "Virtual environment: $VIRTUAL_ENV"
104-
echo "Python location: $(which python)"
105-
echo "Packages available: $(pip list | wc -l) packages"
103+
echo "Python version : $(python --version)"
104+
echo "Virtual environment : $VIRTUAL_ENV"
105+
echo "Python location : $(which python)"
106+
echo "Packages available : $(pip list | wc -l) packages"
106107

107-
echo -e "\n7) Testing core packages...\n"
108+
echo -e "\n7/8) Testing core packages...\n"
108109

109110
python -c "
110111
import sys
@@ -129,22 +130,24 @@ except ImportError as e:
129130
print(f'❌ Jupyter packages: {e}')
130131
"
131132

132-
echo -e "\n8) Azure CLI version: $(az --version | head -1)\n"
133+
echo -e "\n8/8) Azure CLI version (2.72.0 is expected - do not upgrade)\n"
134+
echo -e "$(az --version | head -1)\n"
133135

134136
# ------------------------------
135137
# COMPLETION
136138
# ------------------------------
137139

140+
echo -e "\n---------------------------------------------------\n"
138141
echo "🎉 Environment setup complete!"
139142
echo ""
140143
echo "📋 Quick start:"
141144
echo " • Single virtual environment at: $VENV_PATH"
142-
echo " • All packages are pre-installed and verified"
145+
echo " • All packages are pre-installed and verified."
143146
echo " • .env file configured with proper PYTHONPATH"
144-
echo " • VS Code Python extension configured"
145-
echo " • Ready to run notebooks and scripts immediately"
147+
echo " • VS Code Python extension configured."
148+
echo " • Ready to run notebooks and scripts immediately."
146149
echo ""
147-
echo "💡 To verify your Azure setup:"
150+
echo "💡 NEXT STEPS: To verify your Azure setup:"
148151
echo " 1. Run : az login"
149152
echo " 2. Execute : shared/jupyter/verify-az-account.ipynb"
150-
echo ""
153+
echo -e "\n\n"

setup/setup_python_path.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -107,9 +107,8 @@ def generate_env_file() -> None:
107107
print(f"Generated .env file : {env_file_path}")
108108
print(f"PROJECT_ROOT : {project_root}")
109109
print(f"PYTHONPATH : {shared_python_path}\n")
110-
print("All done!\n")
111-
112-
110+
111+
113112
# Script entry point - handles command-line arguments
114113
if __name__ == "__main__":
115114
# Check for --generate-env flag to create .env file for VS Code

0 commit comments

Comments
 (0)