Skip to content

Latest commit

 

History

History
103 lines (71 loc) · 2.52 KB

CONTRIBUTING.md

File metadata and controls

103 lines (71 loc) · 2.52 KB

Contributing to nxbench

Thank you for your interest in contributing to nxbench! We welcome contributions from the community to help improve and expand this project.

Table of Contents

Setting Up the Development Environment

  1. Fork the nxbench repository on GitHub.
  2. Clone your fork locally:
git clone git@github.com:your-username/nxbench.git
cd nxbench
  1. Create a virtual environment:
python -m venv nxbench-dev
source nxbench-dev/bin/activate  # On Windows, use `nxbench-dev\Scripts\activate`
  1. Install the development dependencies:
pip install -e ".[developer]"
  1. Install pre-commit hooks:
pre-commit install

Coding Guidelines

  • Follow PEP 8 style guide for Python code.
  • Use absolute imports (no relative imports).
  • Write clear, concise, and well-documented code.
  • Follow the project's existing code structure and naming conventions.
  • Handle exceptions and errors gracefully.
  • Ensure there are no redundant lines of code.

Testing

  • Write unit tests for all new functionality.
  • Ensure all tests pass before submitting a pull request.
  • To run tests:
pytest
  • Aim for high test coverage (at least 90% for new code).

Documentation

  • Use numpydoc style for docstrings.
  • Update relevant documentation for any changes or new features.
  • Include examples in docstrings where appropriate.

Pull Request Process

  1. Create a new branch for your feature or bugfix:
git checkout -b feature-or-fix-name
  1. Make your changes and commit them with a clear commit message.
  2. Run pre-commit hooks:
pre-commit install
pre-commit run --all-files
  1. Push your branch to your fork:
git push origin feature-or-fix-name
  1. Open a pull request against the main branch of the nxbench repository.
  2. Ensure the PR description clearly describes the problem and solution.
  3. Reference any relevant issues in the PR description.

Reporting Issues

  • Use the GitHub issue tracker to report bugs or suggest enhancements.
  • Provide a clear and detailed description of the issue or suggestion.
  • Include steps to reproduce for bugs, and example use cases for enhancements.

Thank you for contributing to nxbench! 🎉