Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 31 additions & 2 deletions BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
# *******************************************************************************

load("@rules_python//python:pip.bzl", "compile_pip_requirements")
load("@score_docs_as_code//:docs.bzl", "docs")
load("@score_docs_as_code//:bzl/bundle_rules.bzl", "bundle_source_files")
load("@score_docs_as_code//:docs.bzl", "docs", "docs_bundle")
load("@score_tooling//:defs.bzl", "copyright_checker", "dash_license_checker", "setup_starpls")
load("@score_tooling//third_party/format:macros.bzl", "use_format_targets")
load("//:project_config.bzl", "PROJECT_CONFIG")
Expand Down Expand Up @@ -108,6 +109,26 @@ use_format_targets(languages = [
exports_files(["MODULE.bazel"])

# Docs
_IS_ROOT_MODULE = repository_name() == "@"

bundle_source_files(
name = "platform_docs_sources",
bundle = "@score_platform//:docs_bundle",
)

genrule(
name = "platform_glossary_rst",
srcs = [":platform_docs_sources"],
outs = ["platform_glossary/glossary.rst"],
cmd = "cp $$(printf '%s\\n' $(SRCS) | grep '/docs/features/lifecycle/glossary[.]rst$$') $@",
)

docs_bundle(
name = "platform_glossary",
srcs = [":platform_glossary_rst"],
entry_doc = "glossary",
)

docs(
bundles = [
{
Expand All @@ -118,7 +139,15 @@ docs(
"bundle": "//score/health_monitor:docs",
"mount_at": "components/health_monitor",
},
],
] + ([
# Glossary is located in score_platform but we also need to
# avoid duplication during integration in ref_int repository
{
"attach_to": "features/lifecycle/index",
"bundle": ":platform_glossary",
"mount_at": "features/lifecycle",
},
] if _IS_ROOT_MODULE else []),
external_needs = [
"@score_platform//:needs_json", # This allows linking to feature requirements.
"@score_process_description//:needs_json", # This allows linking to requirements (wp__requirements_comp, etc.) from the process_description repository.
Expand Down
124 changes: 0 additions & 124 deletions docs/features/lifecycle/glossary.rst

This file was deleted.

1 change: 0 additions & 1 deletion docs/features/lifecycle/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,3 @@ For the main feature description and requirements, see the belonging Feature in
safety_analysis/aou_requirements.rst
safety_planning/index.rst
security_planning/index.rst
glossary
Loading