First off, thanks for taking the time to contribute! 🎉
This project and everyone participating in it is governed by the "Good Luck With That" philosophy. Be excellent to each other, and remember that with great power comes great responsibility.
Before creating bug reports, please check the issue list as you might find out that you don't need to create one. When you are creating a bug report, please include as many details as possible:
- Use a clear and descriptive title
- Describe the exact steps which reproduce the problem
- Provide specific examples to demonstrate the steps
- Describe the behavior you observed after following the steps
- Explain which behavior you expected to see instead and why
- Include logs if relevant
Enhancement suggestions are tracked as GitHub issues. When creating an enhancement suggestion, please include:
- A clear and descriptive title
- A detailed description of the proposed functionality
- Any possible drawbacks
- If relevant, include mock-ups of any UI/UX aspects
- Fill in the required template
- Follow the Python style guide (PEP 8)
- Include comments in your code where necessary
- Update documentation as needed
- Add tests if applicable
- Update CHANGELOG.md with your changes
- Fork the repo
- Create a new branch from
main - Make your changes
- Run tests if available
- Push to your fork
- Submit a pull request
# Clone your fork
git clone https://github.com/ncecere/exporter-openwebui.git
cd exporter-openwebui
# Create virtual environment
python -m venv venv
source venv/bin/activate # or `venv\Scripts\activate` on Windows
# Install dependencies
pip install -r requirements.txt- Follow PEP 8
- Use meaningful variable names
- Keep functions focused and small
- Comment complex logic
- Use type hints where possible
- Use the present tense ("Add feature" not "Added feature")
- Use the imperative mood ("Move cursor to..." not "Moves cursor to...")
- Limit the first line to 72 characters or less
- Reference issues and pull requests liberally after the first line
Example:
Add user activity metrics collector
- Add new metrics for tracking user session duration
- Include labels for user roles
- Update documentation with new metrics
- Add tests for new collector
Fixes #123
- Update README.md if adding new features
- Update ENV-VARS.md if adding new configuration options
- Update POSTGRES_SETUP.md if changing database requirements
- Keep CHANGELOG.md up to date
- Add tests for new functionality if applicable
- Ensure existing tests pass
- Test your changes with a real PostgreSQL database
exporter-openwebui/
├── collectors/ # Metric collectors
├── db/ # Database connection handling
├── utils/ # Utility functions
├── main.py # Main application
└── config.py # Configuration
- Identify the appropriate collector or create a new one
- Follow the existing pattern for metric creation
- Use clear metric names following Prometheus conventions
- Add appropriate labels
- Document new metrics in README.md
Feel free to open an issue for clarification on any of these points.
Remember: GOOD LUCK WITH THAT! 🚀