Closed Nic30 closed 3 years ago
Also I do have some "sphinx extension test runner" which may be helpful https://github.com/Nic30/sphinx-hwt/tree/master/tests It is not much but it works.
Apologies, this fell off our radar.
I personally don't have time to look at this, but please feel free to either add a test demonstrating the issue.
We've just moved the tests to pytest
making each test more sandboxed along the way, so it should be a tad easier to add new tests.
Also, feel free to raise a separate PR for integrating the sphinx extension test runner.
I suspect the problem is in the folowing code in generate_img
:
path_from_base = os.path.join(self.DIR_NAME, "{1}_{0}.{2}").format(
module_name, img_name, config.sphinx_pyreverse_output
)
# use relpath to get sub-directory of the main 'source' location
src_base = os.path.relpath(base_dir, start=src_dir)
uri = directives.uri(os.path.join(src_base, path_from_base))
Hello @doublethefish, the fix would help me a lot. I am having the doc with missing images for more than 0.5y. I am currently in hurry because of some conferences and I am not familiar with you tests, do you think you can fix it?
Not now, I'm only a volunteer and I am paying the bills myself ;)
But I have written a quick test that doesn't show your issue but it should if the issue exists. It suggests that perhaps you have something funky in your path or sphinx setup. E.g. try setting PYTHONPATH
.
The test (meta) is:
# for each of the types of submodule below
["parent_only", "parent.submodule", "parent.submodule.nestedsubmodule"]
[..snip..]
# check that the output is invariant
assert uri == f"../BASE_DIR/uml_images/IMG_NAME_{module_address}.png"
assert output_file == f"BASE_DIR/uml_images/IMG_NAME_{module_address}.png"
That should be a good starter for 10 for you :)
It suggests that perhaps you have something funky in your path or sphinx setup. E.g. try setting PYTHONPATH.
In fact, I am so confident in this, based on that test, I will close this for now.
If I am wrong and you can provide either a minimal repro case or a test that shows it please reopen, I'll be more than happy to look at it when I get a bit of time :)
I am using:
https://github.com/Nic30/hdlConvertorAst/blob/master/hdlConvertorAst/hdlAst/__init__.py#L17 https://hdlconvertorast.readthedocs.io/en/latest/hdlConvertorAst.hdlAst.html
The file is really there just the path is wrong. Should I use a different combination of packages or there is a bug?