Skip to content

Latest commit

 

History

History
133 lines (96 loc) · 5.56 KB

CONTRIBUTING.md

File metadata and controls

133 lines (96 loc) · 5.56 KB

Contributing to XuanCe

Thank you for your interest in contributing to XuanCe! We welcome and appreciate contributions from the community to help improve and expand this deep reinforcement learning library. By participating in this project, you help make XuanCe more robust, versatile, and user-friendly for researchers, developers, and enthusiasts alike.

Table of Contents

How to Contribute

Reporting Issues

If you encounter a bug, have a feature request, or find something unclear, please help us by creating an issue:

  1. Go to the Issues page.
  2. Click on New Issue.
  3. Choose the appropriate template (bug report, feature request, etc.).
  4. Provide a clear and descriptive title.
  5. Fill out the template with as much detail as possible, including steps to reproduce the issue, expected behavior, actual behavior, and any relevant screenshots or logs.

Suggesting Enhancements

We welcome suggestions for new features or improvements:

  1. Open a new issue on the Issues page.
  2. Choose the Feature Request template.
  3. Clearly describe the enhancement or feature you have in mind.
  4. Explain the problem it solves or the benefit it provides.

Contributing Code

If you'd like to contribute code to XuanCe, please follow these steps:

  1. Fork the Repository

  2. Clone Your Fork

    git clone https://github.com/<your-username>/xuance.git
    cd xuance
    
  3. Create a New Branch

    • Use a descriptive branch name.
    git checkout -b branch-name
  4. Make Your Changes

    • Implement your feature or bug fix.
    • Ensure your code adheres to the project's coding standards.
  5. Run Tests

    • Ensure all existing tests pass.
    • Add new tests for your changes if applicable.
  6. Commit Your Changes

    • Write a clear and concise commit message.
    git commit -m "short-description"
  7. Push to Your Fork

    git push origin branch-name
  8. Create a Pull Request

    • Navigate to your fork on GitHub.
    • Click the Compare & pull request button.
    • Provide a detailed description of your changes.
    • Submit the pull request to the main branch of the original XuanCe repository.

Coding Guidelines

To maintain consistency and quality across the project, please follow these guidelines:

  • Follow PEP 8: Adhere to PEP 8 coding standards for Python.
  • Meaningful Names: Use clear and descriptive names for variables, functions, classes, and modules.
  • Docstrings and Comments: Provide comprehensive docstrings for all public modules, functions, classes, and methods. Use comments to explain complex logic.
  • Modular Code: Write modular and reusable code. Break down large functions into smaller, manageable pieces.
  • Error Handling: Implement proper error handling to make the library robust and user-friendly.
  • Testing: Write unit tests for new features and bug fixes. Ensure that all tests pass before submitting a pull request.
  • Documentation: Update the documentation to reflect any changes or additions to the codebase.

Pull Request Process

  1. Ensure Your Branch is Up to Date

    • Sync your fork with the original repository to avoid merge conflicts.
  2. Submit a Pull Request

    • Provide a clear title and detailed description of your changes.
    • Reference any related issues using keywords like Closes #123.
  3. Address Feedback

    • Collaborate with maintainers to make necessary revisions.
  4. Final Approval

    • Once approved, your pull request will be merged into the main branch.

Code of Conduct

By participating in this project, you agree to abide by our Code of Conduct. Please read it to understand the expectations for participation.

Contributing to Documentation

Contributing to documentation improvements is highly valuable to us. Please follow the steps below to update or add documentation:

  • Locate Documentation Files: Documentation is located in the docs/ directory.
  • Make Changes: Update existing documentation or add new documentation files.
  • Build Documentation Locally: Follow the documentation build guide to preview your changes locally.
  • Submit a Pull Request (PR): Ensure your documentation changes are clear, properly formatted, and describe the changes made in your PR.

Contact Us

If you have any questions or need further assistance, please contact us through the following methods:

Thank you for contributing to XuanCe! Your efforts help make this library a valuable resource for the community.