Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Collector metadata #1184

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

valouvaliavlo
Copy link
Contributor

@@ -87,6 +84,8 @@ async def start(self):
f"[{time_frame_index}/{len(self.time_frames)}] Collecting {symbol} history on {time_frame}...")
await self.get_ohlcv_history(self.exchange_name, symbol, time_frame)
await self.get_kline_history(self.exchange_name, symbol, time_frame)
# create description
await self._create_description()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we also move this line in bot_snapshot_with_history_collector.py please ?

assert collector.temp_file_path is not None
assert not os.path.isfile(collector.temp_file_path)
assert os.path.isfile(collector.file_path)
assert os.path.isfile(collector.metadata_file_path)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

assert os.path.isfile(collector.file_path)
async with collector_database(collector) as database:
ohlcv = await database.select(enums.ExchangeDataTables.OHLCV)
# use > to take into account new possible candles since collect max time is not specified
assert len(ohlcv) > 19316
h_ohlcv = await database.select(enums.ExchangeDataTables.OHLCV, time_frame="4h")
assert len(h_ohlcv) == len(symbols) * BINANCE_MAX_CANDLES_COUNT
symbols_description = json.loads((await database.select(enums.DataTables.DESCRIPTION))[0][3])
symbols_description = data.get_metadata_description(collector.metadata_file_path)\
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@GuillaumeDSM
Copy link
Member

can we also rebase and target this branch towards the dev branch please ?

assert os.path.isfile(collector.file_path)
async with collector_database(collector) as database:
ohlcv = await database.select(enums.ExchangeDataTables.OHLCV)
# use > to take into account new possible candles since collect max time is not specified
assert len(ohlcv) > 19316
h_ohlcv = await database.select(enums.ExchangeDataTables.OHLCV, time_frame="4h")
assert len(h_ohlcv) == len(symbols) * BINANCE_MAX_CANDLES_COUNT
symbols_description = json.loads((await database.select(enums.DataTables.DESCRIPTION))[0][3])
symbols_description = data.get_metadata_description(collector.metadata_file_path)\
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
symbols_description = data.get_metadata_description(collector.metadata_file_path)\
symbols_description = data.get_metadata_description(collector.file_path)\

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants