diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 59bf16c..3448ce5 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -4,7 +4,7 @@ repos: hooks: - id: check-added-large-files - id: check-yaml - exclude: ^helm\/diffcalc-api\/templates\/.* + exclude: ^helm\/diffcalc-api\/templates\/.*|catalog-info.yaml - id: check-merge-conflict - repo: local @@ -36,4 +36,4 @@ repos: stages: [commit] language: system entry: mypy - files: ^(src\/|tests\/).*\.py \ No newline at end of file + files: ^(src\/|tests\/).*\.py diff --git a/README.rst b/README.rst index 7c9223c..b24ee44 100644 --- a/README.rst +++ b/README.rst @@ -28,6 +28,10 @@ Or if it is a commandline tool then you might put some example commands here:: No other features yet. +To test codecov.yaml, run: +``` +curl -X POST --data-binary @codecov.yml https://codecov.io/validate +``` .. |code_ci| image:: https://github.com/dls-controls/diffcalc_api/workflows/Code%20CI/badge.svg?branch=master :target: https://github.com/dls-controls/diffcalc_api/actions?query=workflow%3A%22Code+CI%22 :alt: Code CI diff --git a/catalog-info.yaml b/catalog-info.yaml new file mode 100644 index 0000000..503a38a --- /dev/null +++ b/catalog-info.yaml @@ -0,0 +1,26 @@ +apiVersion: backstage.io/v1alpha1 +kind: Component +metadata: + name: diffcalc + title: diffcalc + description: service for accessing diffcalc-core library methods, with a mongo database backend. +spec: + type: service + lifecycle: production + owner: user:ton99817 + providesApis: + - diffcalc-api + +--- +apiVersion: backstage.io/v1alpha1 +kind: API +metadata: + name: diffcalc-api + title: diffcalc-api + description: REST API for the service +spec: + type: openapi + lifecycle: production + owner: user:ton99817 + definition: + $text: https://github.com/DiamondLightSource/diffcalc-api/releases/latest/download/openapi.json diff --git a/codecov.yml b/codecov.yml new file mode 100644 index 0000000..49ab1e8 --- /dev/null +++ b/codecov.yml @@ -0,0 +1,9 @@ +coverage: + status: + project: + default: + target: 90% + threshold: 2% + patch: + default: + threshold: 2% diff --git a/pyproject.toml b/pyproject.toml index 8724a78..5a6addd 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -14,7 +14,7 @@ classifiers = [ "Programming Language :: Python :: 3.11", ] dependencies = [ - "diffcalc-core @ git+https://github.com/DiamondLightSource/diffcalc-core.git@getMiscut", + "diffcalc-core @ git+https://github.com/DiamondLightSource/diffcalc-core.git", "fastapi", "uvicorn", "pymongo",