sibi-flux 2026.1.1__py3-none-any.whl → 2026.1.3__py3-none-any.whl
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.
- sibi_flux/__init__.py +0 -1
- sibi_flux/cli.py +68 -0
- sibi_flux/config/settings.py +5 -7
- sibi_flux/datacube/_data_cube.py +1 -0
- sibi_flux/datacube/cli.py +1637 -415
- sibi_flux/datacube/config_engine.py +36 -18
- sibi_flux/datacube/field_factory.py +71 -28
- sibi_flux/datacube/field_mapper.py +93 -69
- sibi_flux/datacube/field_registry.py +1 -1
- sibi_flux/datacube/generator.py +255 -181
- sibi_flux/datacube/orchestrator.py +309 -37
- sibi_flux/df_helper/backends/__init__.py +0 -1
- sibi_flux/init/__init__.py +0 -0
- sibi_flux/init/core.py +211 -0
- sibi_flux/init/discovery_updater.py +153 -0
- sibi_flux/init/env.py +113 -0
- sibi_flux/init/env_engine.py +192 -0
- sibi_flux/init/env_generator.py +707 -0
- sibi_flux/init/rule_generator.py +171 -0
- sibi_flux/init/templates/__init__.py +0 -0
- sibi_flux/init/templates/discovery_params.yaml +44 -0
- sibi_flux/init/templates/gen_dc.py +188 -0
- sibi_flux/init/templates/property_template.yaml +10 -0
- sibi_flux/orchestration/__init__.py +0 -1
- sibi_flux/storage/_storage_manager.py +0 -1
- sibi_flux/utils/date_utils/__init__.py +0 -1
- sibi_flux/utils/date_utils/_business_days.py +0 -1
- {sibi_flux-2026.1.1.dist-info → sibi_flux-2026.1.3.dist-info}/METADATA +43 -4
- {sibi_flux-2026.1.1.dist-info → sibi_flux-2026.1.3.dist-info}/RECORD +31 -18
- sibi_flux-2026.1.3.dist-info/entry_points.txt +3 -0
- {sibi_flux-2026.1.1.dist-info → sibi_flux-2026.1.3.dist-info}/WHEEL +0 -0
sibi_flux/__init__.py
CHANGED
sibi_flux/cli.py
ADDED
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import typer
|
|
2
|
+
from typing import Optional
|
|
3
|
+
from pathlib import Path
|
|
4
|
+
from rich.console import Console
|
|
5
|
+
from sibi_flux.init.core import initialize_project
|
|
6
|
+
|
|
7
|
+
app = typer.Typer(help="Sibi Flux CLI")
|
|
8
|
+
console = Console()
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
@app.callback()
|
|
12
|
+
def callback():
|
|
13
|
+
"""
|
|
14
|
+
Sibi Flux CLI
|
|
15
|
+
"""
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
@app.command()
|
|
19
|
+
def init(
|
|
20
|
+
project_name: str = typer.Argument(..., help="Name of the project to create"),
|
|
21
|
+
lib: bool = typer.Option(
|
|
22
|
+
False, "--lib", help="Initialize as a library project (passed to uv init)"
|
|
23
|
+
),
|
|
24
|
+
app: bool = typer.Option(
|
|
25
|
+
False, "--app", help="Initialize as an application project (passed to uv init)"
|
|
26
|
+
),
|
|
27
|
+
):
|
|
28
|
+
"""
|
|
29
|
+
Initialize a new Sibi Flux project.
|
|
30
|
+
|
|
31
|
+
Creates a new directory <project_name>, initializes it with 'uv',
|
|
32
|
+
and adds 'sibi-flux' as a dependency.
|
|
33
|
+
"""
|
|
34
|
+
initialize_project(project_name, lib, app)
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
@app.command()
|
|
38
|
+
def env(
|
|
39
|
+
project_path: Path = typer.Argument(Path("."), help="Project root directory"),
|
|
40
|
+
env_file: Optional[Path] = typer.Option(
|
|
41
|
+
None, "--env-file", "-e", help="Path to environment file (defaults to .env)"
|
|
42
|
+
),
|
|
43
|
+
cleanup: bool = typer.Option(
|
|
44
|
+
False, "--cleanup", help="Remove existing configuration files"
|
|
45
|
+
),
|
|
46
|
+
production: bool = typer.Option(
|
|
47
|
+
False,
|
|
48
|
+
"--production",
|
|
49
|
+
"-p",
|
|
50
|
+
help="Generate production skeleton (no hardcoded values)",
|
|
51
|
+
),
|
|
52
|
+
):
|
|
53
|
+
"""
|
|
54
|
+
Initialize configuration files (settings.py, credentials) based on .env
|
|
55
|
+
"""
|
|
56
|
+
from sibi_flux.init.env import init_env
|
|
57
|
+
|
|
58
|
+
init_env(project_path, env_file, cleanup=cleanup, production_mode=production)
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
# Mount Datacube CLI
|
|
62
|
+
from sibi_flux.datacube.cli import app as dc_app
|
|
63
|
+
|
|
64
|
+
app.add_typer(dc_app, name="dc", help="Datacube generation and management commands")
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
if __name__ == "__main__":
|
|
68
|
+
app()
|
sibi_flux/config/settings.py
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
from typing import Optional, Any
|
|
1
|
+
from typing import Optional, Any, ClassVar
|
|
2
2
|
from pydantic import SecretStr
|
|
3
3
|
from pydantic_settings import BaseSettings, SettingsConfigDict
|
|
4
4
|
|
|
@@ -10,6 +10,8 @@ class SibiBaseSettings(BaseSettings):
|
|
|
10
10
|
env_file=".env", env_file_encoding="utf-8", extra="ignore"
|
|
11
11
|
)
|
|
12
12
|
|
|
13
|
+
conf_name: ClassVar[str] = ""
|
|
14
|
+
|
|
13
15
|
|
|
14
16
|
class FsSettings(SibiBaseSettings):
|
|
15
17
|
"""Common filesystem settings."""
|
|
@@ -84,13 +86,8 @@ class DatabaseSettings(SibiBaseSettings):
|
|
|
84
86
|
"""Generic SQL Database settings."""
|
|
85
87
|
|
|
86
88
|
db_url: str = "sqlite:///:memory:"
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
class ClickhouseBaseSettings(SibiBaseSettings):
|
|
90
|
-
"""Base settings for ClickHouse connection."""
|
|
91
|
-
|
|
92
89
|
host: str = "localhost"
|
|
93
|
-
port: int =
|
|
90
|
+
port: int = 5432
|
|
94
91
|
database: str = "default"
|
|
95
92
|
user: str = "default"
|
|
96
93
|
password: SecretStr = SecretStr("secret")
|
|
@@ -102,6 +99,7 @@ class ClickhouseBaseSettings(SibiBaseSettings):
|
|
|
102
99
|
"dbname": self.database,
|
|
103
100
|
"user": self.user,
|
|
104
101
|
"password": self.password.get_secret_value() if self.password else None,
|
|
102
|
+
"db_url": self.db_url,
|
|
105
103
|
}
|
|
106
104
|
|
|
107
105
|
|
sibi_flux/datacube/_data_cube.py
CHANGED