gnomepy 2.26.0__tar.gz → 2.26.2__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.
- {gnomepy-2.26.0 → gnomepy-2.26.2}/PKG-INFO +1 -1
- {gnomepy-2.26.0 → gnomepy-2.26.2}/gnomepy/_fs.py +4 -2
- {gnomepy-2.26.0 → gnomepy-2.26.2}/gnomepy/data/datasets.py +8 -1
- {gnomepy-2.26.0 → gnomepy-2.26.2}/gnomepy/reporting/report.py +2 -2
- {gnomepy-2.26.0 → gnomepy-2.26.2}/pyproject.toml +1 -1
- {gnomepy-2.26.0 → gnomepy-2.26.2}/README.md +0 -0
- {gnomepy-2.26.0 → gnomepy-2.26.2}/gnomepy/__init__.py +0 -0
- {gnomepy-2.26.0 → gnomepy-2.26.2}/gnomepy/auth.py +0 -0
- {gnomepy-2.26.0 → gnomepy-2.26.2}/gnomepy/cli.py +0 -0
- {gnomepy-2.26.0 → gnomepy-2.26.2}/gnomepy/config.py +0 -0
- {gnomepy-2.26.0 → gnomepy-2.26.2}/gnomepy/data/__init__.py +0 -0
- {gnomepy-2.26.0 → gnomepy-2.26.2}/gnomepy/data/artifacts.py +0 -0
- {gnomepy-2.26.0 → gnomepy-2.26.2}/gnomepy/data/catalog.py +0 -0
- {gnomepy-2.26.0 → gnomepy-2.26.2}/gnomepy/explorer/__init__.py +0 -0
- {gnomepy-2.26.0 → gnomepy-2.26.2}/gnomepy/explorer/app.py +0 -0
- {gnomepy-2.26.0 → gnomepy-2.26.2}/gnomepy/explorer/data.py +0 -0
- {gnomepy-2.26.0 → gnomepy-2.26.2}/gnomepy/explorer/panels/__init__.py +0 -0
- {gnomepy-2.26.0 → gnomepy-2.26.2}/gnomepy/explorer/panels/book.py +0 -0
- {gnomepy-2.26.0 → gnomepy-2.26.2}/gnomepy/explorer/panels/event_log.py +0 -0
- {gnomepy-2.26.0 → gnomepy-2.26.2}/gnomepy/explorer/panels/pnl.py +0 -0
- {gnomepy-2.26.0 → gnomepy-2.26.2}/gnomepy/explorer/panels/price.py +0 -0
- {gnomepy-2.26.0 → gnomepy-2.26.2}/gnomepy/explorer/panels/signals.py +0 -0
- {gnomepy-2.26.0 → gnomepy-2.26.2}/gnomepy/explorer/styles.py +0 -0
- {gnomepy-2.26.0 → gnomepy-2.26.2}/gnomepy/importer/__init__.py +0 -0
- {gnomepy-2.26.0 → gnomepy-2.26.2}/gnomepy/importer/chunker.py +0 -0
- {gnomepy-2.26.0 → gnomepy-2.26.2}/gnomepy/importer/encoder.py +0 -0
- {gnomepy-2.26.0 → gnomepy-2.26.2}/gnomepy/importer/import_job.py +0 -0
- {gnomepy-2.26.0 → gnomepy-2.26.2}/gnomepy/importer/mapping.py +0 -0
- {gnomepy-2.26.0 → gnomepy-2.26.2}/gnomepy/importer/scaling.py +0 -0
- {gnomepy-2.26.0 → gnomepy-2.26.2}/gnomepy/importer/tardis/__init__.py +0 -0
- {gnomepy-2.26.0 → gnomepy-2.26.2}/gnomepy/importer/tardis/book.py +0 -0
- {gnomepy-2.26.0 → gnomepy-2.26.2}/gnomepy/importer/tardis/client.py +0 -0
- {gnomepy-2.26.0 → gnomepy-2.26.2}/gnomepy/importer/tardis/importer.py +0 -0
- {gnomepy-2.26.0 → gnomepy-2.26.2}/gnomepy/importer/tardis/mappings.py +0 -0
- {gnomepy-2.26.0 → gnomepy-2.26.2}/gnomepy/importer/uploader.py +0 -0
- {gnomepy-2.26.0 → gnomepy-2.26.2}/gnomepy/importer/validators.py +0 -0
- {gnomepy-2.26.0 → gnomepy-2.26.2}/gnomepy/java/__init__.py +0 -0
- {gnomepy-2.26.0 → gnomepy-2.26.2}/gnomepy/java/_classpath.py +0 -0
- {gnomepy-2.26.0 → gnomepy-2.26.2}/gnomepy/java/_jvm.py +0 -0
- {gnomepy-2.26.0 → gnomepy-2.26.2}/gnomepy/java/backtest/__init__.py +0 -0
- {gnomepy-2.26.0 → gnomepy-2.26.2}/gnomepy/java/backtest/config.py +0 -0
- {gnomepy-2.26.0 → gnomepy-2.26.2}/gnomepy/java/backtest/orders.py +0 -0
- {gnomepy-2.26.0 → gnomepy-2.26.2}/gnomepy/java/backtest/runner.py +0 -0
- {gnomepy-2.26.0 → gnomepy-2.26.2}/gnomepy/java/backtest/strategy.py +0 -0
- {gnomepy-2.26.0 → gnomepy-2.26.2}/gnomepy/java/cache.py +0 -0
- {gnomepy-2.26.0 → gnomepy-2.26.2}/gnomepy/java/datastore.py +0 -0
- {gnomepy-2.26.0 → gnomepy-2.26.2}/gnomepy/java/enums.py +0 -0
- {gnomepy-2.26.0 → gnomepy-2.26.2}/gnomepy/java/market_data.py +0 -0
- {gnomepy-2.26.0 → gnomepy-2.26.2}/gnomepy/java/oms.py +0 -0
- {gnomepy-2.26.0 → gnomepy-2.26.2}/gnomepy/java/recorder.py +0 -0
- {gnomepy-2.26.0 → gnomepy-2.26.2}/gnomepy/java/sbe.py +0 -0
- {gnomepy-2.26.0 → gnomepy-2.26.2}/gnomepy/java/schemas.py +0 -0
- {gnomepy-2.26.0 → gnomepy-2.26.2}/gnomepy/java/statics.py +0 -0
- {gnomepy-2.26.0 → gnomepy-2.26.2}/gnomepy/java/strategy/__init__.py +0 -0
- {gnomepy-2.26.0 → gnomepy-2.26.2}/gnomepy/java/strategy/config.py +0 -0
- {gnomepy-2.26.0 → gnomepy-2.26.2}/gnomepy/java/strategy/runner.py +0 -0
- {gnomepy-2.26.0 → gnomepy-2.26.2}/gnomepy/metadata.py +0 -0
- {gnomepy-2.26.0 → gnomepy-2.26.2}/gnomepy/raw_exchange.py +0 -0
- {gnomepy-2.26.0 → gnomepy-2.26.2}/gnomepy/registry/__init__.py +0 -0
- {gnomepy-2.26.0 → gnomepy-2.26.2}/gnomepy/registry/api.py +0 -0
- {gnomepy-2.26.0 → gnomepy-2.26.2}/gnomepy/registry/graph.py +0 -0
- {gnomepy-2.26.0 → gnomepy-2.26.2}/gnomepy/registry/types.py +0 -0
- {gnomepy-2.26.0 → gnomepy-2.26.2}/gnomepy/remote.py +0 -0
- {gnomepy-2.26.0 → gnomepy-2.26.2}/gnomepy/reporting/__init__.py +0 -0
- {gnomepy-2.26.0 → gnomepy-2.26.2}/gnomepy/reporting/metrics.py +0 -0
- {gnomepy-2.26.0 → gnomepy-2.26.2}/gnomepy/reporting/plots.py +0 -0
- {gnomepy-2.26.0 → gnomepy-2.26.2}/gnomepy/sweep.py +0 -0
- {gnomepy-2.26.0 → gnomepy-2.26.2}/gnomepy/utils.py +0 -0
|
@@ -55,7 +55,7 @@ def fs_read_json(fs: pafs.FileSystem, path: str) -> dict:
|
|
|
55
55
|
|
|
56
56
|
def fs_write_json(fs: pafs.FileSystem, path: str, data: dict) -> None:
|
|
57
57
|
content = (json.dumps(data, indent=2, default=str) + "\n").encode()
|
|
58
|
-
with fs.open_output_stream(path) as f:
|
|
58
|
+
with fs.open_output_stream(path, compression=None) as f:
|
|
59
59
|
f.write(content)
|
|
60
60
|
|
|
61
61
|
|
|
@@ -110,5 +110,7 @@ def fs_read_bytes(fs: pafs.FileSystem, path: str) -> bytes:
|
|
|
110
110
|
|
|
111
111
|
|
|
112
112
|
def fs_write_bytes(fs: pafs.FileSystem, path: str, data: bytes) -> None:
|
|
113
|
-
|
|
113
|
+
# pyarrow would otherwise compress by suffix, so bytes already gzipped for a .gz path got gzipped
|
|
114
|
+
# again; open_input_file never decompresses, so the write must store them exactly as given.
|
|
115
|
+
with fs.open_output_stream(path, compression=None) as f:
|
|
114
116
|
f.write(data)
|
|
@@ -36,6 +36,13 @@ MANAGED_COLUMNS = tuple(f.name for f in MANAGED_FIELDS)
|
|
|
36
36
|
KEY_PROPERTY = "gnome.key"
|
|
37
37
|
COMMIT_ATTEMPTS = 4
|
|
38
38
|
TRANSFORMS: dict[str, Transform] = {"identity": IdentityTransform(), "day": DayTransform(), "month": MonthTransform()}
|
|
39
|
+
# Arrow hands back an integer or boolean column as float64 or object when the batch has a null in it,
|
|
40
|
+
# and as int64 or bool when it doesn't, so a row's hash would depend on the rows published with it.
|
|
41
|
+
NULLABLE_DTYPES = {
|
|
42
|
+
pa.int8(): pd.Int8Dtype(), pa.int16(): pd.Int16Dtype(), pa.int32(): pd.Int32Dtype(), pa.int64(): pd.Int64Dtype(),
|
|
43
|
+
pa.uint8(): pd.UInt8Dtype(), pa.uint16(): pd.UInt16Dtype(), pa.uint32(): pd.UInt32Dtype(),
|
|
44
|
+
pa.uint64(): pd.UInt64Dtype(), pa.bool_(): pd.BooleanDtype(),
|
|
45
|
+
}
|
|
39
46
|
|
|
40
47
|
|
|
41
48
|
@dataclass(frozen=True)
|
|
@@ -226,7 +233,7 @@ def _as_stored(spec: TableSpec, df: pd.DataFrame) -> pd.DataFrame:
|
|
|
226
233
|
# Hash the values as Iceberg will store them: the same data sent as float, int or a
|
|
227
234
|
# nullable extension dtype, or read back by load(), must hash the same or it re-appends.
|
|
228
235
|
rows = pa.Table.from_pandas(_to_microseconds(df[list(spec.schema.names)]), schema=spec.schema, preserve_index=False)
|
|
229
|
-
return rows.to_pandas()
|
|
236
|
+
return rows.to_pandas(types_mapper=NULLABLE_DTYPES.get)
|
|
230
237
|
|
|
231
238
|
|
|
232
239
|
def _to_microseconds(df: pd.DataFrame) -> pd.DataFrame:
|
|
@@ -417,7 +417,7 @@ class BacktestReport:
|
|
|
417
417
|
if path_str.startswith("s3://"):
|
|
418
418
|
fs, normalized = resolve_fs(path_str)
|
|
419
419
|
content = html.encode("utf-8")
|
|
420
|
-
with fs.open_output_stream(normalized) as f:
|
|
420
|
+
with fs.open_output_stream(normalized, compression=None) as f:
|
|
421
421
|
f.write(content)
|
|
422
422
|
else:
|
|
423
423
|
Path(path_str).write_text(html)
|
|
@@ -429,7 +429,7 @@ class BacktestReport:
|
|
|
429
429
|
if path_str.startswith("s3://"):
|
|
430
430
|
fs, normalized = resolve_fs(path_str)
|
|
431
431
|
content = (json.dumps(data, indent=2, default=str) + "\n").encode("utf-8")
|
|
432
|
-
with fs.open_output_stream(normalized) as f:
|
|
432
|
+
with fs.open_output_stream(normalized, compression=None) as f:
|
|
433
433
|
f.write(content)
|
|
434
434
|
else:
|
|
435
435
|
Path(path_str).write_text(json.dumps(data, indent=2, default=str) + "\n")
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|