bids-standard / bids-matlab

MATLAB / Octave tools for BIDS datasets
https://bids-matlab.readthedocs.io
MIT License
50 stars 30 forks source link

Octave pkg support? #26

Open apjanke opened 4 years ago

apjanke commented 4 years ago

Are you interested in rearranging the repo so that it could be installed using Octave's pkg tool? That's Octave's standard package manager. It provides conveniences like install/uninstall commands, a load command, and the ability to specify dependencies.

This would be a simple rearrangement:

I could throw together a PR to do this, if you're interested.

Remi-Gau commented 4 years ago

I personally have nothing against it.

robertoostenveld commented 4 years ago

the consequence for naive MATLAB and Octave users (which I suspect to be the majority) would be that when downloading the master.zip file, they would have to do

addpath bids-matlab-master/inst

instead of

addpath bids-matlab-master

Would it be possible to make the octave package specifically at the release moment and keep the directory structure of the repo as it is now?

apjanke commented 4 years ago

Would it be possible to make the octave package specifically at the release moment and keep the directory structure of the repo as it is now?

Yes. You could just have a distribution-building step that copied the files into a temporary "target" directory, moving +bids/ (and maybe tests/) into an inst/ subfolder under that, and zip that up as your Octave pkg distribution.

The downside of doing it this way is that Octave's pkg would no longer be able to install the package from the head of master in the GitHub repo. (E.g. with pkg install https://github.com/bids-standard/bids-matlab/archive/master.zip.)

I think most Octave users would be familiar with the pkg format and an inst directory; Octave packages are pretty common. Matlab users definitely wouldn't, though.

apjanke commented 4 years ago

Ah, you know what? Then we'd end up with zip/tarball distribution files for the releases whose file layout didn't match the layout in the original source repo, so the installation instructions would have to be different for installing from those versus from a source checkout or GitHub main repo archive download. (E.g. we'd have to say "if you're running Matlab, don't use the bids-matlab-0.1.0.zip download; instead use bids-matlab-master.zip" or something like that.)

I'm now thinking this is maybe more trouble than it's worth unless there's actual user demand to have an Octave pkg package.