data conversion, not data conversation

* we're not talking to the data yet ...
This commit is contained in:
Matthias 2020-01-05 09:55:02 +01:00
parent 2409261cb7
commit f82c4346b6
6 changed files with 13 additions and 13 deletions

View File

@ -78,9 +78,9 @@ optional arguments:
Show profits for only these pairs. Pairs are space- Show profits for only these pairs. Pairs are space-
separated. separated.
--format-from {json,jsongz} --format-from {json,jsongz}
Source format for data conversation. Source format for data conversion.
--format-to {json,jsongz} --format-to {json,jsongz}
Destination format for data conversation. Destination format for data conversion.
--erase Clean all existing data for the selected --erase Clean all existing data for the selected
exchange/pairs/timeframes. exchange/pairs/timeframes.
-t {1m,3m,5m,15m,30m,1h,2h,4h,6h,8h,12h,1d,3d,1w} [{1m,3m,5m,15m,30m,1h,2h,4h,6h,8h,12h,1d,3d,1w} ...], --timeframes {1m,3m,5m,15m,30m,1h,2h,4h,6h,8h,12h,1d,3d,1w} [{1m,3m,5m,15m,30m,1h,2h,4h,6h,8h,12h,1d,3d,1w} ...] -t {1m,3m,5m,15m,30m,1h,2h,4h,6h,8h,12h,1d,3d,1w} [{1m,3m,5m,15m,30m,1h,2h,4h,6h,8h,12h,1d,3d,1w} ...], --timeframes {1m,3m,5m,15m,30m,1h,2h,4h,6h,8h,12h,1d,3d,1w} [{1m,3m,5m,15m,30m,1h,2h,4h,6h,8h,12h,1d,3d,1w} ...]
@ -127,9 +127,9 @@ optional arguments:
Show profits for only these pairs. Pairs are space- Show profits for only these pairs. Pairs are space-
separated. separated.
--format-from {json,jsongz} --format-from {json,jsongz}
Source format for data conversation. Source format for data conversion.
--format-to {json,jsongz} --format-to {json,jsongz}
Destination format for data conversation. Destination format for data conversion.
--erase Clean all existing data for the selected --erase Clean all existing data for the selected
exchange/pairs/timeframes. exchange/pairs/timeframes.

View File

@ -264,14 +264,14 @@ class Arguments:
convert_data_cmd.set_defaults(func=partial(start_convert_data, ohlcv=True)) convert_data_cmd.set_defaults(func=partial(start_convert_data, ohlcv=True))
self._build_args(optionlist=ARGS_CONVERT_DATA_OHLCV, parser=convert_data_cmd) self._build_args(optionlist=ARGS_CONVERT_DATA_OHLCV, parser=convert_data_cmd)
# Add convert-data subcommand # Add convert-trade-data subcommand
convert_data_cmd = subparsers.add_parser( convert_trade_data_cmd = subparsers.add_parser(
'convert-trade-data', 'convert-trade-data',
help='Convert trade-data from one format to another.', help='Convert trade-data from one format to another.',
parents=[_common_parser], parents=[_common_parser],
) )
convert_data_cmd.set_defaults(func=partial(start_convert_data, ohlcv=False)) convert_trade_data_cmd.set_defaults(func=partial(start_convert_data, ohlcv=False))
self._build_args(optionlist=ARGS_CONVERT_DATA, parser=convert_data_cmd) self._build_args(optionlist=ARGS_CONVERT_DATA, parser=convert_trade_data_cmd)
# Add Plotting subcommand # Add Plotting subcommand
plot_dataframe_cmd = subparsers.add_parser( plot_dataframe_cmd = subparsers.add_parser(

View File

@ -334,13 +334,13 @@ AVAILABLE_CLI_OPTIONS = {
), ),
"format_from": Arg( "format_from": Arg(
'--format-from', '--format-from',
help='Source format for data conversation.', help='Source format for data conversion.',
choices=constants.AVAILABLE_DATAHANDLERS, choices=constants.AVAILABLE_DATAHANDLERS,
required=True, required=True,
), ),
"format_to": Arg( "format_to": Arg(
'--format-to', '--format-to',
help='Destination format for data conversation.', help='Destination format for data conversion.',
choices=constants.AVAILABLE_DATAHANDLERS, choices=constants.AVAILABLE_DATAHANDLERS,
required=True, required=True,
), ),

View File

@ -132,7 +132,7 @@ def _load_cached_data_for_updating(pair: str, timeframe: str, timerange: Optiona
start = None start = None
if timerange: if timerange:
if timerange.starttype == 'date': if timerange.starttype == 'date':
# TODO: convert to date for conversation # TODO: convert to date for conversion
start = datetime.fromtimestamp(timerange.startts, tz=timezone.utc) start = datetime.fromtimestamp(timerange.startts, tz=timezone.utc)
# Intentionally don't pass timerange in - since we need to load the full dataset. # Intentionally don't pass timerange in - since we need to load the full dataset.

View File

@ -52,7 +52,7 @@ class IDataHandler(ABC):
) -> DataFrame: ) -> DataFrame:
""" """
Internal method used to load data for one pair from disk. Internal method used to load data for one pair from disk.
Implements the loading and conversation to a Pandas dataframe. Implements the loading and conversion to a Pandas dataframe.
Timerange trimming and dataframe validation happens outside of this method. Timerange trimming and dataframe validation happens outside of this method.
:param pair: Pair to load data :param pair: Pair to load data
:param timeframe: Ticker timeframe (e.g. "5m") :param timeframe: Ticker timeframe (e.g. "5m")

View File

@ -57,7 +57,7 @@ class JsonDataHandler(IDataHandler):
) -> DataFrame: ) -> DataFrame:
""" """
Internal method used to load data for one pair from disk. Internal method used to load data for one pair from disk.
Implements the loading and conversation to a Pandas dataframe. Implements the loading and conversion to a Pandas dataframe.
Timerange trimming and dataframe validation happens outside of this method. Timerange trimming and dataframe validation happens outside of this method.
:param pair: Pair to load data :param pair: Pair to load data
:param timeframe: Ticker timeframe (e.g. "5m") :param timeframe: Ticker timeframe (e.g. "5m")