Files
duty-teller/.cursorrules
Nikolay Tatarinov 35946a5812
All checks were successful
CI / lint-and-test (push) Successful in 23s
feat: add tests for admin checks and error handling
- Introduced new tests for the `is_admin_async` function to verify correct behavior based on user roles.
- Added tests for error handling in the `error_handler` to ensure exceptions are logged and do not propagate.
- Enhanced test coverage for configuration settings by adding a test for parsing admin phone numbers from environment variables.
- Updated the `.cursorrules` file to include the use of a virtual environment for better dependency management.
2026-02-21 00:50:29 +03:00

146 lines
4.2 KiB
Plaintext

{
"general": {
"coding_style": {
"language": "Python",
"use_strict": true,
"indentation": "4 spaces",
"max_line_length": 120,
"comments": {
"style": "# for single-line, ''' for multi-line",
"require_comments": true
}
},
"naming_conventions": {
"variables": "snake_case",
"functions": "snake_case",
"classes": "PascalCase",
"interfaces": "PascalCase",
"files": "snake_case"
},
"error_handling": {
"prefer_try_catch": true,
"log_errors": true
},
"testing": {
"require_tests": true,
"test_coverage": "80%",
"test_types": ["unit", "integration"]
},
"documentation": {
"require_docs": true,
"doc_tool": "docstrings",
"style_guide": "Google Python Style Guide"
},
"security": {
"require_https": true,
"sanitize_inputs": true,
"validate_inputs": true,
"use_env_vars": true
},
"configuration_management": {
"config_files": [".env"],
"env_management": "python-dotenv",
"secrets_management": "environment variables"
},
"code_review": {
"require_reviews": true,
"review_tool": "Gitea Pull Requests",
"review_criteria": ["functionality", "code quality", "security"]
},
"version_control": {
"system": "Git",
"branching_strategy": "Gitea Flow",
"commit_message_format": "Conventional Commits"
},
"logging": {
"logging_tool": "Python logging module",
"log_levels": ["debug", "info", "warn", "error"],
"log_retention_policy": "7 days"
},
"monitoring": {
"monitoring_tool": "Not specified",
"metrics": ["file processing time", "classification accuracy", "error rate"]
},
"dependency_management": {
"package_manager": "pip",
"versioning_strategy": "Semantic Versioning"
},
"accessibility": {
"standards": ["Not applicable"],
"testing_tools": ["Not applicable"]
},
"internationalization": {
"i18n_tool": "Not applicable",
"supported_languages": ["English, Russian"],
"default_language": "Russian"
},
"code_formatting": {
"formatter": "Black",
"linting_tool": "Pylint",
"rules": ["PEP 8", "project-specific rules"]
},
"architecture": {
"patterns": ["Modular design"],
"principles": ["Single Responsibility", "DRY"]
}
},
"project_specific": {
"use_framework": "None",
"styling": "Not applicable",
"testing_framework": "pytest",
"build_tool": "setuptools",
"use_venv": ".venv",
"deployment": {
"environment": "Local machine",
"automation": "Not specified",
"strategy": "Manual deployment"
},
"performance": {
"benchmarking_tool": "Not specified",
"performance_goals": {
"response_time": "< 5 seconds per file",
"throughput": "Not specified",
"error_rate": "< 1%"
}
}
},
"context": {
"codebase_overview": "Python-based telegram bot, for team duty shift calendar, and group reminder",
"coding_practices": {
"modularity": true,
"DRY_principle": true,
"performance_optimization": true
}
},
"behavior": {
"verbosity": {
"level": 2,
"range": [0, 3]
},
"handle_incomplete_tasks": "Provide partial solution and explain limitations",
"ask_for_clarification": true,
"communication_tone": "Professional and concise"
}
}