onetick-py 1.174.0__tar.gz → 1.176.0__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.
- {onetick_py-1.174.0/src/onetick_py.egg-info → onetick_py-1.176.0}/PKG-INFO +1 -1
- {onetick_py-1.174.0 → onetick_py-1.176.0}/src/onetick/py/_version.py +1 -1
- {onetick_py-1.174.0 → onetick_py-1.176.0}/src/onetick/py/aggregations/order_book.py +8 -0
- {onetick_py-1.174.0 → onetick_py-1.176.0}/src/onetick/py/compatibility.py +10 -0
- {onetick_py-1.174.0 → onetick_py-1.176.0}/src/onetick/py/core/_source/source_methods/joins.py +6 -1
- {onetick_py-1.174.0 → onetick_py-1.176.0}/src/onetick/py/core/_source/source_methods/merges.py +39 -0
- {onetick_py-1.174.0 → onetick_py-1.176.0}/src/onetick/py/core/column_operations/accessors/float_accessor.py +40 -36
- {onetick_py-1.174.0 → onetick_py-1.176.0}/src/onetick/py/sources/order_book.py +3 -0
- {onetick_py-1.174.0 → onetick_py-1.176.0}/src/onetick/py/sources/symbols.py +9 -1
- {onetick_py-1.174.0 → onetick_py-1.176.0}/src/onetick/py/types.py +8 -3
- {onetick_py-1.174.0 → onetick_py-1.176.0/src/onetick_py.egg-info}/PKG-INFO +1 -1
- {onetick_py-1.174.0 → onetick_py-1.176.0}/LICENSE +0 -0
- {onetick_py-1.174.0 → onetick_py-1.176.0}/README.md +0 -0
- {onetick_py-1.174.0 → onetick_py-1.176.0}/pyproject.toml +0 -0
- {onetick_py-1.174.0 → onetick_py-1.176.0}/requirements.strict.txt +0 -0
- {onetick_py-1.174.0 → onetick_py-1.176.0}/requirements.txt +0 -0
- {onetick_py-1.174.0 → onetick_py-1.176.0}/setup.cfg +0 -0
- {onetick_py-1.174.0 → onetick_py-1.176.0}/setup.py +0 -0
- {onetick_py-1.174.0 → onetick_py-1.176.0}/src/locator_parser/__init__.py +0 -0
- {onetick_py-1.174.0 → onetick_py-1.176.0}/src/locator_parser/acl.py +0 -0
- {onetick_py-1.174.0 → onetick_py-1.176.0}/src/locator_parser/actions.py +0 -0
- {onetick_py-1.174.0 → onetick_py-1.176.0}/src/locator_parser/common.py +0 -0
- {onetick_py-1.174.0 → onetick_py-1.176.0}/src/locator_parser/io.py +0 -0
- {onetick_py-1.174.0 → onetick_py-1.176.0}/src/locator_parser/locator.py +0 -0
- {onetick_py-1.174.0 → onetick_py-1.176.0}/src/onetick/__init__.py +0 -0
- {onetick_py-1.174.0 → onetick_py-1.176.0}/src/onetick/doc_utilities/__init__.py +0 -0
- {onetick_py-1.174.0 → onetick_py-1.176.0}/src/onetick/doc_utilities/napoleon.py +0 -0
- {onetick_py-1.174.0 → onetick_py-1.176.0}/src/onetick/doc_utilities/ot_doctest.py +0 -0
- {onetick_py-1.174.0 → onetick_py-1.176.0}/src/onetick/doc_utilities/snippets.py +0 -0
- {onetick_py-1.174.0 → onetick_py-1.176.0}/src/onetick/lib/__init__.py +0 -0
- {onetick_py-1.174.0 → onetick_py-1.176.0}/src/onetick/lib/instance.py +0 -0
- {onetick_py-1.174.0 → onetick_py-1.176.0}/src/onetick/py/__init__.py +0 -0
- {onetick_py-1.174.0 → onetick_py-1.176.0}/src/onetick/py/_stack_info.py +0 -0
- {onetick_py-1.174.0 → onetick_py-1.176.0}/src/onetick/py/aggregations/__init__.py +0 -0
- {onetick_py-1.174.0 → onetick_py-1.176.0}/src/onetick/py/aggregations/_base.py +0 -0
- {onetick_py-1.174.0 → onetick_py-1.176.0}/src/onetick/py/aggregations/_docs.py +0 -0
- {onetick_py-1.174.0 → onetick_py-1.176.0}/src/onetick/py/aggregations/compute.py +0 -0
- {onetick_py-1.174.0 → onetick_py-1.176.0}/src/onetick/py/aggregations/functions.py +0 -0
- {onetick_py-1.174.0 → onetick_py-1.176.0}/src/onetick/py/aggregations/generic.py +0 -0
- {onetick_py-1.174.0 → onetick_py-1.176.0}/src/onetick/py/aggregations/high_low.py +0 -0
- {onetick_py-1.174.0 → onetick_py-1.176.0}/src/onetick/py/aggregations/num_distinct.py +0 -0
- {onetick_py-1.174.0 → onetick_py-1.176.0}/src/onetick/py/aggregations/other.py +0 -0
- {onetick_py-1.174.0 → onetick_py-1.176.0}/src/onetick/py/backports.py +0 -0
- {onetick_py-1.174.0 → onetick_py-1.176.0}/src/onetick/py/cache.py +0 -0
- {onetick_py-1.174.0 → onetick_py-1.176.0}/src/onetick/py/callback/__init__.py +0 -0
- {onetick_py-1.174.0 → onetick_py-1.176.0}/src/onetick/py/callback/callback.py +0 -0
- {onetick_py-1.174.0 → onetick_py-1.176.0}/src/onetick/py/callback/callbacks.py +0 -0
- {onetick_py-1.174.0 → onetick_py-1.176.0}/src/onetick/py/configuration.py +0 -0
- {onetick_py-1.174.0 → onetick_py-1.176.0}/src/onetick/py/core/__init__.py +0 -0
- {onetick_py-1.174.0 → onetick_py-1.176.0}/src/onetick/py/core/_csv_inspector.py +0 -0
- {onetick_py-1.174.0 → onetick_py-1.176.0}/src/onetick/py/core/_internal/__init__.py +0 -0
- {onetick_py-1.174.0 → onetick_py-1.176.0}/src/onetick/py/core/_internal/_manually_bound_value.py +0 -0
- {onetick_py-1.174.0 → onetick_py-1.176.0}/src/onetick/py/core/_internal/_nodes_history.py +0 -0
- {onetick_py-1.174.0 → onetick_py-1.176.0}/src/onetick/py/core/_internal/_op_utils/__init__.py +0 -0
- {onetick_py-1.174.0 → onetick_py-1.176.0}/src/onetick/py/core/_internal/_op_utils/every_operand.py +0 -0
- {onetick_py-1.174.0 → onetick_py-1.176.0}/src/onetick/py/core/_internal/_op_utils/is_const.py +0 -0
- {onetick_py-1.174.0 → onetick_py-1.176.0}/src/onetick/py/core/_internal/_per_tick_scripts/tick_list_sort_template.script +0 -0
- {onetick_py-1.174.0 → onetick_py-1.176.0}/src/onetick/py/core/_internal/_proxy_node.py +0 -0
- {onetick_py-1.174.0 → onetick_py-1.176.0}/src/onetick/py/core/_internal/_state_objects.py +0 -0
- {onetick_py-1.174.0 → onetick_py-1.176.0}/src/onetick/py/core/_internal/_state_vars.py +0 -0
- {onetick_py-1.174.0 → onetick_py-1.176.0}/src/onetick/py/core/_source/__init__.py +0 -0
- {onetick_py-1.174.0 → onetick_py-1.176.0}/src/onetick/py/core/_source/_symbol_param.py +0 -0
- {onetick_py-1.174.0 → onetick_py-1.176.0}/src/onetick/py/core/_source/schema.py +0 -0
- {onetick_py-1.174.0 → onetick_py-1.176.0}/src/onetick/py/core/_source/source_methods/__init__.py +0 -0
- {onetick_py-1.174.0 → onetick_py-1.176.0}/src/onetick/py/core/_source/source_methods/aggregations.py +0 -0
- {onetick_py-1.174.0 → onetick_py-1.176.0}/src/onetick/py/core/_source/source_methods/applyers.py +0 -0
- {onetick_py-1.174.0 → onetick_py-1.176.0}/src/onetick/py/core/_source/source_methods/columns.py +0 -0
- {onetick_py-1.174.0 → onetick_py-1.176.0}/src/onetick/py/core/_source/source_methods/data_quality.py +0 -0
- {onetick_py-1.174.0 → onetick_py-1.176.0}/src/onetick/py/core/_source/source_methods/debugs.py +0 -0
- {onetick_py-1.174.0 → onetick_py-1.176.0}/src/onetick/py/core/_source/source_methods/drops.py +0 -0
- {onetick_py-1.174.0 → onetick_py-1.176.0}/src/onetick/py/core/_source/source_methods/fields.py +0 -0
- {onetick_py-1.174.0 → onetick_py-1.176.0}/src/onetick/py/core/_source/source_methods/filters.py +0 -0
- {onetick_py-1.174.0 → onetick_py-1.176.0}/src/onetick/py/core/_source/source_methods/misc.py +0 -0
- {onetick_py-1.174.0 → onetick_py-1.176.0}/src/onetick/py/core/_source/source_methods/pandases.py +0 -0
- {onetick_py-1.174.0 → onetick_py-1.176.0}/src/onetick/py/core/_source/source_methods/renames.py +0 -0
- {onetick_py-1.174.0 → onetick_py-1.176.0}/src/onetick/py/core/_source/source_methods/sorts.py +0 -0
- {onetick_py-1.174.0 → onetick_py-1.176.0}/src/onetick/py/core/_source/source_methods/switches.py +0 -0
- {onetick_py-1.174.0 → onetick_py-1.176.0}/src/onetick/py/core/_source/source_methods/symbols.py +0 -0
- {onetick_py-1.174.0 → onetick_py-1.176.0}/src/onetick/py/core/_source/source_methods/times.py +0 -0
- {onetick_py-1.174.0 → onetick_py-1.176.0}/src/onetick/py/core/_source/source_methods/writes.py +0 -0
- {onetick_py-1.174.0 → onetick_py-1.176.0}/src/onetick/py/core/_source/symbol.py +0 -0
- {onetick_py-1.174.0 → onetick_py-1.176.0}/src/onetick/py/core/_source/tmp_otq.py +0 -0
- {onetick_py-1.174.0 → onetick_py-1.176.0}/src/onetick/py/core/column.py +0 -0
- {onetick_py-1.174.0 → onetick_py-1.176.0}/src/onetick/py/core/column_operations/__init__.py +0 -0
- {onetick_py-1.174.0 → onetick_py-1.176.0}/src/onetick/py/core/column_operations/_methods/__init__.py +0 -0
- {onetick_py-1.174.0 → onetick_py-1.176.0}/src/onetick/py/core/column_operations/_methods/_internal.py +0 -0
- {onetick_py-1.174.0 → onetick_py-1.176.0}/src/onetick/py/core/column_operations/_methods/conversions.py +0 -0
- {onetick_py-1.174.0 → onetick_py-1.176.0}/src/onetick/py/core/column_operations/_methods/methods.py +0 -0
- {onetick_py-1.174.0 → onetick_py-1.176.0}/src/onetick/py/core/column_operations/_methods/op_types.py +0 -0
- {onetick_py-1.174.0 → onetick_py-1.176.0}/src/onetick/py/core/column_operations/accessors/__init__.py +0 -0
- {onetick_py-1.174.0 → onetick_py-1.176.0}/src/onetick/py/core/column_operations/accessors/_accessor.py +0 -0
- {onetick_py-1.174.0 → onetick_py-1.176.0}/src/onetick/py/core/column_operations/accessors/decimal_accessor.py +0 -0
- {onetick_py-1.174.0 → onetick_py-1.176.0}/src/onetick/py/core/column_operations/accessors/dt_accessor.py +0 -0
- {onetick_py-1.174.0 → onetick_py-1.176.0}/src/onetick/py/core/column_operations/accessors/str_accessor.py +0 -0
- {onetick_py-1.174.0 → onetick_py-1.176.0}/src/onetick/py/core/column_operations/base.py +0 -0
- {onetick_py-1.174.0 → onetick_py-1.176.0}/src/onetick/py/core/cut_builder.py +0 -0
- {onetick_py-1.174.0 → onetick_py-1.176.0}/src/onetick/py/core/db_constants.py +0 -0
- {onetick_py-1.174.0 → onetick_py-1.176.0}/src/onetick/py/core/eval_query.py +0 -0
- {onetick_py-1.174.0 → onetick_py-1.176.0}/src/onetick/py/core/lambda_object.py +0 -0
- {onetick_py-1.174.0 → onetick_py-1.176.0}/src/onetick/py/core/multi_output_source.py +0 -0
- {onetick_py-1.174.0 → onetick_py-1.176.0}/src/onetick/py/core/per_tick_script.py +0 -0
- {onetick_py-1.174.0 → onetick_py-1.176.0}/src/onetick/py/core/query_inspector.py +0 -0
- {onetick_py-1.174.0 → onetick_py-1.176.0}/src/onetick/py/core/source.py +0 -0
- {onetick_py-1.174.0 → onetick_py-1.176.0}/src/onetick/py/db/__init__.py +0 -0
- {onetick_py-1.174.0 → onetick_py-1.176.0}/src/onetick/py/db/_inspection.py +0 -0
- {onetick_py-1.174.0 → onetick_py-1.176.0}/src/onetick/py/db/db.py +0 -0
- {onetick_py-1.174.0 → onetick_py-1.176.0}/src/onetick/py/db/utils.py +0 -0
- {onetick_py-1.174.0 → onetick_py-1.176.0}/src/onetick/py/docs/__init__.py +0 -0
- {onetick_py-1.174.0 → onetick_py-1.176.0}/src/onetick/py/docs/docstring_parser.py +0 -0
- {onetick_py-1.174.0 → onetick_py-1.176.0}/src/onetick/py/docs/utils.py +0 -0
- {onetick_py-1.174.0 → onetick_py-1.176.0}/src/onetick/py/functions.py +0 -0
- {onetick_py-1.174.0 → onetick_py-1.176.0}/src/onetick/py/license.py +0 -0
- {onetick_py-1.174.0 → onetick_py-1.176.0}/src/onetick/py/log.py +0 -0
- {onetick_py-1.174.0 → onetick_py-1.176.0}/src/onetick/py/math.py +0 -0
- {onetick_py-1.174.0 → onetick_py-1.176.0}/src/onetick/py/misc.py +0 -0
- {onetick_py-1.174.0 → onetick_py-1.176.0}/src/onetick/py/oqd/__init__.py +0 -0
- {onetick_py-1.174.0 → onetick_py-1.176.0}/src/onetick/py/oqd/eps.py +0 -0
- {onetick_py-1.174.0 → onetick_py-1.176.0}/src/onetick/py/oqd/sources.py +0 -0
- {onetick_py-1.174.0 → onetick_py-1.176.0}/src/onetick/py/otq.py +0 -0
- {onetick_py-1.174.0 → onetick_py-1.176.0}/src/onetick/py/pyomd_mock.py +0 -0
- {onetick_py-1.174.0 → onetick_py-1.176.0}/src/onetick/py/run.py +0 -0
- {onetick_py-1.174.0 → onetick_py-1.176.0}/src/onetick/py/servers.py +0 -0
- {onetick_py-1.174.0 → onetick_py-1.176.0}/src/onetick/py/session.py +0 -0
- {onetick_py-1.174.0 → onetick_py-1.176.0}/src/onetick/py/sources/__init__.py +0 -0
- {onetick_py-1.174.0 → onetick_py-1.176.0}/src/onetick/py/sources/cache.py +0 -0
- {onetick_py-1.174.0 → onetick_py-1.176.0}/src/onetick/py/sources/common.py +0 -0
- {onetick_py-1.174.0 → onetick_py-1.176.0}/src/onetick/py/sources/csv.py +0 -0
- {onetick_py-1.174.0 → onetick_py-1.176.0}/src/onetick/py/sources/custom.py +0 -0
- {onetick_py-1.174.0 → onetick_py-1.176.0}/src/onetick/py/sources/data_file.py +0 -0
- {onetick_py-1.174.0 → onetick_py-1.176.0}/src/onetick/py/sources/data_source.py +0 -0
- {onetick_py-1.174.0 → onetick_py-1.176.0}/src/onetick/py/sources/empty.py +0 -0
- {onetick_py-1.174.0 → onetick_py-1.176.0}/src/onetick/py/sources/odbc.py +0 -0
- {onetick_py-1.174.0 → onetick_py-1.176.0}/src/onetick/py/sources/parquet.py +0 -0
- {onetick_py-1.174.0 → onetick_py-1.176.0}/src/onetick/py/sources/pit.py +0 -0
- {onetick_py-1.174.0 → onetick_py-1.176.0}/src/onetick/py/sources/query.py +0 -0
- {onetick_py-1.174.0 → onetick_py-1.176.0}/src/onetick/py/sources/snapshots.py +0 -0
- {onetick_py-1.174.0 → onetick_py-1.176.0}/src/onetick/py/sources/split_query_output_by_symbol.py +0 -0
- {onetick_py-1.174.0 → onetick_py-1.176.0}/src/onetick/py/sources/symbology_mapping.py +0 -0
- {onetick_py-1.174.0 → onetick_py-1.176.0}/src/onetick/py/sources/ticks.py +0 -0
- {onetick_py-1.174.0 → onetick_py-1.176.0}/src/onetick/py/sql.py +0 -0
- {onetick_py-1.174.0 → onetick_py-1.176.0}/src/onetick/py/state.py +0 -0
- {onetick_py-1.174.0 → onetick_py-1.176.0}/src/onetick/py/utils/__init__.py +0 -0
- {onetick_py-1.174.0 → onetick_py-1.176.0}/src/onetick/py/utils/acl.py +0 -0
- {onetick_py-1.174.0 → onetick_py-1.176.0}/src/onetick/py/utils/config.py +0 -0
- {onetick_py-1.174.0 → onetick_py-1.176.0}/src/onetick/py/utils/default.py +0 -0
- {onetick_py-1.174.0 → onetick_py-1.176.0}/src/onetick/py/utils/file.py +0 -0
- {onetick_py-1.174.0 → onetick_py-1.176.0}/src/onetick/py/utils/helpers.py +0 -0
- {onetick_py-1.174.0 → onetick_py-1.176.0}/src/onetick/py/utils/locator.py +0 -0
- {onetick_py-1.174.0 → onetick_py-1.176.0}/src/onetick/py/utils/perf.py +0 -0
- {onetick_py-1.174.0 → onetick_py-1.176.0}/src/onetick/py/utils/query.py +0 -0
- {onetick_py-1.174.0 → onetick_py-1.176.0}/src/onetick/py/utils/render.py +0 -0
- {onetick_py-1.174.0 → onetick_py-1.176.0}/src/onetick/py/utils/script.py +0 -0
- {onetick_py-1.174.0 → onetick_py-1.176.0}/src/onetick/py/utils/temp.py +0 -0
- {onetick_py-1.174.0 → onetick_py-1.176.0}/src/onetick/py/utils/types.py +0 -0
- {onetick_py-1.174.0 → onetick_py-1.176.0}/src/onetick/py/utils/tz.py +0 -0
- {onetick_py-1.174.0 → onetick_py-1.176.0}/src/onetick_py.egg-info/SOURCES.txt +0 -0
- {onetick_py-1.174.0 → onetick_py-1.176.0}/src/onetick_py.egg-info/dependency_links.txt +0 -0
- {onetick_py-1.174.0 → onetick_py-1.176.0}/src/onetick_py.egg-info/entry_points.txt +0 -0
- {onetick_py-1.174.0 → onetick_py-1.176.0}/src/onetick_py.egg-info/requires.txt +0 -0
- {onetick_py-1.174.0 → onetick_py-1.176.0}/src/onetick_py.egg-info/top_level.txt +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
# This file was generated automatically. DO NOT CHANGE.
|
|
2
|
-
VERSION = '1.
|
|
2
|
+
VERSION = '1.176.0'
|
|
@@ -147,6 +147,7 @@ class _OrderBookAggregation(_Aggregation, ABC):
|
|
|
147
147
|
self.book_uncross_method = book_uncross_method
|
|
148
148
|
self.dq_events_that_clear_book = ','.join(dq_events_that_clear_book) if dq_events_that_clear_book else None
|
|
149
149
|
self.bound_symbols = None
|
|
150
|
+
self._validate_ob_input_columns = True
|
|
150
151
|
|
|
151
152
|
super().__init__(_Column('TIMESTAMP'), *args, **kwargs)
|
|
152
153
|
|
|
@@ -163,8 +164,15 @@ class _OrderBookAggregation(_Aggregation, ABC):
|
|
|
163
164
|
raise ValueError("'bucket_units' can be one of the following: "
|
|
164
165
|
f"'{', '.join(valid_units)}'; however, '{self.bucket_units}' was passed")
|
|
165
166
|
|
|
167
|
+
def disable_ob_input_columns_validation(self):
|
|
168
|
+
self._validate_ob_input_columns = False
|
|
169
|
+
|
|
166
170
|
def validate_input_columns(self, src: 'Source'):
|
|
167
171
|
super().validate_input_columns(src)
|
|
172
|
+
|
|
173
|
+
if not self._validate_ob_input_columns:
|
|
174
|
+
return
|
|
175
|
+
|
|
168
176
|
if any([
|
|
169
177
|
not {'BUY_SELL_FLAG', 'PRICE', 'SIZE'}.issubset(src.schema),
|
|
170
178
|
'UPDATE_TIME' not in src.schema and 'DELETED_TIME' not in src.schema
|
|
@@ -779,3 +779,13 @@ def is_show_db_list_show_description_supported():
|
|
|
779
779
|
# However on 20240330 builds it returns SHOW_DESCRIPTION column instead of DESCRIPTION
|
|
780
780
|
return _is_min_build_or_version(1.25, 20241229055942,
|
|
781
781
|
20240501000000)
|
|
782
|
+
|
|
783
|
+
|
|
784
|
+
def is_symbols_prepend_db_name_supported():
|
|
785
|
+
# 20250924: Implemented 0036753: FIND_DB_SYMBOLS should have EP parameter PREPEND_DB_NAME (true by default)
|
|
786
|
+
return hasattr(otq.FindDbSymbols.Parameters, 'prepend_db_name')
|
|
787
|
+
|
|
788
|
+
|
|
789
|
+
def is_diff_show_all_ticks_supported():
|
|
790
|
+
# 20250919: Implemented 0036784: Add SHOW_ALL_TICKS(false by default) ep parameter to DIFF EP.
|
|
791
|
+
return hasattr(otq.Diff.Parameters, 'show_all_ticks')
|
{onetick_py-1.174.0 → onetick_py-1.176.0}/src/onetick/py/core/_source/source_methods/joins.py
RENAMED
|
@@ -104,7 +104,12 @@ def _columns_to_params_for_joins(columns, query_params=False):
|
|
|
104
104
|
get_msecs_expression(value) + "+'.'+SUBSTR(NSECTIME_FORMAT('%J'," + str(value) + ",_TIMEZONE),3,6)"
|
|
105
105
|
)
|
|
106
106
|
else:
|
|
107
|
-
|
|
107
|
+
if issubclass(dtype, float) or dtype is otp.decimal:
|
|
108
|
+
warnings.warn(f"Parameter '{key}' is of {dtype} type.\n"
|
|
109
|
+
"Parameters passed to query will have to be converted to string"
|
|
110
|
+
" so the precision may be lost (default precision of 8 will be used).\n"
|
|
111
|
+
"Use other types like integers or strings to pass parameters with higher precision.")
|
|
112
|
+
convert_rule += "tostring(" + ott.value2str(value) + ")"
|
|
108
113
|
params_list.append(convert_rule)
|
|
109
114
|
return "+','+".join(params_list)
|
|
110
115
|
|
{onetick_py-1.174.0 → onetick_py-1.176.0}/src/onetick/py/core/_source/source_methods/merges.py
RENAMED
|
@@ -16,6 +16,7 @@ from onetick.py.aggregations._docs import (
|
|
|
16
16
|
)
|
|
17
17
|
from onetick.py.docs.utils import docstring, param_doc
|
|
18
18
|
from onetick.py.aggregations._base import _Aggregation
|
|
19
|
+
from onetick.py.compatibility import is_diff_show_all_ticks_supported
|
|
19
20
|
|
|
20
21
|
|
|
21
22
|
if TYPE_CHECKING:
|
|
@@ -51,6 +52,7 @@ def diff(self: 'Source', other: 'Source',
|
|
|
51
52
|
output_ignored_fields: Optional[bool] = None,
|
|
52
53
|
show_only_fields_that_differ: Optional[bool] = None,
|
|
53
54
|
show_matching_ticks: Optional[bool] = None,
|
|
55
|
+
show_all_ticks: bool = False,
|
|
54
56
|
non_decreasing_value_fields: Optional[Union[str, List[str]]] = None,
|
|
55
57
|
threshold: Optional[int] = None,
|
|
56
58
|
left_prefix: str = 'L',
|
|
@@ -97,6 +99,15 @@ def diff(self: 'Source', other: 'Source',
|
|
|
97
99
|
instead of unmatched ticks.
|
|
98
100
|
The output tick timestamp is equal to the earliest timestamp of its corresponding input ticks.
|
|
99
101
|
Default value is False.
|
|
102
|
+
show_all_ticks: bool
|
|
103
|
+
If specified, the output of this EP consists of both matched and unmatched ticks from both input time series.
|
|
104
|
+
``MATCH_STATUS`` field will be added to the output tick with the possible values of:
|
|
105
|
+
|
|
106
|
+
* ``0`` - different ticks
|
|
107
|
+
* ``1`` - matching ticks
|
|
108
|
+
* ``2`` - tick from one source only
|
|
109
|
+
|
|
110
|
+
Default: ``False``
|
|
100
111
|
non_decreasing_value_fields:
|
|
101
112
|
List of *non-decreasing* value fields to be used for matching.
|
|
102
113
|
If value of this parameter is **TIMESTAMP** (default), it compares two time series based on tick timestamp.
|
|
@@ -170,6 +181,24 @@ def diff(self: 'Source', other: 'Source',
|
|
|
170
181
|
1 2003-12-01 00:00:01 1 3 1 4
|
|
171
182
|
2 2003-12-01 00:00:02 1 4 1 6
|
|
172
183
|
3 2003-12-01 00:00:02 1 5 1 7
|
|
184
|
+
|
|
185
|
+
Showing diff for every tick with ``show_all_ticks`` parameter:
|
|
186
|
+
|
|
187
|
+
.. testcode::
|
|
188
|
+
:skipif: not otp.compatibility.is_diff_show_all_ticks_supported()
|
|
189
|
+
|
|
190
|
+
t = otp.Ticks(A=[1, 2, 3], B=[0, 0, 1])
|
|
191
|
+
q = otp.Ticks(A=[1, 3], B=[0, 0])
|
|
192
|
+
data = t.diff(q, show_all_ticks=True)
|
|
193
|
+
print(otp.run(data))
|
|
194
|
+
|
|
195
|
+
.. testoutput::
|
|
196
|
+
|
|
197
|
+
Time MATCH_STATUS L.A R.A L.B
|
|
198
|
+
0 2003-12-01 00:00:00.000 1 0 0 0
|
|
199
|
+
1 2003-12-01 00:00:00.001 0 2 3 0
|
|
200
|
+
2 2003-12-01 00:00:00.002 2 3 0 1
|
|
201
|
+
|
|
173
202
|
"""
|
|
174
203
|
|
|
175
204
|
if not fields:
|
|
@@ -210,6 +239,13 @@ def diff(self: 'Source', other: 'Source',
|
|
|
210
239
|
raise ValueError(
|
|
211
240
|
"Parameters 'output_ignored_fields' and 'show_only_fields_that_differ' can't be set at the same time"
|
|
212
241
|
)
|
|
242
|
+
|
|
243
|
+
if show_all_ticks:
|
|
244
|
+
if not is_diff_show_all_ticks_supported():
|
|
245
|
+
raise RuntimeError('`show_all_ticks` parameter not supported on current OneTick version')
|
|
246
|
+
|
|
247
|
+
ep_params['show_all_ticks'] = show_all_ticks
|
|
248
|
+
|
|
213
249
|
if show_only_fields_that_differ is None and output_ignored_fields is None:
|
|
214
250
|
if ignore:
|
|
215
251
|
ep_params['output_ignored_fields'] = True
|
|
@@ -241,6 +277,9 @@ def diff(self: 'Source', other: 'Source',
|
|
|
241
277
|
continue
|
|
242
278
|
schema[f'{src_prefix}.{field}'] = dtype
|
|
243
279
|
|
|
280
|
+
if show_all_ticks:
|
|
281
|
+
schema['MATCH_STATUS'] = int
|
|
282
|
+
|
|
244
283
|
result = otp.Source(
|
|
245
284
|
node=otq.Diff(**ep_params),
|
|
246
285
|
schema=schema,
|
|
@@ -37,29 +37,32 @@ class _FloatAccessor(_Accessor):
|
|
|
37
37
|
Examples
|
|
38
38
|
--------
|
|
39
39
|
|
|
40
|
-
>>> data = otp.Ticks(X=[1, 2.17, 10.31861, 3.141593])
|
|
40
|
+
>>> data = otp.Ticks(X=[1, 2.17, 10.31861, 3.141593, otp.nan, otp.inf, -otp.inf])
|
|
41
41
|
>>> # OTdirective: snippet-name: float operations.to string.constant precision;
|
|
42
|
-
>>> data["
|
|
43
|
-
>>>
|
|
44
|
-
|
|
45
|
-
0
|
|
46
|
-
1
|
|
47
|
-
2
|
|
48
|
-
3
|
|
49
|
-
|
|
42
|
+
>>> data["Y"] = data["X"].float.str(15, 3)
|
|
43
|
+
>>> otp.run(data)
|
|
44
|
+
Time X Y
|
|
45
|
+
0 2003-12-01 00:00:00.000 1.000000 1.000
|
|
46
|
+
1 2003-12-01 00:00:00.001 2.170000 2.170
|
|
47
|
+
2 2003-12-01 00:00:00.002 10.318610 10.319
|
|
48
|
+
3 2003-12-01 00:00:00.003 3.141593 3.142
|
|
49
|
+
4 2003-12-01 00:00:00.004 NaN nan
|
|
50
|
+
5 2003-12-01 00:00:00.005 inf inf
|
|
51
|
+
6 2003-12-01 00:00:00.006 -inf -inf
|
|
52
|
+
|
|
53
|
+
Parameters ``length`` and ``precision`` can also be taken from the columns:
|
|
50
54
|
|
|
51
55
|
>>> data = otp.Ticks(X=[1, 2.17, 10.31841, 3.141593],
|
|
52
56
|
... LENGTH=[2, 3, 4, 5],
|
|
53
57
|
... PRECISION=[5, 5, 3, 3])
|
|
54
58
|
>>> # OTdirective: snippet-name: float operations.to string.precision from fields;
|
|
55
|
-
>>> data["
|
|
56
|
-
>>>
|
|
57
|
-
|
|
58
|
-
0
|
|
59
|
-
1 2.2
|
|
60
|
-
2
|
|
61
|
-
3
|
|
62
|
-
Name: X, dtype: object
|
|
59
|
+
>>> data["Y"] = data["X"].float.str(data["LENGTH"], data["PRECISION"])
|
|
60
|
+
>>> otp.run(data)
|
|
61
|
+
Time X LENGTH PRECISION Y
|
|
62
|
+
0 2003-12-01 00:00:00.000 1.000000 2 5 1
|
|
63
|
+
1 2003-12-01 00:00:00.001 2.170000 3 5 2.2
|
|
64
|
+
2 2003-12-01 00:00:00.002 10.318410 4 3 10.3
|
|
65
|
+
3 2003-12-01 00:00:00.003 3.141593 5 3 3.142
|
|
63
66
|
"""
|
|
64
67
|
dtype = ott.string[length] if isinstance(length, int) else str
|
|
65
68
|
|
|
@@ -67,7 +70,10 @@ class _FloatAccessor(_Accessor):
|
|
|
67
70
|
column = ott.value2str(column)
|
|
68
71
|
_length = ott.value2str(_length)
|
|
69
72
|
_precision = ott.value2str(_precision)
|
|
70
|
-
|
|
73
|
+
str_expr = f"str({column}, {_length}, {_precision})"
|
|
74
|
+
# BDS-478: str() function raises exception for nan and inf values, so converting them manually
|
|
75
|
+
str_expr = f'CASE({column}, NAN(), "nan", INFINITY(), "inf", -INFINITY(), "-inf", {str_expr})'
|
|
76
|
+
return str_expr
|
|
71
77
|
|
|
72
78
|
return _FloatAccessor.Formatter(
|
|
73
79
|
op_params=[self._base_column, length, precision],
|
|
@@ -108,15 +114,14 @@ class _FloatAccessor(_Accessor):
|
|
|
108
114
|
... OTHER=[1.01, 2.1, 10.32841, 3.14, 5],
|
|
109
115
|
... EPS=[0, 1, 0.1, 0.001, 0.001])
|
|
110
116
|
>>> # OTdirective: snippet-name: float operations.approximate comparison.lt|eq|gt;
|
|
111
|
-
>>> data["
|
|
112
|
-
>>>
|
|
113
|
-
|
|
114
|
-
0 -1.0
|
|
115
|
-
1
|
|
116
|
-
2
|
|
117
|
-
3
|
|
118
|
-
4
|
|
119
|
-
Name: X, dtype: float64
|
|
117
|
+
>>> data["Y"] = data["X"].float.cmp(data["OTHER"], data["EPS"])
|
|
118
|
+
>>> otp.run(data)
|
|
119
|
+
Time X OTHER EPS Y
|
|
120
|
+
0 2003-12-01 00:00:00.000 1.000000 1.01000 0.000 -1.0
|
|
121
|
+
1 2003-12-01 00:00:00.001 2.170000 2.10000 1.000 0.0
|
|
122
|
+
2 2003-12-01 00:00:00.002 10.318410 10.32841 0.100 0.0
|
|
123
|
+
3 2003-12-01 00:00:00.003 3.141593 3.14000 0.001 0.0
|
|
124
|
+
4 2003-12-01 00:00:00.004 6.000000 5.00000 0.001 1.0
|
|
120
125
|
"""
|
|
121
126
|
def formatter(column, _other, _eps):
|
|
122
127
|
column = ott.value2str(column)
|
|
@@ -157,15 +162,14 @@ class _FloatAccessor(_Accessor):
|
|
|
157
162
|
... OTHER=[1.01, 2.1, 10.32841, 3.14, 5],
|
|
158
163
|
... DELTA=[0, 1, 0.1, 0.01, 0.001])
|
|
159
164
|
>>> # OTdirective: snippet-name: float operations.approximate comparison.eq;
|
|
160
|
-
>>> data["
|
|
161
|
-
>>>
|
|
162
|
-
|
|
163
|
-
0
|
|
164
|
-
1
|
|
165
|
-
2
|
|
166
|
-
3
|
|
167
|
-
4
|
|
168
|
-
Name: X, dtype: float64
|
|
165
|
+
>>> data["Y"] = (1 + data["X"] - 1).float.eq(data["OTHER"], data["DELTA"])
|
|
166
|
+
>>> otp.run(data)
|
|
167
|
+
Time X OTHER DELTA Y
|
|
168
|
+
0 2003-12-01 00:00:00.000 1.000000 1.01000 0.000 0.0
|
|
169
|
+
1 2003-12-01 00:00:00.001 2.170000 2.10000 1.000 1.0
|
|
170
|
+
2 2003-12-01 00:00:00.002 10.318410 10.32841 0.100 1.0
|
|
171
|
+
3 2003-12-01 00:00:00.003 3.141593 3.14000 0.010 1.0
|
|
172
|
+
4 2003-12-01 00:00:00.004 6.000000 5.00000 0.001 0.0
|
|
169
173
|
"""
|
|
170
174
|
def formatter(column, _other, _delta):
|
|
171
175
|
column = ott.value2str(column)
|
|
@@ -58,6 +58,9 @@ class _ObSource(DataSource):
|
|
|
58
58
|
|
|
59
59
|
self._ob_agg = self.__class__.OB_AGG_FUNC(**ob_agg_params)
|
|
60
60
|
|
|
61
|
+
if kwargs.get('schema_policy') in [DataSource.POLICY_MANUAL, DataSource.POLICY_MANUAL_STRICT]:
|
|
62
|
+
self._ob_agg.disable_ob_input_columns_validation()
|
|
63
|
+
|
|
61
64
|
if use_bound_symbols:
|
|
62
65
|
self._ob_agg.set_bound_symbols(symbols)
|
|
63
66
|
|
|
@@ -7,6 +7,7 @@ from onetick.py.core.source import Source
|
|
|
7
7
|
from onetick.py.core.column_operations.base import Raw, OnetickParameter
|
|
8
8
|
from onetick.py.core.eval_query import _QueryEvalWrapper
|
|
9
9
|
from onetick.py.core._source.tmp_otq import TmpOtq
|
|
10
|
+
from onetick.py.compatibility import is_symbols_prepend_db_name_supported
|
|
10
11
|
|
|
11
12
|
from .. import types as ott
|
|
12
13
|
from .. import utils
|
|
@@ -303,6 +304,9 @@ class Symbols(Source):
|
|
|
303
304
|
_find_params.setdefault('symbology', symbology)
|
|
304
305
|
_find_params.setdefault('show_original_symbols', show_original_symbols)
|
|
305
306
|
|
|
307
|
+
if 'prepend_db_name' in _find_params:
|
|
308
|
+
raise ValueError('Use parameter `keep_db` instead of passing `prepend_db_name` in `find_params`')
|
|
309
|
+
|
|
306
310
|
if discard_on_match is not None:
|
|
307
311
|
_find_params.setdefault('discard_on_match', discard_on_match)
|
|
308
312
|
if cep_method is not None:
|
|
@@ -346,12 +350,16 @@ class Symbols(Source):
|
|
|
346
350
|
self._tmp_otq.merge(_tmp_otq)
|
|
347
351
|
|
|
348
352
|
def base_ep(self, ep_tick_type, keep_db, **params):
|
|
353
|
+
use_prepend_db_name = is_symbols_prepend_db_name_supported()
|
|
354
|
+
if use_prepend_db_name and not keep_db:
|
|
355
|
+
params['prepend_db_name'] = False
|
|
356
|
+
|
|
349
357
|
src = Source(otq.FindDbSymbols(**params))
|
|
350
358
|
|
|
351
359
|
update_node_tick_type(src, ep_tick_type)
|
|
352
360
|
src.schema['SYMBOL_NAME'] = str
|
|
353
361
|
|
|
354
|
-
if not keep_db:
|
|
362
|
+
if not keep_db and not use_prepend_db_name:
|
|
355
363
|
src["SYMBOL_NAME"] = src["SYMBOL_NAME"].str.regex_replace('.*::', '')
|
|
356
364
|
|
|
357
365
|
return src
|
|
@@ -807,9 +807,10 @@ class decimal:
|
|
|
807
807
|
return super().__new__(cls)
|
|
808
808
|
|
|
809
809
|
def __init__(self, value):
|
|
810
|
-
|
|
810
|
+
from onetick.py.core.column_operations.base import OnetickParameter
|
|
811
|
+
supported_types = (str, int, float, OnetickParameter)
|
|
811
812
|
if not isinstance(value, supported_types):
|
|
812
|
-
raise TypeError("Parameter 'value' must be one of these types: {supported_types}")
|
|
813
|
+
raise TypeError(f"Parameter 'value' must be one of these types: {supported_types}, got {type(value)}")
|
|
813
814
|
self.__value = value
|
|
814
815
|
|
|
815
816
|
@classmethod
|
|
@@ -819,7 +820,11 @@ class decimal:
|
|
|
819
820
|
|
|
820
821
|
def _to_onetick_string(self):
|
|
821
822
|
# called by ott.value2str
|
|
822
|
-
|
|
823
|
+
from onetick.py.core.column_operations.base import OnetickParameter
|
|
824
|
+
if isinstance(self.__value, OnetickParameter):
|
|
825
|
+
value = self.__value
|
|
826
|
+
else:
|
|
827
|
+
value = str(self.__value)
|
|
823
828
|
return f'STRING_TO_DECIMAL({value2str(value)})'
|
|
824
829
|
|
|
825
830
|
def to_operation(self):
|
|
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
|
{onetick_py-1.174.0 → onetick_py-1.176.0}/src/onetick/py/core/_internal/_manually_bound_value.py
RENAMED
|
File without changes
|
|
File without changes
|
{onetick_py-1.174.0 → onetick_py-1.176.0}/src/onetick/py/core/_internal/_op_utils/__init__.py
RENAMED
|
File without changes
|
{onetick_py-1.174.0 → onetick_py-1.176.0}/src/onetick/py/core/_internal/_op_utils/every_operand.py
RENAMED
|
File without changes
|
{onetick_py-1.174.0 → onetick_py-1.176.0}/src/onetick/py/core/_internal/_op_utils/is_const.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{onetick_py-1.174.0 → onetick_py-1.176.0}/src/onetick/py/core/_source/source_methods/__init__.py
RENAMED
|
File without changes
|
{onetick_py-1.174.0 → onetick_py-1.176.0}/src/onetick/py/core/_source/source_methods/aggregations.py
RENAMED
|
File without changes
|
{onetick_py-1.174.0 → onetick_py-1.176.0}/src/onetick/py/core/_source/source_methods/applyers.py
RENAMED
|
File without changes
|
{onetick_py-1.174.0 → onetick_py-1.176.0}/src/onetick/py/core/_source/source_methods/columns.py
RENAMED
|
File without changes
|
{onetick_py-1.174.0 → onetick_py-1.176.0}/src/onetick/py/core/_source/source_methods/data_quality.py
RENAMED
|
File without changes
|
{onetick_py-1.174.0 → onetick_py-1.176.0}/src/onetick/py/core/_source/source_methods/debugs.py
RENAMED
|
File without changes
|
{onetick_py-1.174.0 → onetick_py-1.176.0}/src/onetick/py/core/_source/source_methods/drops.py
RENAMED
|
File without changes
|
{onetick_py-1.174.0 → onetick_py-1.176.0}/src/onetick/py/core/_source/source_methods/fields.py
RENAMED
|
File without changes
|
{onetick_py-1.174.0 → onetick_py-1.176.0}/src/onetick/py/core/_source/source_methods/filters.py
RENAMED
|
File without changes
|
{onetick_py-1.174.0 → onetick_py-1.176.0}/src/onetick/py/core/_source/source_methods/misc.py
RENAMED
|
File without changes
|
{onetick_py-1.174.0 → onetick_py-1.176.0}/src/onetick/py/core/_source/source_methods/pandases.py
RENAMED
|
File without changes
|
{onetick_py-1.174.0 → onetick_py-1.176.0}/src/onetick/py/core/_source/source_methods/renames.py
RENAMED
|
File without changes
|
{onetick_py-1.174.0 → onetick_py-1.176.0}/src/onetick/py/core/_source/source_methods/sorts.py
RENAMED
|
File without changes
|
{onetick_py-1.174.0 → onetick_py-1.176.0}/src/onetick/py/core/_source/source_methods/switches.py
RENAMED
|
File without changes
|
{onetick_py-1.174.0 → onetick_py-1.176.0}/src/onetick/py/core/_source/source_methods/symbols.py
RENAMED
|
File without changes
|
{onetick_py-1.174.0 → onetick_py-1.176.0}/src/onetick/py/core/_source/source_methods/times.py
RENAMED
|
File without changes
|
{onetick_py-1.174.0 → onetick_py-1.176.0}/src/onetick/py/core/_source/source_methods/writes.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{onetick_py-1.174.0 → onetick_py-1.176.0}/src/onetick/py/core/column_operations/_methods/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{onetick_py-1.174.0 → onetick_py-1.176.0}/src/onetick/py/core/column_operations/_methods/methods.py
RENAMED
|
File without changes
|
{onetick_py-1.174.0 → onetick_py-1.176.0}/src/onetick/py/core/column_operations/_methods/op_types.py
RENAMED
|
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
|
{onetick_py-1.174.0 → onetick_py-1.176.0}/src/onetick/py/sources/split_query_output_by_symbol.py
RENAMED
|
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
|