-
Notifications
You must be signed in to change notification settings - Fork 21
Source links as Bazel target #358
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
MaximilianSoerenPollak
merged 20 commits into
eclipse-score:main
from
etas-contrib:sourcelinks_json
Jan 29, 2026
Merged
Changes from all commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
f6991e9
Provide //:sourcelinks_json
a-zw 61dad86
Funnel sourcelinks into Sphinx extension
a-zw d31a8fc
Read source links json when available
a-zw ac852e5
Fix CI checks
a-zw 69991f3
Fix tests
a-zw 740c4e2
Document sourcelinks_json how to
a-zw c4d8950
Fix linter warnings
a-zw 2842afb
Test the new scripts
a-zw 502f550
Explicit module
a-zw c666155
Move into new scripts_bazel/
a-zw e0405c4
Add a concept page about "docs dependencies"
a-zw e971a0f
Fix warnings
a-zw 4955337
Review feedback. Simplified things.
a-zw 470ecaf
More review feedback
a-zw 4d7cab0
Clean up tests
a-zw b6aecd4
Actually test
a-zw d4661f1
Update docs/concepts/docs_deps.rst
a-zw d42577b
Have scan_code attribute instead of sourcelinks_json rule
a-zw 7e2d09a
Merge remote-tracking branch 'origin/main' into sourcelinks_json
a-zw 90d694a
Adapt to Sphinx-Needs 6
a-zw File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,41 @@ | ||
|
|
||
| .. _docs_dependencies: | ||
|
|
||
| ========================== | ||
| Docs Dependencies | ||
| ========================== | ||
|
|
||
| When running ``bazel run :docs``, the documentation build system orchestrates multiple interconnected dependencies to produce HTML documentation. | ||
|
|
||
| 1. Gather inputs (Bazel may do this parallelized): | ||
|
|
||
| * Extract source code links from files via ``sourcelinks_json`` rule. | ||
|
|
||
| * Optionally, merge source links using the ``merge_sourcelinks`` rule. | ||
|
|
||
| * Needs (requirements) are gathered from various ``needs_json`` targets specified in the ``data`` attribute. | ||
|
|
||
| 2. Documentation sources are read from the specified source directory (default: ``docs/``). | ||
| Sphinx processes the documentation sources along with the merged data to generate the final HTML output. | ||
|
|
||
| .. plantuml:: | ||
|
|
||
| @startuml | ||
| left to right direction | ||
|
|
||
| collections "Documentation Sources" as DocsSource | ||
| collections "Needs JSON Targets" as NeedsTargets | ||
| collections "Source Code Links" as SourceLinks | ||
| artifact "Merge Data" as Merge | ||
| process "Sphinx Processing" as Sphinx | ||
| artifact "HTML Output" as HTMLOutput | ||
| collections "S-CORE extensions" as SCoreExt | ||
|
|
||
| DocsSource --> Sphinx | ||
| NeedsTargets --> Sphinx | ||
| SCoreExt --> Sphinx | ||
| SourceLinks --> Merge | ||
| Merge --> Sphinx | ||
| Sphinx --> HTMLOutput | ||
|
|
||
| @enduml | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| # Scripts | ||
|
|
||
| The scripts directory is only for local development (linters) so far. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,38 @@ | ||
| # ******************************************************************************* | ||
| # Copyright (c) 2026 Contributors to the Eclipse Foundation | ||
| # | ||
| # See the NOTICE file(s) distributed with this work for additional | ||
| # information regarding copyright ownership. | ||
| # | ||
| # This program and the accompanying materials are made available under the | ||
| # terms of the Apache License Version 2.0 which is available at | ||
| # https://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
| # ******************************************************************************* | ||
|
|
||
| load("@aspect_rules_py//py:defs.bzl", "py_binary") | ||
| load("@pip_process//:requirements.bzl", "all_requirements") | ||
|
|
||
| filegroup( | ||
| name = "sources", | ||
| srcs = glob(["**/*.py"]), | ||
| visibility = ["//visibility:public"], | ||
| ) | ||
|
|
||
| py_binary( | ||
| name = "generate_sourcelinks", | ||
| srcs = ["generate_sourcelinks_cli.py"], | ||
| main = "generate_sourcelinks_cli.py", | ||
| visibility = ["//visibility:public"], | ||
| deps = [ | ||
| "//src/extensions/score_source_code_linker", | ||
| ] + all_requirements, | ||
| ) | ||
|
|
||
| py_binary( | ||
| name = "merge_sourcelinks", | ||
| srcs = ["merge_sourcelinks.py"], | ||
| main = "merge_sourcelinks.py", | ||
| visibility = ["//visibility:public"], | ||
| ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| # Scripts Bazel | ||
|
|
||
| This folder contains executables to be used within Bazel rules. |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.