Skip to main content

mosaic-basis

PyPI version CI Python License Code style: black Linting: Ruff

Forward-biased frame selection for OMP to reconstruct frame sequences and object trajectories as bases.

Installation

For Users

pip install mosaic-basis

For Development

# Clone the repository
git clone https://github.com/egoughnour/mosaic-basis.git
cd mosaic-basis

# Install in editable mode with development dependencies
pip install -e ".[dev]"

Development

Quick Start with Makefile

The project includes a Makefile for common development tasks:

# Show all available commands
make help

# Run all checks (format, lint, test)
make check

# Run tests
make test

# Run tests with coverage
make coverage

# Format code
make format

# Run linter
make lint

# Clean build artifacts
make clean

Running Tests

# Run all tests
pytest

# Run tests with coverage
pytest --cov=mosaic_basis --cov-report=html

# Run specific test file
pytest tests/test_basic.py

The richer test suite downloads a tiny public clip via yt-dlp to validate the timestamp-aware mosaic and preview flows. Make sure you have network access when running pytest; if the download fails (e.g., offline CI), the integration tests will automatically skip.

Downloading Videos via yt-dlp

Install the optional extra to enable the built-in downloader:

pip install -e ".[yt]"

You can then let the pipeline fetch a clip directly:

python src/video_omp_pipeline.py \
  --video ./work/input.mp4 \
  --download-url https://www.youtube.com/watch?v=V3-HL7MgzzA \
  --work ./work \
  --download-max-height 360

Use --download-overwrite to force a re-download if the target file already exists.

Code Quality

# Format code with black
black src tests

# Lint with ruff
ruff check src tests

# Type check with mypy
mypy src

Project Structure

mosaic-basis/
├── src/
│   └── mosaic_basis/      # Main package source code
│       └── __init__.py
├── tests/                  # Unit tests
│   ├── __init__.py
│   └── test_basic.py
├── pyproject.toml         # Project configuration (TOML-style)
├── README.md
└── LICENSE

Publishing to PyPI

Preparation

  1. Update the version in pyproject.toml and src/mosaic_basis/__init__.py
  2. Update the README.md with any new features or changes
  3. Ensure all tests pass: pytest
  4. Build the distribution: python -m build

Publishing

# Install build tools
pip install build twine

# Build the distribution
python -m build

# Upload to TestPyPI (for testing)
twine upload --repository testpypi dist/*

# Upload to PyPI
twine upload dist/*

Renaming the Package

To rename this package for a different project:

  1. Update name in pyproject.toml (line 6)
  2. Rename the directory src/mosaic_basis/ to src/your_new_name/
  3. Update known-first-party in pyproject.toml (line 109)
  4. Update imports in tests/test_basic.py
  5. Update the description and URLs in pyproject.toml
  6. Update this README.md

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Metadata

Release files for mosaic-basis 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mosaic-basis 0.2.0
File Size Uploaded Provenance Actions
mosaic_basis-0.2.0.tar.gz 18.7 kB Without provenance Details for mosaic_basis-0.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for mosaic-basis 0.2.0
File Interpreter ABI Platform Actions
mosaic_basis-0.2.0-py3-none-any.whl Python 3 none any Details for mosaic_basis-0.2.0-py3-none-any.whl

Total release size: 23.0 kB

Release files / mosaic_basis-0.2.0.tar.gz

Download URL mosaic_basis-0.2.0.tar.gz
Size 18.7 kB
Tags Source
SHA-256 checksum
How to use checksums
f51faf993001f0e3031fbd3220997e770ab3e710de7f23b227512e01e9b80284
BLAKE2b-256 checksum
How to use checksums
647e61b2e142fb3b731262778c263ef697e15f79cd6b93e68f1758771203fba9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.3

Release files / mosaic_basis-0.2.0-py3-none-any.whl

Download URL mosaic_basis-0.2.0-py3-none-any.whl
Size 4.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
cab1c073c7ac001e9396aa9100b879962674327ab56aeeb50549704534a32761
BLAKE2b-256 checksum
How to use checksums
b2003ff669f7357479687c1d963408cf6e32dce0e77ad54de74b66d74bfec039
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.3

Security for mosaic-basis 0.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page