vizflow 0.5.5__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/io.py
CHANGED
|
@@ -213,7 +213,7 @@ 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
219
|
return pl.concat(dfs)
|
|
@@ -273,12 +273,16 @@ def scan_alphas(config: Config | None = None) -> pl.LazyFrame:
|
|
|
273
273
|
schema = _resolve_schema(config.alpha_schema)
|
|
274
274
|
|
|
275
275
|
# Apply schema evolution per-file BEFORE concat to ensure matching schemas
|
|
276
|
-
# Note: Alpha files already have data_date column,
|
|
276
|
+
# Note: Alpha files already have data_date column, convert to Date type for consistency
|
|
277
277
|
dfs = []
|
|
278
278
|
for f in files:
|
|
279
279
|
df = _scan_file(f, schema=schema)
|
|
280
280
|
if schema:
|
|
281
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
|
+
)
|
|
282
286
|
dfs.append(df)
|
|
283
287
|
|
|
284
288
|
return pl.concat(dfs)
|
|
@@ -347,7 +351,7 @@ def scan_univs(config: Config | None = None) -> pl.LazyFrame:
|
|
|
347
351
|
df = _apply_schema_evolution(df, schema)
|
|
348
352
|
date = _extract_date_from_path(f, config.univ_pattern)
|
|
349
353
|
if date:
|
|
350
|
-
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"))
|
|
351
355
|
dfs.append(df)
|
|
352
356
|
|
|
353
357
|
return pl.concat(dfs)
|
|
@@ -1,10 +1,10 @@
|
|
|
1
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
|