Skip to content

Commit d8a23d4

Browse files
committed
Enhance installation example with development workflow guidance
- Add comprehensive installation troubleshooting for both end users and developers - Explain difference between 'pip install PowerPlatform-Dataverse-Client' vs 'pip install -e .' - Provide clear guidance on when to use each installation approach - Improve error handling and user experience for package validation - Add educational content about editable mode for development workflows
1 parent a7965a0 commit d8a23d4

1 file changed

Lines changed: 32 additions & 4 deletions

File tree

examples/basic/installation_example.py

Lines changed: 32 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@
1212
1313
## Installation
1414
15-
1. Install the SDK:
15+
### For End Users (Production/Consumption):
16+
1. Install the published SDK from PyPI:
1617
```bash
1718
pip install PowerPlatform-Dataverse-Client
1819
```
@@ -22,6 +23,23 @@
2223
pip install azure-identity
2324
```
2425
26+
### For Developers (Contributing/Local Development):
27+
1. Clone the repository and navigate to the project directory
28+
2. Install in editable/development mode:
29+
```bash
30+
pip install -e .
31+
```
32+
33+
**Key Differences:**
34+
- `pip install PowerPlatform-Dataverse-Client` → Downloads and installs the published package from PyPI
35+
- `pip install -e .` → Installs from local source code in "editable" mode
36+
37+
**Editable Mode Benefits:**
38+
- ✅ Changes to source code are immediately available (no reinstall needed)
39+
- ✅ Perfect for development, testing, and contributing
40+
- ✅ Examples and tests can access the local codebase
41+
- ✅ Supports debugging and live code modifications
42+
2543
## What This Script Does
2644
2745
- ✅ Validates package installation and imports
@@ -76,9 +94,19 @@ def validate_imports():
7694
except ImportError as e:
7795
print(f" ❌ Import failed: {e}")
7896
print("\n💡 Troubleshooting:")
79-
print(" • Install with: pip install PowerPlatform-Dataverse-Client")
80-
print(" • Install Azure Identity: pip install azure-identity")
81-
print(" • Check virtual environment is activated")
97+
print(" 📦 For end users (published package):")
98+
print(" • pip install PowerPlatform-Dataverse-Client")
99+
print(" • pip install azure-identity")
100+
print(" ")
101+
print(" 🛠️ For developers (local development):")
102+
print(" • Navigate to the project root directory")
103+
print(" • pip install -e .")
104+
print(" • This enables 'editable mode' for live development")
105+
print(" ")
106+
print(" 🔧 General fixes:")
107+
print(" • Check virtual environment is activated")
108+
print(" • Verify you're in the correct directory")
109+
print(" • Try: pip list | grep PowerPlatform")
82110
return False, None, None
83111

84112

0 commit comments

Comments
 (0)