Skip to content

Metapackage #1734

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 10 commits into
base: dev
Choose a base branch
from
Open

Metapackage #1734

wants to merge 10 commits into from

Conversation

ktaletsk
Copy link
Collaborator

@ktaletsk ktaletsk commented Jun 3, 2025

Description

This PR introduces the Mito metapackage - a convenience package that automatically installs both mitosheet and mito-ai with a single pip install mito command. This addresses user requests for simplified installation and provides a unified entry point for the Mito ecosystem.

Key Changes

🎯 Pure Metapackage Implementation

  • Created mito/ directory with metapackage configuration
  • Uses Hatchling as the modern build backend
  • Pure metapackage approach (no Python source code) - users import mitosheet and mito_ai directly
  • Semantic Versioning (SemVer) with unified version scheme across all packages (e.g., 1.0.0, 1.0.1)

🤖 Automated CI/CD Pipeline

  • Daily automated checks for new mito-ai/mitosheet releases via GitHub Actions
  • Smart version detection - only publishes when dependencies are updated
  • SemVer management - coordinated version bumping across all packages
  • Manual trigger option with force-deploy capability

📦 Package Configuration

  • Dependencies: mito-ai==1.0.0, mitosheet==1.0.0 (exact version matching)
  • Python Support: >=3.9 (aligned with both packages)
  • License: AGPL-3.0-or-later
  • Metadata: Comprehensive project URLs, keywords, and classifiers

Motivation

Before: Users needed to install both packages separately:

pip install mitosheet mito-ai

After: Single command installs everything:

pip install mito

This simplifies:

  • 📖 Documentation - Single installation instruction
  • 🎯 User Experience - One package name to remember
  • 🔄 Version Management - Coordinated releases with unified versioning
  • 📊 Analytics - Unified download metrics

Testing

✅ Core Functionality Testing

  • Basic Installation: pip install mito successfully installs both dependencies
  • Dependency Resolution: Verify correct versions of mito-ai and mitosheet are installed
  • Import Testing: Confirm import mitosheet and import mito_ai work after metapackage installation
  • Jupyter Integration: Test both packages work correctly in JupyterLab and Jupyter Notebook
  • VS Code Integration: Verify functionality in VS Code with Jupyter extension

🏗️ Build & Deployment Testing

  • Hatchling Build: python -m build creates correct wheel and sdist
  • Package Contents: Wheel contains only metadata (no Python source code)
  • PyPI Upload: Test deployment to TestPyPI first
  • Version Constraints: Verify exact version dependencies work correctly

🤖 CI/CD Workflow Testing

  • Manual Trigger: Test workflow_dispatch with and without force-deploy
  • Version Detection: Verify script correctly identifies version differences
  • SemVer Management: Test unified version bumping across all packages
  • PyPI API Integration: Confirm API calls work for version checking
  • Git Commits: Verify automated commits work correctly

🔄 Real-World Scenarios

  • Fresh Environment: Test installation in clean Python environment
  • Existing Dependencies: Test with pre-existing mito-ai or mitosheet installations
  • Version Conflicts: Test behavior with conflicting version requirements
  • Large Datasets: Verify both packages work with substantial data after metapackage install
  • Multiple Sessions: Test repeated use in same notebook/environment

Documentation

📝 Required Documentation Updates

Installation Documentation

  • Update main README.md with simplified installation instructions
  • Add metapackage section to documentation website
  • Update getting-started tutorials to use pip install mito

New Documentation

  • Add metapackage README.md explaining purpose and versioning
  • Document SemVer versioning scheme for users
  • Create migration guide for existing separate installations

Developer Documentation

  • Document CI/CD workflow for maintainers
  • Add troubleshooting guide for metapackage issues
  • Update release process documentation

🔗 Documentation Links to Review

  • Installation pages across docs.trymito.io
  • PyPI package descriptions
  • GitHub repository README files
  • Tutorial notebooks and examples

🚀 Next Steps After Merge

  1. Coordination: Ensure PyPI tokens are configured for automated deployment
  2. Communication: Announce metapackage availability to users
  3. Monitoring: Watch for any installation issues or user feedback
  4. Documentation: Complete all documentation updates listed above

This metapackage represents a significant improvement in user experience while maintaining full backward compatibility. Users can continue using individual packages or adopt the convenient metapackage approach with unified SemVer versioning.

Copy link

vercel bot commented Jun 3, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
monorepo ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 12, 2025 3:01am

@ktaletsk ktaletsk requested review from aarondr77 and Copilot June 3, 2025 05:05
Copilot

This comment was marked as outdated.

…tallation instructions in README, and remove deprecated GitHub workflows. Introduce new scripts for version bumping and consistency checks across packages.
Copilot

This comment was marked as outdated.

Copy link
Member

@aarondr77 aarondr77 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sweet. Nice work on this. It's going to be great to not have the messy commands. And make upgrading easy for users too!

There's one important change we need to make which is we want to also deploy these packages to testpypi when merging into dev. This is how we do a lot of testing of the tool and sanity check things before deploying to production.

@aarondr77
Copy link
Member

Oh and also, if we end up not using the deploy_hatch.py and deploy.py files anymore, let's get rid of them

…Versioning, clarifying versioning scheme and consistency across Mito packages.
use dev version with timestamp
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds a pure “mito” metapackage to install both mitosheet and mito-ai, centralizes versioning, and modernizes CI/CD with a unified SemVer bump and release workflow.

  • Introduces mito metapackage with pyproject.toml and README
  • Bumps all packages (mitosheet, mito-ai, mito) to 1.0.0 via a new version.json
  • Overhauls deployment scripts and GitHub Actions for coordinated releases

Reviewed Changes

Copilot reviewed 13 out of 13 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
version.json New centralized SemVer version file
mitosheet/package.json Updated version to 1.0.0
mito/pyproject.toml Added metapackage definition with exact dependencies
mito/README.md Added installation and versioning instructions for the metapackage
mito-ai/package.json Updated version to 1.0.0
deployment/check_versions.py New script to verify version consistency
deployment/bump_version.py Unified bump script for all packages
deployment/README.md Updated docs for new bump and deploy scripts
README.md Switched install instructions to pip install mito
.github/workflows/deploy.yml New consolidated workflow for auto/manual SemVer releases
Comments suppressed due to low confidence (4)

.github/workflows/deploy.yml:33

  • The set-output command is deprecated and will break the workflow. Use the new syntax: echo "branch=$(echo ${GITHUB_REF#refs/heads/})" >> $GITHUB_OUTPUT.
run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"

.github/workflows/deploy.yml:103

  • GitHub Actions expressions do not support the || fallback operator. Since version_type has a default of patch, reference it directly (${{ inputs.version_type }}) or add a conditional step.
python deployment/bump_version.py "${{ inputs.version_type || 'patch' }}"

deployment/README.md:13

  • The README references deploy.py, but no such script exists. Update this entry to match the new bump_version.py and check_versions.py scripts or remove it.
- **`deploy.py`** - Local deployment script for mitosheet

deployment/bump_version.py:123

  • [nitpick] The new version‐bumping logic in bump_all_versions lacks automated tests. Adding unit tests for each bump type and specific version paths will ensure reliability and catch regressions.
def bump_all_versions(bump_type: str = 'patch', specific_version: Union[str, None] = None) -> str:

version_data = json.load(f)
return version_data['version']
else:
return '1.0.0' # Default starting version
Copy link
Preview

Copilot AI Jun 12, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] Defaulting to 1.0.0 when version.json is missing may mask configuration errors. Consider raising an explicit error or warning so missing files aren't silently ignored.

Copilot uses AI. Check for mistakes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants