Skip to content

Pushing changes and PRs

Iván Pérez edited this page Apr 30, 2025 · 3 revisions

Contributing to Ui-Py

This guide explains how to contribute to the Ui-Py project, including best practices for submitting changes, creating issues, and making pull requests.

Ways to Contribute

There are three main ways to contribute to Ui-Py:

  1. Code Contributions: Adding new features or fixing bugs
  2. Ideas and Suggestions: Proposing new functionality or improvements
  3. Bug Reports: Reporting issues with the bot

General Contribution Flow

  1. Create an Issue: Before writing code, create an issue to discuss your idea
  2. Fork the Repository: Create your own fork of the repository
  3. Make Changes: Implement your feature or fix
  4. Test Your Changes: Make sure everything works as expected
  5. Create a Pull Request: Submit your changes for review

Creating Issues

When creating issues, please use the appropriate issue templates:

  • Bug Reports: Use the bug report template to describe the issue in detail
  • Feature Requests: Use the feature request template to propose new functionality
  • Questions: For general questions or help, use the discussion forum

Be sure to include:

  • Clear, descriptive title
  • Detailed description of the problem or suggestion
  • Steps to reproduce (for bugs)
  • Expected vs. actual behavior (for bugs)
  • Any relevant context or screenshots

Code Contribution Guidelines

1. Setting Up Your Development Environment

# Fork the repository on GitHub, then:
git clone https://github.com/YOUR-USERNAME/Ui-Py.git
cd Ui-Py
pip install pipenv
pipenv sync --dev  # Installs dev dependencies too

2. Creating a Feature Branch

git checkout -b feature/your-feature-name
# or
git checkout -b fix/issue-you-are-fixing

3. Code Style

  • Follow PEP 8 for Python code
  • Use type hints wherever possible
  • Write docstrings for functions and classes
  • Keep functions small and focused on a single task
  • Use meaningful variable and function names

4. Testing Your Changes

  • Test your changes thoroughly before submitting
  • Ensure all commands work as expected
  • Check for any performance impacts

5. Committing Changes

git add .
git commit -m "Descriptive commit message"
git push origin feature/your-feature-name

Use meaningful commit messages that explain what changes you've made and why.

6. Creating a Pull Request

  • Go to the GitHub repository and create a new pull request
  • Fill in the pull request template with details about your changes
  • Reference any related issues using #issue-number
  • Wait for review and address any feedback

Pull Request Review Process

Your PR will be reviewed for:

  • Code quality and style
  • Functionality and correctness
  • Documentation
  • Test coverage

Once approved, your changes will be merged into the main codebase.

Additional Resources

If you have any questions or need help with your contribution, please feel free to reach out by creating an issue or contacting the maintainers directly on Discord.