MSTR-Robotics-magerdaniel 0.5.5__tar.gz → 0.5.7__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.
Files changed (57) hide show
  1. {mstr_robotics_magerdaniel-0.5.5 → mstr_robotics_magerdaniel-0.5.7}/MSTR_Robotics_magerdaniel.egg-info/PKG-INFO +3 -3
  2. {mstr_robotics_magerdaniel-0.5.5 → mstr_robotics_magerdaniel-0.5.7}/MSTR_Robotics_magerdaniel.egg-info/SOURCES.txt +10 -9
  3. mstr_robotics_magerdaniel-0.5.7/MSTR_Robotics_magerdaniel.egg-info/top_level.txt +1 -0
  4. {mstr_robotics_magerdaniel-0.5.5 → mstr_robotics_magerdaniel-0.5.7}/PKG-INFO +3 -3
  5. {mstr_robotics_magerdaniel-0.5.5 → mstr_robotics_magerdaniel-0.5.7}/README.md +2 -2
  6. mstr_robotics_magerdaniel-0.5.7/docs/SETUP.md +121 -0
  7. {mstr_robotics_magerdaniel-0.5.5 → mstr_robotics_magerdaniel-0.5.7}/mstr_robotics/__init__.py +2 -2
  8. {mstr_robotics_magerdaniel-0.5.5 → mstr_robotics_magerdaniel-0.5.7}/mstr_robotics/_paths.py +27 -21
  9. {mstr_robotics_magerdaniel-0.5.5 → mstr_robotics_magerdaniel-0.5.7}/mstr_robotics/mcp_servers/_run_mstr_report_wizzard.py +1 -1
  10. {mstr_robotics_magerdaniel-0.5.5 → mstr_robotics_magerdaniel-0.5.7}/mstr_robotics/mcp_servers/_server_config.py +1 -1
  11. {mstr_robotics_magerdaniel-0.5.5 → mstr_robotics_magerdaniel-0.5.7}/mstr_robotics/setup.py +2 -2
  12. {mstr_robotics_magerdaniel-0.5.5 → mstr_robotics_magerdaniel-0.5.7}/pyproject.toml +25 -7
  13. mstr_robotics_magerdaniel-0.5.5/MSTR_Robotics_magerdaniel.egg-info/top_level.txt +0 -3
  14. {mstr_robotics_magerdaniel-0.5.5 → mstr_robotics_magerdaniel-0.5.7}/MSTR_Robotics_magerdaniel.egg-info/dependency_links.txt +0 -0
  15. {mstr_robotics_magerdaniel-0.5.5 → mstr_robotics_magerdaniel-0.5.7}/MSTR_Robotics_magerdaniel.egg-info/requires.txt +0 -0
  16. {mstr_robotics_magerdaniel-0.5.5 → mstr_robotics_magerdaniel-0.5.7}/OSI_Produktion/osi_dashboard_8D47320148C7E2850BFD2B9605D73297.yml +0 -0
  17. {mstr_robotics_magerdaniel-0.5.5 → mstr_robotics_magerdaniel-0.5.7}/config/API_KEY.example.env +0 -0
  18. {mstr_robotics_magerdaniel-0.5.5 → mstr_robotics_magerdaniel-0.5.7}/config/dans_migrations.example.yml +0 -0
  19. {mstr_robotics_magerdaniel-0.5.5 → mstr_robotics_magerdaniel-0.5.7}/config/jupyter_objects_d.example.yml +0 -0
  20. {mstr_robotics_magerdaniel-0.5.5 → mstr_robotics_magerdaniel-0.5.7}/config/mstr_redis_y.example.yml +0 -0
  21. {mstr_robotics_magerdaniel-0.5.5 → mstr_robotics_magerdaniel-0.5.7}/config/user_d.example.yml +0 -0
  22. {mstr_robotics_magerdaniel-0.5.5 → mstr_robotics_magerdaniel-0.5.7}/mstr_robotics/_connectors.py +0 -0
  23. {mstr_robotics_magerdaniel-0.5.5 → mstr_robotics_magerdaniel-0.5.7}/mstr_robotics/_export.py +0 -0
  24. {mstr_robotics_magerdaniel-0.5.5 → mstr_robotics_magerdaniel-0.5.7}/mstr_robotics/_helper.py +0 -0
  25. {mstr_robotics_magerdaniel-0.5.5 → mstr_robotics_magerdaniel-0.5.7}/mstr_robotics/_lu_data.py +0 -0
  26. {mstr_robotics_magerdaniel-0.5.5 → mstr_robotics_magerdaniel-0.5.7}/mstr_robotics/_mod_prj_obj.py +0 -0
  27. {mstr_robotics_magerdaniel-0.5.5 → mstr_robotics_magerdaniel-0.5.7}/mstr_robotics/_pa_etl.py +0 -0
  28. {mstr_robotics_magerdaniel-0.5.5 → mstr_robotics_magerdaniel-0.5.7}/mstr_robotics/dossier.py +0 -0
  29. {mstr_robotics_magerdaniel-0.5.5 → mstr_robotics_magerdaniel-0.5.7}/mstr_robotics/json_compare.py +0 -0
  30. {mstr_robotics_magerdaniel-0.5.5 → mstr_robotics_magerdaniel-0.5.7}/mstr_robotics/mcp_servers/__init__.py +0 -0
  31. {mstr_robotics_magerdaniel-0.5.5 → mstr_robotics_magerdaniel-0.5.7}/mstr_robotics/mcp_servers/_fetch_static_data.py +0 -0
  32. {mstr_robotics_magerdaniel-0.5.5 → mstr_robotics_magerdaniel-0.5.7}/mstr_robotics/mcp_servers/_osi_find_bi_data.py +0 -0
  33. {mstr_robotics_magerdaniel-0.5.5 → mstr_robotics_magerdaniel-0.5.7}/mstr_robotics/mcp_servers/_osi_object_analysis.py +0 -0
  34. {mstr_robotics_magerdaniel-0.5.5 → mstr_robotics_magerdaniel-0.5.7}/mstr_robotics/mcp_servers/_osi_specific_analysis.py +0 -0
  35. {mstr_robotics_magerdaniel-0.5.5 → mstr_robotics_magerdaniel-0.5.7}/mstr_robotics/mcp_servers/mstr_osi_mcp.py +0 -0
  36. {mstr_robotics_magerdaniel-0.5.5 → mstr_robotics_magerdaniel-0.5.7}/mstr_robotics/ms_azure.py +0 -0
  37. {mstr_robotics_magerdaniel-0.5.5 → mstr_robotics_magerdaniel-0.5.7}/mstr_robotics/mstr_classes.py +0 -0
  38. {mstr_robotics_magerdaniel-0.5.5 → mstr_robotics_magerdaniel-0.5.7}/mstr_robotics/mstr_pandas.py +0 -0
  39. {mstr_robotics_magerdaniel-0.5.5 → mstr_robotics_magerdaniel-0.5.7}/mstr_robotics/navigation.py +0 -0
  40. {mstr_robotics_magerdaniel-0.5.5 → mstr_robotics_magerdaniel-0.5.7}/mstr_robotics/osi_exporter/__init__.py +0 -0
  41. {mstr_robotics_magerdaniel-0.5.5 → mstr_robotics_magerdaniel-0.5.7}/mstr_robotics/osi_exporter/export_dashboard.py +0 -0
  42. {mstr_robotics_magerdaniel-0.5.5 → mstr_robotics_magerdaniel-0.5.7}/mstr_robotics/prepare_ai_data.py +0 -0
  43. {mstr_robotics_magerdaniel-0.5.5 → mstr_robotics_magerdaniel-0.5.7}/mstr_robotics/read_out_prj_obj.py +0 -0
  44. {mstr_robotics_magerdaniel-0.5.5 → mstr_robotics_magerdaniel-0.5.7}/mstr_robotics/redis_db.py +0 -0
  45. {mstr_robotics_magerdaniel-0.5.5 → mstr_robotics_magerdaniel-0.5.7}/mstr_robotics/regam.py +0 -0
  46. {mstr_robotics_magerdaniel-0.5.5 → mstr_robotics_magerdaniel-0.5.7}/mstr_robotics/report.py +0 -0
  47. {mstr_robotics_magerdaniel-0.5.5 → mstr_robotics_magerdaniel-0.5.7}/mstr_robotics/select_mig_objects.py +0 -0
  48. {mstr_robotics_magerdaniel-0.5.5 → mstr_robotics_magerdaniel-0.5.7}/mstr_robotics/user_rag.py +0 -0
  49. {mstr_robotics_magerdaniel-0.5.5/mstr_robotics → mstr_robotics_magerdaniel-0.5.7}/notebooks/00_setup.ipynb +0 -0
  50. {mstr_robotics_magerdaniel-0.5.5/mstr_robotics → mstr_robotics_magerdaniel-0.5.7}/notebooks/jup_REGAM.ipynb +0 -0
  51. {mstr_robotics_magerdaniel-0.5.5/mstr_robotics → mstr_robotics_magerdaniel-0.5.7}/notebooks/jup_chat_answer_prompt_page.ipynb +0 -0
  52. {mstr_robotics_magerdaniel-0.5.5/mstr_robotics → mstr_robotics_magerdaniel-0.5.7}/notebooks/jup_load_rag_cubes.ipynb +0 -0
  53. {mstr_robotics_magerdaniel-0.5.5/mstr_robotics → mstr_robotics_magerdaniel-0.5.7}/notebooks/jup_migrate.ipynb +0 -0
  54. {mstr_robotics_magerdaniel-0.5.5/mstr_robotics → mstr_robotics_magerdaniel-0.5.7}/notebooks/jup_mstr_admin.ipynb +0 -0
  55. {mstr_robotics_magerdaniel-0.5.5/mstr_robotics → mstr_robotics_magerdaniel-0.5.7}/notebooks/jup_prj_obj_exporter.ipynb +0 -0
  56. {mstr_robotics_magerdaniel-0.5.5/mstr_robotics → mstr_robotics_magerdaniel-0.5.7}/notebooks/jup_schema_monitor.ipynb +0 -0
  57. {mstr_robotics_magerdaniel-0.5.5 → mstr_robotics_magerdaniel-0.5.7}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: MSTR-Robotics-magerdaniel
3
- Version: 0.5.5
3
+ Version: 0.5.7
4
4
  Summary: Automation toolkit for MicroStrategy / Strategy One: object read-out, migration, comparison, RAG and OSI export.
5
5
  Author-email: Daniel Mager <danielmager@gmx.de>
6
6
  Requires-Python: >=3.12
@@ -43,7 +43,7 @@ A Python toolkit for MicroStrategy automation, object comparison, and Redis-base
43
43
  ## Project Structure
44
44
 
45
45
  - `mstr_robotics/` - Main package with core functionality
46
- - `mstr_robotics/notebooks/` - Jupyter notebooks for analysis and exploration
46
+ - `notebooks/` - Jupyter notebooks for analysis and exploration
47
47
  - `Dansfiles/` - Migration and automation scripts
48
48
  - `config/` - Configuration files (YAML, JSON)
49
49
  - `export/` - Export utilities and logs
@@ -58,7 +58,7 @@ A Python toolkit for MicroStrategy automation, object comparison, and Redis-base
58
58
 
59
59
  ## Usage
60
60
 
61
- The Jupyter notebooks in `mstr_robotics/notebooks/` are the primary entry points (object
61
+ The Jupyter notebooks in `notebooks/` are the primary entry points (object
62
62
  export, schema monitoring, migration, REGAM regression testing).
63
63
 
64
64
  ## Development
@@ -11,6 +11,7 @@ config/dans_migrations.example.yml
11
11
  config/jupyter_objects_d.example.yml
12
12
  config/mstr_redis_y.example.yml
13
13
  config/user_d.example.yml
14
+ docs/SETUP.md
14
15
  mstr_robotics/__init__.py
15
16
  mstr_robotics/_connectors.py
16
17
  mstr_robotics/_export.py
@@ -41,13 +42,13 @@ mstr_robotics/mcp_servers/_osi_specific_analysis.py
41
42
  mstr_robotics/mcp_servers/_run_mstr_report_wizzard.py
42
43
  mstr_robotics/mcp_servers/_server_config.py
43
44
  mstr_robotics/mcp_servers/mstr_osi_mcp.py
44
- mstr_robotics/notebooks/00_setup.ipynb
45
- mstr_robotics/notebooks/jup_REGAM.ipynb
46
- mstr_robotics/notebooks/jup_chat_answer_prompt_page.ipynb
47
- mstr_robotics/notebooks/jup_load_rag_cubes.ipynb
48
- mstr_robotics/notebooks/jup_migrate.ipynb
49
- mstr_robotics/notebooks/jup_mstr_admin.ipynb
50
- mstr_robotics/notebooks/jup_prj_obj_exporter.ipynb
51
- mstr_robotics/notebooks/jup_schema_monitor.ipynb
52
45
  mstr_robotics/osi_exporter/__init__.py
53
- mstr_robotics/osi_exporter/export_dashboard.py
46
+ mstr_robotics/osi_exporter/export_dashboard.py
47
+ notebooks/00_setup.ipynb
48
+ notebooks/jup_REGAM.ipynb
49
+ notebooks/jup_chat_answer_prompt_page.ipynb
50
+ notebooks/jup_load_rag_cubes.ipynb
51
+ notebooks/jup_migrate.ipynb
52
+ notebooks/jup_mstr_admin.ipynb
53
+ notebooks/jup_prj_obj_exporter.ipynb
54
+ notebooks/jup_schema_monitor.ipynb
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: MSTR-Robotics-magerdaniel
3
- Version: 0.5.5
3
+ Version: 0.5.7
4
4
  Summary: Automation toolkit for MicroStrategy / Strategy One: object read-out, migration, comparison, RAG and OSI export.
5
5
  Author-email: Daniel Mager <danielmager@gmx.de>
6
6
  Requires-Python: >=3.12
@@ -43,7 +43,7 @@ A Python toolkit for MicroStrategy automation, object comparison, and Redis-base
43
43
  ## Project Structure
44
44
 
45
45
  - `mstr_robotics/` - Main package with core functionality
46
- - `mstr_robotics/notebooks/` - Jupyter notebooks for analysis and exploration
46
+ - `notebooks/` - Jupyter notebooks for analysis and exploration
47
47
  - `Dansfiles/` - Migration and automation scripts
48
48
  - `config/` - Configuration files (YAML, JSON)
49
49
  - `export/` - Export utilities and logs
@@ -58,7 +58,7 @@ A Python toolkit for MicroStrategy automation, object comparison, and Redis-base
58
58
 
59
59
  ## Usage
60
60
 
61
- The Jupyter notebooks in `mstr_robotics/notebooks/` are the primary entry points (object
61
+ The Jupyter notebooks in `notebooks/` are the primary entry points (object
62
62
  export, schema monitoring, migration, REGAM regression testing).
63
63
 
64
64
  ## Development
@@ -11,7 +11,7 @@ A Python toolkit for MicroStrategy automation, object comparison, and Redis-base
11
11
  ## Project Structure
12
12
 
13
13
  - `mstr_robotics/` - Main package with core functionality
14
- - `mstr_robotics/notebooks/` - Jupyter notebooks for analysis and exploration
14
+ - `notebooks/` - Jupyter notebooks for analysis and exploration
15
15
  - `Dansfiles/` - Migration and automation scripts
16
16
  - `config/` - Configuration files (YAML, JSON)
17
17
  - `export/` - Export utilities and logs
@@ -26,7 +26,7 @@ A Python toolkit for MicroStrategy automation, object comparison, and Redis-base
26
26
 
27
27
  ## Usage
28
28
 
29
- The Jupyter notebooks in `mstr_robotics/notebooks/` are the primary entry points (object
29
+ The Jupyter notebooks in `notebooks/` are the primary entry points (object
30
30
  export, schema monitoring, migration, REGAM regression testing).
31
31
 
32
32
  ## Development
@@ -0,0 +1,121 @@
1
+ # Setup
2
+
3
+ Three stages, in order. Stage 2 is one notebook; stage 3 is automatic.
4
+
5
+ 1. [Install the Python package](#1-install-the-python-package)
6
+ 2. [Deploy the Object Manager packages](#2-deploy-the-object-manager-packages)
7
+ 3. [Run the setup notebook](#3-run-the-setup-notebook)
8
+
9
+ ---
10
+
11
+ ## 1. Install the Python package
12
+
13
+ Requires **Python 3.12+** and network access to a MicroStrategy Library REST endpoint.
14
+
15
+ ```bash
16
+ git clone https://github.com/magerdaniel/MSTR_Robotics.git
17
+ cd MSTR_Robotics
18
+ python -m venv .venv
19
+ .venv\Scripts\Activate.ps1 # Windows; source .venv/bin/activate on Unix
20
+ pip install -e .
21
+ ```
22
+
23
+ The base install is deliberately small — connection, object read-out, comparison and
24
+ migration. Add only what you need:
25
+
26
+ | Command | Adds |
27
+ |---|---|
28
+ | `pip install -e ".[rag]"` | OpenAI / Perplexity — the chat and RAG notebooks |
29
+ | `pip install -e ".[redis]"` | Redis-backed metadata analysis |
30
+ | `pip install -e ".[azure]"` | Azure Blob staging for migration packages |
31
+ | `pip install -e ".[servers]"` | the MCP servers |
32
+ | `pip install -e ".[all]"` | everything above |
33
+ | `pip install -e ".[dev]"` | ruff, vulture, jupyter |
34
+
35
+ ---
36
+
37
+ ## 2. Deploy the Object Manager packages
38
+
39
+ The notebooks and the libraries read from cubes, reports and dossiers that must exist in **your**
40
+ MicroStrategy environment. Further they write into cubes. To simplify your start, everything is pre-configured for MSTR - Tutorial. You'll find the relevant mmp files for Tutorial and Platform Analytics in the file mstr_robotics_demo.zip under
41
+ [`Object_Manager_Packages/`](../Object_Manager_Packages/).
42
+
43
+ ### Prerequisites
44
+
45
+ - Access to MSTR Tutorial and Platform Analytics over Workstation and Library as developer
46
+ - Python environment with the posibility to pip install
47
+ - A POC or development environment is recomended
48
+
49
+ ### Packages
50
+
51
+ | Package | Provides |
52
+ |---|---|
53
+ | `mstr_robotics_tutorial.mmp` | contains the folder structure, the MTDI-cubes and MSTR application objects. — **deploy this first** |
54
+ | `PA_mstr_robotics.mmp` | is only needed for REGAM regession testing. Using this report, we can fetch user job for re-play out of PA |
55
+
56
+
57
+ ### If a package fails to import
58
+
59
+ Send me a mail to daniel@magdata.de.
60
+
61
+ ---
62
+
63
+ ## 3. Run the setup notebook
64
+
65
+ ```bash
66
+ jupyter lab notebooks/00_setup.ipynb
67
+ ```
68
+
69
+ Run it top to bottom. It creates the output folders, copies the config templates,
70
+ validates what you filled in, verifies the connection, and then **resolves the object
71
+ GUIDs automatically**.
72
+
73
+ ### If you want to use your
74
+
75
+ If you want or need to modify the cubes, reports or objects, you can use this feature to check if they all fit.
76
+ This saves a lot of time and nervs. `config/jupyter_objects_d.example.yml` are meaningless if the do not exist. Their *names* are fixed
77
+ by the packages, so the notebook searches your project by name and writes the correct
78
+ GUIDs into `config/jupyter_objects_d.yml` for you.
79
+
80
+ If a name is reported as **not found**, the package providing it has not been deployed.
81
+ If a name is **ambiguous**, your project has duplicates — set that ID by hand.
82
+
83
+ ### Configuration reference
84
+
85
+ Every live config is gitignored; each ships an `.example` twin that
86
+ `00_setup.ipynb` copies for you.
87
+
88
+ | File | Needed for |
89
+ |---|---|
90
+ | `config/user_d.yml` | everything — connection and project GUIDs |
91
+ | `config/jupyter_objects_d.yml` | the notebooks; filled in automatically in step 5 |
92
+ | `config/API_KEY.env` | RAG notebooks and the MCP servers |
93
+ | `config/mstr_redis_y.yml` | Redis-backed metadata analysis |
94
+ | `config/dans_migrations.yml` | Azure-staged migrations |
95
+
96
+ `config/user_d.yml` doubles as the marker file `mstr_robotics._paths` uses to locate the
97
+ repo root, so it must exist even if you override paths via environment variables.
98
+
99
+ ### Where files are written
100
+
101
+ | Variable | Default | Holds |
102
+ |---|---|---|
103
+ | `MSTR_REPO_ROOT` | auto-detected from `config/user_d.yml` | repo root |
104
+ | `MSTR_OSI_DIR` | `<repo>/data/osi` | generated OSI YAML |
105
+ | `MSTR_OUTPUT_DIR` | `<repo>/output` | exports, logs, MCP data |
106
+
107
+ ---
108
+
109
+ ## Troubleshooting
110
+
111
+ **`Cannot save file into a non-existent directory`** — the output folders were never
112
+ created. Run step 1 of `00_setup.ipynb`, or `python -c "from mstr_robotics import setup; print(setup.ensure_dirs())"`.
113
+
114
+ **`MicroStrategy configuration not found`** — `config/user_d.yml` is missing. Run step 2
115
+ of the setup notebook.
116
+
117
+ **`no object named '...'`** during GUID discovery — the Object Manager package providing
118
+ that object has not been deployed to the project you connected to.
119
+
120
+ **Config still points at the reference environment** — you copied the template but did
121
+ not edit it. `setup.check_configs()` reports this explicitly.
@@ -1,7 +1,7 @@
1
1
  """mstr_robotics — automation toolkit for MicroStrategy / Strategy One.
2
2
 
3
3
  Object read-out, migration packaging, environment comparison, RAG helpers
4
- and OSI dashboard export, driven by the Jupyter notebooks in ``mstr_robotics/notebooks/``.
4
+ and OSI dashboard export, driven by the Jupyter notebooks in ``notebooks/``.
5
5
  """
6
6
 
7
- __version__ = "0.5.5"
7
+ __version__ = "0.5.7"
@@ -1,11 +1,18 @@
1
- """Central repo-relative path resolution.
2
-
3
- Every path here is derived from the installed package location
4
- (``Path(__file__).parent.parent`` == the repo root), so the same code resolves
5
- correctly in whichever environment the package is installed -- e.g.
6
- ``mstr_robotics`` vs ``mstr_robotics_comp`` -- without any hardcoded absolute
7
- paths. This is what lets ``tools/nb_compare`` run the same notebooks against two
8
- environments and get comparable results.
1
+ """Central project-relative path resolution.
2
+
3
+ Resolution walks up from the current working directory looking for
4
+ ``config/user_d.yml`` -- the marker that says "this is a project that has run
5
+ setup". This is what lets a user ``pip install`` the package, copy the
6
+ reference material from ``mstr_robotics/utils/`` to the top level of their own
7
+ project, and have config/output/OSI paths resolve there -- instead of inside
8
+ the installed package's own location (e.g. site-packages), which is not
9
+ writable in any meaningful sense for the user.
10
+
11
+ It is also what lets ``tools/nb_compare`` (in the dans_playground dev repo)
12
+ run the same notebooks against two full repo checkouts that share one
13
+ installed ``mstr_robotics`` package: each checkout has its own
14
+ ``config/user_d.yml``, so walking up from cwd tells the two apart even though
15
+ ``Path(__file__)`` cannot.
9
16
 
10
17
  Notebooks and modules should import the constants they need from here, e.g.::
11
18
 
@@ -20,25 +27,24 @@ from __future__ import annotations
20
27
  import os
21
28
  from pathlib import Path
22
29
 
23
- # Marker that identifies a repo root (every environment has its own copy).
30
+ # Marker that identifies a project root (every environment has its own copy).
24
31
  _MARKER = Path("config") / "user_d.yml"
25
32
 
26
33
 
27
34
  def find_repo_root() -> Path:
28
- """Resolve the repo root of the *current* environment.
29
-
30
- The two comparison environments (mstr_robotics / mstr_robotics_comp) share a
31
- single installed ``mstr_robotics`` package, so ``Path(__file__)`` always
32
- points at whichever repo the package was installed from -- it cannot tell
33
- the environments apart. Instead we anchor on the runtime working directory:
34
- ``run_shapes.py`` executes each notebook with cwd set to ``<repo>/mstr_robotics/notebooks``
35
- (see tools/nb_compare), so walking up from cwd to the dir that contains
36
- ``config/user_d.yml`` yields THIS environment's repo.
35
+ """Resolve the root of the *current* project.
37
36
 
38
37
  Resolution order:
39
38
  1. ``MSTR_REPO_ROOT`` environment variable, if set.
40
- 2. The nearest ancestor of the cwd that contains ``config/user_d.yml``.
41
- 3. Fall back to this file's install location (the package's own repo).
39
+ 2. The nearest ancestor of the cwd that contains ``config/user_d.yml``
40
+ (a project that has already run setup at least once).
41
+ 3. The current working directory, on the assumption this is a fresh
42
+ project where the user just copied ``mstr_robotics/utils/`` in and is
43
+ about to run setup for the first time.
44
+
45
+ Step 3 deliberately does NOT fall back to this file's install location
46
+ (e.g. site-packages) -- that would silently write config/output inside the
47
+ venv instead of the user's own project.
42
48
  """
43
49
  env = os.environ.get("MSTR_REPO_ROOT")
44
50
  if env:
@@ -47,7 +53,7 @@ def find_repo_root() -> Path:
47
53
  for base in (cwd, *cwd.parents):
48
54
  if (base / _MARKER).exists():
49
55
  return base
50
- return Path(__file__).resolve().parent.parent
56
+ return cwd
51
57
 
52
58
 
53
59
  REPO_ROOT = find_repo_root()
@@ -5,7 +5,7 @@ keyword-extraction → Perplexity RAG → prompt-answering → report-execution
5
5
  pipeline and returns the result as CSV plus a browser link.
6
6
 
7
7
  Importing this module loads the four RAG cubes into DataFrames (same loading
8
- logic as mstr_robotics/notebooks/jup_chat_answer_prompt_page.ipynb) and builds the
8
+ logic as notebooks/jup_chat_answer_prompt_page.ipynb) and builds the
9
9
  flash-text keyword index — i.e. it happens once when the MCP server process
10
10
  starts. Every query_bi_report call afterwards is served from the in-memory
11
11
  copies and reuses the shared session-managed connection (_server_config).
@@ -33,7 +33,7 @@ try:
33
33
  except FileNotFoundError as exc:
34
34
  raise RuntimeError(
35
35
  f"MicroStrategy configuration not found at {USER_CONFIG}.\n"
36
- "Run the setup notebook (mstr_robotics/notebooks/00_setup.ipynb), or copy the template by hand:\n"
36
+ "Run the setup notebook (notebooks/00_setup.ipynb), or copy the template by hand:\n"
37
37
  f" cp {USER_CONFIG.parent / 'user_d.example.yml'} {USER_CONFIG}\n"
38
38
  "then fill in base_url, username, password and project_id."
39
39
  ) from exc
@@ -1,4 +1,4 @@
1
- """First-time setup helpers, driven by ``mstr_robotics/notebooks/00_setup.ipynb``.
1
+ """First-time setup helpers, driven by ``notebooks/00_setup.ipynb``.
2
2
 
3
3
  Each function performs one setup step and returns a :class:`StepResult` instead
4
4
  of raising, so the setup notebook can show every problem at once rather than
@@ -43,7 +43,7 @@ from mstr_robotics._paths import (
43
43
  _PLACEHOLDER_MARKERS = ("_guid", "your", "you account", "changeme", "placeholder")
44
44
 
45
45
  # Directories the package writes into. Nothing else creates these, and pandas
46
- # `to_csv` / `open(..., "w")` do not create parents -- see mstr_robotics/notebooks/00_setup.ipynb.
46
+ # `to_csv` / `open(..., "w")` do not create parents -- see notebooks/00_setup.ipynb.
47
47
  _WRITABLE_DIRS = (OSI_DIR, OSI_DASHBOARD_CONTEXT, OUTPUT_DIR, MCP_DATA)
48
48
 
49
49
  # Configs every user must customise. The rest are feature-specific and may
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "MSTR-Robotics-magerdaniel"
7
- version = "0.5.5"
7
+ version = "0.5.7"
8
8
  description = "Automation toolkit for MicroStrategy / Strategy One: object read-out, migration, comparison, RAG and OSI export."
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.12"
@@ -52,14 +52,32 @@ dev = [
52
52
  "jupyter",
53
53
  ]
54
54
 
55
- [tool.setuptools.packages.find]
56
- include = ["mstr_robotics*", "config", "OSI_Produktion"]
57
- namespaces = true
55
+ [tool.setuptools]
56
+ packages = [
57
+ "mstr_robotics",
58
+ "mstr_robotics.mcp_servers",
59
+ "mstr_robotics.osi_exporter",
60
+ "mstr_robotics.utils.notebooks",
61
+ "mstr_robotics.utils.config",
62
+ "mstr_robotics.utils.docs",
63
+ "mstr_robotics.utils.OSI_Produktion",
64
+ ]
65
+
66
+ # Repo layout keeps notebooks/, config/, docs/, OSI_Produktion/ at project level;
67
+ # these map them into mstr_robotics/utils/ only inside the built package, so
68
+ # `pip install`ers get a self-contained, copy-pasteable bundle of reference
69
+ # material alongside the code.
70
+ [tool.setuptools.package-dir]
71
+ "mstr_robotics.utils.notebooks" = "notebooks"
72
+ "mstr_robotics.utils.config" = "config"
73
+ "mstr_robotics.utils.docs" = "docs"
74
+ "mstr_robotics.utils.OSI_Produktion" = "OSI_Produktion"
58
75
 
59
76
  [tool.setuptools.package-data]
60
- config = ["*.example.*"]
61
- OSI_Produktion = ["*.yml"]
62
- mstr_robotics = ["notebooks/*.ipynb"]
77
+ "mstr_robotics.utils.notebooks" = ["*.ipynb"]
78
+ "mstr_robotics.utils.config" = ["*.example.*"]
79
+ "mstr_robotics.utils.docs" = ["*.md"]
80
+ "mstr_robotics.utils.OSI_Produktion" = ["*.yml"]
63
81
 
64
82
  [tool.ruff]
65
83
  line-length = 120
@@ -1,3 +0,0 @@
1
- OSI_Produktion
2
- config
3
- mstr_robotics