b_discussion - depcharge-org/depcharge GitHub Wiki
Just a draft that needs review
DepCharge: A Dependency Manager for Matlab
DepCharge is a combination of best practices and a Matlab utility designed to simplify dependency management in Matlab projects. It draws inspiration from CMake and aims to automate the installation and management of project dependencies.
Key Features
-
Automated Dependency Installation:
- Users can install all dependencies automatically by running
DepCharge.m
. - Eliminates the need for manual installation of multiple dependencies.
- Users can install all dependencies automatically by running
-
Dependency Specification:
- Uses a
deplist.json
file (or potentially an m-file function returning a struct) to specify dependencies. - Includes information such as dependency names, source (git/path/zip), version (tag/commit/branch), and installation options.
- Uses a
-
Flexible Sourcing:
- Can source dependencies from various locations:
- Git repositories
- Relative file paths
- Zip files
- Allows for easy transition between development and distribution stages.
- Can source dependencies from various locations:
-
Version Control:
- Supports specifying exact versions, tags, or branches of dependencies.
- Option to specify whether later versions are acceptable.
-
Installation Options:
- Local installation in a
deps
folder by default. - Option for global installation in Matlab's global installation directory.
- Local installation in a
-
Path Management:
- Automatically adds installed dependencies to the Matlab path.
-
Recursive Dependency Resolution:
- Handles sub-projects and their dependencies recursively.
-
Custom Installation Scripts:
- Supports custom installation scripts for dependencies with unique requirements.
-
Project Structure Guidelines:
- Recommends a standard project layout, including a top-level
+project
folder with a unique name.
- Recommends a standard project layout, including a top-level
-
Update Management:
- Users can update dependencies by pulling new code and running
depcharge
again.
- Users can update dependencies by pulling new code and running
-
Distribution Support:
- Potential feature to automatically package projects for customer distribution.
Usage
- Create a
deplist.json
file in your project root. - Specify your project's dependencies in the
deplist.json
. - Run
depcharge.m
to automatically install and set up all dependencies. - Update dependencies by pulling new code and re-running
depcharge.m
.
Benefits
- Simplifies the process of organizing and managing complex Matlab projects with multiple dependencies.
- Improves code reusability without sacrificing ease of installation for end-users.
- Standardizes project structure and dependency management across Matlab projects.