Skip to content

Commit

Permalink
Resolved merge conflicts with develop
Browse files Browse the repository at this point in the history
  • Loading branch information
josvandervelde committed Nov 29, 2023
2 parents 48a5915 + ffa36b8 commit fb0669f
Show file tree
Hide file tree
Showing 9 changed files with 31 additions and 22 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/dockerized-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: Build the docker image
run: docker build --tag ai4eu_server_demo:latest -f Dockerfile .
run: docker build --tag aiod_metadata_catalogue:latest -f Dockerfile .

- name: Run docker container and pytest tests
run: |
docker run -e KEYCLOAK_CLIENT_SECRET="mocked_secret" --entrypoint "" ai4eu_server_demo sh -c "pip install \".[dev]\" && pytest tests -s"
docker run -e KEYCLOAK_CLIENT_SECRET="mocked_secret" --entrypoint "" aiod_metadata_catalogue sh -c "pip install \".[dev]\" && pytest tests -s"


Expand Down
3 changes: 2 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,10 @@ repos:
name: mypy src
files: src/.*
additional_dependencies:
- types-requests
- types-python-dateutil
- types-pytz
- types-requests
- types-setuptools
- repo: https://github.com/PyCQA/flake8
rev: 6.0.0
hooks:
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2022 OpenML Labs
Copyright (c) 2023 AI On Demand

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion connectors/openml/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ai4eu_server
FROM aiod_metadata_catalogue

COPY cron /etc/cron.d/aiod
COPY datasets.sh /opt/connectors/script/datasets.sh
Expand Down
2 changes: 1 addition & 1 deletion connectors/zenodo/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ai4eu_server
FROM aiod_metadata_catalogue

COPY cron /etc/cron.d/aiod
COPY datasets.sh /opt/connectors/script/datasets.sh
Expand Down
2 changes: 1 addition & 1 deletion deletion/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ai4eu_server
FROM aiod_metadata_catalogue

COPY cron /etc/cron.d/aiod
COPY delete_old.sh /opt/deletion/script/delete_old.sh
Expand Down
16 changes: 9 additions & 7 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ services:
build:
context: ./
dockerfile: Dockerfile
image: ai4eu_server
image: aiod_metadata_catalogue
container_name: apiserver
env_file: .env
environment:
Expand All @@ -32,7 +32,7 @@ services:

fill-db-with-examples:
profiles: ["examples"]
image: ai4eu_server
image: aiod_metadata_catalogue
container_name: fill-db-with-examples
env_file: .env
environment:
Expand All @@ -51,7 +51,7 @@ services:
build:
context: deletion
dockerfile: Dockerfile
image: ai4eu_deletion
image: aiod_deletion
container_name: deletion
env_file: .env
volumes:
Expand All @@ -65,7 +65,7 @@ services:

huggingface-dataset-connector:
profiles: ["huggingface-datasets"]
image: ai4eu_server
image: aiod_metadata_catalogue
container_name: huggingface-dataset-connector
env_file: .env
environment:
Expand All @@ -85,7 +85,7 @@ services:
build:
context: connectors/openml
dockerfile: Dockerfile
image: ai4eu_openml_connector
image: aiod_openml_connector
container_name: openml-connector
env_file: .env
environment:
Expand All @@ -105,7 +105,7 @@ services:
build:
context: connectors/zenodo
dockerfile: Dockerfile
image: ai4eu_zenodo_connector
image: aiod_zenodo_connector
container_name: zenodo-dataset-connector
env_file: .env
environment:
Expand Down Expand Up @@ -193,7 +193,7 @@ services:
retries: 30

es_logstash_setup:
image: ai4eu_server
image: aiod_metadata_catalogue
container_name: es_logstash_setup
env_file: .env
environment:
Expand All @@ -210,10 +210,12 @@ services:
depends_on:
elasticsearch:
condition: service_healthy

logstash:
build:
context: logstash/
dockerfile: Dockerfile
image: aiod_logstash
container_name: logstash
env_file: .env
environment:
Expand Down
17 changes: 9 additions & 8 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
[project]
name = "ai4eu_server_demo"
description = "A containerized demo application for AI on demand (previously AI4EU) "
name = "aiod_metadata_catalogue"
description = "A Metadata Catalogue for AI on Demand "
version = "1.0.20230911"
requires-python = ">=3.11"
authors = [

{ name = "Antonis Ganios"},
{ name = "Íñigo Aréjula Aísa"},
{ name = "Jos van der Velde", email = "[email protected]"},
{ name = "Adrián Alcolea" },
{ name = "Antonis Ganios" },
{ name = "Giannis Mouchakis" },
{ name = "Íñigo Aréjula Aísa" },
{ name = "Jean Matias" },
{ name = "Jos van der Velde", email = "[email protected]" },
{ name = "Pieter Gijsbers", email = "[email protected]"},
{ name = "Giannis Mouchakis"},
{name = "Taniya Das", email = "[email protected]"}
{ name = "Taniya Das", email = "[email protected]" }
]
dependencies = [
"urllib3== 2.1.0",
Expand Down
5 changes: 5 additions & 0 deletions src/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"""
import argparse

import pkg_resources
import uvicorn
from fastapi import Depends, FastAPI
from fastapi.responses import HTMLResponse
Expand Down Expand Up @@ -92,9 +93,13 @@ def create_app() -> FastAPI:
"""Create the FastAPI application, complete with routes."""
setup_logger()
args = _parse_args()
pyproject_toml = pkg_resources.get_distribution("aiod_metadata_catalogue")
app = FastAPI(
openapi_url=f"{args.url_prefix}/openapi.json",
docs_url=f"{args.url_prefix}/docs",
title="AIoD Metadata Catalogue",
description="This is the Swagger documentation of the AIoD Metadata Catalogue.",
version=pyproject_toml.version,
swagger_ui_oauth2_redirect_url=f"{args.url_prefix}/docs/oauth2-redirect",
swagger_ui_init_oauth={
"clientId": KEYCLOAK_CONFIG.get("client_id_swagger"),
Expand Down

0 comments on commit fb0669f

Please sign in to comment.