Skip to content

Commit f091901

Browse files
Merge branch 'release/v0.2.1'
2 parents afae072 + 94d2949 commit f091901

File tree

180 files changed

+32927
-30
lines changed

Some content is hidden

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

180 files changed

+32927
-30
lines changed

.clang-format

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
BasedOnStyle: Microsoft
3+
AccessModifierOffset: '-4'
4+
BreakConstructorInitializers: BeforeComma
5+
ColumnLimit: '0'
6+
IndentWidth: '4'
7+
KeepEmptyLinesAtTheStartOfBlocks: 'false'
8+
PointerAlignment: Left
9+
UseTab: Never
10+
FixNamespaceComments: 'false'
11+
IncludeBlocks: 'Regroup'
12+
IncludeCategories:
13+
- Regex: '^(<|")teiacare/'
14+
Priority: 1
15+
CaseSensitive: true
16+
- Regex: '.*'
17+
Priority: 2
18+
...

.clang-tidy

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
Checks: >
3+
clang-*,
4+
modernize-*',
5+
6+
WarningsAsErrors: '*'
7+
HeaderFilterRegex: '.*'
8+
...

.github/workflows/coverage.yml

Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
name: Coverage
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
7+
jobs:
8+
build:
9+
runs-on: ${{ matrix.agent }}
10+
name: '${{ matrix.build_type }} ${{ matrix.compiler }} ${{ matrix.compiler_version }}'
11+
strategy:
12+
fail-fast: false
13+
matrix:
14+
include:
15+
- agent: ubuntu-22.04
16+
compiler: gcc
17+
compiler_version: '12'
18+
activate_virtual_env: 'source .venv/bin/activate'
19+
build_type: 'Debug'
20+
- agent: ubuntu-22.04
21+
compiler: gcc
22+
compiler_version: '12'
23+
activate_virtual_env: 'source .venv/bin/activate'
24+
build_type: 'Release'
25+
- agent: ubuntu-22.04
26+
compiler: clang
27+
compiler_version: '15'
28+
activate_virtual_env: 'source .venv/bin/activate'
29+
build_type: 'Debug'
30+
- agent: ubuntu-22.04
31+
compiler: clang
32+
compiler_version: '15'
33+
activate_virtual_env: 'source .venv/bin/activate'
34+
build_type: 'Release'
35+
36+
steps:
37+
- name: Checkout code
38+
uses: actions/checkout@v3
39+
with:
40+
submodules: true
41+
42+
- name: Set up Python 3.10
43+
uses: actions/setup-python@v4
44+
with:
45+
python-version: '3.10'
46+
architecture: 'x64'
47+
48+
- name: Cache Virtual Environment
49+
uses: actions/cache@v3
50+
with:
51+
path: .venv
52+
key: venv-${{ runner.os }}-${{ matrix.build_type }}-${{ hashFiles('scripts/requirements.txt') }}
53+
54+
- name: Cache Conan
55+
uses: actions/cache@v3
56+
with:
57+
path: .conan
58+
key: conan-${{ runner.os }}-${{ matrix.build_type }}-${{ hashFiles('sdk/examples/conanfile.txt', 'sdk/tests/conanfile.txt') }}
59+
60+
- name: Setup Virtual Environment
61+
if: steps.cache.outputs.cache-hit != 'true'
62+
run: |
63+
python3 -m venv .venv
64+
source .venv/bin/activate
65+
pip install -r scripts/requirements.txt
66+
67+
- name: Setup Conan
68+
run: |
69+
source .venv/bin/activate
70+
python3 scripts/conan/setup.py ${{ matrix.build_type }} ${{ matrix.compiler }} ${{ matrix.compiler_version }}
71+
72+
- name: Run Code Coverage
73+
run: |
74+
source .venv/bin/activate
75+
python3 scripts/cmake.py ${{ matrix.build_type }} ${{ matrix.compiler }} ${{ matrix.compiler_version }} --warnings --coverage
76+
python3 scripts/tools/run_unit_tests.py ${{ matrix.build_type }}
77+
python3 scripts/tools/run_coverage.py ${{ matrix.compiler }} ${{ matrix.compiler_version }} sdk --extra_args=-e=sdk/src/datetime/date.h
78+
timeout-minutes: 5
79+
continue-on-error: true
80+
env:
81+
CONAN_USER_HOME: ${{ github.workspace }}
82+
83+
- name: Upload Codecov
84+
uses: codecov/codecov-action@v4
85+
with:
86+
files: './results/coverage/cobertura.xml'
87+
name: TeiaCareSDK
88+
slug: TeiaCare/TeiaCareSDK
89+
token: ${{secrets.CODECOV_TOKEN}}
90+
flags: '${{ matrix.build_type }} ${{ matrix.compiler }} ${{ matrix.compiler_version }}'
91+
92+
- name: Upload Codacy
93+
if: ${{ matrix.build_type == 'Release' && matrix.compiler == 'gcc' }}
94+
run: bash <(curl -Ls https://coverage.codacy.com/get.sh) report -r results/coverage/cobertura.xml
95+
env:
96+
CODACY_PROJECT_TOKEN: ${{secrets.CODACY_TOKEN}}

.github/workflows/docs.yml

Lines changed: 22 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
1-
# Simple workflow for deploying static content to GitHub Pages
21
name: Docs
32

43
on:
5-
# Runs on pushes targeting the default branch
64
push:
7-
branches: ["master"]
5+
branches:
6+
- 'develop'
87

9-
# Allows you to run this workflow manually from the Actions tab
108
workflow_dispatch:
119

1210
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
@@ -22,22 +20,36 @@ concurrency:
2220
cancel-in-progress: false
2321

2422
jobs:
25-
# Single deploy job since we're just deploying
2623
deploy:
24+
runs-on: ubuntu-latest
25+
2726
environment:
2827
name: github-pages
2928
url: ${{ steps.deployment.outputs.page_url }}
30-
runs-on: ubuntu-latest
29+
3130
steps:
3231
- name: Checkout
3332
uses: actions/checkout@v4
34-
- name: Setup Pages
33+
with:
34+
submodules: true
35+
36+
- name: Setup GitHub Pages
3537
uses: actions/configure-pages@v4
36-
- name: Upload artifact
38+
39+
- name: Build Docs
40+
run: sudo apt-get install -y doxygen graphviz
41+
42+
- name: Build Docs
43+
run: python3 scripts/tools/run_doxygen.py
44+
45+
- name: Upload Docs
3746
uses: actions/upload-pages-artifact@v3
3847
with:
39-
# Upload entire repository
40-
path: '.'
48+
name: github-pages
49+
path: 'docs/html'
50+
4151
- name: Deploy to GitHub Pages
4252
id: deployment
4353
uses: actions/deploy-pages@v4
54+
with:
55+
artifact_name: github-pages

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[submodule "scripts"]
2+
path = scripts
3+
url = https://github.com/TeiaCare/venvpp.git

.vscode/launch.json

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
{
2+
// Use IntelliSense to learn about possible attributes.
3+
// Hover to view descriptions of existing attributes.
4+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5+
"version": "0.2.0",
6+
"configurations": [
7+
{
8+
"name": "unit_tests (lldb)",
9+
"type": "lldb",
10+
"request": "launch",
11+
"cwd": "${workspaceFolder}/build/Debug/sdk",
12+
"program": "${workspaceFolder}/build/Debug/sdk/tests/teiacare_sdk_unit_tests",
13+
"args": [
14+
"--gtest_filter=*"
15+
]
16+
},
17+
{
18+
"name": "unit_tests (gdb)",
19+
"type": "cppdbg",
20+
"request": "launch",
21+
"externalConsole": false,
22+
"MIMode": "gdb",
23+
"setupCommands": [
24+
{
25+
"text": "-enable-pretty-printing"
26+
}
27+
],
28+
"cwd": "${workspaceFolder}/build/Debug/sdk",
29+
"program": "${workspaceFolder}/build/Debug/sdk/tests/teiacare_sdk_unit_tests",
30+
"args": [
31+
"--gtest_filter=*"
32+
]
33+
},
34+
{
35+
"name": "unit_tests (msvc)",
36+
"type": "cppvsdbg",
37+
"request": "launch",
38+
"console": "integratedTerminal",
39+
"cwd": "${workspaceFolder}/build/Debug/sdk",
40+
"program": "${workspaceFolder}/build/Debug/sdk/tests/teiacare_sdk_unit_tests",
41+
"args": [
42+
"--gtest_filter=*"
43+
]
44+
}
45+
]
46+
}

CHANGELOG

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# TeiaCareSDK Changelog
2+
3+
## [1.0.0] - 2024-xx-xx
4+
### Added

CMakeLists.txt

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
cmake_minimum_required(VERSION 3.21 FATAL_ERROR)
2+
file(STRINGS "VERSION" VERSION_STR)
3+
project(teiacare_sdk
4+
VERSION ${VERSION_STR}
5+
LANGUAGES CXX
6+
HOMEPAGE_URL "https://github.com/TeiaCare/TeiaCareSDK"
7+
DESCRIPTION "TeiaCareSDK is a collection of reusable C++ components"
8+
)
9+
10+
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
11+
list(APPEND CMAKE_PREFIX_PATH ${CMAKE_CURRENT_SOURCE_DIR}/build/modules)
12+
13+
include(GNUInstallDirs)
14+
include(CMakePrintHelpers)
15+
16+
include(compiler_info)
17+
include(warnings)
18+
include(options)
19+
validate_project_options()
20+
21+
enable_testing()
22+
add_subdirectory(sdk)

CONTRIBUTING.md

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# Contributing to TeiaCareSDK project
2+
3+
A big welcome and thank you for considering contributing to TeiaCareSDK! It’s people like you that make it a reality for users in our community.
4+
5+
Reading and following these guidelines will help us make the contribution process easy and effective for everyone involved. It also communicates that you agree to respect the time of the developers managing and developing these open source projects. In return, we will reciprocate that respect by addressing your issue, assessing changes, and helping you finalize your pull requests.
6+
7+
## Quicklinks
8+
9+
- [Getting Started](#getting-started)
10+
- [Issues](#issues)
11+
- [Pull Requests](#pull-requests)
12+
- [License](#license)
13+
14+
## Getting Started
15+
16+
Contributions are made to this repo via Issues and Pull Requests (PRs). A few general guidelines that cover both:
17+
18+
- Search for existing Issues and PRs before creating your own.
19+
- We work hard to makes sure issues are handled in a timely manner but, depending on the impact, it could take a while to investigate the root cause. A friendly ping in the comment thread to the submitter or a contributor can help draw attention if your issue is blocking.
20+
21+
### Issues
22+
23+
Issues should be used to report problems with the library, request a new feature, or to discuss potential changes before a PR is created. When you create a new Issue, a template will be loaded that will guide you through collecting and providing the information we need to investigate.
24+
25+
If you find an Issue that addresses the problem you're having, please add your own reproduction information to the existing issue rather than creating a new one. Adding a reaction can also help be indicating to our maintainers that a particular problem is affecting more than just the reporter.
26+
27+
### Pull Requests
28+
29+
PRs to our libraries are always welcome and can be a quick way to get your fix or improvement slated for the next release. In general, PRs should:
30+
31+
- Only fix/add the functionality in question **OR** address wide-spread whitespace/style issues, not both.
32+
- Add unit or integration tests for fixed or changed functionality (if a test suite already exists).
33+
- Address a single concern in the least number of changed lines as possible.
34+
- Include documentation in the repo.
35+
- Be accompanied by a complete Pull Request template (loaded automatically when a PR is created).
36+
37+
For changes that address core functionality or would require breaking changes (e.g. a major release), it's best to open an Issue to discuss your proposal first. This is not required but can save time creating and reviewing changes.
38+
39+
In general, we follow the ["fork-and-pull" Git workflow](https://github.com/susam/gitpr)
40+
41+
1. Fork the repository to your own Github account
42+
2. Clone the project to your machine
43+
3. Create a branch locally with a succinct but descriptive name
44+
4. Commit changes to the branch
45+
5. Following any formatting and testing guidelines specific to this repo
46+
6. Push changes to your fork
47+
7. Open a PR in our repository and follow the PR template so that we can efficiently review the changes.
48+
49+
### License
50+
51+
By contributing, you agree that your contributions will be licensed under its [Apache License, Version 2.0](LICENSE).

0 commit comments

Comments
 (0)