Skip to content

Latest commit

 

History

History
146 lines (115 loc) · 4.42 KB

CONTRIBUTING.md

File metadata and controls

146 lines (115 loc) · 4.42 KB

Contributing to Streamlit Plugins

We appreciate your interest in contributing to Streamlit Plugins! Whether you're fixing bugs, adding features, improving documentation, or helping with frontend components, your help is invaluable.

Please take a moment to review the following guidelines to ensure a smooth contribution process.


Table of Contents

  1. Code of Conduct
  2. How Can I Contribute?
  3. Development Workflow
  4. Code Style Guidelines
  5. Contact

Code of Conduct

By participating in this project, you agree to abide by our Code of Conduct. Please treat everyone with respect and kindness.


How Can I Contribute?

Reporting Issues

If you find a bug or an issue, please open an issue. Be sure to include:

  • A clear and descriptive title.
  • Steps to reproduce the issue.
  • Relevant screenshots or GIFs, if applicable.
  • Details about your environment (Streamlit version, Python version, etc.).

Feature Requests

We love hearing your ideas for improving Streamlit Plugins! If you have a feature request, open a feature request issue and describe:

  • The feature you'd like to see.
  • Why this feature would be useful.
  • Any potential implementation ideas.

Contributing Code

If you'd like to contribute code, you can work on either:

  • Backend (Python): Core Streamlit plugins and server-side logic.
  • Frontend (React + TypeScript): Custom Streamlit components with modern web technologies.

Development Workflow

Setting Up the Project

  1. Clone the repository:
    git clone https://github.com/quiradev/streamlit-plugins.git
    cd streamlit-plugins
  2. Create and activate a virtual environment for Python development:
    python -m venv venv  
    source venv/bin/activate  # On Windows: venv\Scripts\activate
  3. Install Python dependencies:
    pip install -r requirements.txt
  4. Install frontend dependencies (if working on components):
    cd frontend  
    npm install

Backend (Python)

  • The backend is written in Python and extends Streamlit functionality.
  • Core plugins and functionality live in the streamlit_plugins directory.

Running Tests

Ensure your Python code works as expected by running the test suite:

pytest

Frontend (React + TypeScript)

Custom components are developed using React and TypeScript. These components interact with Streamlit via the Streamlit Component API.

Workflow for Frontend Development

  1. Navigate to the frontend directory:
    cd frontend
  2. Start the development server:
    npm start
    This will start a local server at http://localhost:3000 where you can preview your components.
  3. Build the frontend components:
    npm run build

Testing Frontend Changes

Frontend tests can be written using Jest or other JavaScript testing frameworks. Run tests with:

npm test

Packaging a Component

Once your custom component is ready, package it by running:

npm run build  

Place the built files in the appropriate Python directory to make it accessible as a Streamlit plugin.


Code Style Guidelines

Python

  • Follow PEP 8.
  • Use meaningful variable and function names.
  • Add comments where the code might not be self-explanatory.

React + TypeScript

  • Use Prettier for formatting.
  • Use functional components and React hooks.
  • Keep components small and focused.
  • Follow best practices for TypeScript type safety.

Run linters before committing:

flake8  # For Python  
npm run lint  # For TypeScript  

Contact

If you have any questions or need help, feel free to reach out by opening an issue or contacting the maintainers.


Thank you for helping make Streamlit Plugins awesome! 🎉