Skip to main content

pip-style package manager for MATLAB packages

Project description

mip-client

⚠️ Warning: This project is at a very early stage of development and is subject to breaking changes.

A simple pip-style package manager for MATLAB packages.

Installation

Install the package using pip:

pip install mip-client

Or install from source:

# First, clone the repository
git clone https://github.com/mip-org/mip.git
cd mip

# Then, install the package
pip install -e .

To set up the MATLAB integration, run:

mip setup

This command will create the necessary directories and files in ~/.mip/matlab for MATLAB integration.

Then add ~/.mip/matlab to your MATLAB path permanently. You can do this in MATLAB:

addpath('~/.mip/matlab')
savepath

Alternatively, you can add this to your MATLAB startup.m file (typically located at ~/Documents/MATLAB/startup.m):

addpath('~/.mip/matlab')

Note: After upgrading to a new version of mip, run mip setup to ensure you have the latest MATLAB integration.

Usage

Install a package

Either from the command line or from within MATLAB, run:

mip install package_name

Downloads and installs a package to ~/.mip/packages/package_name.

Currently, the supported packages are:

Using packages in MATLAB

After setting up the MATLAB path and installing packages, you can import them in MATLAB:

% Import a package (adds it to the path for the current session)
mip.import('package_name')

% or
mip import package_name

% Now you can use the package functions

List installed packages

mip list

Shows all currently installed packages.

Uninstall a package

mip uninstall package_name

Removes an installed package after confirmation. Also removes any packages that depend on it.

Internal Package Structure

  • Packages are stored in ~/.mip/packages/
  • Each package is extracted from a zip (.mhl) file into its own directory
  • Each package has a mip.json file containing metadata and a setup.m that gets called on import
  • The +mip MATLAB namespace is installed in ~/.mip/matlab/+mip/

Example

# Install a package
mip install surfacefun

# List installed packages
mip list

# Use in MATLAB
matlab
>> mip import surfacefun
>> % Now use the toolbox functions

# Uninstall
mip uninstall surfacefun

How to add new packages

For now mip supports a very limited set of packages, which are built as part of this repository. To add a new package, you should submit a pull request to https://github.com/mip-org/mip-core.

Requirements

  • Python 3.6+
  • MATLAB

Authors

Jeremy Magland and Dan Fortunato - Center for Computational Mathematics, Flatiron Institute

License

Apache License 2.0

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mip_package_manager-0.1.0.tar.gz (21.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mip_package_manager-0.1.0-py3-none-any.whl (15.3 kB view details)

Uploaded Python 3

File details

Details for the file mip_package_manager-0.1.0.tar.gz.

File metadata

  • Download URL: mip_package_manager-0.1.0.tar.gz
  • Upload date:
  • Size: 21.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for mip_package_manager-0.1.0.tar.gz
Algorithm Hash digest
SHA256 107c7a9584960460c69a08a14cb1c02b67c3d235df2e86b56eeedd1ba59a59e9
MD5 6e24c605d57a15b5b8fa05ab7de2f1f7
BLAKE2b-256 6682b57fa62c2212abab53236f14ab28326099e781f572485611b950ef0a14d0

See more details on using hashes here.

File details

Details for the file mip_package_manager-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for mip_package_manager-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 fa2809489d34d379b4c692e428470b1b8c506ff67a1ffbdf40350aa5032925fa
MD5 1d066bc230ef078eb56ae4f05c1ab091
BLAKE2b-256 b80987d9d71a546f82ea3ca61b4d962f4f7fa1f1ff695c31e11acc9a87e2a454

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page