Skip to content

Commit 9390082

Browse files
authored
Merge branch 'main' into nicu1989_uplift_docs_as_code
Signed-off-by: Nicolae Dicu <nicolae.dicu.ext@qorix.ai>
2 parents 7699ec5 + a1ef140 commit 9390082

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+2600
-2291
lines changed

.bazelversion

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
8.3.0
1+
8.3.0

.github/workflows/check.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,10 +80,13 @@ jobs:
8080
sudo apt-get update
8181
sudo apt-get install -y lcov
8282
83-
- name: Extract Coverage for kvs.cpp
83+
- name: Extract Coverage for CPP Files
8484
run: |
8585
REPORT=$(find "$(bazel info output_path)" -name _coverage_report.dat | head -n1)
8686
lcov \
8787
--rc branch_coverage=1 \
88-
--extract "$REPORT" "src/cpp/src/kvs.cpp" \
88+
--extract "$REPORT" '*.cpp' -o "${REPORT}.cpp" \
8989
--output-file kvs_coverage.info
90+
91+
- name: Bazel Benchmark
92+
run: bazel run -c opt //:bm_kvs_cpp

.github/workflows/copyright.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,3 @@ on:
2020
jobs:
2121
copyright-check:
2222
uses: eclipse-score/cicd-workflows/.github/workflows/copyright.yml@main
23-
with:
24-
bazel-target: "run //:copyright.check"

.github/workflows/docs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,5 +38,5 @@ jobs:
3838
id-token: write
3939

4040
with:
41-
bazel run //:docs -- --github_user=${{ github.repository_owner }} --github_repo=${{ github.event.repository.name }}
41+
bazel-target: "//:docs -- --github_user=${{ github.repository_owner }} --github_repo=${{ github.event.repository.name }}"
4242
retention-days: 3

.github/workflows/format.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,4 @@ on:
2222

2323
jobs:
2424
formatting-check:
25-
uses: qorix-group/cicd-workflows/.github/workflows/format.yml@dcalavrezo_local_cache
26-
with:
27-
bazel-target: "test //:format.check" # optional, this is the default
25+
uses: eclipse-score/cicd-workflows/.github/workflows/format.yml@main

BUILD

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,25 @@
1010
#
1111
# SPDX-License-Identifier: Apache-2.0
1212
# *******************************************************************************
13+
1314
load("@score_cr_checker//:cr_checker.bzl", "copyright_checker")
1415
load("@score_dash_license_checker//:dash.bzl", "dash_license_checker")
16+
load("@score_docs_as_code//:docs.bzl", "docs")
1517
load("@score_format_checker//:macros.bzl", "use_format_targets")
1618
load("@score_starpls_lsp//:starpls.bzl", "setup_starpls")
1719
load("//:project_config.bzl", "PROJECT_CONFIG")
1820
load("@score_docs_as_code//:docs.bzl", "docs")
1921

