diff --git a/.gitignore b/.gitignore index d7f14ff..4b3baf9 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,6 @@ +# ---> Aii +.crush + # ---> Python # Byte-compiled / optimized / DLL files __pycache__/ diff --git a/CRUSH.md b/CRUSH.md new file mode 100644 index 0000000..4eeb59c --- /dev/null +++ b/CRUSH.md @@ -0,0 +1,34 @@ +# Fedora Metalink Proxy Codebase Guide + +## Build/Lint/Test Commands + +- **Build**: `docker-compose up --build` - Builds and runs the Docker container +- **Run**: `docker-compose up` - Starts the application +- **Test**: `python -m unittest discover` - Runs all tests (no test files found) +- **Lint**: `pylint app.py` - Lints the main application file + +## Code Style Guidelines + +- **Imports**: Grouped by standard library, third-party, local imports +- **Formatting**: 4-space indentation, spaces around operators +- **Types**: Use type hints for function signatures +- **Naming**: snake_case for variables/functions, CamelCase for classes +- **Error Handling**: Use try/except blocks for network operations +- **Environment**: Use `python-dotenv` for configuration +- **Logging**: Use `print()` for debugging (consider structured logging) +- **Security**: Validate all user inputs and environment variables + +## Project Structure + +- `app.py`: Main Flask application +- `templates/`: HTML templates for web interface +- `data/`: Persistent data directory (mounted in Docker) +- `Dockerfile`: Container configuration +- `docker-compose.yml`: Orchestration setup + +## Key Components + +- Flask web framework with Gunicorn for production +- BeautifulSoup for XML parsing +- Requests for HTTP operations +- Pandas/matplotlib for statistics visualization \ No newline at end of file