Thank you for considering contributing to Qt API Client! This document provides guidelines for contributing to the project.
-
Fork the repository
-
Clone your fork:
git clone https://github.com/YOUR_USERNAME/qt-api-client.git cd qt-api-client -
Install dependencies:
pip install -r requirements.txt
-
Run the demo to verify setup:
python demo.py
qt-api-client/
├── src/
│ ├── core/ # Business logic (request handling, data management)
│ └── ui/ # PyQt5 UI components
├── examples/ # Example collection files
├── main.py # Application entry point
└── demo.py # Demo script for testing
Core modules are in src/core/ and handle business logic:
- request_manager.py: HTTP request handling using the
requestslibrary - collection_manager.py: Collection storage and management
- environment_manager.py: Environment variable handling and substitution
- history_manager.py: Request/response history tracking
- authentication.py: Authentication method implementations
When modifying core modules:
- Keep business logic separate from UI code
- Ensure data is properly serialized/deserialized for persistence
- Add error handling for edge cases
- Test functionality with the demo script
UI components are in src/ui/ and are built with PyQt5:
- main_window.py: Main application window and menu bar
- request_panel.py: Request builder interface
- response_panel.py: Response display interface
- collection_panel.py: Collection tree browser
- history_panel.py: History dialog
- environment_dialog.py: Environment management dialog
When modifying UI components:
- Follow Qt best practices and signals/slots pattern
- Keep UI responsive (use threading for long operations if needed)
- Maintain consistent styling
- Test in both light and dark themes if possible
- Follow PEP 8 Python style guide
- Use type hints where appropriate
- Add docstrings to classes and functions
- Keep functions focused and single-purpose
- Use meaningful variable names
Before submitting a pull request:
-
Test the demo script:
python demo.py
-
Test the GUI application:
python main.py
-
Verify your changes work with example collections:
- Import examples from
examples/directory - Test request execution
- Test environment variable substitution
- Test authentication methods
- Import examples from
- Add the method to
AuthTypeenum insrc/core/authentication.py - Implement getter methods in
Authenticationclass - Add UI controls in
src/ui/request_panel.py - Update documentation
- Add formatting logic in
src/ui/response_panel.py - Consider adding a new tab if needed
- Update documentation
- Update data model in
src/core/collection_manager.py - Update UI in
src/ui/collection_panel.py - Ensure backward compatibility with existing collections
- Update example collections if needed
-
Create a new branch for your feature:
git checkout -b feature/your-feature-name
-
Make your changes and commit:
git add . git commit -m "Add your descriptive commit message"
-
Push to your fork:
git push origin feature/your-feature-name
-
Open a Pull Request on GitHub
- Provide a clear description of the changes
- Reference any related issues
- Include screenshots for UI changes
- Ensure code follows project style
- Test thoroughly before submitting
When reporting bugs, please include:
- Qt API Client version
- Python version
- Operating system
- Steps to reproduce the issue
- Expected vs actual behavior
- Error messages or logs if applicable
Feature requests are welcome! Please:
- Check if the feature already exists or is planned
- Provide a clear use case
- Explain how it would benefit users
- Consider implementation complexity
Feel free to open an issue for questions or discussions.
By contributing, you agree that your contributions will be licensed under the MIT License.