Closed yurivict closed 2 years ago
Hi! Thanks for reporting this. Can you mention which documentation you checked? The procedure for MATLAB setup is described in the platform-specific install instructions. I think in this case you'll need to also addpath
that folder and any subfolders. Also, the output of scons install
shows the install path for the interfaces, I think the MATLAB interface usually goes in /usr/local/share
although I'm on my phone so I can't check.
Thanks for the link! How did you install Cantera? Did you check that folder you mentioned for the Cantera interface?
I found the problem. addpath
directory should be /usr/local/lib/cantera/matlab/toolbox
, not /usr/local/lib/cantera
.
Great! So I don't think the API docs page should change, the Python documentation likewise doesn't list how to install the Python interface. How did you install the interface? Was the message from scons install
clear?
How did you install the interface?
Through the port/package.
Was the message from scons install clear?
Not really. Most importantly, when users install a package - they don't see messages printed by scripts. Then users look for the online documentation and it doesn't explain required additional steps.
With Python at least there are no additional steps, so this makes it easy.
What port/package? Is this the FreeBSD package for which you are the maintainer? Your post on Cantera/cantera-website#154 (where this probably belongs as well) suggests that all that is necessary to install on FreeBSD is to run pkg install cantera
. If that package is now compiling the Mex interface to be used with Octave, the either
I install Cantera through the FreeBSD port/package, but any packaging system would have the same problem.
Once users install the package, most wouldn't be able to figure out that some line needs to be added somewhere to enable its Matlab interface.
Any special steps that are required for users to begin using the package or it specific features need to be explained in the documentation,
The Windows installation instructions explain how the user should set the Matlab path.
If I recall correctly, the macOS installer automatically adds the correct directory to the Matlab path.
For other platforms, we don't provide packages for the Matlab toolbox, so there's nothing to explain. And if you compile from source, the directory to add is going to depend on what options were specified, hence the reliance on the post-install message.
I do agree that if we're adding a page for FreeBSD instructions, it should list whatever the additional steps required are since you're taking the time to compile an interface for Octave.
@yurivict It seems like this belongs in the installation instructions for FreeBSD then, so I'm going to migrate this over to the website repository. Please feel free to make a pull request to my branch, or a separate pull request, to add these instructions. Unfortunately, none of the main developers have a FreeBSD machine to test with.
Does Matlab also require to add the addpath
line to some file before the package can be used?
Yes, usually it can go in startup.m
, or using the GUI interface you can add the appropriate folder, which I think adds it to some system directories.
@yurivict Do you plan to add these instructions for FreeBSD?
The FreeBSD port already runs with Octave - no instructions are needed there.
Thanks @yurivict I'll close this issue then. Please feel free to reopen if there is something that still needs to be done here
It seems that documentation focuses on specific functions and doesn't cover topics like how to run it in the first place.
For example:
addpath /usr/local/lib/cantera/matlab
was executed, so it isn't clear what's wrong, and the documentation doesn't help either.