NatLibFi / Annif

Annif is a multi-algorithm automated subject indexing tool for libraries, archives and museums.
https://annif.org
Other
195 stars 41 forks source link

Add REST API root resource #658

Closed UnniKohonen closed 1 year ago

UnniKohonen commented 1 year ago

This PR adds a resource to the root of the REST API (i.e. http:///v1/) that gives basic information on the API. The information given is a title for the API and the version of Annif being used. The response is a json object with the format:

{
    "title": "Annif REST API",
    "version": "0.60.0"
}

Implements #655

codecov[bot] commented 1 year ago

Codecov Report

Base: 99.55% // Head: 99.55% // Increases project coverage by +0.00% :tada:

Coverage data is based on head (a4e5be8) compared to base (45be34d). Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #658 +/- ## ======================================= Coverage 99.55% 99.55% ======================================= Files 87 87 Lines 6006 6017 +11 ======================================= + Hits 5979 5990 +11 Misses 27 27 ``` | [Impacted Files](https://codecov.io/gh/NatLibFi/Annif/pull/658?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=NatLibFi) | Coverage Δ | | |---|---|---| | [annif/rest.py](https://codecov.io/gh/NatLibFi/Annif/pull/658?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=NatLibFi#diff-YW5uaWYvcmVzdC5weQ==) | `96.55% <100.00%> (+0.18%)` | :arrow_up: | | [tests/test\_rest.py](https://codecov.io/gh/NatLibFi/Annif/pull/658?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=NatLibFi#diff-dGVzdHMvdGVzdF9yZXN0LnB5) | `100.00% <100.00%> (ø)` | | | [tests/test\_config.py](https://codecov.io/gh/NatLibFi/Annif/pull/658?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=NatLibFi#diff-dGVzdHMvdGVzdF9jb25maWcucHk=) | `100.00% <0.00%> (ø)` | | Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=NatLibFi). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=NatLibFi)

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

osma commented 1 year ago

Looks good so far. A couple of suggestions:

sonarcloud[bot] commented 1 year ago

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication