{"id":20414573,"url":"https://github.com/codecov/example-components","last_synced_at":"2025-08-19T21:23:03.673Z","repository":{"id":66039624,"uuid":"594517272","full_name":"codecov/example-components","owner":"codecov","description":"An example of how to use Codecov's Components feature","archived":false,"fork":false,"pushed_at":"2024-12-05T22:55:05.000Z","size":22,"stargazers_count":2,"open_issues_count":0,"forks_count":5,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-08-17T18:59:11.950Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","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/codecov.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2023-01-28T19:44:06.000Z","updated_at":"2025-06-15T09:08:46.000Z","dependencies_parsed_at":"2024-01-23T21:39:12.394Z","dependency_job_id":"9a4a47a3-5201-47c2-9d74-08b1161ab7ff","html_url":"https://github.com/codecov/example-components","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/codecov/example-components","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codecov%2Fexample-components","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codecov%2Fexample-components/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codecov%2Fexample-components/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codecov%2Fexample-components/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/codecov","download_url":"https://codeload.github.com/codecov/example-components/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codecov%2Fexample-components/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271224188,"owners_count":24721828,"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-08-19T02:00:09.176Z","response_time":63,"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":[],"created_at":"2024-11-15T06:11:12.738Z","updated_at":"2025-08-19T21:23:03.624Z","avatar_url":"https://github.com/codecov.png","language":"Python","readme":"# example-components\nAn example of how to use Codecov's Components feature\n\nThe initial setup consists of 2 directories `calculator` and `smiles`. The `calculator` directory also consists of 2 sub-directories `simple` and `complex`.\n\n```\n.\n├── calculator\n│   ├── complex\n│   │   ├── complex_calculator.py\n│   │   └── test_complex_calculator.py\n│   └── simple\n│       ├── simple_calculator.py\n│       └── test_simple_calculator.py\n└── smiles\n    ├── smiles.py\n    └── test_smiles.py\n```\n\nAs shown above, each file exists alongside its corresponding test file.\n\nFor this example, there will be **2 components**, `calculator` and `smiles` which correspond to the directories. You will need to edit the `codecov.yml` file as is done in this repository in order to see Components in your codebases. See [our documentation](https://docs.codecov.com/docs/components) for details.\n\n## Components in the PR comment\n\nTo see an example of what components look like in the Codecov [PR comment](https://github.com/codecov/example-components/pull/2#issuecomment-1407490619), see this [pull request](https://github.com/codecov/example-components/pull/2). Note the section `Components` where you will see the increase in the `calculator` component.\n\n## Components with multiple uploads\n\nTo see how Components deal with multiple uploads, see this [pull request](https://github.com/codecov/example-components/pull/3). The `calculator` Component is created as a union of the `complex` and `simple` coverage uploads.\n\nSince Components are not correlated with uploads, you do not need to specify Components during upload time, only in the `codecov.yml` file. They will work with any number of uploads.\n\n## Components with flags\n\nUnlike Components, Flags are correlated with uploads. For larger codebases, you may find that you will need a Flag for internal services (e.g. `simple/` and `complex/`) of projects (e.g. `calculator/` and `smiles/`) in a monorepository.\n\nSee this [pull request](https://github.com/codecov/example-components/pull/4) with how to incorporate both into your systems.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodecov%2Fexample-components","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodecov%2Fexample-components","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodecov%2Fexample-components/lists"}