vizflow 0.5.4__py3-none-any.whl → 0.5.6__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.
vizflow/__init__.py
CHANGED
vizflow/io.py
CHANGED
|
@@ -213,11 +213,10 @@ def scan_trades(config: Config | None = None) -> pl.LazyFrame:
|
|
|
213
213
|
df = _apply_schema_evolution(df, schema)
|
|
214
214
|
date = _extract_date_from_path(f, config.trade_pattern)
|
|
215
215
|
if date:
|
|
216
|
-
df = df.with_columns(pl.lit(date).alias("data_date"))
|
|
216
|
+
df = df.with_columns(pl.lit(date).str.to_date("%Y%m%d").alias("data_date"))
|
|
217
217
|
dfs.append(df)
|
|
218
218
|
|
|
219
|
-
|
|
220
|
-
return pl.concat(dfs, how="diagonal")
|
|
219
|
+
return pl.concat(dfs)
|
|
221
220
|
|
|
222
221
|
|
|
223
222
|
def scan_alpha(date: str, config: Config | None = None) -> pl.LazyFrame:
|
|
@@ -274,16 +273,19 @@ def scan_alphas(config: Config | None = None) -> pl.LazyFrame:
|
|
|
274
273
|
schema = _resolve_schema(config.alpha_schema)
|
|
275
274
|
|
|
276
275
|
# Apply schema evolution per-file BEFORE concat to ensure matching schemas
|
|
277
|
-
# Note: Alpha files already have data_date column,
|
|
276
|
+
# Note: Alpha files already have data_date column, convert to Date type for consistency
|
|
278
277
|
dfs = []
|
|
279
278
|
for f in files:
|
|
280
279
|
df = _scan_file(f, schema=schema)
|
|
281
280
|
if schema:
|
|
282
281
|
df = _apply_schema_evolution(df, schema)
|
|
282
|
+
# Convert data_date to Date type (may be Int64 from feather or String from CSV)
|
|
283
|
+
df = df.with_columns(
|
|
284
|
+
pl.col("data_date").cast(pl.String).str.to_date("%Y%m%d")
|
|
285
|
+
)
|
|
283
286
|
dfs.append(df)
|
|
284
287
|
|
|
285
|
-
|
|
286
|
-
return pl.concat(dfs, how="diagonal")
|
|
288
|
+
return pl.concat(dfs)
|
|
287
289
|
|
|
288
290
|
|
|
289
291
|
def scan_univ(date: str, config: Config | None = None) -> pl.LazyFrame:
|
|
@@ -349,11 +351,10 @@ def scan_univs(config: Config | None = None) -> pl.LazyFrame:
|
|
|
349
351
|
df = _apply_schema_evolution(df, schema)
|
|
350
352
|
date = _extract_date_from_path(f, config.univ_pattern)
|
|
351
353
|
if date:
|
|
352
|
-
df = df.with_columns(pl.lit(date).alias("data_date"))
|
|
354
|
+
df = df.with_columns(pl.lit(date).str.to_date("%Y%m%d").alias("data_date"))
|
|
353
355
|
dfs.append(df)
|
|
354
356
|
|
|
355
|
-
|
|
356
|
-
return pl.concat(dfs, how="diagonal")
|
|
357
|
+
return pl.concat(dfs)
|
|
357
358
|
|
|
358
359
|
|
|
359
360
|
def load_calendar(config: Config | None = None) -> pl.DataFrame:
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
vizflow/__init__.py,sha256=
|
|
1
|
+
vizflow/__init__.py,sha256=_jP6bp5U2iBFkPGTSLNwvOQay9XU_opNdrylF22iR9s,589
|
|
2
2
|
vizflow/config.py,sha256=nPZPXlqQbaY8u_FAdtPShvb0mdx3e2TRaQ2CILzliAU,7192
|
|
3
|
-
vizflow/io.py,sha256=
|
|
3
|
+
vizflow/io.py,sha256=5gucUD68zBhfnVOmFRbDyxqVM5ikzPWRTeOY20gXQOM,11612
|
|
4
4
|
vizflow/market.py,sha256=MtNz_nnZxC66Aq-i2PXEwaFCTknijFWYZUUv6798k2s,2493
|
|
5
5
|
vizflow/ops.py,sha256=oR44HYKrfaXLh0SmbfXefl714UESSIC5lTNJBrR1kto,10858
|
|
6
6
|
vizflow/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
7
7
|
vizflow/schema_evolution.py,sha256=puwuuJ8LAzelHq1JTwQD968J7GYLvgAsCaHJnDHzu4U,14025
|
|
8
|
-
vizflow-0.5.
|
|
9
|
-
vizflow-0.5.
|
|
10
|
-
vizflow-0.5.
|
|
8
|
+
vizflow-0.5.6.dist-info/METADATA,sha256=oadPQYbrOT8G2aPZ-QZ1_VZ0uqRbde62ddsZnnmDKHE,388
|
|
9
|
+
vizflow-0.5.6.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
10
|
+
vizflow-0.5.6.dist-info/RECORD,,
|
|
File without changes
|