Skip to main content

pip-style package manager for MATLAB packages

Project description

mip package manager

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

A pip-style package manager for MATLAB packages.

Installation and Setup

Step 1: Install the package using pip.

pip install mip-package-manager

Or install from source:

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

# Then, install the package
pip install -e .

Step 2: Set up the MATLAB integration.

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

For detailed documentation on all commands and features, see the Usage Guide.

Install a package

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

mip install package_name

For example, to install the chebfun package:

mip install chebfun

This downloads and installs a package to ~/.mip/packages/package_name.

Table of installable packages

Using packages in MATLAB

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

% Load a package (adds it to the path for the current session)
mip load package_name

% Now you can use the package functions

For example:

mip load chebfun
% Now use chebfun 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, a load_package.m that gets called when the package is loaded, and an unload_package.m that gets called when the package is unloaded.
  • The +mip MATLAB namespace is installed in ~/.mip/matlab/+mip/

Example

# Install a package
mip install chebfun

# List installed packages
mip list

# Use in MATLAB
matlab
>> mip load chebfun
>> % Now use the toolbox functions

# Uninstall
mip uninstall chebfun

How to add new packages

For now mip supports a limited set of packages. To add a new package, you can 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.3.1.tar.gz (22.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.3.1-py3-none-any.whl (27.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: mip_package_manager-0.3.1.tar.gz
  • Upload date:
  • Size: 22.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for mip_package_manager-0.3.1.tar.gz
Algorithm Hash digest
SHA256 ae58cc0c3907defeb6fe8e3c08a8293b970b9a2539702cffa9482a017439908d
MD5 aa196cda5c2909a79de22686965ed7d0
BLAKE2b-256 a03f81634882f4e3f54da7a1186a54c631ecd72e8447d32fecb0342da2b372a0

See more details on using hashes here.

Provenance

The following attestation bundles were made for mip_package_manager-0.3.1.tar.gz:

Publisher: publish.yml on mip-org/mip-package-manager

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

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

File metadata

File hashes

Hashes for mip_package_manager-0.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 8598b70193ed3421f3a3b8880bbc8a04f406c762a732cc61be6404b9ce838e82
MD5 14ea1558f81a4f1aee0a338806d49be7
BLAKE2b-256 3a1865efe137256d58906ec5ad40142ab07fb5436179c391f5bf886036590877

See more details on using hashes here.

Provenance

The following attestation bundles were made for mip_package_manager-0.3.1-py3-none-any.whl:

Publisher: publish.yml on mip-org/mip-package-manager

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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