feat: Update coding guidelines to enhance modularity and avoid deprecated patterns
This commit is contained in:
4
.github/instructions/copilot.instructions.md
vendored
4
.github/instructions/copilot.instructions.md
vendored
@@ -36,6 +36,8 @@ applyTo: '**'
|
|||||||
- Use manager classes (e.g., DataManager, UIManager, ThemeManager) for encapsulating related functionality.
|
- Use manager classes (e.g., DataManager, UIManager, ThemeManager) for encapsulating related functionality.
|
||||||
- UI elements and data columns must be generated dynamically based on current medicines/pathologies.
|
- UI elements and data columns must be generated dynamically based on current medicines/pathologies.
|
||||||
- New medicines/pathologies should not require changes to main logic—use dynamic lists and keys.
|
- New medicines/pathologies should not require changes to main logic—use dynamic lists and keys.
|
||||||
|
- Avoid hardcoding values; use configuration files or constants.
|
||||||
|
- Adopt a modular project structure following python best practices.
|
||||||
|
|
||||||
### 3. Error Handling
|
### 3. Error Handling
|
||||||
- Use try/except for operations that may fail (file I/O, data parsing).
|
- Use try/except for operations that may fail (file I/O, data parsing).
|
||||||
@@ -76,6 +78,8 @@ applyTo: '**'
|
|||||||
- Code Refactoring is allowed as long as it does not change the external behavior of the code.
|
- Code Refactoring is allowed as long as it does not change the external behavior of the code.
|
||||||
- Ensure compatibility with the existing UI and data model.
|
- Ensure compatibility with the existing UI and data model.
|
||||||
- Write clear, concise, and maintainable code with proper type hints and docstrings.
|
- Write clear, concise, and maintainable code with proper type hints and docstrings.
|
||||||
|
- Avoid using deprecated imports or patterns.
|
||||||
|
- Remove any warnings or deprecation notices from the codebase.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user