Contribution Guidelines #
These recommendations are general guidelines from Open Science Labs. Each project may have its own specific set of recommendations and rules; contributors should review those for each project.
Community Engagement #
- Communication Platforms: Each project may use its preferred communication platform for discussions, such as code repository platforms (GitHub, GitLab, etc.) or chat-based platforms (Discord, Slack, etc.). Contributors should verify with the community and mentors which platform is recommended for seeking assistance, discussing ideas, and requesting reviews.
- Collaboration and Support: Contributors are encouraged to assist others when possible, as everyone is here to learn and support one another.
- Respect and Inclusivity: Contributors should communicate with kindness and respect, particularly when interacting with beginners or colleagues for whom English may not be their first language. Instead of engaging in arguments, they should offer constructive feedback and encouragement to help others improve both their language and technical skills.
- Channel Usage: If the primary discussion channel is not the code repository platform, contributors should use the designated platform to draw attention to pull requests or issues. Initiating a discussion there prior to opening issues or pull requests is also expected.
Contributions #
- Task Coordination: Contributors should avoid duplicating work by verifying whether someone else is already addressing a task or if the task remains relevant before beginning work.
- Managing Stale Contributions: Project maintainers may implement mechanisms to label and close stale issues and pull requests. Some contributors open pull requests without following up or addressing review recommendations, which can impede progress.
- Branch Management: When updating a branch, contributors should follow the project's preferred approach, whether that involves using a rebase or a merge commit.
- If your PR is not ready yet for review, please keep it in draft mode.
Coding Tips #
- Ensure that
pre-commit
is applied to your branch before opening a pull request. Runpre-commit install
to enable pre-commit hooks, ensuring they are applied automatically before every commit. - Avoid excessive nesting. Try to keep nesting levels to four or fewer for better readability and maintainability.
- Follow the project's specific coding guidelines. Review them regularly to ensure consistency across contributions.
- Remove any unnecessary comments. In most cases, if you need to explain what your code does, it may indicate that the code is unclear or overly complex. This is also often a sign of code generated by Generative AI.
- Do not use emojis in comments. This is typically seen as a red flag and may suggest improper use of AI-generated content.
- Ensure there is an empty line at the end of each file. GitHub highlights missing end-of-file newlines with a red icon. Configure your IDE to automatically add this final newline.
Last update: 2025-03-25