{"id":21919787,"url":"https://github.com/kernelci/kernelci-api","last_synced_at":"2025-04-19T12:39:40.272Z","repository":{"id":36949993,"uuid":"415002820","full_name":"kernelci/kernelci-api","owner":"kernelci","description":"KernelCI API - Database - Pub/Sub","archived":false,"fork":false,"pushed_at":"2024-11-26T08:25:36.000Z","size":608,"stargazers_count":9,"open_issues_count":50,"forks_count":17,"subscribers_count":19,"default_branch":"main","last_synced_at":"2024-11-26T08:35:50.756Z","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":"lgpl-2.1","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kernelci.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"COPYING","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}},"created_at":"2021-10-08T13:44:01.000Z","updated_at":"2024-11-26T07:59:58.000Z","dependencies_parsed_at":"2024-01-22T14:30:14.063Z","dependency_job_id":"6622edce-cc6f-40a7-bc71-8801c511bb76","html_url":"https://github.com/kernelci/kernelci-api","commit_stats":null,"previous_names":[],"tags_count":355,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kernelci%2Fkernelci-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kernelci%2Fkernelci-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kernelci%2Fkernelci-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kernelci%2Fkernelci-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kernelci","download_url":"https://codeload.github.com/kernelci/kernelci-api/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":226979168,"owners_count":17712574,"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-28T20:10:50.198Z","updated_at":"2024-11-28T20:10:50.823Z","avatar_url":"https://github.com/kernelci.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cimg src=\"https://kernelci.org/image/kernelci-horizontal-color.png\"\n     alt=\"KernelCI project logo\"\n     width=\"40%\" /\u003e\n\nKernelCI API\n============\n\nThis repository is a work-in-progress implementation of a new API and database\ninterface for KernelCI, to replace\n[kernelci-backend](https://github.com/kernelci/kernelci-backend.git).  It's\nmainly based on [FastAPI](https://fastapi.tiangolo.com/), [Mongo\nDB](https://www.mongodb.com/) and [Redis](https://redis.io/).\n\nPlease refer to the [architecture](https://docs.kernelci.org/api_pipeline/api/design/#api-architecture) for more details.\n\n\n## Getting started with docker-compose\n\nPlease refer to [start Docker containers](https://docs.kernelci.org/api_pipeline/api/local-instance/#start-docker-compose) of all the services.\n\nNote that the FastAPI server is running on port 8000 inside the container, but\nit's exposed to the host via port 8001 to avoid conflicts with other services.\nThis can be adjusted for each setup in\n[`docker-compose.yaml`](docker-compose.yaml).\n\n\n## Authentication\n\nGenerate a new key for [Authentication](https://docs.kernelci.org/api_pipeline/api/local-instance/#create-the-environment-file)\n).\nAfter that, please refer to [create and add a user](https://docs.kernelci.org/api_pipeline/api/local-instance/#create-an-admin-user-account) in Mongo DB.\nThe user can also generate an [API token](https://docs.kernelci.org/api_pipeline/api/local-instance/#create-an-admin-pipeline-token) to use API endpoints.\n\nUltimately, there will be a web frontend to provide a login form.  We don't\nhave that yet as this new KernelCI API implementation is still in its early\nstages.\n\n\n## API Documentation\n\nThe FastAPI server will automatically generate documentation for the API itself\nand serve it directly: http://localhost:8001/latest/docs\n\nTo use the generated documentation, first [open\nit](http://localhost:8001/latest/docs) with a web browser.  Then click on\n\"Authorize 🔓\", enter the user name and password and click on the new\n\"Authorize\" button.\n\nThis is based on OpenAPI, and you can also download the `openapi.json` file to\nuse it with other tools: http://localhost:8001/latest/openapi.json\n\n\n## API Testing\n\nPlease follow the below instructions to test API endpoints.\n\nInstall Python requirements with additional packages for testing:\n```\npip install -r docker/api/requirements-dev.txt\n```\n\nWe have already created .env file from [Authentication](#authentication) section.\nExport the file with SECRET_KEY environment variable in it:\n```\nexport $(cat .env)\n```\n\nRun the below command from kernelci-api directory:\n```\npytest -v tests/unit_tests/\n```\nThis will start running unit test cases from kernelci-api/test directory and display results.\n\nIn addition to the unit tests, end-to-end tests for API has been developed.\nA Github action check `test` is running on every push and pull to execute the end-to-end tests.\n\nIn order to ease the execution of the tests locally, a shell script `run_e2e_tests.sh` has been introduced.\n\nRun the below command from kernelci-api directory:\n```\n./run_e2e_tests.sh\n```\nThis will start running e2e test cases in a `docker-compose` environment from kernelci-api/e2e_tests directory and display results.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkernelci%2Fkernelci-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkernelci%2Fkernelci-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkernelci%2Fkernelci-api/lists"}