Markdown Converter
Agent skill for markdown-converter
This document outlines the coding standards and style guidelines for the Bitcoin Twitter Bot project.
Sign in to like and favorite skills
This document outlines the coding standards and style guidelines for the Bitcoin Twitter Bot project.
Variables/Functions: Use
snake_case for all variable names and functions
def calculate_returns(): daily_price = 1000
Classes: Use
PascalCase for all class names
class CryptoTracker: pass
Organize imports in the following order, with a blank line between each section:
# Standard library import os from datetime import datetime, timedelta # Third-party libraries import pandas as pd import tweepy import requests # Local imports from config.api_keys import TwitterCredentials from config.constants import Emojis
Use type annotations for all function parameters and return values.
def format_price(price: float) -> str: return f"{int(price):,}" def get_historical_data() -> pd.DataFrame: # Implementation pass
Write descriptive docstrings for all classes and functions. Use the following format:
def function_name(param1: type, param2: type) -> return_type: """Short description of what the function does. Args: param1: Description of param1 param2: Description of param2 Returns: Description of return value Raises: ExceptionType: When and why this exception is raised """
Use loguru for logging errors, warnings, and info messages:
from loguru import logger # Log levels logger.debug("Detailed information for debugging") logger.info("Confirmation that things are working as expected") logger.warning("Something unexpected happened, but the program still works") logger.error("The program couldn't perform some function due to a problem") logger.critical("The program cannot continue running")
Use conda for environment management:
# Create environment conda create -n bitcoin_twitter python=3.9 # Activate environment conda activate bitcoin_twitter # Install packages pip install -r requirements.txt
For running the bot:
# Run the bot python main.py
When running any tests or checking your code, use:
# Run the bot with mock mode python main.py