Holzhaus / sphinx-multiversion

Sphinx extension for building self-hosted versioned docs.
https://holzhaus.github.io/sphinx-multiversion/
BSD 2-Clause "Simplified" License
148 stars 65 forks source link

How to specify matlab_src_dir (matlabdomain extension) in conf.py to yield correctly versioned docstrings? #108

Closed Heinzelhoernchen closed 7 months ago

Heinzelhoernchen commented 8 months ago

First of all, thanks for this great tool and the support you give! I use the matlabdomain extension to create a documentation of a Matlab based code with Sphinx. As part of conf.py this includes

matlab_src_dir = os.path.dirname(os.path.abspath("../../matlab_code"))

Unfortunately this path seems to direct to the current matlab_code folder no matter the version supposedly being documented. So switching between versions yields the docstrings from the current status.

I have tried something along the lines of this without success.

I'm definitely not a pro at this, so can't tell if it's a bug or if I'm missing something here.

Any help would be much appreciated! Thanks!

stibus commented 7 months ago

The issue can be solved by a small modification to matlabdomain. See https://github.com/sphinx-contrib/matlabdomain/pull/224

stibus commented 7 months ago

The issue was fixed with version 0.21.2 of sphinx-contrib/matlabdomain: see sphinx-contrib/matlabdomain@2fc26b2022f67374a4c7caa291e6f955dc4b2009