mosaic-basis
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
- Update the version in
pyproject.tomlandsrc/mosaic_basis/__init__.py - Update the
README.mdwith any new features or changes - Ensure all tests pass:
pytest - 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:
- Update
nameinpyproject.toml(line 6) - Rename the directory
src/mosaic_basis/tosrc/your_new_name/ - Update
known-first-partyinpyproject.toml(line 109) - Update imports in
tests/test_basic.py - Update the description and URLs in
pyproject.toml - 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)
| 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)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| 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.