diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS deleted file mode 100644 index ff063c4..0000000 --- a/.github/CODEOWNERS +++ /dev/null @@ -1,15 +0,0 @@ -# Comment out as not in score yet -# * @eclipse-score/infrastructure-tooling-community -# .* @eclipse-score/infrastructure-tooling-community -# .github/CODEOWNERS @eclipse-score/technical-lead - -# in separate repositories: -# -# /docs @eclipse-score/process-community -# /docs/manual @eclipse-score//safety-manager -# /docs/release @eclipse-score//quality-manager @eclipse-score//module-lead -# /docs/safety_plan @eclipse-score//safety-manager @eclipse-score//module-lead -# /docs/safety_analysis @eclipse-score//safety-manager -# /docs/verification @eclipse-score//quality-manager @eclipse-score//safety-manager -# /components @eclipse-score//technical-lead -# /components/*/ @eclipse-score//automotive-score-committers diff --git a/.gitignore b/.gitignore deleted file mode 100644 index e7dc329..0000000 --- a/.gitignore +++ /dev/null @@ -1,56 +0,0 @@ -# Prerequisites -*.d - -# Compiled Object files -*.slo -*.lo -*.o -*.obj - -# Precompiled Headers -*.gch -*.pch - -# Compiled Dynamic libraries -*.so -*.dylib -*.dll - -# Fortran module files -*.mod -*.smod - -# Compiled Static libraries -*.lai -*.la -*.a -*.lib - -# Executables -*.exe -*.out -*.app - - -# Bazel -bazel-* -MODULE.bazel.lock -user.bazelrc - -# Ruff -.ruff_cache - -# docs:incremental and docs:ide_support build artifacts -/_build - -# Vale - editorial style guide -.vale.ini -styles/ - -# direnv - folder-specific bash configuration -.envrc - -# Python -.venv -__pycache__/ -/.coverage diff --git a/.vscode/extensions.json b/.vscode/extensions.json deleted file mode 100644 index ce87b69..0000000 --- a/.vscode/extensions.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "recommendations": [ - // Editing *.drawio.svg files directly in VS Code - "hediet.vscode-drawio", - - // Some convenient extensions for editing reStructuredText files - "lextudio.restructuredtext", - - // Linting and live preview for score docs - "swyddfa.esbonio", - - // ErrorLens highlights errors and warnings in your code / docs - "usernamehw.errorlens", - - // Linting and formatting for Python (LSP via ruff server) - "charliermarsh.ruff", - - // BasedPyright for python various type checking improvements and pylance features - "detachhead.basedpyright", - ] -} diff --git a/.vscode/restructuredtext.code-snippets b/.vscode/restructuredtext.code-snippets deleted file mode 100644 index bde982f..0000000 --- a/.vscode/restructuredtext.code-snippets +++ /dev/null @@ -1,347 +0,0 @@ -{ - "std_req_directive": { - "prefix": "std_req__", - "description": "Create a Standard Requirement", - "body": [ - ".. std_req:: $1", - " :id: std_req__$2", - " :status: ${3|valid|}", - "", - " ${4}" - ] - }, - "std_wp_directive": { - "prefix": "std_wp__", - "description": "Create a Standard Work Product", - "body": [ - ".. std_wp:: $1", - " :id: std_wp__$2", - " :status: ${3|valid|}", - "", - " ${4}" - ] - }, - "workflow_directive": { - "prefix": "wf__", - "description": "Create a Workflow", - "body": [ - ".. workflow:: $1", - " :id: wf__$2", - " :status: ${3|valid, draft|}", - " :input: ${4}", - " :output: ${5}", - " :approved_by: ${6}", - " :responsible: ${7}", - "", - " ${8}" - ] - }, - "gd_req_directive": { - "prefix": "gd_req__", - "description": "Create a Process Requirements", - "body": [ - ".. gd_req:: $1", - " :id: gd_req__$2", - " :status: ${3|valid, draft|}", - "", - " ${4}" - ] - }, - "gd_temp_directive": { - "prefix": "gd_temp__", - "description": "Create a Process Template", - "body": [ - ".. gd_temp:: $1", - " :id: gd_temp__$2", - " :status: ${3|valid, draft|}", - "", - " ${4}" - ] - }, - "gd_chklst_directive": { - "prefix": "gd_chklst__", - "description": "Create a Process Checklist", - "body": [ - ".. gd_chklst:: $1", - " :id: gd_chklst__$2", - " :status: ${3|valid, draft|}", - "", - " ${4}" - ] - }, - "gd_guidl_directive": { - "prefix": "gd_guidl__", - "description": "Create a Process Guideline", - "body": [ - ".. gd_guidl:: $1", - " :id: gd_guidl__$2", - " :status: ${3|valid, draft|}", - "", - " ${4}" - ] - }, - "gd_method_directive": { - "prefix": "gd_meth__", - "description": "Create a Process Method", - "body": [ - ".. gd_method:: $1", - " :id: gd_meth__$2", - " :status: ${3|valid, draft|}", - "", - " ${4}" - ] - }, - "workproduct_directive": { - "prefix": "wp__", - "description": "Create a Workproduct", - "body": [ - ".. workproduct:: $1", - " :id: wp__$2", - " :status: ${3|valid, draft|}", - "", - " ${4}" - ] - }, - "role_directive": { - "prefix": "rl__", - "description": "Create a Role", - "body": [ - ".. role:: $1", - " :id: rl__$2", - "", - " ${3}" - ] - }, - "doc_concept_directive": { - "prefix": "doc_concept__", - "description": "Create a Concept Definition", - "body": [ - ".. doc_concept:: $1", - " :id: doc_concept__$2", - " :status: ${3|valid, draft|}", - "", - " ${4}" - ] - }, - "doc_getstrt_directive": { - "prefix": "doc_getstrt__", - "description": "Create a Getting Startet", - "body": [ - ".. doc_getstrt:: $1", - " :id: doc_getstrt__$2", - " :status: ${3|valid, draft|}", - "", - " ${4}" - ] - }, - "document_directive": { - "prefix": "doc__", - "description": "Create a Generic Document", - "body": [ - ".. document:: $1", - " :id: doc__$2", - " :safety: ${3|QM, ASIL_B, ASIL_D|}", - " :status: ${4|valid, draft, invalid|}", - "", - " ${5}" - ] - }, - "stkh_req_directive": { - "prefix": "stkh_req__", - "description": "Create a Stakeholder Requirement", - "body": [ - ".. stkh_req:: $1", - " :id: stkh_req__$2", - " :reqtype: ${3|Functional, Interface, Process, Legal, Non-Functional|}", - " :security: ${4|YES, NO|}", - " :safety: ${5|QM, ASIL_B, ASIL_D|}", - " :status: ${6|valid, invalid|}", - " :rationale: ${7}", - "", - " ${8}" - ] - }, - "feat_req_directive": { - "prefix": "feat_req__", - "description": "Create a Feature Requirement", - "body": [ - ".. feat_req:: $1", - " :id: feat_req__$2", - " :reqtype: ${3|Functional, Interface, Process, Legal, Non-Functional|}", - " :security: ${4|YES, NO|}", - " :safety: ${5|QM, ASIL_B, ASIL_D|}", - " :status: ${6|valid, invalid|}", - " :satisfies: ${7}", - "", - " ${8}" - ] - }, - "comp_req_directive": { - "prefix": "comp_req__", - "description": "Create a Component Requirement", - "body": [ - ".. comp_req:: $1", - " :id: comp_req__$2", - " :reqtype: ${3|Functional, Interface, Process, Legal, Non-Functional|}", - " :security: ${4|YES, NO|}", - " :safety: ${5|QM, ASIL_B, ASIL_D|}", - " :status: ${6|valid, invalid|}", - " :satisfies: ${7}", - "", - " ${8}" - ] - }, - "tool_req_directive": { - "prefix": "tool_req__", - "description": "Create a Tool Requirement", - "body": [ - ".. tool_req:: $1", - " :id: tool_req__$2", - " :reqtype: ${3|Functional, Interface, Process, Legal, Non-Functional|}", - " :security: ${4|YES, NO|}", - " :safety: ${5|QM, ASIL_B, ASIL_D|}", - " :status: ${6|valid, invalid|}", - " :satisfies: ${7}", - "", - " ${8}" - ] - }, - "aou_req_directive": { - "prefix": "aou_req__", - "description": "Create a Assumption of Use", - "body": [ - ".. aou_req:: $1", - " :id: aou_req__$2", - " :reqtype: ${3|Functional, Interface, Process, Legal, Non-Functional|}", - " :security: ${4|YES, NO|}", - " :safety: ${5|QM, ASIL_B, ASIL_D|}", - " :status: ${6|valid, invalid|}", - "", - " ${7}" - ] - }, - "feat_arc_sta_directive": { - "prefix": "feat_arc_sta__", - "description": "Create a Feature Architecture Static View", - "body": [ - ".. feat_arc_sta:: $1", - " :id: feat_arc_sta__$2", - " :security: ${3|YES, NO|}", - " :safety: ${4|QM, ASIL_B, ASIL_D|}", - " :status: ${5|valid, invalid|}", - " :satisfies: ${6}", - "", - " ${7}" - ] - }, - "feat_arc_dyn_directive": { - "prefix": "feat_arc_dyn__", - "description": "Create a Feature Architecture Dynamic View", - "body": [ - ".. feat_arc_dyn:: $1", - " :id: feat_arc_dyn__$2", - " :security: ${3|YES, NO|}", - " :safety: ${4|QM, ASIL_B, ASIL_D|}", - " :status: ${5|valid, invalid|}", - " :satisfies: ${6}", - "", - " ${7}" - ] - }, - "feat_arc_int_directive": { - "prefix": "feat_arc_int__", - "description": "Create a Feature Architecture Interfaces", - "body": [ - ".. feat_arc_int:: $1", - " :id: feat_arc_int__$2", - " :security: ${3|YES, NO|}", - " :safety: ${4|QM, ASIL_B, ASIL_D|}", - " :status: ${5|valid, invalid|}", - " :satisfies: ${6}", - "", - " ${7}" - ] - }, - "feat_arc_int_op_directive": { - "prefix": "feat_arc_int_op__", - "description": "Create a Feature Architecture Interface Operation", - "body": [ - ".. feat_arc_int_op:: $1", - " :id: feat_arc_int_op__$2", - " :security: ${3|YES, NO|}", - " :safety: ${4|QM, ASIL_B, ASIL_D|}", - " :status: ${5|valid, invalid|}", - "", - " ${6}" - ] - }, - "mod_arc_sta_directive": { - "prefix": "mod_arc_sta__", - "description": "Create a Module Architecture Static View", - "body": [ - ".. mod_arc_sta:: $1", - " :id: mod_arc_sta__$2", - " :security: ${3|YES, NO|}", - " :safety: ${4|QM, ASIL_B, ASIL_D|}", - " :status: ${5|valid, invalid|}", - "", - " ${6}" - ] - }, - "comp_arc_sta_directive": { - "prefix": "comp_arc_sta__", - "description": "Create a Component Architecture Static View", - "body": [ - ".. comp_arc_sta:: $1", - " :id: comp_arc_sta__$2", - " :security: ${3|YES, NO|}", - " :safety: ${4|QM, ASIL_B, ASIL_D|}", - " :status: ${5|valid, invalid|}", - " :satisfies: ${6}", - "", - " ${7}" - ] - }, - "comp_arc_dyn_directive": { - "prefix": "comp_arc_dyn__", - "description": "Create a Component Architecture Dynamic View", - "body": [ - ".. comp_arc_dyn:: $1", - " :id: comp_arc_dyn__$2", - " :security: ${3|YES, NO|}", - " :safety: ${4|QM, ASIL_B, ASIL_D|}", - " :status: ${5|valid, invalid|}", - " :satisfies: ${6}", - "", - " ${7}" - ] - }, - "comp_arc_int_directive": { - "prefix": "comp_arc_int__", - "description": "Create a Component Architecture Interfaces", - "body": [ - ".. comp_arc_int:: $1", - " :id: comp_arc_int__$2", - " :security: ${3|YES, NO|}", - " :safety: ${4|QM, ASIL_B, ASIL_D|}", - " :status: ${5|valid, invalid|}", - " :satisfies: ${6}", - "", - " ${7}" - ] - }, - "comp_arc_int_op_directive": { - "prefix": "comp_arc_int_op__", - "description": "Create a Component Architecture Interface Operation", - "body": [ - ".. comp_arc_int_op:: $1", - " :id: comp_arc_int_op__$2", - " :security: ${3|YES, NO|}", - " :safety: ${4|QM, ASIL_B, ASIL_D|}", - " :status: ${5|valid, invalid|}", - " :satisfies: ${6}", - "", - " ${7}" - ] - } -} \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json deleted file mode 100644 index 47cb954..0000000 --- a/.vscode/settings.json +++ /dev/null @@ -1,106 +0,0 @@ -{ - // General Settings - "files.insertFinalNewline": true, - "files.trimFinalNewlines": true, - "files.trimTrailingWhitespace": true, - "editor.insertSpaces": true, - "editor.tabCompletion": "on", - - // Default for any filetype - "editor.rulers": [ - 99 - ], - - // Exclude build, temp and cache folders - "files.watcherExclude": { - ".*/**": true, - "**/__pycache__/**": true, - "bazel-*/**": true, - ".venv*/**": true, - "_build/**": true, - }, - - // Python Settings - // Exclude build, temp and cache folders - "python.analysis.exclude": [ - // Note: this overrides the default setting, so we need to re-exclude defaults like .* and **/__pycache__ - ".*", - "**/__pycache__", - "bazel-*", - ".venv*", - "_build", - ], - "[python]": { - // In python using 80 characters per line is the standard. - "editor.rulers": [ - 79 - ], - // Opinionated option for the future: - // "editor.formatOnSave": true, - "editor.codeActionsOnSave": { - "source.sortImports": "explicit" - }, - "editor.defaultFormatter": "charliermarsh.ruff", - }, - - // Markdown Settings - "[markdown]": { - // We mostly write markdown in some combination with python, - // so we use the same rulers as python. - "editor.rulers": [ - 79, 99 - ] - }, - - "bazel.lsp.command": "bazel", - "bazel.lsp.args": [ - "run", - "//:starpls_server" - ], - - // RST Settings - "[restructuredtext]": { - "editor.tabSize": 3, - }, - // - // - // Esbonio 0.x (Current) - // see https://github.com/swyddfa/esbonio/blob/0.x/docs/lsp/getting-started.rst - // and https://github.com/swyddfa/esbonio/blob/0.x/docs/lsp/editors/vscode/_configuration.rst - "esbonio.server.pythonPath": "${workspaceFolder}/.venv_docs/bin/python", - "esbonio.sphinx.srcDir": "${workspaceFolder}/docs", - "esbonio.sphinx.confDir": "${workspaceFolder}/docs", - "esbonio.sphinx.buildDir": "${workspaceFolder}/_build", - "esbonio.server.logLevel": "info", - // Do not auto-install. We'll use the one in the venv. - "esbonio.server.installBehavior": "nothing", - // Enable port forwarding for preview if working on remote workstation - "remote.autoForwardPorts": true, - "remote.autoForwardPortsSource": "process", - // - // - // Esbonio 1.x (Preview) - "esbonio.sphinx.pythonCommand": [ - ".venv_docs/bin/python" - ], - "esbonio.sphinx.buildCommand": [ - "docs", - "_build", - "-T", // show details in case of errors in extensions - "--jobs", - "auto", - "--conf-dir", - "docs" - ], - // default is "error", which doesn't show anything. - "esbonio.logging.level": "warning", - "python.testing.pytestArgs": [ - ".", - "--ignore-glob=bazel-*/*", - "--ignore-glob=.venv_docs/*", - "--ignore-glob=_build/*", - - ], - "python.testing.unittestEnabled": false, - "python.testing.pytestEnabled": true, -} diff --git a/BUILD b/BUILD index 1d9e33c..94478ea 100644 --- a/BUILD +++ b/BUILD @@ -25,8 +25,6 @@ setup_starpls( copyright_checker( name = "copyright", srcs = [ - "src", - "tests", "//:BUILD", "//:MODULE.bazel", ], diff --git a/CONTRIBUTION.md b/CONTRIBUTION.md deleted file mode 100644 index dcc54e6..0000000 --- a/CONTRIBUTION.md +++ /dev/null @@ -1,35 +0,0 @@ -# Eclipse Safe Open Vehicle Core (SCORE) -The [Eclipse Safe Open Vehicle Core](https://projects.eclipse.org/projects/automotive.score) project aims to develop an open-source core stack for Software Defined Vehicles (SDVs), specifically targeting embedded high-performance Electronic Control Units (ECUs). -Please check the [documentation](https://eclipse-score.github.io) for more information. -The source code is hosted at [GitHub](https://github.com/eclipse-score). - -The communication mainly takes place via the [`score-dev` mailing list](https://accounts.eclipse.org/mailing-list/score-dev) and GitHub issues & pull requests (PR). And we have a chatroom for community discussions here [Eclipse SCORE chatroom](https://chat.eclipse.org/#/room/#automotive.score:matrix.eclipse.org). - -Please note that for the project the [Eclipse Foundationโ€™s Terms of Use](https://www.eclipse.org/legal/terms-of-use/) apply. -In addition, you need to sign the [ECA](https://www.eclipse.org/legal/ECA.php) and the [DCO](https://www.eclipse.org/legal/dco/) to contribute to the project. - -## Contributing -### Getting the source code & building the project -Please refer to the [README.md](README.md) for further information. - -### Getting involved - -#### Setup Phase -This phase is part of the eclipse Incubation Phase and shall establish all the processes needed for a safe development of functions. Only after this phase it will be possible to contribute code to the project. As the development in this project is driven by requirements, the processes and needed infrastructure incl. tooling will be established based on non-functional Stakeholder_Requirements. During setup phase the contributions are Bug Fixes and Improvements (both on processes and infrastructure). - -#### Bug Fixes and Improvements -Improvements are adding/changing processes and infrastructure, bug fixes can be also on development work products like code. -In case you want to fix a bug or contribute an improvement, please perform the following steps: -1) Create a PR by using the corresponding template ([Bugfix PR template](.github/PULL_REQUEST_TEMPLATE/bug_fix.md) or [Improvement PR template](.github/PULL_REQUEST_TEMPLATE/improvement.md)). Please mark your PR as draft until it's ready for review by the Committers (see the [Eclipse Foundation Project Handbook](https://www.eclipse.org/projects/handbook/#contributing-committers) for more information on the role definitions). Improvements are requested by the definition or modification of [Stakeholder Requirements](docs/stakeholder_requirements) or [Tool Requirements](docs/tool_requirements) and may be implemented after acceptance/merge of the request by a second Improvement PR. The needed reviews are automatically triggered via the [CODEOWNERS](.github/CODEOWNERS) file in the repository. -2) Initiate content review by opening a corresponding issue for the PR when it is ready for review. Review of the PR and final merge into the project repository is in responsibility of the Committers. Use the [Bugfix Issue template](.github/ISSUE_TEMPLATE/bug_fix.md) or [Improvement Issue template](.github/ISSUE_TEMPLATE/improvement.md) for this. - -Please check here for our Git Commit Rules in the [Configuration_Tool_Guidelines](https://eclipse-score.github.io/score/process_description/guidelines/index.html). - -Please use the [Stakeholder and Tool Requirements Template](https://eclipse-score.github.io/score/process_description/templates/index.html) when defining these requirements. - -![Contribution guide workflow](./docs/_assets/contribution_guide.svg "Contribution guide workflow") - -#### Additional Information -Please note, that all Git commit messages must adhere the rules described in the [Eclipse Foundation Project Handbook](https://www.eclipse.org/projects/handbook/#resources-commit). - -Please find process descriptions here: [process description](https://eclipse-score.github.io/score/process_description/). diff --git a/README.md b/README.md deleted file mode 100644 index 1e8af75..0000000 --- a/README.md +++ /dev/null @@ -1,114 +0,0 @@ - -# C++ & Rust Bazel Template Repository - -This repository serves as a **template** for setting up **C++ and Rust projects** using **Bazel**. -It provides a **standardized project structure**, ensuring best practices for: - -- **Build configuration** with Bazel. -- **Testing** (unit and integration tests). -- **Documentation** setup. -- **CI/CD workflows**. -- **Development environment** configuration. - ---- - -## ๐Ÿ“‚ Project Structure - -| File/Folder | Description | -| ----------------------------------- | ------------------------------------------------- | -| `README.md` | Short description & build instructions | -| `src/` | Source files for the module | -| `tests/` | Unit tests (UT) and integration tests (IT) | -| `examples/` | Example files used for guidance | -| `docs/` | Documentation (Doxygen for C++ / mdBook for Rust) | -| `.github/workflows/` | CI/CD pipelines | -| `.vscode/` | Recommended VS Code settings | -| `.bazelrc`, `MODULE.bazel`, `BUILD` | Bazel configuration & settings | -| `project_config.bzl` | Project-specific metadata for Bazel macros | -| `LICENSE.md` | Licensing information | -| `CONTRIBUTION.md` | Contribution guidelines | - ---- - -## ๐Ÿš€ Getting Started - -### 1๏ธโƒฃ Clone the Repository - -```sh -git clone https://github.com/eclipse-score/YOUR_PROJECT.git -cd YOUR_PROJECT -``` - -### 2๏ธโƒฃ Build the Examples of module - -> DISCLAIMER: Depending what module implements, it's possible that different -> configuration flags needs to be set on command line. - -To build all targets of the module the following command can be used: - -```sh -bazel build //src/... -``` - -This command will instruct Bazel to build all targets that are under Bazel -package `src/`. The ideal solution is to provide single target that builds -artifacts, for example: - -```sh -bazel build //src/:release_artifacts -``` - -where `:release_artifacts` is filegroup target that collects all release -artifacts of the module. - -> NOTE: This is just proposal, the final decision is on module maintainer how -> the module code needs to be built. - -### 3๏ธโƒฃ Run Tests - -```sh -bazel test //tests/... -``` - ---- - -## ๐Ÿ›  Tools & Linters - -The template integrates **tools and linters** from **centralized repositories** to ensure consistency across projects. - -- **C++:** `clang-tidy`, `cppcheck`, `Google Test` -- **Rust:** `clippy`, `rustfmt`, `Rust Unit Tests` -- **CI/CD:** GitHub Actions for automated builds and tests - ---- - -## ๐Ÿ“– Documentation - -- A **centralized docs structure** is planned. - ---- - -## โš™๏ธ `project_config.bzl` - -This file defines project-specific metadata used by Bazel macros, such as `dash_license_checker`. - -### ๐Ÿ“Œ Purpose - -It provides structured configuration that helps determine behavior such as: - -- Source language type (used to determine license check file format) -- Safety level or other compliance info (e.g. ASIL level) - -### ๐Ÿ“„ Example Content - -```python -PROJECT_CONFIG = { - "asil_level": "QM", # or "ASIL-A", "ASIL-B", etc. - "source_code": ["cpp", "rust"] # Languages used in the module -} -``` - -### ๐Ÿ”ง Use Case - -When used with macros like `dash_license_checker`, it allows dynamic selection of file types - (e.g., `cargo`, `requirements`) based on the languages declared in `source_code`. diff --git a/docs/conf.py b/docs/conf.py index cf13475..753fedb 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -20,7 +20,7 @@ # -- Project information ----------------------------------------------------- # https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information -project = "Module Template Project" +project = "Bazel Tools Python" project_url = "https://eclipse-score.github.io/module_template/" project_prefix = "MODULE_TEMPLATE_" author = "S-CORE" diff --git a/docs/index.rst b/docs/index.rst index 32332d4..72d5803 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -12,70 +12,7 @@ # SPDX-License-Identifier: Apache-2.0 # ******************************************************************************* -Module Template Documentation +Bazel Tools Python ============================= -This documentation describes the structure, usage and configuration of the Bazel-based C++/Rust module template. - -.. contents:: Table of Contents - :depth: 2 - :local: - -Overview --------- - -This repository provides a standardized setup for projects using **C++** or **Rust** and **Bazel** as a build system. -It integrates best practices for build, test, CI/CD and documentation. - -Requirements ------------- - -.. stkh_req:: Example Functional Requirement - :id: stkh_req__docgen_enabled__example - :status: valid - :safety: QM - :reqtype: Functional - :rationale: Ensure documentation builds are possible for all modules - - -Project Layout --------------- - -The module template includes the following top-level structure: - -- `src/`: Main C++/Rust sources -- `tests/`: Unit and integration tests -- `examples/`: Usage examples -- `docs/`: Documentation using `docs-as-code` -- `.github/workflows/`: CI/CD pipelines - -Quick Start ------------ - -To build the module: - -.. code-block:: bash - - bazel build //src/... - -To run tests: - -.. code-block:: bash - - bazel test //tests/... - -Configuration -------------- - -The `project_config.bzl` file defines metadata used by Bazel macros. - -Example: - -.. code-block:: python - - PROJECT_CONFIG = { - "asil_level": "QM", - "source_code": ["cpp", "rust"] - } - -This enables conditional behavior (e.g., choosing `clang-tidy` for C++ or `clippy` for Rust). +Please check the project README for the project configuration. diff --git a/examples/BUILD b/examples/BUILD deleted file mode 100644 index 012dd54..0000000 --- a/examples/BUILD +++ /dev/null @@ -1,8 +0,0 @@ -# Needed for Dash tool to check python dependency licenses. -filegroup( - name = "cargo_lock", - srcs = [ - "Cargo.lock", - ], - visibility = ["//visibility:public"], -) diff --git a/examples/Cargo.lock b/examples/Cargo.lock deleted file mode 100644 index cd1fbfa..0000000 --- a/examples/Cargo.lock +++ /dev/null @@ -1,18 +0,0 @@ -# This file is automatically @generated by Cargo. -# It is not intended for manual editing. -version = 4 - -[[package]] -name = "aho-corasick" -version = "1.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" -dependencies = [ - "memchr", -] - -[[package]] -name = "aliasable" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "250f629c0161ad8107cf89319e990051fae62832fd343083bea452d93e2205fd" diff --git a/pyproject.toml b/pyproject.toml deleted file mode 100644 index 3c9144d..0000000 --- a/pyproject.toml +++ /dev/null @@ -1,9 +0,0 @@ -[tool.basedpyright] -extends = "bazel-bin/ide_support.runfiles/score_python_basics~/pyproject.toml" -verboseOutput = true - -exclude = [ - "**/__pycache__", - "**/.*", - "**/bazel-*", -] diff --git a/src/BUILD b/src/BUILD deleted file mode 100644 index e69de29..0000000 diff --git a/tests/cpp/BUILD b/tests/cpp/BUILD deleted file mode 100644 index e3b354e..0000000 --- a/tests/cpp/BUILD +++ /dev/null @@ -1,19 +0,0 @@ -# ******************************************************************************* -# 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 -# ******************************************************************************* -cc_test( - name = "cpp_test_main", - srcs = ["test_main.cpp"], - deps = [ - "@googletest//:gtest_main", # GoogleTest dependency via Bazel Modules - ], -) diff --git a/tests/cpp/test_main.cpp b/tests/cpp/test_main.cpp deleted file mode 100644 index f523107..0000000 --- a/tests/cpp/test_main.cpp +++ /dev/null @@ -1,41 +0,0 @@ -/******************************************************************************** -* 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 -********************************************************************************/ -#include - -// Function to be tested -int add(int a, int b) { - return a + b; -} - -// Test case -TEST(AdditionTest, HandlesPositiveNumbers) { - EXPECT_EQ(add(2, 3), 5); - EXPECT_EQ(add(10, 20), 30); -} - -TEST(AdditionTest, HandlesNegativeNumbers) { - EXPECT_EQ(add(-2, -3), -5); - EXPECT_EQ(add(-10, 5), -5); -} - -TEST(AdditionTest, HandlesZero) { - EXPECT_EQ(add(0, 0), 0); - EXPECT_EQ(add(0, 5), 5); - EXPECT_EQ(add(5, 0), 5); -} - -// Main function for running tests -int main(int argc, char **argv) { - ::testing::InitGoogleTest(&argc, argv); - return RUN_ALL_TESTS(); -} diff --git a/tests/rust/BUILD b/tests/rust/BUILD deleted file mode 100644 index 828a001..0000000 --- a/tests/rust/BUILD +++ /dev/null @@ -1,18 +0,0 @@ -# ******************************************************************************* -# 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 -# ******************************************************************************* -load("@rules_rust//rust:defs.bzl", "rust_test") - -rust_test( - name = "rust_hello_test", - srcs = ["test_main.rs"], -) diff --git a/tests/rust/test_main.rs b/tests/rust/test_main.rs deleted file mode 100644 index 9390d5e..0000000 --- a/tests/rust/test_main.rs +++ /dev/null @@ -1,4 +0,0 @@ -#[test] -fn test_hello() { - assert_eq!(2 + 2, 4); -}