{"id":18565118,"url":"https://github.com/hubblo-org/carenage","last_synced_at":"2026-01-24T18:32:05.378Z","repository":{"id":110032565,"uuid":"407489530","full_name":"hubblo-org/carenage","owner":"hubblo-org","description":"This is a MIRROR from https://gitlab.com/hubblo/carenage/","archived":false,"fork":false,"pushed_at":"2025-01-28T13:59:21.000Z","size":4349,"stargazers_count":7,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-07-08T06:51:50.906Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hubblo-org.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2021-09-17T09:53:27.000Z","updated_at":"2025-06-26T11:55:28.000Z","dependencies_parsed_at":"2025-05-03T09:37:39.798Z","dependency_job_id":"4641cf22-0040-4835-a7e8-e4626fea74ad","html_url":"https://github.com/hubblo-org/carenage","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/hubblo-org/carenage","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hubblo-org%2Fcarenage","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hubblo-org%2Fcarenage/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hubblo-org%2Fcarenage/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hubblo-org%2Fcarenage/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hubblo-org","download_url":"https://codeload.github.com/hubblo-org/carenage/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hubblo-org%2Fcarenage/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28734307,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-24T17:51:25.893Z","status":"ssl_error","status_checked_at":"2026-01-24T17:50:48.377Z","response_time":89,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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-06T22:17:47.737Z","updated_at":"2026-01-24T18:32:05.358Z","avatar_url":"https://github.com/hubblo-org.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# carenage\n\n*Carenage* is a continuous integration tool meant to make environmental evaluation easier for software projects. Used in CI scripts, it queries needed metrics and metadata during the execution of a CI job to insert them into a database. Afterwards, the data is available as JSON objects through requests to a RESTful API and visualisable in a dashboard.\n\n*Carenage* (*careening* in English) is a series of operations made on the hull of a ship in order to inspect, clean or repair it. Environmental evaluation can be difficult to put into place for software development teams. With data recovered during tests or benchmarks, *Carenage* aims to simplify this and allow for better evaluation and better application of eco-design practices.\n\n## Development\n\n### Back-end\n\nThe `carenage` project is divided into several packages, with three binaries (`api`, `carenaged`, `carenage-cli`) and one library (`database`).\n\n- `carenaged` contains the daemon program that inserts metadata and metrics into the database.\n- `carenage-cli` contains the command-line interface program that can start and stop the execution of the daemon inside scripts.\n- `api` contains the web server that receives requests and sends responses through a RESTful API.\n\nThe `database` library contains all methods needed to communicate with the database, most data structures used throughout the project, and modules to communicate with other external services (most notably [`boagent`](https://github.com/boavizta/boagent])).\n\nTo create environmental impacts metrics, `carenage` queries `boagent` to receive data on the hardware for the computer running processes. This data is made of environmental impact metrics (through queries to [boaviztapi](https://github.com/boavizta/boaviztapi)), and energy consumption metrics (through [scaphandre](https://github.com/hubblo-org/scaphandre)). `carenage` queries information on the computer configuration, then, throughout a CI script execution, queries information for each process running on the computer. All these pieces of information are then inserted into the database with a timestamp.\n\n\n#### Building the project\n\nWith `rust` and `cargo` installed:\n\n```\ncd carenage\nmake build_debug\n```\n\n#### Testing\n\nUnit and integrations tests are implemented for the different packages of the project:\n\n```\ncd carenage\nmake test\n``` \n\nSome tests need a Postgres database set up to apply migrations and fixtures. If you have Docker installed, `make compose_dev` will set up the development / testing environment.\n\n### Front-end\n\n#### Setup\n\nWith `npm` installed, you can do \n\n```\ncd dashboard\nmake install\n```\n\nto setup needed dependencies for the project. Then, with `make run_dev`, this will launch the server for the dashboard.\n\n#### Testing\n\nUnit and integration tests are executed with \n```\ncd dashboard\nmake component_test\n```\n\nend-to-end tests with \n```\ncd dashboard\nmake e2e_test\n```\n\nFor integration testing and mocking responses from external services like `Boagent`, [msw](https://mswjs.io/) is used. You can add handlers for specific\nURLs in `src/mocks/handlers.ts`. In a development environment, those will be able to handle fetching valid URLs by the server code, and render data on the adequate pages. Handlers work either in the browser and in a Node environment.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhubblo-org%2Fcarenage","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhubblo-org%2Fcarenage","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhubblo-org%2Fcarenage/lists"}