diff --git a/README.md b/README.md index 0c5b1a2..c3523e0 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,10 @@ # Autosubmit API +[![codecov](https://codecov.io/gh/BSC-ES/autosubmit-api/graph/badge.svg?token=ECJKA4M6GR)](https://codecov.io/gh/BSC-ES/autosubmit-api) +![PyPI - Downloads](https://img.shields.io/pypi/dm/autosubmit-api) +![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/BSC-ES/autosubmit-api/ci.yml) + + # Table of Contents 1. [Overview](#overview) @@ -13,7 +18,7 @@ Autosubmit API is a package that consumes the information generated by Autosubmi Distribution: https://pypi.org/project/autosubmit-api/ -See the `openapi.json` specification and the repository wiki for more information. +Full documentation: https://autosubmit-api.readthedocs.io/ ## Installation @@ -34,20 +39,12 @@ autosubmit_api start ## Configuration options -The Autosubmit API have some configuration options that can be modified by setting their specific environment variable before starting the server: +The Autosubmit API have some configuration options that can be modified by setting their specific environment variable before starting the server. Here are some options: -- **`PROTECTION_LEVEL`**: Default `ALL`. Possible values `ALL`, `WRITEONLY`, `NONE`. - - If set to `ALL`, all the endpoints will be protected by needing a valid token inside the `Authorization` header of the request. - - If set to `WRITEONLY`, only a subset of the endpoints will be protected. - - If set to `NONE`, none of the endpoints will be protected. - **`SECRET_KEY`**: The secret key to encode the JWT tokens from the Authorization Module. **Important to be set up on production.** -- **`CAS_SERVER_URL`**: CAS Protocol server base URL to request a ticket and verify it. Used for `/v4` endpoints. `CAS_LOGIN_URL` and `CAS_VERIFY_URL` can be empty if this variable is set (the API will append the protocol URL subpaths). -- **`CAS_LOGIN_URL`**: CAS Protocol URL to request a ticket. Used for `/v3` endpoints. -- **`CAS_VERIFY_URL`**: CAS Protocol URL to verify a given ticket. Used for `/v3` endpoints. -- **`GITHUB_OAUTH_CLIENT_ID`**: Client ID of the Github Oauth app. -- **`GITHUB_OAUTH_CLIENT_SECRET`**: Secret key of the Github Oauth app. -- **`GITHUB_OAUTH_WHITELIST_ORGANIZATION`**: Used to use authorization based on the membership of a Github organization. -- **`GITHUB_OAUTH_WHITELIST_TEAM`**: Used to use authorization based on the membership of a Github team in an organization. `GITHUB_OAUTH_WHITELIST_ORGANIZATION` is required +- **`AS_API_ROOT_PATH`**: The root path of the API. This is useful if you are serving it with a reverse proxy. Default is an empty string. + +To see the full list go to: https://autosubmit-api.readthedocs.io/en/latest/configuration/ ## How to run tests @@ -63,10 +60,4 @@ pip install -e .[test] pytest ``` -### Run tests with coverage HTML report: - -```bash -pytest --cov=autosubmit_api --cov-config=.coveragerc --cov-report=html tests/ -``` - -You will find the report in `htmlcov/index.html` +You will find the coverage report in `htmlcov/index.html`