Refactoring source code to be fully a bot#21
Conversation
Signed-off-by: apentori <pentori.alexis@proton.me>
Signed-off-by: apentori <pentori.alexis@proton.me>
Signed-off-by: apentori <pentori.alexis@proton.me>
Signed-off-by: apentori <pentori.alexis@proton.me>
Signed-off-by: apentori <pentori.alexis@proton.me>
Signed-off-by: apentori <pentori.alexis@proton.me>
Signed-off-by: apentori <pentori.alexis@proton.me>
Signed-off-by: apentori <pentori.alexis@proton.me>
Renaming configuration for lisibility Signed-off-by: apentori <pentori.alexis@proton.me>
There was a problem hiding this comment.
Seems an overkill for the project. Looks like a Dagster Config.
There was a problem hiding this comment.
Well that;s just a proper config management
|
The purpose of |
|
It seems like we are reinventing the wheel (with the help of AI) with so many new modules that are completely unnecessary. At the end of the day community monitoring is a batch processing / micro batch processing problem. The most maintainable and simple thing is to convert
|
There was a problem hiding this comment.
This code was copied from another Postgres instance. We should actually centralize a class like Postgres for overall code consistency.
There was a problem hiding this comment.
At the moment this is unnecessary. listen is still in early development stages. Please revert to previous version
There was a problem hiding this comment.
This information was in the main README.md to make users aware of what we are doing. At the moment it just seems hidden and people have to look for this.
| # Public information for the bot | ||
| public_key: "0x041658626a9e1303b631f6d0fb1e047211d5603b977454f7d5d29fe583c3d6c1bd3d8e395d67f6c44b5bc659aae912040e9dd8164b5107368a29029cb53389d8b0" | ||
| compressed_key: "zQ3shNv1tnajHo5FvCvP662cWcbBfS5ZejB4TWaH9iAuFCZZe" |
There was a problem hiding this comment.
This information is crucial and should not be deleted. This makes the bot in the communities as transparent. Users can verify if they are communicating with the official Status bot.
| if display_name in available_accounts: | ||
| account.logger.info(f"Logging in with display name: {display_name}") | ||
| account.login( | ||
| display_name=display_name, | ||
| password=password, | ||
| infura_token=config.bot.infura_token, | ||
| coingecko_api_key=config.bot.coingecko_api_key | ||
| ) | ||
| elif config.bot.init_account: | ||
| mnemonic = config.bot.mnemonic_phrase | ||
| if not mnemonic: | ||
| raise ValueError( | ||
| "init_account is true but no mnemonic_phrase provided" | ||
| ) | ||
| account.logger.info(f"Creating/restoring account: {display_name}") | ||
| account.login( | ||
| display_name=display_name, | ||
| password=password, | ||
| mnemonic=mnemonic, | ||
| infura_token=config.bot.infura_token, | ||
| coingecko_api_key=config.bot.coingecko_api_key | ||
| ) | ||
| else: | ||
| raise ValueError( | ||
| f"Account '{display_name}' not found and init_account is false. " | ||
| f"Available accounts: {[a['display_name'] for a in available_accounts]}" | ||
| ) |
There was a problem hiding this comment.
This is reinventing account.login. These checks are already implemented in the method.
Please refer to status-im/status-python-sdk#5. As described in the issue, there are blockers. |
This repo is not just for monitoring the community, else the repo would be call |
|
@apentori we can keep the repository as it is and just migrate |
|
SDK functionality has been moved to |
Signed-off-by: apentori <pentori.alexis@proton.me>
Signed-off-by: apentori <pentori.alexis@proton.me>
Signed-off-by: apentori <pentori.alexis@proton.me>
Description
Refactoring the source code to be fully a Bot and not just a monitoring tools
Left to do