Spaces:
Running
Running
| """Finance Atlas app package. | |
| Puts the vendored `bit-ui` submodule on `sys.path` so `import bit_ui` works. | |
| It happens here rather than in `app.py` because the tests import `src.*` | |
| directly without going through `app`, and both entry points need it. One | |
| insert, at the one place everything else passes through. | |
| `space/vendor/bit-ui` is a git submodule. If it is empty, the checkout was made | |
| without `--recursive`: | |
| git submodule update --init --recursive | |
| """ | |
| from __future__ import annotations | |
| import sys | |
| from pathlib import Path | |
| _VENDOR = Path(__file__).resolve().parent.parent / "vendor" / "bit-ui" | |
| if _VENDOR.exists() and str(_VENDOR) not in sys.path: | |
| sys.path.insert(0, str(_VENDOR)) | |