Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wishlist #20

Closed
tsdev opened this issue Sep 12, 2017 · 4 comments
Closed

Wishlist #20

tsdev opened this issue Sep 12, 2017 · 4 comments

Comments

@tsdev
Copy link

tsdev commented Sep 12, 2017

I quickly tried out MPM and I find it is a really great tool, I wish Mathworks would implement something like this but deeply integrated into Matlab. I would like to recommend your code to users of my library as a mean of installing it (www.github.com/tsdev/spinw). However I have a few wishes which would be necessary to install my code:

  • MPM should install all code not into userpath but some unique subfolder as many users use the userpath folder to just dump any Matlab code, for example you could use the site-packages (as pip) or something similar
  • the user should able to do all the basic (install, uninstall from FEX and a given github repo) without falling back to python code, as this makes the installation of MPM itself already difficult
  • MPM should check if there is an install script in the added package (something like install.m similarly to pip) and if true, should run it
  • also it should be possible to define the list of subfolders in each package that has to be added to the Matlab path (for example MPM could check for the existence of a pathlist.m file in the package that contains all folder that should be added to the path)
  • it would be nice if mpm would have a more pip like input argument structure mpm install my_package and mpm uninstall my_package
  • since Matlab does not have an import command like python, any package added to the Matlab path last, would conflict with function of the same name, to avoid this I often add/remove certain packages from the search path, it would be really nice if I could do this with MPM by adding/removing a certain package from the search path without installing/uninstalling it every time, for example: mpm on my_package and mpm off my_package

I would be also happy to implement the above changes if you are interested in the above.

@mobeets
Copy link
Owner

mobeets commented Sep 12, 2017

These are all great ideas! Thanks for all the feedback. And please feel free to contribute! Thoughts/replies below.

Your first request is actually an undocumented feature, so I've updated the readme to include it. You can just say mpm matlab2tikz -i /my/custom/dir, which I think is what you're requesting.

And I really like your idea of checking for both an install.m and pathlist.m script. These seem like features that would be really quick/easy to implement and with big payoff.

As far as the install/uninstall feature, and the mpm on/off idea, these sound like things that might require some sort of internal db to keep track of the list of currently installed/uninstalled packages. I definitely see the value of these, but my worry is that this prevents users from being able to also manually add packages to their userpath (for example), without it leading to unintuitive outcomes. I could be wrong though!

To me python was the way to go because doing things like downloading zips, unzipping, managing file directories, command line arguments, etc., is much easier than it would be with matlab. Curious to know if there are ways we could make mpm easier to install without moving away from python. Alternatively, slowing moving some subset of features to be matlab-only might be a good long-term direction.

This was referenced Sep 12, 2017
@tsdev
Copy link
Author

tsdev commented Sep 13, 2017

I would not expect that mpm would manage packages that are not installed via mpm. This could give more flexibility how mpm works, as it could have a separate folder that it manages alone and not expecting any user interaction with that folder. So that's why I think creating a separate folder for mpm (by default) would be a good idea. In this case we could keep a database of the packages and switch them on/off without problem.

Regarding python, the zip, unzip, websave, mkdir, rmdir are Matlab commands that work quite nicely for me in the past when I implemented some automatic update functionality for one of my packages. Using these would make sure mpm runs on any system.

@mobeets
Copy link
Owner

mobeets commented Sep 13, 2017

Ah, I misunderstood before. That sounds like a great idea to have a default mpm install directory other than userpath.

And okay, you sold me on removing the python dependency! I wasn't aware matlab had all of those functions as built-ins.

@mobeets
Copy link
Owner

mobeets commented Nov 7, 2017

Closing since I think I've created separate issues for each of your suggestions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants