### Build and Install Package Source: https://github.com/mnemonice/git-semindex/blob/main/docs/contributing.md Build the Rust core and Python bindings, then install the package in development mode. ```bash make setup # Or run: maturin develop ``` -------------------------------- ### Install Rust Toolchain Source: https://github.com/mnemonice/git-semindex/blob/main/README.md Install the stable Rust toolchain using rustup. This command downloads and executes the rustup installer script. ```bash curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh ``` -------------------------------- ### Quick Start: Index Repository Semantics Source: https://github.com/mnemonice/git-semindex/blob/main/README.md Initialize the indexer and run semantic extraction over the main branch. This snippet demonstrates a common API call. ```python import git_semindex # Initialize the indexer on a local git repository indexer = git_semindex.Indexer(repo_path=".") # Run semantic extraction over the main branch results = indexer.extract_semantics(branch="main") print(f"Indexed {results.commit_count} commits.") print(f"Semantic Summary: {results.summary}") ``` -------------------------------- ### Install Python Dependencies Source: https://github.com/mnemonice/git-semindex/blob/main/docs/contributing.md Install necessary Python packages including the build tool 'maturin' and testing/linting tools. ```bash pip install --upgrade pip maturin pytest ruff mypy ``` -------------------------------- ### Clone Repository and Install git-semindex Source: https://github.com/mnemonice/git-semindex/blob/main/README.md Clone the repository, set up a Python virtual environment, and build the package using maturin. ```bash git clone https://github.com/{{OWNER}}/{{REPO}}.git cd {{REPO}} python3 -m venv venv source venv/bin/activate pip install --upgrade pip maturin maturin develop ``` -------------------------------- ### Install Termux Build Dependencies Source: https://github.com/mnemonice/git-semindex/blob/main/docs/contributing.md Install essential build tools required for compiling the Rust core on Android via Termux. ```bash pkg install build-essential python-dev pkg-config ``` -------------------------------- ### Simplify Testing and Linting with Makefile Source: https://github.com/mnemonice/git-semindex/blob/main/CONTRIBUTING.md Utilize the provided Makefile for convenient execution of common development tasks such as running tests and linters. Examples include 'make test' and 'make lint'. ```bash make test make lint ``` -------------------------------- ### Conventional Commit Examples Source: https://github.com/mnemonice/git-semindex/blob/main/README.md Format commit messages using the Conventional Commits standard for automated semantic versioning and changelog generation. ```git feat: add new map-reduce capability ``` ```git fix: resolve pyo3 memory leak ``` ```git refactor: optimize git2 bindings ``` ```git docs: update troubleshooting guide ``` -------------------------------- ### Set Up Python Virtual Environment Source: https://github.com/mnemonice/git-semindex/blob/main/docs/contributing.md Create and activate a Python virtual environment for managing project dependencies. ```bash python3 -m venv venv source venv/bin/activate ``` -------------------------------- ### Clone the Repository Source: https://github.com/mnemonice/git-semindex/blob/main/docs/contributing.md Clone the git-semindex repository to your local machine. ```bash git clone https://github.com/{{OWNER}}/{{REPO}}.git cd {{REPO}} ``` -------------------------------- ### Run Rust Linting and Formatting Checks Source: https://github.com/mnemonice/git-semindex/blob/main/docs/contributing.md Perform static analysis and check code formatting for the Rust codebase. ```bash cargo clippy -- -D warnings cargo fmt --check ``` -------------------------------- ### Run Rust Tests Source: https://github.com/mnemonice/git-semindex/blob/main/docs/contributing.md Execute all unit and integration tests for the Rust core components. ```bash cargo test ``` -------------------------------- ### Run Python Tests Source: https://github.com/mnemonice/git-semindex/blob/main/docs/contributing.md Execute the test suite for the Python API and bindings. ```bash pytest tests/ ``` -------------------------------- ### Run Python Linting and Type Checking Source: https://github.com/mnemonice/git-semindex/blob/main/docs/contributing.md Check Python code for style issues and perform static type analysis. ```bash ruff check . mypy git_semindex ``` -------------------------------- ### Activate Python Virtual Environment Source: https://github.com/mnemonice/git-semindex/blob/main/README.md Ensure you are running `maturin develop` inside an active Python virtual environment. Maturin relies on the active environment to find the correct Python headers and linker paths. ```bash source venv/bin/activate ``` -------------------------------- ### Perform Rust Linting and Formatting Checks Source: https://github.com/mnemonice/git-semindex/blob/main/CONTRIBUTING.md Check the Rust code for style issues and potential warnings using clippy, and verify code formatting with cargo fmt. The '-D warnings' flag treats all warnings as errors. ```bash cargo clippy -- -D warnings ``` ```bash cargo fmt --check ``` -------------------------------- ### Perform Python Linting and Type Checking Source: https://github.com/mnemonice/git-semindex/blob/main/CONTRIBUTING.md Check Python code for style violations using ruff and perform static type checking with mypy on the 'git_semindex' module. These commands help maintain code quality and consistency. ```bash ruff check . ``` ```bash mypy git_semindex ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.