pbi-enterprise-cli 0.1.0.dev2__tar.gz → 4.0.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {pbi_enterprise_cli-0.1.0.dev2/src/pbi_enterprise_cli.egg-info → pbi_enterprise_cli-4.0.1}/PKG-INFO +40 -32
- pbi_enterprise_cli-4.0.1/README.md +343 -0
- pbi_enterprise_cli-4.0.1/README.pypi.md +50 -0
- {pbi_enterprise_cli-0.1.0.dev2 → pbi_enterprise_cli-4.0.1}/pyproject.toml +39 -26
- {pbi_enterprise_cli-0.1.0.dev2 → pbi_enterprise_cli-4.0.1}/src/pbi_cli/__init__.py +1 -1
- {pbi_enterprise_cli-0.1.0.dev2 → pbi_enterprise_cli-4.0.1}/src/pbi_cli/backends/xmla_backend.py +4 -5
- {pbi_enterprise_cli-0.1.0.dev2 → pbi_enterprise_cli-4.0.1}/src/pbi_cli/cli.py +4 -0
- {pbi_enterprise_cli-0.1.0.dev2 → pbi_enterprise_cli-4.0.1}/src/pbi_cli/commands/_doctor.py +3 -4
- {pbi_enterprise_cli-0.1.0.dev2 → pbi_enterprise_cli-4.0.1}/src/pbi_cli/commands/deploy.py +2 -2
- pbi_enterprise_cli-4.0.1/src/pbi_cli/commands/env_cmd.py +146 -0
- {pbi_enterprise_cli-0.1.0.dev2 → pbi_enterprise_cli-4.0.1}/src/pbi_cli/commands/govern.py +50 -16
- pbi_enterprise_cli-4.0.1/src/pbi_cli/commands/server_cmd.py +74 -0
- {pbi_enterprise_cli-0.1.0.dev2 → pbi_enterprise_cli-4.0.1}/src/pbi_cli/commands/skills_cmd.py +102 -0
- pbi_enterprise_cli-4.0.1/src/pbi_cli/commands/snapshot.py +166 -0
- {pbi_enterprise_cli-0.1.0.dev2 → pbi_enterprise_cli-4.0.1}/src/pbi_cli/commands/source.py +3 -5
- {pbi_enterprise_cli-0.1.0.dev2 → pbi_enterprise_cli-4.0.1}/src/pbi_cli/commands/visual.py +2 -2
- {pbi_enterprise_cli-0.1.0.dev2 → pbi_enterprise_cli-4.0.1}/src/pbi_cli/intelligence/measure_generator.py +1 -1
- {pbi_enterprise_cli-0.1.0.dev2 → pbi_enterprise_cli-4.0.1}/src/pbi_cli/server/api.py +35 -16
- pbi_enterprise_cli-4.0.1/src/pbi_cli/server/auth.py +26 -0
- {pbi_enterprise_cli-0.1.0.dev2 → pbi_enterprise_cli-4.0.1/src/pbi_enterprise_cli.egg-info}/PKG-INFO +40 -32
- {pbi_enterprise_cli-0.1.0.dev2 → pbi_enterprise_cli-4.0.1}/src/pbi_enterprise_cli.egg-info/SOURCES.txt +3 -0
- {pbi_enterprise_cli-0.1.0.dev2 → pbi_enterprise_cli-4.0.1}/src/pbi_enterprise_cli.egg-info/requires.txt +10 -10
- pbi_enterprise_cli-0.1.0.dev2/README.md +0 -326
- pbi_enterprise_cli-0.1.0.dev2/README.pypi.md +0 -46
- pbi_enterprise_cli-0.1.0.dev2/src/pbi_cli/commands/server_cmd.py +0 -30
- {pbi_enterprise_cli-0.1.0.dev2 → pbi_enterprise_cli-4.0.1}/LICENSE +0 -0
- {pbi_enterprise_cli-0.1.0.dev2 → pbi_enterprise_cli-4.0.1}/setup.cfg +0 -0
- {pbi_enterprise_cli-0.1.0.dev2 → pbi_enterprise_cli-4.0.1}/src/pbi_cli/_audit.py +0 -0
- {pbi_enterprise_cli-0.1.0.dev2 → pbi_enterprise_cli-4.0.1}/src/pbi_cli/_snapshot.py +0 -0
- {pbi_enterprise_cli-0.1.0.dev2 → pbi_enterprise_cli-4.0.1}/src/pbi_cli/backends/__init__.py +0 -0
- {pbi_enterprise_cli-0.1.0.dev2 → pbi_enterprise_cli-4.0.1}/src/pbi_cli/backends/mock_backend.py +0 -0
- {pbi_enterprise_cli-0.1.0.dev2 → pbi_enterprise_cli-4.0.1}/src/pbi_cli/backends/pbir_backend.py +0 -0
- {pbi_enterprise_cli-0.1.0.dev2 → pbi_enterprise_cli-4.0.1}/src/pbi_cli/backends/protocol.py +0 -0
- {pbi_enterprise_cli-0.1.0.dev2 → pbi_enterprise_cli-4.0.1}/src/pbi_cli/backends/tom_backend.py +0 -0
- {pbi_enterprise_cli-0.1.0.dev2 → pbi_enterprise_cli-4.0.1}/src/pbi_cli/commands/__init__.py +0 -0
- {pbi_enterprise_cli-0.1.0.dev2 → pbi_enterprise_cli-4.0.1}/src/pbi_cli/commands/_shared.py +0 -0
- {pbi_enterprise_cli-0.1.0.dev2 → pbi_enterprise_cli-4.0.1}/src/pbi_cli/commands/calendar_cmd.py +0 -0
- {pbi_enterprise_cli-0.1.0.dev2 → pbi_enterprise_cli-4.0.1}/src/pbi_cli/commands/connections.py +0 -0
- {pbi_enterprise_cli-0.1.0.dev2 → pbi_enterprise_cli-4.0.1}/src/pbi_cli/commands/custom_visual.py +0 -0
- {pbi_enterprise_cli-0.1.0.dev2 → pbi_enterprise_cli-4.0.1}/src/pbi_cli/commands/database.py +0 -0
- {pbi_enterprise_cli-0.1.0.dev2 → pbi_enterprise_cli-4.0.1}/src/pbi_cli/commands/dax.py +0 -0
- {pbi_enterprise_cli-0.1.0.dev2 → pbi_enterprise_cli-4.0.1}/src/pbi_cli/commands/docs.py +0 -0
- {pbi_enterprise_cli-0.1.0.dev2 → pbi_enterprise_cli-4.0.1}/src/pbi_cli/commands/filter_cmd.py +0 -0
- {pbi_enterprise_cli-0.1.0.dev2 → pbi_enterprise_cli-4.0.1}/src/pbi_cli/commands/layout.py +0 -0
- {pbi_enterprise_cli-0.1.0.dev2 → pbi_enterprise_cli-4.0.1}/src/pbi_cli/commands/measure.py +0 -0
- {pbi_enterprise_cli-0.1.0.dev2 → pbi_enterprise_cli-4.0.1}/src/pbi_cli/commands/model.py +0 -0
- {pbi_enterprise_cli-0.1.0.dev2 → pbi_enterprise_cli-4.0.1}/src/pbi_cli/commands/partition.py +0 -0
- {pbi_enterprise_cli-0.1.0.dev2 → pbi_enterprise_cli-4.0.1}/src/pbi_cli/commands/repl.py +0 -0
- {pbi_enterprise_cli-0.1.0.dev2 → pbi_enterprise_cli-4.0.1}/src/pbi_cli/commands/report.py +0 -0
- {pbi_enterprise_cli-0.1.0.dev2 → pbi_enterprise_cli-4.0.1}/src/pbi_cli/commands/security.py +0 -0
- {pbi_enterprise_cli-0.1.0.dev2 → pbi_enterprise_cli-4.0.1}/src/pbi_cli/commands/theme.py +0 -0
- {pbi_enterprise_cli-0.1.0.dev2 → pbi_enterprise_cli-4.0.1}/src/pbi_cli/commands/trace.py +0 -0
- {pbi_enterprise_cli-0.1.0.dev2 → pbi_enterprise_cli-4.0.1}/src/pbi_cli/commands/watch.py +0 -0
- {pbi_enterprise_cli-0.1.0.dev2 → pbi_enterprise_cli-4.0.1}/src/pbi_cli/docs_gen/__init__.py +0 -0
- {pbi_enterprise_cli-0.1.0.dev2 → pbi_enterprise_cli-4.0.1}/src/pbi_cli/docs_gen/confluence.py +0 -0
- {pbi_enterprise_cli-0.1.0.dev2 → pbi_enterprise_cli-4.0.1}/src/pbi_cli/docs_gen/markdown.py +0 -0
- {pbi_enterprise_cli-0.1.0.dev2 → pbi_enterprise_cli-4.0.1}/src/pbi_cli/governance/__init__.py +0 -0
- {pbi_enterprise_cli-0.1.0.dev2 → pbi_enterprise_cli-4.0.1}/src/pbi_cli/governance/bpa.py +0 -0
- {pbi_enterprise_cli-0.1.0.dev2 → pbi_enterprise_cli-4.0.1}/src/pbi_cli/governance/engine.py +0 -0
- {pbi_enterprise_cli-0.1.0.dev2 → pbi_enterprise_cli-4.0.1}/src/pbi_cli/governance/rules/__init__.py +0 -0
- {pbi_enterprise_cli-0.1.0.dev2 → pbi_enterprise_cli-4.0.1}/src/pbi_cli/governance/rules/measure_brackets.py +0 -0
- {pbi_enterprise_cli-0.1.0.dev2 → pbi_enterprise_cli-4.0.1}/src/pbi_cli/governance/rules/measure_description.py +0 -0
- {pbi_enterprise_cli-0.1.0.dev2 → pbi_enterprise_cli-4.0.1}/src/pbi_cli/governance/rules/measure_format.py +0 -0
- {pbi_enterprise_cli-0.1.0.dev2 → pbi_enterprise_cli-4.0.1}/src/pbi_cli/governance/rules/measure_naming.py +0 -0
- {pbi_enterprise_cli-0.1.0.dev2 → pbi_enterprise_cli-4.0.1}/src/pbi_cli/governance/rules/table_pascal_case.py +0 -0
- {pbi_enterprise_cli-0.1.0.dev2 → pbi_enterprise_cli-4.0.1}/src/pbi_cli/intelligence/__init__.py +0 -0
- {pbi_enterprise_cli-0.1.0.dev2 → pbi_enterprise_cli-4.0.1}/src/pbi_cli/intelligence/layout_engine.py +0 -0
- {pbi_enterprise_cli-0.1.0.dev2 → pbi_enterprise_cli-4.0.1}/src/pbi_cli/intelligence/theme_generator.py +0 -0
- {pbi_enterprise_cli-0.1.0.dev2 → pbi_enterprise_cli-4.0.1}/src/pbi_cli/intelligence/visual_builder.py +0 -0
- {pbi_enterprise_cli-0.1.0.dev2 → pbi_enterprise_cli-4.0.1}/src/pbi_cli/intelligence/visual_recommender.py +0 -0
- {pbi_enterprise_cli-0.1.0.dev2 → pbi_enterprise_cli-4.0.1}/src/pbi_cli/server/__init__.py +0 -0
- {pbi_enterprise_cli-0.1.0.dev2 → pbi_enterprise_cli-4.0.1}/src/pbi_enterprise_cli.egg-info/dependency_links.txt +0 -0
- {pbi_enterprise_cli-0.1.0.dev2 → pbi_enterprise_cli-4.0.1}/src/pbi_enterprise_cli.egg-info/entry_points.txt +0 -0
- {pbi_enterprise_cli-0.1.0.dev2 → pbi_enterprise_cli-4.0.1}/src/pbi_enterprise_cli.egg-info/top_level.txt +0 -0
{pbi_enterprise_cli-0.1.0.dev2/src/pbi_enterprise_cli.egg-info → pbi_enterprise_cli-4.0.1}/PKG-INFO
RENAMED
|
@@ -1,26 +1,30 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: pbi-enterprise-cli
|
|
3
|
-
Version: 0.1
|
|
4
|
-
Summary: Power BI
|
|
3
|
+
Version: 4.0.1
|
|
4
|
+
Summary: Power BI one-stop-shop platform — CLI for AI-driven Power BI development
|
|
5
5
|
Author-email: Mudassir <mir.mudassir1@gmail.com>
|
|
6
6
|
License: MIT AND LicenseRef-Microsoft-AS-Client-Libraries
|
|
7
7
|
Project-URL: Homepage, https://github.com/mudassir09/pbi-enterprise-cli
|
|
8
8
|
Project-URL: Repository, https://github.com/mudassir09/pbi-enterprise-cli
|
|
9
|
-
Project-URL:
|
|
9
|
+
Project-URL: Documentation, https://github.com/mudassir09/pbi-enterprise-cli#readme
|
|
10
10
|
Project-URL: Changelog, https://github.com/mudassir09/pbi-enterprise-cli/blob/main/CHANGELOG.md
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
Project-URL: Bug Tracker, https://github.com/mudassir09/pbi-enterprise-cli/issues
|
|
12
|
+
Project-URL: Security Policy, https://github.com/mudassir09/pbi-enterprise-cli/blob/main/SECURITY.md
|
|
13
|
+
Keywords: power-bi,cli,dax,tmdl,pbir,powerbi,pbip,xmla,fabric
|
|
14
|
+
Classifier: Development Status :: 5 - Production/Stable
|
|
14
15
|
Classifier: Intended Audience :: Developers
|
|
15
16
|
Classifier: Intended Audience :: Information Technology
|
|
17
|
+
Classifier: Topic :: Office/Business
|
|
18
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
19
|
+
Classifier: Topic :: Database
|
|
16
20
|
Classifier: License :: OSI Approved :: MIT License
|
|
17
|
-
Classifier: Operating System ::
|
|
21
|
+
Classifier: Operating System :: Microsoft :: Windows
|
|
18
22
|
Classifier: Programming Language :: Python :: 3
|
|
19
23
|
Classifier: Programming Language :: Python :: 3.10
|
|
20
24
|
Classifier: Programming Language :: Python :: 3.11
|
|
21
25
|
Classifier: Programming Language :: Python :: 3.12
|
|
22
|
-
Classifier:
|
|
23
|
-
Classifier:
|
|
26
|
+
Classifier: Environment :: Console
|
|
27
|
+
Classifier: Typing :: Typed
|
|
24
28
|
Requires-Python: >=3.10
|
|
25
29
|
Description-Content-Type: text/markdown
|
|
26
30
|
License-File: LICENSE
|
|
@@ -29,74 +33,78 @@ Requires-Dist: rich>=13.0
|
|
|
29
33
|
Requires-Dist: pythonnet>=3.0
|
|
30
34
|
Requires-Dist: pydantic>=2.0
|
|
31
35
|
Requires-Dist: python-dotenv>=1.0
|
|
32
|
-
Requires-Dist: PyYAML>=6.0
|
|
33
36
|
Provides-Extra: ai
|
|
34
|
-
Requires-Dist: anthropic>=0.
|
|
37
|
+
Requires-Dist: anthropic>=0.105.2; extra == "ai"
|
|
35
38
|
Provides-Extra: viz
|
|
36
39
|
Requires-Dist: Pillow>=10.0; extra == "viz"
|
|
37
|
-
Requires-Dist:
|
|
40
|
+
Requires-Dist: wcag-contrast-ratio>=0.9; extra == "viz"
|
|
38
41
|
Requires-Dist: playwright>=1.44; extra == "viz"
|
|
39
42
|
Provides-Extra: xmla
|
|
40
43
|
Requires-Dist: msal>=1.28; extra == "xmla"
|
|
41
44
|
Provides-Extra: server
|
|
42
|
-
Requires-Dist: fastapi>=0.
|
|
43
|
-
Requires-Dist: uvicorn>=0.
|
|
45
|
+
Requires-Dist: fastapi>=0.136.3; extra == "server"
|
|
46
|
+
Requires-Dist: uvicorn>=0.48.0; extra == "server"
|
|
44
47
|
Provides-Extra: sources
|
|
45
48
|
Requires-Dist: sqlalchemy>=2.0; extra == "sources"
|
|
46
|
-
Requires-Dist: openpyxl>=3.1; extra == "sources"
|
|
49
|
+
Requires-Dist: openpyxl>=3.1.5; extra == "sources"
|
|
47
50
|
Requires-Dist: httpx>=0.27; extra == "sources"
|
|
48
51
|
Provides-Extra: dev
|
|
49
|
-
Requires-Dist: pytest>=
|
|
50
|
-
Requires-Dist: pytest-cov>=
|
|
51
|
-
Requires-Dist: ruff>=0.
|
|
52
|
-
Requires-Dist: mypy>=1.
|
|
52
|
+
Requires-Dist: pytest>=9.0.3; extra == "dev"
|
|
53
|
+
Requires-Dist: pytest-cov>=7.1.0; extra == "dev"
|
|
54
|
+
Requires-Dist: ruff>=0.15.15; extra == "dev"
|
|
55
|
+
Requires-Dist: mypy>=2.1.0; extra == "dev"
|
|
56
|
+
Requires-Dist: pyyaml>=6.0; extra == "dev"
|
|
53
57
|
Provides-Extra: all
|
|
54
58
|
Requires-Dist: pbi-enterprise-cli[ai,dev,server,sources,viz,xmla]; extra == "all"
|
|
55
59
|
Dynamic: license-file
|
|
56
60
|
|
|
57
61
|
# pbi-enterprise-cli
|
|
58
62
|
|
|
59
|
-
**Full-stack Power BI
|
|
63
|
+
**Full-stack Power BI automation from the command line.**
|
|
60
64
|
|
|
61
65
|
```bash
|
|
62
66
|
pip install pbi-enterprise-cli
|
|
63
67
|
pbi doctor # verify setup
|
|
64
68
|
pbi model tables # list tables in the connected model
|
|
65
|
-
pbi govern check # run governance rules
|
|
69
|
+
pbi govern check # run governance rules (exit 3 on violations)
|
|
66
70
|
```
|
|
67
71
|
|
|
68
72
|
## Feature highlights
|
|
69
73
|
|
|
70
|
-
- **
|
|
71
|
-
- **32 visual types** — from cards to decomposition trees
|
|
74
|
+
- **22 command groups** covering every layer of Power BI development
|
|
72
75
|
- **3 backends** — Desktop (TOM via pythonnet), XMLA (Premium/Fabric), Mock (CI)
|
|
73
76
|
- **PBIR GA format** — read and write `.pbip` project files directly
|
|
74
|
-
- **Governance engine** —
|
|
75
|
-
- **
|
|
76
|
-
- **
|
|
77
|
-
- **
|
|
78
|
-
- **
|
|
79
|
-
- **
|
|
80
|
-
- **
|
|
77
|
+
- **Governance engine** — built-in rules + BPA + custom plugin system, `--fail-on` CI gate
|
|
78
|
+
- **Model snapshots** — create/list/restore/diff with `pbi snapshot`
|
|
79
|
+
- **Multi-environment** — named connections, `pbi env promote dev→prod`
|
|
80
|
+
- **Authenticated REST server** — API key auth, localhost-only default
|
|
81
|
+
- **Source profiling** — SQL, Excel, CSV, REST → star-schema scaffold
|
|
82
|
+
- **30 Claude Code skills** — install with `pbi skills install --all`
|
|
83
|
+
- **575 unit tests** passing on Python 3.10–3.12, coverage gate enforced
|
|
81
84
|
|
|
82
85
|
## Install options
|
|
83
86
|
|
|
84
87
|
```bash
|
|
85
88
|
pip install pbi-enterprise-cli # base
|
|
86
|
-
pip install "pbi-enterprise-cli[ai]" # + Claude AI
|
|
89
|
+
pip install "pbi-enterprise-cli[ai]" # + Claude AI measure generation
|
|
87
90
|
pip install "pbi-enterprise-cli[xmla]" # + MSAL auth for XMLA
|
|
88
91
|
pip install "pbi-enterprise-cli[sources]" # + SQL/Excel/REST profiling
|
|
92
|
+
pip install "pbi-enterprise-cli[server]" # + authenticated FastAPI REST server
|
|
89
93
|
pip install "pbi-enterprise-cli[all]" # everything
|
|
90
94
|
```
|
|
91
95
|
|
|
92
96
|
## Requirements
|
|
93
97
|
|
|
94
98
|
- Python 3.10+
|
|
95
|
-
- Windows (for Desktop/XMLA backends using .NET AMO
|
|
99
|
+
- Windows (for Desktop/XMLA backends using .NET AMO)
|
|
100
|
+
- Power BI Desktop (for the `desktop` backend)
|
|
96
101
|
|
|
97
102
|
## Links
|
|
98
103
|
|
|
99
104
|
- [GitHub Repository](https://github.com/mudassir09/pbi-enterprise-cli)
|
|
100
105
|
- [Full Documentation](https://github.com/mudassir09/pbi-enterprise-cli#readme)
|
|
106
|
+
- [XMLA Auth Guide](https://github.com/mudassir09/pbi-enterprise-cli/blob/main/docs/auth/xmla-auth.md)
|
|
107
|
+
- [Deployment Guide](https://github.com/mudassir09/pbi-enterprise-cli/blob/main/docs/deployment.md)
|
|
108
|
+
- [Stability Policy](https://github.com/mudassir09/pbi-enterprise-cli/blob/main/STABILITY.md)
|
|
101
109
|
- [Changelog](https://github.com/mudassir09/pbi-enterprise-cli/blob/main/CHANGELOG.md)
|
|
102
110
|
- [Security Policy](https://github.com/mudassir09/pbi-enterprise-cli/blob/main/SECURITY.md)
|
|
@@ -0,0 +1,343 @@
|
|
|
1
|
+
# pbi-cli
|
|
2
|
+
|
|
3
|
+
> Full-stack Power BI automation from the command line — semantic model management, report authoring, governance enforcement, DAX testing, deployment pipelines, and 30 Claude Code skills.
|
|
4
|
+
|
|
5
|
+

|
|
6
|
+

|
|
7
|
+

|
|
8
|
+

|
|
9
|
+

|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## What it does
|
|
14
|
+
|
|
15
|
+
`pbi-cli` gives you a single `pbi` command that covers every layer of Power BI development — no clicking through the Desktop UI, no manual file editing, no proprietary tooling dependencies.
|
|
16
|
+
|
|
17
|
+
| Area | Commands |
|
|
18
|
+
|---|---|
|
|
19
|
+
| **Semantic model** | `pbi model` — tables, columns, relationships, lint, lineage |
|
|
20
|
+
| **DAX measures** | `pbi measure` — add, update, delete, AI-generate |
|
|
21
|
+
| **DAX testing** | `pbi dax` — query, validate, YAML unit-test suites |
|
|
22
|
+
| **Source profiling** | `pbi source` — SQL, Excel, CSV, REST APIs → star-schema scaffold |
|
|
23
|
+
| **Report authoring** | `pbi report` — pages, bookmarks (PBIR GA format) |
|
|
24
|
+
| **Visuals** | `pbi visual` — 17 visual types, colour-scale & data-bar formatting |
|
|
25
|
+
| **Layout** | `pbi layout` — shelf-packing auto-layout, named templates |
|
|
26
|
+
| **Themes** | `pbi theme` — generate WCAG-compliant themes from a brand colour |
|
|
27
|
+
| **Filters** | `pbi filter` — relative-date, TopN, basic value filters |
|
|
28
|
+
| **Governance** | `pbi govern` — built-in rules + BPA + custom plugin system, `--fail-on` CI gate |
|
|
29
|
+
| **Security (RLS)** | `pbi security` — role add/delete/test |
|
|
30
|
+
| **Partitions** | `pbi partition` — add, refresh, delete |
|
|
31
|
+
| **Deployment** | `pbi deploy` — snapshot, diff, push via XMLA |
|
|
32
|
+
| **Snapshots** | `pbi snapshot` — create, list, restore, diff — model rollback |
|
|
33
|
+
| **Environments** | `pbi env` — named connections, use, diff, promote (dev→prod) |
|
|
34
|
+
| **TMDL** | `pbi database` — export / import TMDL snapshots |
|
|
35
|
+
| **Docs** | `pbi docs` — markdown/Confluence data dictionary, audit log |
|
|
36
|
+
| **Diagnostics** | `pbi doctor` — check pythonnet, optional deps, platform |
|
|
37
|
+
| **Watch mode** | `pbi watch` — re-run governance + DAX tests on file change |
|
|
38
|
+
| **REST API** | `pbi server` — authenticated FastAPI server for pipeline integration |
|
|
39
|
+
| **Skills** | `pbi skills` — install, list, check 30 Claude Code Power BI skills |
|
|
40
|
+
|
|
41
|
+
---
|
|
42
|
+
|
|
43
|
+
## Backends
|
|
44
|
+
|
|
45
|
+
The same CLI works against three backends — swap with `--backend`:
|
|
46
|
+
|
|
47
|
+
| Backend | When to use |
|
|
48
|
+
|---|---|
|
|
49
|
+
| `desktop` (default) | Local Power BI Desktop open with a `.pbip` project |
|
|
50
|
+
| `xmla` | Power BI Premium or Microsoft Fabric — no Desktop required |
|
|
51
|
+
| `mock` | CI pipelines, unit tests, demos — zero infrastructure |
|
|
52
|
+
|
|
53
|
+
---
|
|
54
|
+
|
|
55
|
+
## Installation
|
|
56
|
+
|
|
57
|
+
**Base install** (semantic model, governance, DAX, report authoring):
|
|
58
|
+
```bash
|
|
59
|
+
pip install pbi-enterprise-cli
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
**Optional feature groups:**
|
|
63
|
+
```bash
|
|
64
|
+
pip install "pbi-enterprise-cli[ai]" # Claude AI measure generation
|
|
65
|
+
pip install "pbi-enterprise-cli[xmla]" # XMLA auth (MSAL)
|
|
66
|
+
pip install "pbi-enterprise-cli[sources]" # SQL / Excel / REST profiling
|
|
67
|
+
pip install "pbi-enterprise-cli[viz]" # WCAG theme validation, screenshots
|
|
68
|
+
pip install "pbi-enterprise-cli[server]" # Authenticated FastAPI REST server
|
|
69
|
+
pip install "pbi-enterprise-cli[all]" # Everything
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
> **Requirements:** Python 3.10+. The `desktop` and `xmla` backends require Windows and the AMO .NET assemblies (installed with Power BI Desktop).
|
|
73
|
+
|
|
74
|
+
---
|
|
75
|
+
|
|
76
|
+
## Quick Start
|
|
77
|
+
|
|
78
|
+
```bash
|
|
79
|
+
# Check your setup
|
|
80
|
+
pbi doctor
|
|
81
|
+
|
|
82
|
+
# Connect to open Power BI Desktop and inspect the model
|
|
83
|
+
pbi model tables
|
|
84
|
+
pbi model relationships
|
|
85
|
+
pbi measure list
|
|
86
|
+
|
|
87
|
+
# Run governance checks (exit code 3 on errors — CI safe)
|
|
88
|
+
pbi govern check --fail-on error
|
|
89
|
+
|
|
90
|
+
# Auto-fix safe violations (PascalCase, missing format strings, etc.)
|
|
91
|
+
pbi govern fix --auto
|
|
92
|
+
|
|
93
|
+
# Add a measure
|
|
94
|
+
pbi measure add \
|
|
95
|
+
--table Sales \
|
|
96
|
+
--name "Total Revenue" \
|
|
97
|
+
--expression "SUM(Sales[Revenue])" \
|
|
98
|
+
--format-string "#,0.00" \
|
|
99
|
+
--description "Net revenue after discounts"
|
|
100
|
+
|
|
101
|
+
# Run DAX unit tests
|
|
102
|
+
pbi dax test --suite tests/fixtures/measures/sales_suite.yaml
|
|
103
|
+
|
|
104
|
+
# Profile a SQL source and scaffold a star-schema model
|
|
105
|
+
pbi source profile --source "mssql://server/SalesDW" --output json
|
|
106
|
+
pbi source scaffold --source "mssql://server/SalesDW" \
|
|
107
|
+
--output ./MyModel.SemanticModel/definition/
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
---
|
|
111
|
+
|
|
112
|
+
## Governance & CI/CD
|
|
113
|
+
|
|
114
|
+
Built-in rules + BPA (Best Practice Analyzer) run out of the box.
|
|
115
|
+
Drop a `.py` file in `~/.pbi-cli/rules/` to add organisation-specific rules.
|
|
116
|
+
|
|
117
|
+
```bash
|
|
118
|
+
pbi govern rules # list all built-in + plugin rules
|
|
119
|
+
pbi govern check --fail-on error # exit 3 on violations — CI gate
|
|
120
|
+
pbi --json govern check # structured {summary, violations} JSON output
|
|
121
|
+
pbi govern fix --auto # auto-fix PascalCase, format strings, folders
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
### BPA Compatibility
|
|
125
|
+
|
|
126
|
+
```bash
|
|
127
|
+
# Microsoft community rules (fetched live — same as Tabular Editor)
|
|
128
|
+
pbi govern bpa check
|
|
129
|
+
|
|
130
|
+
# Local rule set
|
|
131
|
+
pbi govern bpa check --file ./BPARules.json
|
|
132
|
+
|
|
133
|
+
# Filter by severity or category
|
|
134
|
+
pbi govern bpa check --severity error --category Performance
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
### GitHub Actions
|
|
138
|
+
|
|
139
|
+
Copy `.github/workflows/pbi-govern.yml` from this repo — it runs governance on every PR,
|
|
140
|
+
fails on errors, and posts a summary comment automatically.
|
|
141
|
+
|
|
142
|
+
```yaml
|
|
143
|
+
# One-liner governance gate for your own repo:
|
|
144
|
+
- run: pbi --backend mock --json govern check --fail-on error
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
See also `azure-pipelines-govern.yml` for Azure DevOps.
|
|
148
|
+
|
|
149
|
+
---
|
|
150
|
+
|
|
151
|
+
## Snapshots & Rollback
|
|
152
|
+
|
|
153
|
+
```bash
|
|
154
|
+
# Save a snapshot before risky changes
|
|
155
|
+
pbi snapshot create --label before-refactor
|
|
156
|
+
|
|
157
|
+
# See all snapshots
|
|
158
|
+
pbi snapshot list
|
|
159
|
+
|
|
160
|
+
# Diff current model against a snapshot
|
|
161
|
+
pbi snapshot diff 20260530_142300_before-refactor
|
|
162
|
+
|
|
163
|
+
# Restore (requires --confirm)
|
|
164
|
+
pbi snapshot restore 20260530_142300_before-refactor --confirm
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
---
|
|
168
|
+
|
|
169
|
+
## Multi-Environment Support
|
|
170
|
+
|
|
171
|
+
Named connections in `~/.pbi-cli/connections.json` — switch with one command:
|
|
172
|
+
|
|
173
|
+
```bash
|
|
174
|
+
pbi connections add # interactive wizard
|
|
175
|
+
pbi env list # show all environments
|
|
176
|
+
pbi env use fabric-dev # set default
|
|
177
|
+
pbi env promote fabric-dev fabric-prod --confirm # deploy dev → prod
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
See `docs/auth/xmla-auth.md` for service principal, managed identity, and interactive auth.
|
|
181
|
+
|
|
182
|
+
---
|
|
183
|
+
|
|
184
|
+
## Authenticated REST Server
|
|
185
|
+
|
|
186
|
+
```bash
|
|
187
|
+
# Generate a key
|
|
188
|
+
export PBI_SERVER_KEY=$(pbi server generate-key)
|
|
189
|
+
|
|
190
|
+
# Start server (localhost-only by default)
|
|
191
|
+
pbi server start
|
|
192
|
+
|
|
193
|
+
# Call the API
|
|
194
|
+
curl -H "X-PBI-API-Key: $PBI_SERVER_KEY" http://localhost:7788/api/tables
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
The server binds to `127.0.0.1` by default. Use `--host 0.0.0.0` only behind a firewall.
|
|
198
|
+
All endpoints require the `X-PBI-API-Key` header — no unauthenticated access.
|
|
199
|
+
|
|
200
|
+
---
|
|
201
|
+
|
|
202
|
+
## XMLA Backend
|
|
203
|
+
|
|
204
|
+
Connect to Power BI Premium or Fabric without Desktop:
|
|
205
|
+
|
|
206
|
+
```bash
|
|
207
|
+
# Add a named connection
|
|
208
|
+
pbi connections add
|
|
209
|
+
|
|
210
|
+
# Use it
|
|
211
|
+
pbi --connection fabric-prod model tables
|
|
212
|
+
pbi --connection fabric-prod govern check --fail-on error
|
|
213
|
+
pbi --connection fabric-prod deploy push --workspace "Sales-PROD"
|
|
214
|
+
```
|
|
215
|
+
|
|
216
|
+
Full auth guide: [docs/auth/xmla-auth.md](docs/auth/xmla-auth.md)
|
|
217
|
+
|
|
218
|
+
---
|
|
219
|
+
|
|
220
|
+
## Claude Code Skills (30 skills)
|
|
221
|
+
|
|
222
|
+
Install Power BI skills into Claude Code for AI-assisted development:
|
|
223
|
+
|
|
224
|
+
```bash
|
|
225
|
+
# Install all 30 skills
|
|
226
|
+
pbi skills install --all
|
|
227
|
+
|
|
228
|
+
# Check compatibility with current CLI version
|
|
229
|
+
pbi skills check
|
|
230
|
+
|
|
231
|
+
# Install specific skills
|
|
232
|
+
pbi skills install power-bi-dax power-bi-governance
|
|
233
|
+
```
|
|
234
|
+
|
|
235
|
+
**30 bundled skills:**
|
|
236
|
+
|
|
237
|
+
| Skill | Purpose |
|
|
238
|
+
|---|---|
|
|
239
|
+
| `power-bi-advisor` | Master orchestrator — routes any question to the right skill |
|
|
240
|
+
| `power-bi-dax` | DAX measures, time intelligence, VAR/RETURN patterns |
|
|
241
|
+
| `power-bi-modeling` | Star schema, relationships, dimensional design |
|
|
242
|
+
| `power-bi-power-query` | M language, ETL, REST API connectors, query folding |
|
|
243
|
+
| `power-bi-performance` | Query optimisation, VertiPaq, DAX Studio patterns |
|
|
244
|
+
| `power-bi-rls-security` | Dynamic RLS, hierarchy security, OLS |
|
|
245
|
+
| `power-bi-themes` | WCAG-compliant themes, brand palettes |
|
|
246
|
+
| `power-bi-layout` | Shelf-packing auto-layout, navigation patterns |
|
|
247
|
+
| `power-bi-report` | Report pages, bookmarks, drillthrough |
|
|
248
|
+
| `power-bi-visual-selection` | Which visual for which data question |
|
|
249
|
+
| `power-bi-visuals` | Visual add/configure, conditional formatting |
|
|
250
|
+
| `power-bi-governance` | Rules, auto-fix, custom plugins, BPA |
|
|
251
|
+
| `power-bi-deployment` | XMLA deploy, snapshot, diff, rollback |
|
|
252
|
+
| `power-bi-deployment-pipeline` | Git integration, CI/CD, Azure DevOps |
|
|
253
|
+
| `power-bi-fabric` | OneLake, Medallion, Direct Lake, RTI, KQL |
|
|
254
|
+
| `power-bi-copilot` | Copilot setup, Q&A synonyms, Smart Narratives, AI visuals |
|
|
255
|
+
| `power-bi-templates` | Starter templates: Sales, Finance, HR, Operations, Marketing |
|
|
256
|
+
| `power-bi-sources` | SQL/Fabric/REST profiling, star-schema scaffold |
|
|
257
|
+
| `power-bi-docs` | Data dictionary, measure catalog, ERDs |
|
|
258
|
+
| `power-bi-testing` | DAX unit tests, regression suites, CI integration |
|
|
259
|
+
| `power-bi-security` | RLS, OLS, workspace roles |
|
|
260
|
+
| `power-bi-partitions` | Partition strategy, incremental refresh |
|
|
261
|
+
| `power-bi-diagnostics` | Doctor, environment checks, troubleshooting |
|
|
262
|
+
| `power-bi-patterns` | End-to-end workflows, design patterns |
|
|
263
|
+
| `power-bi-pages` | Drillthrough, tooltip pages, mobile layout |
|
|
264
|
+
| `power-bi-filters` | Visual, page, and report-level filters |
|
|
265
|
+
| `power-bi-design-system` | Brand consistency, typography, colour systems |
|
|
266
|
+
| `power-bi-page-designer` | Full page design from business domain description |
|
|
267
|
+
| `power-bi-project-orchestrator` | End-to-end project orchestration |
|
|
268
|
+
| `power-bi-troubleshooter` | Guided troubleshooting workflows |
|
|
269
|
+
|
|
270
|
+
---
|
|
271
|
+
|
|
272
|
+
## Global Flags
|
|
273
|
+
|
|
274
|
+
| Flag | Purpose |
|
|
275
|
+
|---|---|
|
|
276
|
+
| `--backend desktop\|xmla\|mock` | Select backend (default: `desktop`) |
|
|
277
|
+
| `--dry-run` | Preview changes without applying them |
|
|
278
|
+
| `--json` | Machine-readable JSON output |
|
|
279
|
+
| `--connection <name>` | Use a named connection from `~/.pbi-cli/connections.json` |
|
|
280
|
+
| `--port 5000` | Desktop local server port |
|
|
281
|
+
|
|
282
|
+
---
|
|
283
|
+
|
|
284
|
+
## Exit Code Contract
|
|
285
|
+
|
|
286
|
+
| Code | Meaning |
|
|
287
|
+
|------|---------|
|
|
288
|
+
| 0 | Success |
|
|
289
|
+
| 1 | User error — bad args, missing flags |
|
|
290
|
+
| 2 | Connection error — Desktop not open, XMLA unreachable |
|
|
291
|
+
| 3 | Validation error — governance violation, schema error |
|
|
292
|
+
| 4 | Operation error — TOM write failed, partial completion |
|
|
293
|
+
|
|
294
|
+
See [STABILITY.md](STABILITY.md) for the full API stability policy.
|
|
295
|
+
|
|
296
|
+
---
|
|
297
|
+
|
|
298
|
+
## Environment Variables
|
|
299
|
+
|
|
300
|
+
| Variable | Purpose |
|
|
301
|
+
|---|---|
|
|
302
|
+
| `ANTHROPIC_API_KEY` | Claude AI for `pbi measure generate` |
|
|
303
|
+
| `PBI_SERVER_KEY` | API key for `pbi server start` (required) |
|
|
304
|
+
| `PBI_CLIENT_SECRET` | Service principal secret for XMLA connections |
|
|
305
|
+
| `PBI_REST_BEARER` | Default Bearer token for REST source profiling |
|
|
306
|
+
|
|
307
|
+
---
|
|
308
|
+
|
|
309
|
+
## Documentation
|
|
310
|
+
|
|
311
|
+
| Document | Contents |
|
|
312
|
+
|---|---|
|
|
313
|
+
| [docs/auth/xmla-auth.md](docs/auth/xmla-auth.md) | XMLA auth: service principal, managed identity, interactive |
|
|
314
|
+
| [docs/deployment.md](docs/deployment.md) | Snapshot format, diff algorithm, push safety, rollback |
|
|
315
|
+
| [docs/source-profiling.md](docs/source-profiling.md) | Source types, classification logic, scaffold output |
|
|
316
|
+
| [STABILITY.md](STABILITY.md) | Stable command surface, exit code contract, deprecation policy |
|
|
317
|
+
| [MAINTAINERS.md](MAINTAINERS.md) | Maintainer team, support SLAs, release process |
|
|
318
|
+
| [CONTRIBUTING.md](CONTRIBUTING.md) | Branch strategy, coding standards, PR guide |
|
|
319
|
+
|
|
320
|
+
---
|
|
321
|
+
|
|
322
|
+
## Development
|
|
323
|
+
|
|
324
|
+
```bash
|
|
325
|
+
git clone https://github.com/mudassir09/pbi-enterprise-cli.git
|
|
326
|
+
cd pbi-enterprise-cli
|
|
327
|
+
pip install -e ".[all]"
|
|
328
|
+
|
|
329
|
+
# Run the full test suite (575 tests, ~7 s)
|
|
330
|
+
python -m pytest
|
|
331
|
+
|
|
332
|
+
# Lint
|
|
333
|
+
ruff check src/ tests/
|
|
334
|
+
|
|
335
|
+
# Type check
|
|
336
|
+
mypy src/
|
|
337
|
+
```
|
|
338
|
+
|
|
339
|
+
---
|
|
340
|
+
|
|
341
|
+
## License
|
|
342
|
+
|
|
343
|
+
[MIT](LICENSE) — © 2026 Mudassir
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# pbi-enterprise-cli
|
|
2
|
+
|
|
3
|
+
**Full-stack Power BI automation from the command line.**
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
pip install pbi-enterprise-cli
|
|
7
|
+
pbi doctor # verify setup
|
|
8
|
+
pbi model tables # list tables in the connected model
|
|
9
|
+
pbi govern check # run governance rules (exit 3 on violations)
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
## Feature highlights
|
|
13
|
+
|
|
14
|
+
- **22 command groups** covering every layer of Power BI development
|
|
15
|
+
- **3 backends** — Desktop (TOM via pythonnet), XMLA (Premium/Fabric), Mock (CI)
|
|
16
|
+
- **PBIR GA format** — read and write `.pbip` project files directly
|
|
17
|
+
- **Governance engine** — built-in rules + BPA + custom plugin system, `--fail-on` CI gate
|
|
18
|
+
- **Model snapshots** — create/list/restore/diff with `pbi snapshot`
|
|
19
|
+
- **Multi-environment** — named connections, `pbi env promote dev→prod`
|
|
20
|
+
- **Authenticated REST server** — API key auth, localhost-only default
|
|
21
|
+
- **Source profiling** — SQL, Excel, CSV, REST → star-schema scaffold
|
|
22
|
+
- **30 Claude Code skills** — install with `pbi skills install --all`
|
|
23
|
+
- **575 unit tests** passing on Python 3.10–3.12, coverage gate enforced
|
|
24
|
+
|
|
25
|
+
## Install options
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
pip install pbi-enterprise-cli # base
|
|
29
|
+
pip install "pbi-enterprise-cli[ai]" # + Claude AI measure generation
|
|
30
|
+
pip install "pbi-enterprise-cli[xmla]" # + MSAL auth for XMLA
|
|
31
|
+
pip install "pbi-enterprise-cli[sources]" # + SQL/Excel/REST profiling
|
|
32
|
+
pip install "pbi-enterprise-cli[server]" # + authenticated FastAPI REST server
|
|
33
|
+
pip install "pbi-enterprise-cli[all]" # everything
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
## Requirements
|
|
37
|
+
|
|
38
|
+
- Python 3.10+
|
|
39
|
+
- Windows (for Desktop/XMLA backends using .NET AMO)
|
|
40
|
+
- Power BI Desktop (for the `desktop` backend)
|
|
41
|
+
|
|
42
|
+
## Links
|
|
43
|
+
|
|
44
|
+
- [GitHub Repository](https://github.com/mudassir09/pbi-enterprise-cli)
|
|
45
|
+
- [Full Documentation](https://github.com/mudassir09/pbi-enterprise-cli#readme)
|
|
46
|
+
- [XMLA Auth Guide](https://github.com/mudassir09/pbi-enterprise-cli/blob/main/docs/auth/xmla-auth.md)
|
|
47
|
+
- [Deployment Guide](https://github.com/mudassir09/pbi-enterprise-cli/blob/main/docs/deployment.md)
|
|
48
|
+
- [Stability Policy](https://github.com/mudassir09/pbi-enterprise-cli/blob/main/STABILITY.md)
|
|
49
|
+
- [Changelog](https://github.com/mudassir09/pbi-enterprise-cli/blob/main/CHANGELOG.md)
|
|
50
|
+
- [Security Policy](https://github.com/mudassir09/pbi-enterprise-cli/blob/main/SECURITY.md)
|
|
@@ -1,31 +1,33 @@
|
|
|
1
1
|
[build-system]
|
|
2
|
-
requires = ["setuptools>=
|
|
2
|
+
requires = ["setuptools>=82.0.1", "wheel"]
|
|
3
3
|
build-backend = "setuptools.build_meta"
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "pbi-enterprise-cli"
|
|
7
|
-
version = "0.1
|
|
8
|
-
description = "Power BI
|
|
7
|
+
version = "4.0.1"
|
|
8
|
+
description = "Power BI one-stop-shop platform — CLI for AI-driven Power BI development"
|
|
9
9
|
readme = "README.pypi.md"
|
|
10
10
|
requires-python = ">=3.10"
|
|
11
11
|
license = { text = "MIT AND LicenseRef-Microsoft-AS-Client-Libraries" }
|
|
12
|
-
keywords = ["power-bi", "cli", "dax", "tmdl", "pbir", "powerbi", "
|
|
12
|
+
keywords = ["power-bi", "cli", "dax", "tmdl", "pbir", "powerbi", "pbip", "xmla", "fabric"]
|
|
13
13
|
authors = [
|
|
14
|
-
{ name = "Mudassir", email = "mir.mudassir1@gmail.com" }
|
|
14
|
+
{ name = "Mudassir", email = "mir.mudassir1@gmail.com" }
|
|
15
15
|
]
|
|
16
16
|
classifiers = [
|
|
17
|
-
"Development Status ::
|
|
18
|
-
"Environment :: Console",
|
|
17
|
+
"Development Status :: 5 - Production/Stable",
|
|
19
18
|
"Intended Audience :: Developers",
|
|
20
19
|
"Intended Audience :: Information Technology",
|
|
20
|
+
"Topic :: Office/Business",
|
|
21
|
+
"Topic :: Software Development :: Libraries :: Python Modules",
|
|
22
|
+
"Topic :: Database",
|
|
21
23
|
"License :: OSI Approved :: MIT License",
|
|
22
|
-
"Operating System ::
|
|
24
|
+
"Operating System :: Microsoft :: Windows",
|
|
23
25
|
"Programming Language :: Python :: 3",
|
|
24
26
|
"Programming Language :: Python :: 3.10",
|
|
25
27
|
"Programming Language :: Python :: 3.11",
|
|
26
28
|
"Programming Language :: Python :: 3.12",
|
|
27
|
-
"
|
|
28
|
-
"
|
|
29
|
+
"Environment :: Console",
|
|
30
|
+
"Typing :: Typed",
|
|
29
31
|
]
|
|
30
32
|
dependencies = [
|
|
31
33
|
"click>=8.1",
|
|
@@ -33,23 +35,24 @@ dependencies = [
|
|
|
33
35
|
"pythonnet>=3.0",
|
|
34
36
|
"pydantic>=2.0",
|
|
35
37
|
"python-dotenv>=1.0",
|
|
36
|
-
"PyYAML>=6.0",
|
|
37
38
|
]
|
|
38
39
|
|
|
39
40
|
[project.urls]
|
|
40
41
|
Homepage = "https://github.com/mudassir09/pbi-enterprise-cli"
|
|
41
42
|
Repository = "https://github.com/mudassir09/pbi-enterprise-cli"
|
|
42
|
-
|
|
43
|
+
Documentation = "https://github.com/mudassir09/pbi-enterprise-cli#readme"
|
|
43
44
|
Changelog = "https://github.com/mudassir09/pbi-enterprise-cli/blob/main/CHANGELOG.md"
|
|
45
|
+
"Bug Tracker" = "https://github.com/mudassir09/pbi-enterprise-cli/issues"
|
|
46
|
+
"Security Policy" = "https://github.com/mudassir09/pbi-enterprise-cli/blob/main/SECURITY.md"
|
|
44
47
|
|
|
45
48
|
[project.optional-dependencies]
|
|
46
|
-
ai
|
|
47
|
-
viz
|
|
48
|
-
xmla
|
|
49
|
-
server = ["fastapi>=0.
|
|
50
|
-
sources = ["sqlalchemy>=2.0", "openpyxl>=3.1", "httpx>=0.27"]
|
|
51
|
-
dev
|
|
52
|
-
all
|
|
49
|
+
ai = ["anthropic>=0.105.2"]
|
|
50
|
+
viz = ["Pillow>=10.0", "wcag-contrast-ratio>=0.9", "playwright>=1.44"]
|
|
51
|
+
xmla = ["msal>=1.28"]
|
|
52
|
+
server = ["fastapi>=0.136.3", "uvicorn>=0.48.0"]
|
|
53
|
+
sources = ["sqlalchemy>=2.0", "openpyxl>=3.1.5", "httpx>=0.27"]
|
|
54
|
+
dev = ["pytest>=9.0.3", "pytest-cov>=7.1.0", "ruff>=0.15.15", "mypy>=2.1.0", "pyyaml>=6.0"]
|
|
55
|
+
all = ["pbi-enterprise-cli[ai,viz,xmla,server,sources,dev]"]
|
|
53
56
|
|
|
54
57
|
[project.scripts]
|
|
55
58
|
pbi = "pbi_cli.cli:cli"
|
|
@@ -57,9 +60,6 @@ pbi = "pbi_cli.cli:cli"
|
|
|
57
60
|
[tool.setuptools.packages.find]
|
|
58
61
|
where = ["src"]
|
|
59
62
|
|
|
60
|
-
[tool.setuptools.package-data]
|
|
61
|
-
pbi_cli = ["dlls/*.dll"]
|
|
62
|
-
|
|
63
63
|
[tool.ruff]
|
|
64
64
|
line-length = 100
|
|
65
65
|
target-version = "py310"
|
|
@@ -73,12 +73,25 @@ ignore_missing_imports = true
|
|
|
73
73
|
warn_unused_ignores = false
|
|
74
74
|
# strict mode is disabled: backends use pythonnet/AMO dynamic dispatch (Any is intentional)
|
|
75
75
|
|
|
76
|
+
[tool.pytest.ini_options]
|
|
77
|
+
testpaths = ["tests"]
|
|
78
|
+
addopts = "--cov=pbi_cli --cov-report=term-missing --cov-fail-under=67"
|
|
79
|
+
markers = ["e2e: requires live Power BI Desktop or XMLA endpoint"]
|
|
80
|
+
|
|
76
81
|
[tool.coverage.run]
|
|
77
82
|
omit = [
|
|
83
|
+
# TOM/XMLA backends require Windows .NET (pythonnet/AMO) — untestable on Linux CI
|
|
78
84
|
"src/pbi_cli/backends/tom_backend.py",
|
|
79
|
-
"src/pbi_cli/
|
|
85
|
+
"src/pbi_cli/backends/xmla_backend.py",
|
|
80
86
|
]
|
|
81
87
|
|
|
82
|
-
[tool.
|
|
83
|
-
|
|
84
|
-
|
|
88
|
+
[tool.coverage.report]
|
|
89
|
+
exclude_lines = [
|
|
90
|
+
"pragma: no cover",
|
|
91
|
+
"if TYPE_CHECKING",
|
|
92
|
+
"raise NotImplementedError",
|
|
93
|
+
]
|
|
94
|
+
omit = [
|
|
95
|
+
"src/pbi_cli/backends/tom_backend.py",
|
|
96
|
+
"src/pbi_cli/backends/xmla_backend.py",
|
|
97
|
+
]
|