Potential workflow enhancement

#1 · open · 0 comments

View on GitHub ↗

kdunn926

I caught wind of this (very valuable) work you've started and spent a couple hours poking around. It actually looks like there may be a way to avoid requiring a full build for each iteration. It's possible I'm missing some important nuances about Sphinx / FreeCAD module layout but I found that Autodoc supports mocking imports - e.g. adding the following to `conf.py`: ``` autodoc_mock_imports = ["FreeCAD", "FreeCADGui", "PySide", "six"] ``` I then tried setting `freecad_source_path` to `<FREEDCAD_GIT_REPO_PATH>/src/Mod` and adding each subdirectory to the system path: ``` subdirs = ["AddonManager", "Arch", "Assembly", ... , "Web"] for d in subdirs: sys.path.append(freecad_source_path + "/" + d) ``` There were some other edge-case handling changes to `linkcode_resolve()` but otherwise I was able to generate this from the existing `Doc/sphinx/DraftWorkingPlane.rst` file in the source tree: ``` Draft Working Plane =================== The Draft WorkingPlane module contains utilities to create and manipulate working planes, which are used by the Draft and Arch modules. .. toctree:: :maxdepth: 4 .. automodule:: WorkingPlane :members: ``` ![image](https://user-images.githubusercontent.com/7925800/94317949-a20f6b80-ff44-11ea-9670-bce331ec06fb.png)

Comments