Contributing Guide

CreativeDynamics Library v0.9.8.1

This document provides guidance for contributing to the CreativeDynamics library. Please note that CreativeDynamics is proprietary software owned by The & Partners Group Limited. All contributions are subject to the terms of the proprietary license.

Getting Started for Developers

  1. Fork & Clone the Repository: CreativeDynamics is a private repository. You’ll need a Personal Access Token (PAT) to clone it.

    First, create a GitHub Personal Access Token:

    • Go to GitHub Settings → Developer settings → Personal access tokens → Tokens (classic)

    • Generate a new token with repo scope permissions

    • Copy the token (you won’t be able to see it again)

    Then clone the repository:

    git clone https://github.com/tandpds/CreativeDynamics.git # Or your fork's URL
    cd CreativeDynamics
    

    When prompted for your password, use your PAT instead of your GitHub password.

  2. Set Up a Virtual Environment: Follow the instructions in the Installation Guide to create and activate a Python virtual environment.

  3. Install in Editable Mode with Development Extras:

    pip install -e ".[dev]"
    

    This uses the dev extra defined in pyproject.toml, which pulls in the testing, documentation, linting, and AI dependencies in a single step.

  4. Set Up Pre-commit Hooks:

    pre-commit install
    pre-commit run --all-files
    

Coding Standards

  1. Formatting: Black for code formatting and isort for import sorting, enforced by pre-commit.

  2. Linting: Flake8 for linting, enforced by pre-commit.

  3. Editor Configuration: .editorconfig at the root for consistent styles.

  4. Docstrings: Use Google style docstrings for public APIs to generate Sphinx docs with napoleon.

Running Tests

  1. To run all tests:

    pytest
    
  2. Add new tests for new features or bug fixes.

  3. Ensure tests pass before submitting a PR.

Building Documentation

  1. Local build: from docs/ run:

    make html
    

    Or from root:

    sphinx-build -b html docs docs/_build/html
    

    Or:

    make docs
    
  2. Ensure docs build without errors or warnings.

Branching Strategy

  1. Branch from main (or develop).

  2. Use descriptive names, e.g., feature/xyz, fix/123-bug.

Pull Request Process

  1. Before submitting: tests and pre-commit hooks pass, docs build.

  2. Submit PR: push branch, create PR against main, add title and description.

  3. Review: address feedback, ensure CI passes, then merge.

Versioning

Version defined in creativedynamics/_version.py (__version__), follow SemVer (MAJOR.MINOR.PATCH).

Intellectual Property

All contributions to the CreativeDynamics library become the property of The & Partners Group Limited. By submitting a contribution, you agree that your work will be subject to the proprietary license terms outlined in LICENSE.md.

For inquiries or permissions regarding contributions, please contact hello@tandpgroup.com.