Skip to content

DOC: Add unified code guideline document (#33851) #61840

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

abujabarmubarak
Copy link

Summary

This PR addresses Issue #33851 by adding a new consolidated documentation file named code_guidelines.md under doc/source/development/. The goal is to unify coding standards and make it easier for new contributors to find all code style rules in one place.

Key Highlights

  • Combines content from:
    • code_style.html
    • contributing.html#code-standards
  • Covers formatting tools (black, flake8, isort)
  • Includes naming conventions, testing rules, and docstring format
  • Improves onboarding for new contributors
  • Adds references and examples

Let me know if you'd like me to update links in index.rst or make any changes. Happy to collaborate on refinements.

### Summary

This PR addresses Issue #33851 by adding a new consolidated documentation file named `code_guidelines.md` under `doc/source/development/`. The purpose is to unify the various coding style and contribution guidelines that were previously scattered across multiple locations such as:

- `code_style.html`
- `contributing.html#code-standards`

### Why This Change?

Many new contributors struggle to find a complete set of code formatting rules. Some style guidelines are embedded in scripts, others in separate docs. This unified document:

- Reduces guesswork for contributors
- Minimizes repetitive code review comments
- Increases visibility and onboarding efficiency

### What's Included

✅ A new file `code_guidelines.md` that includes:
- Formatting with `black`, `flake8`, and `isort`
- Import ordering conventions
- Usage of f-strings, type checking, and `None` comparisons
- Function and variable naming rules
- Docstring formatting using `numpydoc`
- Testing standards using `pytest`
- Git commit and PR hygiene
- Reference links to official tools and standards

### Follow-up Actions

- [ ] Optionally link this in `index.rst` under `doc/source/development/` for visibility in the sidebar
- [ ] Receive feedback from maintainers for refinement or integration with existing content

---

Let me know if any refinements or reorganization are needed. Happy to make the changes based on your feedback.
@abujabarmubarak
Copy link
Author

Hi team 👋,
This PR addresses issue #33851 by consolidating code style guidelines into one document (code_guidelines.md) under doc/source/development/.

All checks have passed ✅. Please let me know if anything needs to be revised — happy to make changes! Thanks for reviewing 🙏

@abujabarmubarak
Copy link
Author

Hi team 👋,
This PR addresses issue #33851 by consolidating code style guidelines into one document (code_guidelines.md) under doc/source/development/.

All checks have passed ✅. Please let me know if anything needs to be revised — happy to make changes! Thanks for reviewing 🙏

@mroeschke
Copy link
Member

Thanks for the PR but this seems incorporate little to no information in the current contribution documentation. And as a reminder, we discourage the use of AI code contributions. Closing

@mroeschke mroeschke closed this Jul 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants