Contribution Guidelines
Relevant source files
The following files were used as context for generating this wiki page:This document provides a comprehensive guide for contributing to the Django Local Library project. The project is a tutorial website that creates an online catalog for a small local library, allowing users to browse books and manage their accounts. Contributions are welcome to improve features, fix bugs, and enhance documentation.
All contributions are expected to adhere to the project's community standards and development processes. This includes following the code of conduct, using the prescribed pull request process, and ensuring all code is properly tested.
Sources: CONTRIBUTING.md, README.md:1-5
Code of Conduct
All contributors and reviewers must abide by the project's Code of Conduct, which is governed by Mozilla's Community Participation Guidelines. This ensures a safe and respectful environment for everyone. Reviewers are protected by the code of conduct and are encouraged to report any violations.
For details on reporting violations, please refer to Mozilla's "How to report" page.
Sources: CODE_OF_CONDUCT.md:1-6, REVIEWING.md:1-4
Ways to Contribute
The project welcomes a variety of contributions. You can help by:
- Suggesting new features and content.
- Identifying and filing issues for bugs or documentation gaps.
- Providing feedback on existing issues.
- Engaging with the community and answering questions.
- Contributing code or documentation.
- Promoting the project.
Sources: CONTRIBUTING.md:20-28
Getting Started: Your First Contribution
This section outlines the steps to set up your local environment and make your first contribution.
Finding an Issue
A great way to start is by looking for issues tagged with good first issue or help wanted.
good first issue: These are ideal for new contributors and include extra information to guide you.help wanted: These are suitable for any contributor who is more comfortable with the project.
If you find an issue you want to work on, leave a comment like "I want to work on this" and mention the community team (@mdn/mdn-community-engagement) to get assigned. If you need help finding an issue, you can reach out on Matrix.
Sources: CONTRIBUTING.md:30-41
Asking for Help
If you have questions, use the following channels in order of precedence:
- Start a discussion on GitHub.
- Ask on Matrix.
- File an issue and tag the community team (
@mdn/mdn-community-engagement).
Sources: CONTRIBUTING.md:43-49
Local Development Setup
Before you can contribute code, you need to set up the project on your local machine.
The following diagram illustrates the setup process.
This workflow ensures your local environment is correctly configured and ready for development.
Sources: README.md:21-32, CONTRIBUTING.md:56-57
Contribution Workflow
Once your environment is set up, you can begin the process of creating and submitting your contribution.
Contribution and Review Process
The overall process from finding an issue to getting your pull request merged is outlined below.
This diagram shows the contribution lifecycle, including local development, testing, and the pull request review process.
Sources: CONTRIBUTING.md:51-54, REVIEWING.md:6-9, README.md:28
Signing Commits
All commits must be cryptographically signed to verify the author's identity. This is a mandatory requirement for all contributions. GitHub provides a detailed guide on how to set up commit signing.
Sources: CONTRIBUTING.md:59-62
Pull Request (PR) Process
The project follows a well-defined pull request process documented in the MDN Pull request guidelines. You must read and understand this process before submitting a PR.
Sources: CONTRIBUTING.md:51-54
Review Process
All pull requests are subject to a review process. Reviewers must follow the Code of Conduct. The detailed review process is described on the same MDN Pull request guidelines page.
Sources: REVIEWING.md:1-9
Testing
Before submitting a pull request, you must run the project's test suite to ensure your changes have not introduced any regressions.
Run tests using the following command:
python3 manage.py test
The project contains various tests, such as view tests that check for URL accessibility, correct template usage, and logic for features like pagination and user authentication. For example, LoanedBookInstancesByUserListViewTest verifies that a logged-in user only sees their own borrowed books.
Sources: README.md:28, catalog/tests/test_views.py:108-110, 128-137