|
| 1 | +# Contributing to MoinMoin |
| 2 | + |
| 3 | +Thank you for your interest in contributing to MoinMoin! We welcome contributions |
| 4 | +and appreciate your support in improving this project. This guide outlines how |
| 5 | +you can contribute, whether through bug reports, code contributions or help with |
| 6 | +documentation. |
| 7 | + |
| 8 | + |
| 9 | +## How to contribute |
| 10 | + |
| 11 | +Find out how you can start reporting bugs, fixing bugs, adding new features or |
| 12 | +improving the documentation. |
| 13 | + |
| 14 | +### Reporting bugs |
| 15 | + |
| 16 | +If you've encountered a bug, please report it by following these steps: |
| 17 | + |
| 18 | + 1. Search the issue tracker to see if the bug has already been reported. |
| 19 | + 2. Open a new issue in GitHub if it has not been reported yet. |
| 20 | + 3. Provide as much detail as possible, including: |
| 21 | + - A description of the bug |
| 22 | + - Steps to reproduce the issue |
| 23 | + - Any relevant logs or error messages |
| 24 | + |
| 25 | +### Suggesting enhancements |
| 26 | + |
| 27 | +If you have an idea for a new feature or improvement: |
| 28 | + |
| 29 | + 1. Check the issue tracker to see if the enhancement has already been suggested. |
| 30 | + 2. Open a new issue with a detailed description of the suggested enhancement. |
| 31 | + 3. Include a rough idea of how the enhancement could be implemented if possible. |
| 32 | + |
| 33 | +### Submitting code or documentation enhancements |
| 34 | + |
| 35 | +To submit code or documentation updates, follow these steps: |
| 36 | + |
| 37 | + * Setup your development environment, see next chapter. |
| 38 | + * Create a new branch for your changes: |
| 39 | + ``` |
| 40 | + git checkout -b feature-branch |
| 41 | + ``` |
| 42 | + * Implement your changes locally. |
| 43 | + * Run tests and ensure everything works before submitting your changes. |
| 44 | + * Commit your changes and push them to your fork on GitHub: |
| 45 | + ``` |
| 46 | + git commit -am "Description of changes" |
| 47 | + git push --set-upstream origin feature-branch |
| 48 | + ``` |
| 49 | + * Create a pull request against the master MoinMoin repository. |
| 50 | + |
| 51 | +We encourage you to split complex changes into smaller, focused pull requests. |
| 52 | +This makes it easier to review and merge your contributions. |
| 53 | + |
| 54 | +## Development setup |
| 55 | + |
| 56 | +To begin contributing, you need to set up your development environment. Follow |
| 57 | +the steps below to get started: |
| 58 | + |
| 59 | + * Fork the main moin repository from GitHub |
| 60 | + * Clone your repo to your local development system |
| 61 | + * Create a virtualenv and download Python packages |
| 62 | + * Activate the virtualenv |
| 63 | + * Create a wiki instance with help data and a welcome page |
| 64 | + * Start the built-in server |
| 65 | + |
| 66 | +For details on setting up your environment, please refer to the MoinMoin |
| 67 | +development documentation at |
| 68 | +[moin-20.readthedocs.io](https://moin-20.readthedocs.io/en/latest/devel/development.html#create-your-development-environment) |
| 69 | + |
| 70 | + |
| 71 | +## Code Style and Best Practices |
| 72 | + |
| 73 | +MoinMoin follows some common coding standards to ensure the consistency of the |
| 74 | +code base. Here are some major things to keep in mind: |
| 75 | + |
| 76 | + * Python Version: MoinMoin is based on Python 3. Make sure your changes work |
| 77 | + with the versions specified in pyproject.toml. |
| 78 | + * Code Formatting: Follow PEP 8 standards for Python code. |
| 79 | + * Testing: Write tests for your changes to ensure stability. Tests should be |
| 80 | + added under the corresponding _tests directory. |
| 81 | + * Documentation: Ensure that your changes are well-documented. Add docstrings |
| 82 | + to your functions and classes where appropriate. |
| 83 | + |
| 84 | +We have added Git pre-commit hooks to ensure a consistent code quality. |
| 85 | +The checks include the use of the tools black, ruff and bandit. For details please see |
| 86 | +[moin-20.readthedocs.io](https://moin-20.readthedocs.io/en/latest/devel/development.html#install-pre-commit-hooks) |
| 87 | + |
| 88 | + |
| 89 | +## Licensing |
| 90 | + |
| 91 | +By submitting code to MoinMoin, you agree that your contributions are licensed |
| 92 | +under the GNU General Public License, the license used by the MoinMoin project. |
| 93 | + |
| 94 | +We appreciate your contributions to MoinMoin! If you have any questions that |
| 95 | +are not covered in the docs, feel free to ask. |
0 commit comments