CONTRIBUTING.rst
Thank you for considering improving Loguru, any contribution is much welcome!
.. _minimal reproducible example: https://stackoverflow.com/help/mcve .. _open a new issue: https://github.com/Delgan/loguru/issues/new .. _open a pull request: https://github.com/Delgan/loguru/compare .. _PEP 8: https://www.python.org/dev/peps/pep-0008/ .. _Loguru: https://github.com/Delgan/loguru
Recent advances in artificial intelligence (AI) offer powerful tools to identify bugs and accelerate development, but their usage must remain carefully controlled.
The use of AI tools to interact with this project is welcome under the following principles:
PRs and issues may be closed without proper review if they do not adhere to these guidelines.
If you have any question about Loguru, if you are seeking for help, or if you would like to suggest a new feature, you are encouraged to open a new issue_ so we can discuss it. Bringing new ideas and pointing out elements needing clarification allows to make this library always better!
If you encountered an unexpected behavior using Loguru, please open a new issue_ and describe the problem you have spotted. Be as specific as possible in the description of the trouble so we can easily analyse it and quickly fix it.
An ideal bug report includes:
Loguru version you are using (you can find it with print(loguru.__version__))minimal reproducible example_If you are willing to enhance Loguru by implementing non-trivial changes, please open a new issue_ first to keep a reference about why such modifications are made (and potentially avoid unneeded work).
Prefer using a relatively recent Python version as some dependencies required for development may have dropped support for oldest Python versions. Then, the workflow would look as follows:
Fork the Loguru_ project from GitHub.
Clone the repository locally::
$ git clone [email protected]:your_name_here/loguru.git $ cd loguru
Activate your virtual environment::
$ python -m venv env $ source env/bin/activate
Install Loguru in development mode::
$ pip install -e ".[dev]"
Install pre-commit hooks that will check your commits::
$ pre-commit install --install-hooks
Create a new branch from master::
$ git checkout master $ git branch fix_bug $ git checkout fix_bug
Implement the modifications wished. During the process of development, honor PEP 8_ as much as possible.
Add unit tests (don't hesitate to be exhaustive!) and ensure none are failing using::
$ tox -e tests
Remember to update documentation if required.
If your development modifies Loguru behavior, update the CHANGELOG.rst file with what you improved.
add and commit your changes, then push your local project::
$ git add . $ git commit -m 'Add succinct explanation of what changed' $ git push origin fix_bug
If previous step failed due to the pre-commit hooks, fix reported errors and try again.
Finally, open a pull request_ before getting it merged!