{"id":20414505,"url":"https://github.com/codecov/shared","last_synced_at":"2025-04-12T16:46:47.066Z","repository":{"id":184019867,"uuid":"667551874","full_name":"codecov/shared","owner":"codecov","description":"Shared code between worker and api","archived":false,"fork":false,"pushed_at":"2025-04-11T09:41:33.000Z","size":5543,"stargazers_count":16,"open_issues_count":21,"forks_count":10,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-11T09:48:55.717Z","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":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/codecov.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2023-07-17T19:10:49.000Z","updated_at":"2025-04-11T07:44:44.000Z","dependencies_parsed_at":"2024-02-23T18:39:26.154Z","dependency_job_id":"671f293a-6940-4f56-9588-4673834710c9","html_url":"https://github.com/codecov/shared","commit_stats":null,"previous_names":["codecov/shared"],"tags_count":160,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codecov%2Fshared","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codecov%2Fshared/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codecov%2Fshared/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codecov%2Fshared/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/codecov","download_url":"https://codeload.github.com/codecov/shared/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248600859,"owners_count":21131564,"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","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:10:41.949Z","updated_at":"2025-04-12T16:46:47.030Z","avatar_url":"https://github.com/codecov.png","language":"Python","readme":"# shared\n[![Shared CI](https://github.com/codecov/shared/actions/workflows/ci.yml/badge.svg)](https://github.com/codecov/shared/actions/workflows/ci.yml)\n[![codecov](https://codecov.io/gh/codecov/shared/graph/badge.svg?token=IL64imgbOu)](https://codecov.io/gh/codecov/shared)  \n\nShared is a place for code that is common to multiple python repositories on `codecov`.\n\n\u003e We believe that everyone should have access to quality software (like Sentry), that’s why we have always offered Codecov for free to open source maintainers.\n\u003e\n\u003e By making our code public, we’re not only joining the community that’s supported us from the start — but also want to make sure that every developer can contribute to and build on the Codecov experience.\n\n## How does shared get into production\n\n`shared` is a repository of its own, so it needs to be installed as a dependency on the repositories that might use it.\n\nThe current repositories using `shared` are `codecov/worker` and `codecov/codecov-api`.\n\nWhenever getting new code into `shared`, one needs to wait for a new version to be released (or release it themselves, see below), and update the `requirements.in` file in `codecov/worker` and `codecov/codecov-api` to use the newly released version of `shared`.\n\n## Getting started\n\nTo get started, ensure that you have:\n\n1. Docker installed on your machine\n2. Run\n```\ndocker compose up\n```\n\n## Releasing a new version on shared\n\nTo release a new version, you need to:\n\n1) Check what the next version should be.\n    - You can check the latest version on https://github.com/codecov/shared/releases\n    - As a rule of thumb, just add one to the micro version (number most to the right)\n2) Create a new PR:\n- Changing the `version` field on https://github.com/codecov/shared/blob/main/setup.py#L12 to that new version\n- Change https://github.com/codecov/shared/blob/main/CHANGELOG.md  unreleased header name to that version, and create a new _unreleased_ section with the same subsections.\n3) Merge that PR\n4) Create a new release on https://github.com/codecov/shared/releases/new\n\n## Running tests\n\nIn order to run tests from within your docker container, run:\n\n```\nmake test\n```\n\nTo run a specific test file, run for example:\n```\nmake test-path TEST_PATH=tests/unit/bundle_analysis/test_bundle_analysis.py\n```\n\n## Running migrations\n\nIf you make changes to the models in `shared/django_apps/` you will need to create migrations to reflect those changes in the database.\n\nMake sure the shared container is running and shell into it\n```bash\n$ docker compose up\n$ docker compose exec -it shared /bin/bash\n```\n\nNow you can create a migration (from within the container)\n\n```bash\n$ cd shared/django_apps/\n$ python manage.py makemigrations\n```\n\nTo learn more about migrations visit [Django Docs](https://docs.djangoproject.com/en/5.0/topics/migrations/)\n\n## Managing shared dependencies\n\nAs a normal python package, `shared` can include dependencies of its own.\n\nUpdating them should be done at the `setup.py` file.\n\nRemember to add dependencies as loosely as possible. Only make sure to include what the minimum version is, and only include a maximum version if you do know that higher versions will break.\n\nRemember that multiple packages, on different contexts of their own requirements, will have to install this. So keeping the requirements loose allow them to avoid version clashes and eases upgrades whenever they need to.\n\n## Contributing\n\nThis repository, like all of Codecov's repositories, strives to follow our general [Contributing guidlines](https://github.com/codecov/contributing). If you're considering making a contribution to this repository, we encourage review of our Contributing guidelines first. \n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodecov%2Fshared","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodecov%2Fshared","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodecov%2Fshared/lists"}