{"id":15524544,"url":"https://github.com/sergeyklay/ytc","last_synced_at":"2026-05-04T11:34:28.885Z","repository":{"id":39963293,"uuid":"227226505","full_name":"sergeyklay/ytc","owner":"sergeyklay","description":"An yaml-cpp example project.","archived":false,"fork":false,"pushed_at":"2023-01-08T18:47:39.000Z","size":119,"stargazers_count":1,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-28T20:48:56.045Z","etag":null,"topics":["cmake","cmake-examples","codecov","conan","conan-examples","coverage","cpp","cpp-examples","cpp17","gtest","yaml","yaml-cpp"],"latest_commit_sha":null,"homepage":null,"language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sergeyklay.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-12-10T22:19:21.000Z","updated_at":"2023-09-19T12:49:09.000Z","dependencies_parsed_at":"2023-02-08T07:15:27.128Z","dependency_job_id":null,"html_url":"https://github.com/sergeyklay/ytc","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/sergeyklay/ytc","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sergeyklay%2Fytc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sergeyklay%2Fytc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sergeyklay%2Fytc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sergeyklay%2Fytc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sergeyklay","download_url":"https://codeload.github.com/sergeyklay/ytc/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sergeyklay%2Fytc/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279003186,"owners_count":26083533,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-10T02:00:06.843Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cmake","cmake-examples","codecov","conan","conan-examples","coverage","cpp","cpp-examples","cpp17","gtest","yaml","yaml-cpp"],"created_at":"2024-10-02T10:51:39.427Z","updated_at":"2025-10-10T07:39:58.715Z","avatar_url":"https://github.com/sergeyklay.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# YTC\n\n[![Actions Status][actions badge]][actions link]\n[![License: MIT][license badge]](./LICENSE)\n\nYTC (a Yaml Template Class example) is an `yaml-cpp` example project.\nThe main goal of this project is to show a possible strategy to convert user data types using\n[yaml-cpp][yaml-cpp link].\n\nThis project build with following tools:\n- C++ version: `C++17`\n- C++ compiler: **Gcc**, **Clang** and **Apple Clang**\n- Source: multiple files\n- Package manager: [Conan][conan link]\n- Build system: [CMake][cmake link]\n- Libraries: STL, [`yaml-cpp`][yaml-cpp link]\n- Code coverage report: [`lcov`][lcov link]\n- Testing framework: [Google Tests][gtest link]\n- CI: [GitHub Actions][actions feature]\n\n## How to try it out\n\nThese instructions will get you a copy of the project up and running on your local machine for\ndevelopment and testing purposes.\n\n### Prerequisites\n\nTo build YTC you need the following requirements:\n\n- A C++ compiler such as [Gcc][gcc link] \u003e= 7.0.0, [Clang][clang link] \u003e= 5.0.0 or [Apple Clang][apple link] \u003e= 10.0.0\n- [CMake][cmake link] 3.11 or later\n- [Conan][conan link] decentralized package manager with a client-server architecture\n\nTo enable test coverage reports you need the following requirements:\n- `lcov`\n- `genhtml`\n\nFor project dependencies list see `conanfile.txt` bundled with this project.\n\nIf you're using Ubuntu, you can install the required packages this way:\n```shell script\nsudo apt install gcc cmake build-essential\n```\n\nOn macOS you most likely have a compiler so you'll need only cmake:\n```shell script\nbrew install cmake\n```\n\nPlease note that specific versions of libraries and programs at the time of reading this guide may vary.\nThe following dependencies is recommended install using [`pip`][pip link]:\n\n- `conan`\n\nThey can be installed using pip as follows:\n\n```shell script\npip install -r requirements.txt\n```\n\n### Building\n\nFirst you'll need clone the project and fetch its modules:\n\n```shell script\ngit clone https://github.com/sergeyklay/ytc\ncd ytc\n```\n\nThen build project as follows:\n\n```shell script\ncmake -H. -Bbuild -DCMAKE_BUILD_TYPE=Debug\ncmake --build build\n```\n\n### Running the tests\n\nTests expect `YTC_TESTS_ROOT` environment variable to use fixtures. This\nvariable should point to the tests directory root. Set this variable and\nrun the tests as follows:\n\n```shell script\nexport YTC_TESTS_ROOT=$(pwd)/tests\ncmake --build build --target check\n```\n\n### Generate HTML code coverage report\n\nFollow these steps:\n\n1. Configure with code coverage instrumentation enabled `-DCODE_COVERAGE=ON`\n2. Build project\n3. Execute the tests to generate the coverage data\n4. Generate and customize reports as follows:\n\n```shell script\n# Create lcov report\nlcov --directory build --capture --output-file ./build/coverage.info\n\n# Filter out extra files\nlcov \\\n    --remove ./build/coverage.info \\\n    '/usr/*'                       \\\n    \"${HOME}\"'/.conan/*'           \\\n    '*/tests/*'                    \\\n    --output-file ./build/coverage.info\n\n# Output coverage data for debugging (Optional)\nlcov --list ./build/coverage.info\n\n# Create a directory to store HTML report \nmkdir ./build/coverage\n\n# Generate HTML report\ngenhtml ./build/coverage.info --output-directory ./build/coverage\n```\n\n## Further Reading\n\n- [Conan Examples][conan examples]\n- [yaml-cpp tutorial][yaml tutor]\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](./LICENSE) file for details.\n\n[actions link]: https://github.com/sergeyklay/ytc/actions\n[actions badge]: https://github.com/sergeyklay/ytc/workflows/build/badge.svg\n[license badge]: https://img.shields.io/badge/License-MIT-blue.svg\n[yaml-cpp link]: https://github.com/jbeder/yaml-cpp\n[yaml tutor]: https://github.com/jbeder/yaml-cpp/wiki/Tutorial\n[gcc link]: https://gcc.gnu.org\n[clang link]: https://clang.llvm.org\n[apple link]: https://apps.apple.com/us/app/xcode/id497799835\n[cmake link]: https://cmake.org\n[conan link]: https://conan.io\n[conan examples]: https://github.com/conan-io/examples\n[pip link]: https://pip.pypa.io\n[gtest link]: https://github.com/google/googletest\n[actions feature]: https://github.com/features/actions\n[lcov link]: http://ltp.sourceforge.net/coverage/lcov.php\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsergeyklay%2Fytc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsergeyklay%2Fytc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsergeyklay%2Fytc/lists"}