Skip to content

Latest commit

 

History

History
149 lines (107 loc) · 3.29 KB

File metadata and controls

149 lines (107 loc) · 3.29 KB

Contributing to Shiny TreeView

Thank you for your interest in contributing to Shiny TreeView! This guide will help you get started with local development and submitting contributions.

Getting Started

Prerequisites

  • Python 3.10+
  • Node.js 16+ (only needed for JavaScript development)
  • Git

Local Development Setup

  1. Fork and clone the repository:

    git clone https://github.com/yourusername/shiny-treeview.git
    cd shiny-treeview
  2. Create a virtual environment:

    python3.10 -m venv .venv
    source .venv/bin/activate  # On Windows: .venv\Scripts\activate
  3. Install the package in development mode:

    pip install -e ".[dev]"
  4. Install JavaScript dependencies (if working on the React component):

    npm install

Development Workflow

Python Development

  1. Make your changes to the Python code in shiny_treeview/

  2. Run tests:

    pytest
  3. Format code:

    black .
    isort .

JavaScript/TypeScript Development

  1. Make changes to TypeScript code in srcts/

  2. Build the JavaScript bundle:

    npm run build
  3. For continuous development (auto-rebuild on changes):

    npm run watch
  4. Test the example app:

    cd example-app
    python -m shiny run app.py --reload

Documentation Development

  1. Install Quarto:

    • Download from quarto.org
    • Or on macOS: brew install quarto
  2. Build API documentation:

    cd docs
    quartodoc build
  3. Render the documentation site:

    quarto render
  4. Preview locally:

    quarto preview

Submitting a Pull Request

Pull Request Process

  1. Create a feature branch:

    git checkout -b feature/your-feature-name
  2. Make your changes following the development workflow above

  3. Add tests for any new functionality

  4. Update documentation if you're changing APIs

  5. Commit your changes with descriptive commit messages:

    git commit -m "Add support for custom tree icons"
  6. Push to your fork:

    git push origin feature/your-feature-name
  7. Create a Pull Request on GitHub with:

    • Clear description of what the PR does
    • Link to any related issues
    • Screenshots/examples if relevant
    • Notes about breaking changes (if any)

Release Process

(For maintainers)

  1. Update version in package.json
  2. Update CHANGELOG.md
  3. Create a git tag: git tag v0.1.1
  4. Push tag: git push origin v0.1.1
  5. GitHub Actions will automatically build and publish to PyPI

Getting Help

  • Issues: Open an issue on GitHub for bugs or feature requests
  • Discussions: Use GitHub Discussions for questions
  • Documentation: Check the online documentation

Code of Conduct

This project follows the Contributor Covenant Code of Conduct. Please be respectful and inclusive in all interactions.

License

By contributing to Shiny TreeView, you agree that your contributions will be licensed under the MIT License.