https://github.com/inab/observatory-api
Software Observatory API
https://github.com/inab/observatory-api
fair-software fairsoft fastapi software-metadata
Last synced: 19 days ago
JSON representation
Software Observatory API
- Host: GitHub
- URL: https://github.com/inab/observatory-api
- Owner: inab
- License: mit
- Created: 2024-08-06T18:03:37.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2025-09-02T08:56:10.000Z (9 months ago)
- Last Synced: 2025-09-02T09:11:37.683Z (9 months ago)
- Topics: fair-software, fairsoft, fastapi, software-metadata
- Language: Python
- Homepage: https://observatory.openebench.bsc.es/api/docs
- Size: 6.45 MB
- Stars: 1
- Watchers: 7
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
- Citation: CITATION.cff
Awesome Lists containing this project
README
# Software Observatory API
This repository contains the source code of the Software Observatory API. This API is a [FastAPI](https://fastapi.tiangolo.com/) application that uses a remote mongodb database.
## Development
To start the development environment, first create a virtual environment and install the dependencies:
```
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
```
Then, start the development server:
```
export CONFIG_PATH=./api-variables/config_db.ini
uvicorn main:app --host 0.0.0.0 --port 3500 --reload --log-level debug
```
The API will be available at `http://localhost:3500`.
### Versioning
When a push is done to the `main` branch, the version of the API should be updated. This is done by adding the new version to `VERSION`. A GitHub action will create a tag with the version to the version in `VERSION` file, build and publish the docker image.
## API Documentation
The API documentation is available at [https://observatory.openebench.bsc.es/api/docs](https://observatory.openebench.bsc.es/api/docs).
This documentation is automatically generated by FastAPI and is based on the OpenAPI standard.
## Production
The API is deployed in the BSC's infrastructure. The deployment is done using docker and docker-compose.
The docker image is built as part of the CI/CD pipeline. It is triggered by pushing a tag to the repository.
Notice that the API is accessible at a subdomain of the OpenEBench platform. The API is available at [https://observatory.openebench.bsc.es/api](https://observatory.openebench.bsc.es/api). In development, the API is available directly at `http://localhost:3500`.
## Development
### Testing
```
PYTHONPATH=$(pwd) pytest -s app/tests
```
## License
This software is licensed under the MIT License. For more information, read the [LICENSE](LICENSE) file.