Skip to content
Merged
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
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,6 @@ repos:
entry: cr_checker/tool/pre-commit_wrapper --extensions h hpp c cpp rs rst py sh bzl ini yml yaml BUILD bazel --fix
# this would be the better language implementation, but struggle with python tooling
# language: python
language: unsupported_script
language: script
minimum_pre_commit_version: 3.2.0
types_or: [python, yaml, ini, rst, sh, shell, bash, bazel, c, c++, rust]
2 changes: 1 addition & 1 deletion .pre-commit-hooks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@
entry: cr_checker/tool/pre-commit_wrapper --extensions h hpp c cpp rs rst py sh bzl ini yml yaml BUILD bazel --fix
# this would be the better language implementation, but struggle with python tooling
# language: python
language: unsupported_script
language: script
minimum_pre_commit_version: 3.2.0
types_or: [python, yaml, ini, rst, sh, shell, bash, bazel, c, c++, rust]
4 changes: 2 additions & 2 deletions MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -228,13 +228,13 @@ use_repo(pip, "manual_analysis_deps")
bazel_dep(name = "trlc", version = "0.0.0")
git_override(
module_name = "trlc",
commit = "c7750ebd0520996e05b9a9bc91eb6a4f62030f22",
commit = "1872957ae981ae632a0ec6eafb5b8d3aa44bdb86",
remote = "https://github.com/bmw-software-engineering/trlc.git",
)

bazel_dep(name = "lobster", version = "0.0.0")
git_override(
module_name = "lobster",
commit = "56881461f9d3fde2918d1731aa5937aaf64cd67c",
commit = "94ed5961ca28ee1b840cd8a938138c17ae4da671",
remote = "https://github.com/bmw-software-engineering/lobster.git",
)
19 changes: 19 additions & 0 deletions plantuml/BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# *******************************************************************************
# Copyright (c) 2025 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
# *******************************************************************************
filegroup(
name = "fta_metamodel",
srcs = [
"fta_metamodel.puml",
],
visibility = ["//visibility:public"],
)
63 changes: 63 additions & 0 deletions plantuml/fta_metamodel.puml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
' *******************************************************************************
' Copyright (c) 2025 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
' *******************************************************************************

@startuml

' AND gate: flat bottom + elliptic arch on top
sprite $and <svg width="60" height="70" viewBox="0 0 60 70" xmlns="http://www.w3.org/2000/svg">
<path d="M 8,58 H 52 V 35 A 22,27 0 0,0 8,35 L 8,58 Z" fill="white" stroke="black" stroke-width="2.5"/>
</svg>

' OR gate: pointed top, bowed sides, concave bottom
sprite $or <svg width="60" height="70" viewBox="0 0 60 70" xmlns="http://www.w3.org/2000/svg">
<path d="M 30,8 C 55,25 54,42 52,58 Q 30,48 8,58 C 6,42 5,25 30,8 Z" fill="white" stroke="black" stroke-width="2.5"/>
</svg>

' Transfer-In gate: upward triangle
sprite $transferin <svg width="60" height="70" viewBox="0 0 60 70" xmlns="http://www.w3.org/2000/svg">
<polygon points="30,8 52,60 8,60" fill="white" stroke="black" stroke-width="2.5"/>
</svg>

'skinparam linetype polyline
'skinparam linetype ortho

!procedure $TopEvent($name, $alias)
rectangle "$name" as $alias
!endprocedure

!procedure $IntermediateEvent($name, $alias, $connection)
rectangle "$name" as $alias
$alias -u-> $connection
!endprocedure

!procedure $BasicEvent($name, $alias, $connection)
usecase "$name" as $alias
$alias -u-> $connection
!endprocedure

!procedure $AndGate($alias, $connection)
rectangle " " <<$and>> as $alias
$alias -u-> $connection
!endprocedure

!procedure $OrGate($alias, $connection)
rectangle " " <<$or>> as $alias
$alias -u-> $connection
!endprocedure

!procedure $TransferInGate($alias, $connection)
rectangle " " <<$transferin>> as $alias
$alias -u-> $connection
!endprocedure

@enduml
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@ use test_framework::{run_case, DefaultExpectationChecker, DiagramProcessor};
// ===== Class Resolver adapter DiagramProcessor =====
struct ClassResolverRunner;
impl DiagramProcessor for ClassResolverRunner {
type Output = HashMap<String, ClassDiagram>;
type Output = ClassDiagram;
type Error = ClassResolverError;

fn run(
&self,
files: &HashSet<Rc<PathBuf>>,
) -> Result<HashMap<Rc<PathBuf>, HashMap<String, ClassDiagram>>, ClassResolverError> {
) -> Result<HashMap<Rc<PathBuf>, ClassDiagram>, ClassResolverError> {
let mut results = HashMap::new();
let mut parser = PumlClassParser;
let mut resolver = ClassResolver::new();
Expand Down
44 changes: 44 additions & 0 deletions tools/sphinx/BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# *******************************************************************************
# 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("@pip_rules_score//:requirements.bzl", "requirement")
load("@rules_java//java:defs.bzl", "java_binary")
load("@rules_python//sphinxdocs:sphinx.bzl", "sphinx_build_binary")

java_binary(
name = "plantuml",
main_class = "net.sourceforge.plantuml.Run",
visibility = ["//visibility:public"],
runtime_deps = [
"@blueprint_maven_dependencies//:net_sourceforge_plantuml_plantuml",
],
)

sphinx_build_binary(
name = "sphinx-build",
visibility = ["//visibility:public"],
deps = [
"@lobster//sphinx_lobster:sphinx_lobster_builder",
"@score_tooling//plantuml/sphinx/clickable_plantuml",
"@trlc//tools/sphinx/extensions/trlc",
requirement("sphinx"),
requirement("sphinx_rtd_theme"),
requirement("myst_parser"),
requirement("readthedocs_sphinx_ext"),
requirement("rst2pdf"),
requirement("sphinxcontrib-umlet"),
requirement("svglib"),
requirement("sphinxcontrib-plantuml"),
"@rules_python//python/runfiles",
],
)
Loading