Conversation
License Check Results🚀 The license check job ran with the Bazel command: bazel run //src:license-checkStatus: Click to expand output |
|
The created documentation from the pull request is available at: docu-html |
|
Hello @a-zw, In my case the files I want to create a link to are generated during testing. In /docs static .rst files I would like to have a link to them. If testing was executed before and artifacts are in defined place the links should work. Otherwise I would expect docs build to be successful but the links to be broken. Do you think it could work like this or some redesign is needed (around my idea or the tool itself)? |
paulquiring
left a comment
There was a problem hiding this comment.
A needed addition to existing functionality.
This approach is not suitable to include Bazel build artifacts/dependencies. That would be the next logical step to me though, because then we could stop using sphinx-collections in the docs-combo build. @PiotrKorkus Are these test results integrated build artifacts though? Alternatively, are they "sources" committed to git? Or is it just temporary artifacts creating in some GH workflows? |
Currently there are two cases:
First option can also get rid of the template and use only temp artifact if possible. |
That sounds like there is already some scripting around both use cases anyways. Wouldn't it be easier to just extend these script a little and copy/symlink the stuff into |
|
Isn't this the same as sphinx-collections? Could you explain the relation / overlap? |
I addressed that within the documentation now. |
The symlinks are quite confusing with git and gitignore does not seem like a suitable solution here.
| logger.error( | ||
| "score_any_folder: source path must be relative, got: %r; skipping", | ||
| source_rel, | ||
| ) | ||
| continue |
There was a problem hiding this comment.
Should this truly be an error then?
The build will be broken if thati s the case, that is wanted here I guess?
| def _create_symlinks(app: Sphinx) -> None: | ||
| created_links: set[Path] = set() | ||
|
|
||
| for source, link in _symlink_pairs(app): |
There was a problem hiding this comment.
Does this work?
You get a list[tuple[Path,Path]] back. But that list could have one or many tuples inside.
Will this actually unwrap each tuple inside it?
Or is the symlink_pairs function guranteed to only return 1 tuple?
| logger.error( | ||
| "score_any_folder: target path already exists and is not a symlink: " | ||
| "%s; skipping", | ||
| link, | ||
| ) |
There was a problem hiding this comment.
When would this be the case, and should it be an error?
| created_links.add(link) | ||
| logger.debug("score_any_folder: created symlink %s -> %s", link, source) | ||
|
|
||
| setattr(app, _APP_ATTRIBUTE, created_links) |
There was a problem hiding this comment.
Is global _APP_ATTRIBUTE missing here in the function or does it work without?
| make_sphinx_app: Callable[[dict[str, str]], SphinxTestApp], docs_dir: Path | ||
| ) -> None: | ||
| """An empty mapping produces no symlinks and no errors.""" | ||
| make_sphinx_app({}).build() |
There was a problem hiding this comment.
Do you even need to build the app here?
| make_sphinx_app({"../external": "notes"}).build() | ||
|
|
||
| assert not link.exists() |
There was a problem hiding this comment.
Guessing copy/paste error?
There was a problem hiding this comment.
Seems to be duplicated from the lines above
MaximilianSoerenPollak
left a comment
There was a problem hiding this comment.
Overall makes sense and looks good.
Just couple of questions I had
📌 Description
A proposal for a mechanism how to include other directories of the repo into documentation.
🚨 Impact Analysis
✅ Checklist