Contributing to TensorPlay#
We want to make contributing to TensorPlay as easy and transparent as possible.
Development Process#
Fork the repository: Click the ‘Fork’ button on the repository page.
Clone your fork: .. code-block:: bash
git clone your-username/tensorplay.git cd tensorplay
Create a branch: .. code-block:: bash
git checkout -b my-new-feature
Make your changes: Implement your feature or fix.
Run tests: Ensure all tests pass. .. code-block:: bash
pytest test/
Commit your changes: .. code-block:: bash
git commit -am ‘Add some feature’
Push to the branch: .. code-block:: bash
git push origin my-new-feature
Submit a Pull Request: Go to the original repository and create a Pull Request.
Coding Style#
We follow PEP 8 for Python code.
We use Google C++ Style Guide for C++ code.
Python code should be typed using type hints where possible.
Use
blackfor Python formatting andclang-formatfor C++.
Building from Source#
Prerequisites#
Python 3.9+
CMake 3.18+
C++17 compatible compiler (MSVC on Windows, GCC/Clang on Linux/macOS)
CUDA Toolkit (optional, for GPU support)
Installation#
pip install -r requirements.txt
python setup.py install
Or for development (editable install):
pip install -e .
Running Tests#
We use pytest for testing.
# Run all tests
pytest
# Run specific test file
pytest test/test_tensor_basic.py
Documentation#
Documentation is built using Sphinx.
cd docs
pip install -r requirements.txt
make html
The generated HTML files will be in docs/_build/html.
License#
By contributing, you agree that your contributions will be licensed under its Apache 2.0 License.