Thank you for your interest in contributing to nxbench! We welcome contributions from the community to help improve and expand this project.
- Setting Up the Development Environment
- Coding Guidelines
- Testing
- Documentation
- Pull Request Process
- Reporting Issues
- Fork the nxbench repository on GitHub.
- Clone your fork locally:
git clone git@github.com:your-username/nxbench.git
cd nxbench
- Create a virtual environment:
python -m venv nxbench-dev
source nxbench-dev/bin/activate # On Windows, use `nxbench-dev\Scripts\activate`
- Install the development dependencies:
pip install -e ".[developer]"
- Install pre-commit hooks:
pre-commit install
- 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.
- 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).
- Use numpydoc style for docstrings.
- Update relevant documentation for any changes or new features.
- Include examples in docstrings where appropriate.
- Create a new branch for your feature or bugfix:
git checkout -b feature-or-fix-name
- Make your changes and commit them with a clear commit message.
- Run pre-commit hooks:
pre-commit install
pre-commit run --all-files
- Push your branch to your fork:
git push origin feature-or-fix-name
- Open a pull request against the
main
branch of the nxbench repository. - Ensure the PR description clearly describes the problem and solution.
- Reference any relevant issues in the PR description.
- 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! 🎉