22+
# Creates all documentation targets:
23+
# - `:docs` for building documentation at build-time
24+
docs(
25+
data = [
26+
"@score_platform//:needs_json",
27+
"@score_process//:needs_json",
28+
],
29+
source_dir = "docs",
30+
)
31+
2032
setup_starpls(
2133
name = "starpls_server",
2234
visibility = ["//visibility:public"],
@@ -46,7 +58,7 @@ use_format_targets()
4658

4759
alias(
4860
name = "kvs_cpp",
49-
actual = "//src/cpp:kvs_cpp",
61+
actual = "//src/cpp/src:kvs_cpp",
5062
visibility = ["//visibility:public"],
5163
)
5264

MODULE.bazel

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,14 @@ python.toolchain(
2828
use_repo(python)
2929

3030
# Add GoogleTest dependency
31-
bazel_dep(name = "googletest", version = "1.14.0")
31+
bazel_dep(name = "googletest", version = "1.15.0")
3232
bazel_dep(name = "google_benchmark", version = "1.9.4")
3333

3434
# Rust rules for Bazel
3535
bazel_dep(name = "rules_rust", version = "0.56.0")
3636

3737
# Checker rule for CopyRight checks/fixs
38-
bazel_dep(name = "score_cr_checker", version = "0.2.2")
38+
bazel_dep(name = "score_cr_checker", version = "0.3.1")
3939

4040
# C/C++ rules for Bazel
4141
bazel_dep(name = "rules_cc", version = "0.1.1")
@@ -59,13 +59,19 @@ bazel_dep(name = "score_dash_license_checker", version = "0.1.2")
5959

6060
# Format checker
6161
bazel_dep(name = "score_format_checker", version = "0.1.1")
62-
bazel_dep(name = "aspect_rules_lint", version = "1.0.3")
63-
bazel_dep(name = "buildifier_prebuilt", version = "7.3.1")
62+
bazel_dep(name = "aspect_rules_lint", version = "1.4.4")
63+
bazel_dep(name = "buildifier_prebuilt", version = "8.2.0.2")
6464

6565
#docs-as-code
6666
bazel_dep(name = "score_docs_as_code", version = "1.0.1")
67-
bazel_dep(name = "score_process", version = "1.1.0")
67+
git_override(
68+
module_name = "score_docs_as_code",
69+
commit = "13ba715a95cfe85158b60d7f4748ba8e28895d8c",
70+
remote = "https://github.com/eclipse-score/docs-as-code.git",
71+
)
72+
6873
bazel_dep(name = "score_platform", version = "0.3.0")
74+
bazel_dep(name = "score_process", version = "1.1.0")
6975

7076
# Module deps
7177

@@ -97,6 +103,6 @@ archive_override(
97103
bazel_dep(name = "score-baselibs", version = "0.0.0")
98104
git_override(
99105
module_name = "score-baselibs",
100-
commit = "ae349b99cafc1e79d98c0391a851fc5664c04ebc",
106+
commit = "46923f5c4f302bd9feae0261588687aaf32e3c5c",
101107
remote = "https://github.com/eclipse-score/baselibs.git",
102108
)

docs/conf.py

Lines changed: 20 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# *******************************************************************************
2-
# Copyright (c) 2024 Contributors to the Eclipse Foundation
2+
# Copyright (c) 2025 Contributors to the Eclipse Foundation
33
#
44
# See the NOTICE file(s) distributed with this work for additional
55
# information regarding copyright ownership.
@@ -19,11 +19,12 @@
1919

2020
# -- Project information -----------------------------------------------------
2121
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information
22-
project = "Persistency"
23-
project_url = "https://eclipse-score.github.io/inc_mw_per"
24-
project_prefix = "PERSISTENCY_"
25-
version = "0.1.0"
22+
23+
project = "Score Persistency"
24+
project_url = "https://eclipse-score.github.io/inc_mw_per/"
25+
project_prefix = "PER_"
2626
author = "S-CORE"
27+
version = "0.1.0"
2728

2829
# -- General configuration ---------------------------------------------------
2930
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
@@ -32,6 +33,7 @@
3233
extensions = [
3334
"sphinx_design",
3435
"sphinx_needs",
36+
"myst_parser",
3537
"sphinxcontrib.plantuml",
3638
"score_plantuml",
3739
"score_metamodel",
@@ -40,16 +42,26 @@
4042
"score_layout",
4143
]
4244

45+
myst_enable_extensions = ["colon_fence"]
46+
4347
exclude_patterns = [
4448
# The following entries are not required when building the documentation via 'bazel
45-
# build //docs:docs', as that command runs in a sandboxed environment. However, when
46-
# building the documentation via 'bazel run //docs:incremental' or esbonio, these
49+
# build //:docs', as that command runs in a sandboxed environment. However, when
50+
# building the documentation via 'bazel run //:docs' or esbonio, these
4751
# entries are required to prevent the build from failing.
4852
"bazel-*",
49-
".venv_docs",
53+
".venv*",
5054
]
5155

56+
# Enable markdown rendering
57+
source_suffix = {
58+
".rst": "restructuredtext",
59+
".md": "markdown",
60+
}
61+
5262
templates_path = ["templates"]
5363

64+
5465
# Enable numref
5566
numfig = True
67+
# needs_builder_filter = ""

src/cpp/BUILD renamed to src/cpp/src/BUILD

Lines changed: 25 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,37 @@
1313

1414
# The filegroup is used to collect all source files for the tests.
1515

16+
cc_library(
17+
name = "kvsvalue",
18+
srcs = [
19+
"kvsvalue.cpp",
20+
],
21+
hdrs = ["kvsvalue.hpp"],
22+
includes = ["."],
23+
visibility = [
24+
"//:__pkg__",
25+
"//src/cpp/src/internal:__pkg__",
26+
],
27+
)
28+
1629
cc_library(
1730
name = "kvs_cpp",
1831
srcs = [
19-
"inc/internal/kvs_helper.hpp",
20-
"src/kvs.cpp",
32+
"kvs.cpp",
33+
"kvsbuilder.cpp",
34+
],
35+
hdrs = [
36+
"kvs.hpp",
37+
"kvsbuilder.hpp",
38+
],
39+
implementation_deps = [
40+
"//src/cpp/src/internal:kvs_helper",
2141
],
22-
hdrs = ["inc/kvs.hpp"],
23-
includes = ["inc"],
42+
includes = ["."],
2443
visibility = ["//:__pkg__"],
2544
deps = [
45+
":kvsvalue",
46+
"//src/cpp/src/internal:error",
2647
"@score-baselibs//score/filesystem:filesystem",
2748
"@score-baselibs//score/json",
2849
"@score-baselibs//score/result:result",

src/cpp/src/internal/BUILD

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# *******************************************************************************
2+
# Copyright (c) 2025 Contributors to the Eclipse Foundation
3+
#
4+
# See the NOTICE file(s) distributed with this work for additional
5+
# information regarding copyright ownership.
6+
#
7+
# This program and the accompanying materials are made available under the
8+
# terms of the Apache License Version 2.0 which is available at
9+
# https://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# SPDX-License-Identifier: Apache-2.0
12+
# *******************************************************************************
13+
14+
cc_library(
15+
name = "error",
16+
srcs = [
17+
"error.cpp",
18+
],
19+
hdrs = [
20+
"error.hpp",
21+
],
22+
visibility = [
23+
"//src/cpp/src:__pkg__",
24+
"//src/cpp/tests:__pkg__",
25+
],
26+
deps = [
27+
"@score-baselibs//score/result:result",
28+
],
29+
)
30+
31+
cc_library(
32+
name = "kvs_helper",
33+
srcs = [
34+
"kvs_helper.cpp",
35+
],
36+
hdrs = [
37+
"kvs_helper.hpp",
38+
],
39+
visibility = [
40+
"//src/cpp/src:__pkg__",
41+
"//src/cpp/tests:__pkg__",
42+
],
43+
deps = [
44+
":error",
45+
"//src/cpp/src:kvsvalue",
46+
"@score-baselibs//score/json",
47+
],
48+
)

0 commit comments

Comments
 (0)