diff --git a/.gitignore b/.gitignore index f3bf63bc..24348d29 100644 --- a/.gitignore +++ b/.gitignore @@ -1,17 +1,20 @@ -# Ignore Gradle project-specific cache directory -.gradle -# Ignore Gradle build output directory -build -# Ignore vscode metadata -.vscode -# Ingore pyhton cache -__pycache__ -# Ignore macos -.DS_Store -# Ignore generated python code -src/python/account/ - -*.pyc - -node_modules/ -angular-app/.angular \ No newline at end of file +# Ignore Gradle project-specific cache directory +.gradle +# Ignore Gradle build output directory +build +# Ignore vscode metadata +.vscode +# Ingore pyhton cache +__pycache__ +# Ignore macos +.DS_Store +# Ignore generated python code +src/python/account/ + +*.pyc + +node_modules/ +angular-app/.angular + +# Ignore sentence-transformer local model cache +service/sentence_transformer/models/ \ No newline at end of file diff --git a/projects_eu_all_names.txt b/projects_eu_all_names.txt new file mode 100644 index 00000000..2f5cc250 --- /dev/null +++ b/projects_eu_all_names.txt @@ -0,0 +1,8 @@ +UNIVERSITAET DUISBURG-ESSEN +UNIVERSITAET DUISBURG-ESSEN - STANDORT DUISBURG +UNIVERSITÄT DUISBURG-ESSEN +UNIVERSITAET DUISBURG-ESSEN - STANDORT ESSEN +UNIVERSITAET DUISBURG-ESSEN (UNIVERSITY OF DUISBURG-ESSEN) +UNIVERSITAT DUISBURG-ESSEN +UNIVERSITY OF DUISBURG-ESSEN +UNIVERSITÄT DUISBURG ESSEN \ No newline at end of file diff --git a/service/Dockerfile b/service/Dockerfile index 2335ec87..90d1a619 100644 --- a/service/Dockerfile +++ b/service/Dockerfile @@ -1,9 +1,7 @@ -FROM python:3.12-slim-bookworm +ARG BASE_IMAGE=inse-base-static:latest +FROM $BASE_IMAGE -RUN mkdir /test && \ - mkdir /data && \ - pip install --root-user-action=ignore --no-cache-dir --upgrade pip && \ - pip install --root-user-action=ignore --no-cache-dir --disable-pip-version-check \ +RUN pip install --root-user-action=ignore --no-cache-dir --disable-pip-version-check \ "fastapi~=0.115.0" \ "SQLAlchemy~=2.0.0" \ "pyjwt~=2.8.0" \ diff --git a/service/Dockerfile.base b/service/Dockerfile.base new file mode 100644 index 00000000..77926c9a --- /dev/null +++ b/service/Dockerfile.base @@ -0,0 +1,10 @@ +FROM python:3.12-slim-bookworm + +RUN mkdir /test && \ + mkdir /data && \ + pip install --root-user-action=ignore --no-cache-dir --upgrade pip && \ + pip install --root-user-action=ignore --no-cache-dir torch --index-url https://download.pytorch.org/whl/cpu && \ + pip install --root-user-action=ignore --no-cache-dir "sentence-transformers~=5.5.1" + +ENV SENTENCE_TRANSFORMERS_HOME=/models +RUN python -c "from sentence_transformers import SentenceTransformer; SentenceTransformer('paraphrase-multilingual-mpnet-base-v2')" diff --git a/service/build.gradle b/service/build.gradle index 0d569c9c..40510af3 100644 --- a/service/build.gradle +++ b/service/build.gradle @@ -2,7 +2,32 @@ plugins { id 'base' } +task createBaseImage(type: Exec) { + commandLine 'docker', 'build', '--platform', "${targetPlatform}", '-f', 'Dockerfile.base', '-t', "${imagePrefix}-base-static:latest", '.' +} + +task buildBaseImageIfNeeded { + doLast { + def baseImage = "${imagePrefix}-base-static:latest" + def checkCmd = ["docker", "image", "inspect", baseImage] + def process = checkCmd.execute() + process.waitFor() + if (process.exitValue() != 0) { + println "Base image ${baseImage} not found. Building it..." + def buildCmd = ["docker", "build", "--platform", "${targetPlatform}", "-f", "Dockerfile.base", "-t", baseImage, "."] + def buildProcess = buildCmd.execute([], projectDir) + buildProcess.consumeProcessOutput(System.out, System.err) + if (buildProcess.waitFor() != 0) { + throw new GradleException("Failed to build base image.") + } + } else { + println "Base image ${baseImage} found. Skipping build." + } + } +} + task createImage(type: Exec) { + dependsOn buildBaseImageIfNeeded commandLine 'docker', 'build', '--platform', "${targetPlatform}", '-t', "${imagePrefix}-service:${imageVersion}", '.' } diff --git a/service/pyproject.toml b/service/pyproject.toml index 689f20cf..9e45ebc4 100644 --- a/service/pyproject.toml +++ b/service/pyproject.toml @@ -19,4 +19,14 @@ dependencies = [ "pyyaml~=6.0.1", "sqlalchemy~=2.0.0", "uvicorn~=0.29.0", + "sentence-transformers~=5.5.1", + "torch", ] + +[[tool.uv.index]] +name = "pytorch-cpu" +url = "https://download.pytorch.org/whl/cpu" +explicit = true + +[tool.uv.sources] +torch = { index = "pytorch-cpu" } diff --git a/service/sentence_transformer/download_model.py b/service/sentence_transformer/download_model.py new file mode 100644 index 00000000..60db0a4b --- /dev/null +++ b/service/sentence_transformer/download_model.py @@ -0,0 +1,14 @@ +#!/usr/bin/env python3 +""" +Download the sentence-transformers model to the default cache directory +so it is available for local runs or testing. + +Usage (run once from project root): + python service/sentence_transformer/download_model.py +""" +from sentence_transformers import SentenceTransformer + +MODEL_NAME = "paraphrase-multilingual-mpnet-base-v2" +print(f"Downloading '{MODEL_NAME}' to default cache directory...") +model = SentenceTransformer(MODEL_NAME) +print("Done.") diff --git a/service/sentence_transformer/index_topics.py b/service/sentence_transformer/index_topics.py new file mode 100644 index 00000000..35cea0cb --- /dev/null +++ b/service/sentence_transformer/index_topics.py @@ -0,0 +1,259 @@ +#!/usr/bin/env python3 +""" +One-time script to fetch all topics from 'openalex-topics', +vectorize display names and chunked descriptions using the sentence-transformers model, +and push them to the 'topicvectors' index with multi-vector hybrid mapping. +""" +import os +import sys +import json +import base64 +import re +from pathlib import Path +import httpx +import numpy as np +from dotenv import load_dotenv + +# Add service/src/main to python path to load settings +current_dir = Path(__file__).parent.resolve() +project_root = current_dir.parent.parent.resolve() +env_path = project_root / "service" / "src" / "main" / "inse" / ".env" +load_dotenv(dotenv_path=env_path) + +sys.path.append(str(project_root / "service" / "src" / "main")) +from inse.config import settings + +ELASTIC_URL = settings.elasticsearch_url +API_KEY = settings.elasticsearch_api_key +MODEL_NAME = "paraphrase-multilingual-mpnet-base-v2" + +# Import sentence-transformers +from sentence_transformers import SentenceTransformer + +headers = { + "Authorization": f"ApiKey {API_KEY}", + "Content-Type": "application/json" +} + +def float_array_to_base64(vector): + """ + Convert a float vector into a Base64 string representing 32-bit big-endian float bytes. + Elasticsearch expects big-endian floats for binary/Base64 dense_vector encoding. + """ + arr = np.asarray(vector, dtype=np.float32) + big_endian_bytes = arr.astype('>f4').tobytes() + return base64.b64encode(big_endian_bytes).decode('utf-8') + +def split_into_sentences(text): + if not text: + return [] + # Split on period, exclamation, or question mark followed by whitespace + sentences = re.split(r'(?<=[.!?])\s+', text.strip()) + # Filter out empty or extremely short sentences + return [s for s in sentences if len(s.strip()) > 3] + +def check_and_update_mapping(): + print("Checking 'topicvectors' index...") + + with httpx.Client(timeout=30.0) as client: + exists_resp = client.head(f"{ELASTIC_URL}topicvectors", headers=headers) + if exists_resp.status_code == 404: + print("Index 'topicvectors' does not exist. Creating index with mapping...") + create_payload = { + "mappings": { + "properties": { + "id": {"type": "keyword"}, + "display_name": { + "type": "text", + "fields": { + "keyword": {"type": "keyword", "ignore_above": 256} + } + }, + "display_name_vector": { + "type": "dense_vector", + "dims": 768, + "index": True, + "similarity": "cosine", + "index_options": { + "type": "int8_hnsw", + "m": 16, + "ef_construction": 100 + } + }, + "description": {"type": "text"}, + "description_vectors": { + "type": "nested", + "properties": { + "vector": { + "type": "dense_vector", + "dims": 768, + "index": True, + "similarity": "cosine", + "index_options": { + "type": "int8_hnsw", + "m": 16, + "ef_construction": 100 + } + } + } + }, + "keywords": { + "type": "text", + "fields": { + "keyword": {"type": "keyword"} + } + }, + "cited_by_count": {"type": "long"}, + "works_count": {"type": "long"}, + "updated_date": {"type": "date"}, + "created_date": {"type": "date"} + } + } + } + resp = client.put( + f"{ELASTIC_URL}topicvectors", + json=create_payload, + headers=headers + ) + if resp.status_code == 200: + print("Successfully created 'topicvectors' index.") + else: + print(f"Failed to create index: {resp.status_code} - {resp.text}") + resp.raise_for_status() + else: + print("Index 'topicvectors' already exists.") + +def fetch_all_topics(): + print("Fetching topics from 'openalex-topics'...") + topics = [] + size = 1000 + offset = 0 + + with httpx.Client(timeout=60.0) as client: + while True: + payload = { + "query": {"match_all": {}}, + "from": offset, + "size": size + } + resp = client.post( + f"{ELASTIC_URL}openalex-topics/_search", + json=payload, + headers=headers + ) + resp.raise_for_status() + data = resp.json() + hits = data.get("hits", {}).get("hits", []) + if not hits: + break + topics.extend(hits) + offset += len(hits) + print(f"Fetched {len(topics)} topics so far...") + if len(hits) < size: + break + + print(f"Total topics fetched: {len(topics)}") + return topics + +def bulk_index_topics(topics, display_name_vectors, nested_description_vectors): + print("Bulk indexing vectorized topics into 'topicvectors'...") + batch_size = 500 + + with httpx.Client(timeout=60.0) as client: + for i in range(0, len(topics), batch_size): + batch_topics = topics[i:i+batch_size] + batch_name_vecs = display_name_vectors[i:i+batch_size] + batch_desc_vecs_list = nested_description_vectors[i:i+batch_size] + + bulk_lines = [] + for t, name_vec, desc_vecs in zip(batch_topics, batch_name_vecs, batch_desc_vecs_list): + source = t["_source"] + + # Remove deprecated single vector if present + if "vector" in source: + del source["vector"] + + # Assign name vector as a standard float list + source["display_name_vector"] = name_vec.tolist() + + # Assign nested description vectors as standard float lists + source["description_vectors"] = [ + {"vector": vec.tolist()} for vec in desc_vecs + ] + + # Meta line + meta = {"index": {"_index": "topicvectors", "_id": t["_id"]}} + bulk_lines.append(json.dumps(meta)) + # Document line + bulk_lines.append(json.dumps(source)) + + payload = "\n".join(bulk_lines) + "\n" + resp = client.post( + f"{ELASTIC_URL}_bulk", + content=payload, + headers={"Authorization": f"ApiKey {API_KEY}", "Content-Type": "application/x-ndjson"} + ) + resp.raise_for_status() + resp_data = resp.json() + if resp_data.get("errors"): + print("Bulk indexing encountered errors! First few failed items:") + failed_items = [item for item in resp_data.get("items", []) if item.get("index", {}).get("status", 200) >= 400] + for item in failed_items[:5]: + print(json.dumps(item, indent=2)) + raise ValueError("Bulk indexing failed with document errors.") + print(f"Indexed batch {i} to {i + len(batch_topics)}") + +def main(): + check_and_update_mapping() + + topics = fetch_all_topics() + if not topics: + print("No topics found. Exiting.") + return + + print(f"Initializing SentenceTransformer model '{MODEL_NAME}'...") + model = SentenceTransformer(MODEL_NAME) + + # 1. Gather all texts to embed + display_names = [] + description_sentences_by_topic = [] + all_texts_to_embed = [] + + for t in topics: + source = t["_source"] + name = source.get("display_name") or "" + display_names.append(name) + all_texts_to_embed.append(name) + + desc = source.get("description") or "" + sentences = split_into_sentences(desc) + description_sentences_by_topic.append(sentences) + all_texts_to_embed.extend(sentences) + + print(f"Embedding {len(all_texts_to_embed)} texts (display names and description passages)...") + all_vectors = model.encode(all_texts_to_embed, show_progress_bar=True, batch_size=32) + + # 2. Map embeddings back to topics + display_name_vectors = [] + nested_description_vectors = [] + + vector_idx = 0 + for idx, t in enumerate(topics): + # First vector is the display name + display_name_vectors.append(all_vectors[vector_idx]) + vector_idx += 1 + + # Next N vectors are the description chunks + sentences = description_sentences_by_topic[idx] + topic_desc_vecs = [] + for _ in range(len(sentences)): + topic_desc_vecs.append(all_vectors[vector_idx]) + vector_idx += 1 + nested_description_vectors.append(topic_desc_vecs) + + # Bulk index + bulk_index_topics(topics, display_name_vectors, nested_description_vectors) + print("Done!") + +if __name__ == "__main__": + main() diff --git a/service/src/data/search_scores.json b/service/src/data/search_scores.json new file mode 100644 index 00000000..3f7d4e0b --- /dev/null +++ b/service/src/data/search_scores.json @@ -0,0 +1,150 @@ +{ + "query": "Robotics", + "max_score": 22.734766, + "results": [ + { + "topic_name": "Soft Robotics and Applications", + "score": 22.734766 + }, + { + "topic_name": "Robotics and Automated Systems", + "score": 21.997686 + }, + { + "topic_name": "Educational Robotics and Engineering", + "score": 21.919401 + }, + { + "topic_name": "Prosthetics and Rehabilitation Robotics", + "score": 21.846806 + }, + { + "topic_name": "Micro and Nano Robotics", + "score": 21.820261 + }, + { + "topic_name": "Reinforcement Learning in Robotics", + "score": 21.757397 + }, + { + "topic_name": "Robotics and Sensor-Based Localization", + "score": 19.993645 + }, + { + "topic_name": "Social Robot Interaction and HRI", + "score": 13.187252 + }, + { + "topic_name": "Robotic Locomotion and Control", + "score": 12.283064 + }, + { + "topic_name": "Power Line Inspection Robots", + "score": 11.873396 + }, + { + "topic_name": "Mechatronics Education and Applications", + "score": 11.171629 + }, + { + "topic_name": "Educational Technology and Optimization", + "score": 10.924184 + }, + { + "topic_name": "Mechanical and Thermal Properties Analysis", + "score": 10.924184 + }, + { + "topic_name": "Psychiatry, Mental Health, Neuroscience", + "score": 10.687462 + }, + { + "topic_name": "Advanced Materials and Mechanics", + "score": 10.460782 + }, + { + "topic_name": "Wetland Management and Conservation", + "score": 10.460782 + }, + { + "topic_name": "Artificial Intelligence Applications", + "score": 10.243518 + }, + { + "topic_name": "Digitalization, Law, and Regulation", + "score": 10.243518 + }, + { + "topic_name": "Engineering and Technology Innovations", + "score": 10.243518 + }, + { + "topic_name": "Advanced Algorithms and Applications", + "score": 10.035095 + }, + { + "topic_name": "Teaching and Learning Programming", + "score": 10.035095 + }, + { + "topic_name": "Distributed Control Multi-Agent Systems", + "score": 10.035095 + }, + { + "topic_name": "Advanced Scientific and Engineering Studies", + "score": 9.834986 + }, + { + "topic_name": "Space Satellite Systems and Control", + "score": 9.6427 + }, + { + "topic_name": "Smart Agriculture and AI", + "score": 9.279837 + }, + { + "topic_name": "Underwater Vehicles and Communication Systems", + "score": 9.279837 + }, + { + "topic_name": "Modular Robots and Swarm Intelligence", + "score": 7.7584143 + }, + { + "topic_name": "Diverse Perspectives in Modern Studies", + "score": 5.6107 + }, + { + "topic_name": "Teleoperation and Haptic Systems", + "score": 5.2510495 + }, + { + "topic_name": "Optimization and Search Problems", + "score": 5.1682277 + }, + { + "topic_name": "Adaptive Dynamic Programming Control", + "score": 4.8615155 + }, + { + "topic_name": "Robotic Mechanisms and Dynamics", + "score": 2.6450925 + }, + { + "topic_name": "Control and Dynamics of Mobile Robots", + "score": 2.5917463 + }, + { + "topic_name": "Robot Manipulation and Learning", + "score": 2.5859585 + }, + { + "topic_name": "Robotic Process Automation Applications", + "score": 1.7370787 + }, + { + "topic_name": "Robotic Path Planning Algorithms", + "score": 1.6302633 + } + ] +} diff --git a/service/src/main/inse/.env b/service/src/main/inse/.env index 2b84a5ea..b5adb53d 100644 --- a/service/src/main/inse/.env +++ b/service/src/main/inse/.env @@ -6,4 +6,7 @@ ELASTICSEARCH_INSE_API_KEY=bG1NSWc1NEJPZ3FnTGZCZXRSSEg6VnJXRFd5SnpSTTNWc1VPT01FM LLM_API_URL=https://project.nes.uni-due.de/llm2/v1/ LLM_API_KEY=c2d5e7ccf7a4760dd3d19bed2caed9d85ff7437400e0ea82a6d6f912ebc2f212 -LLM_MODEL=gemma4-e4b \ No newline at end of file +LLM_MODEL=gemma4-e4b + +ELASTICSEARCH_INSE_URL=https://inse.nes.uni-due.de/elastic +ELASTICSEARCH_INSE_API_KEY=bG1NSWc1NEJPZ3FnTGZCZXRSSEg6VnJXRFd5SnpSTTNWc1VPT01FMEhMZw== \ No newline at end of file diff --git a/service/src/main/inse/config.py b/service/src/main/inse/config.py index bfa60cfc..c72e5db4 100644 --- a/service/src/main/inse/config.py +++ b/service/src/main/inse/config.py @@ -58,6 +58,11 @@ class Settings(BaseSettings): {"url": "http://localhost:8000", "description": "Local development server"}, ] + elasticsearch_inse_url: Optional[str] = None + elasticsearch_inse_api_key: Optional[str] = None + + logging_level: str = "DEBUG" + settings = Settings() diff --git a/service/src/main/inse/exceptions.py b/service/src/main/inse/exceptions.py new file mode 100644 index 00000000..772a9607 --- /dev/null +++ b/service/src/main/inse/exceptions.py @@ -0,0 +1,3 @@ +class NotFoundException(Exception): + def __init__(self, message: str): + super().__init__(message) diff --git a/service/src/main/inse/institutions/institutions_search_client.py b/service/src/main/inse/institutions/institutions_search_client.py new file mode 100644 index 00000000..23a736af --- /dev/null +++ b/service/src/main/inse/institutions/institutions_search_client.py @@ -0,0 +1,194 @@ +import logging +from typing import List, Set + +import httpx + +from inse.models.openalex.institution import Institution +from inse.exceptions import NotFoundException + + +logger = logging.getLogger(__name__) + + +class InstitutionsSearchClient: + def __init__( + self, + base_url: str, + api_key: str, + ): + self.base_url = base_url + self.api_key = api_key + self.headers = { + "Content-Type": "application/json", + "Authorization": f"ApiKey {self.api_key}", + } + + async def get_institution_by_id(self, raw_institution_id: str) -> Institution: + query = { + "query": { + "match": { + "id": f"https://openalex.org/{raw_institution_id.upper()}", + } + }, + "size": 1, + } + authors = await self.get_authors_by_institution_id(raw_institution_id) + logger.debug( + "Retrieved authors for institution_id=%s: %s", raw_institution_id, authors + ) + + async with httpx.AsyncClient() as client: + response = await client.post( + f"{self.base_url}/openalex-institutions/_search", + json=query, + headers=self.headers, + ) + response.raise_for_status() + hits = response.json().get("hits", {}).get("hits", []) + if not hits: + raise NotFoundException( + f"Institution with ID '{raw_institution_id}' not found." + ) + + return Institution.from_dict(hits[0]["_source"]) + + async def get_authors_by_institution_id(self, raw_institution_id: str) -> List[str]: + query = { + "query": { + "nested": { + "path": "affiliations", + "query": { + "bool": { + "must": [ + { + "term": { + "affiliations.institution.id": f"https://openalex.org/{raw_institution_id.upper()}" + } + }, + { + "range": { + "affiliations.years": {"gte": 2026, "lte": 2026} + } + }, + ] + } + }, + } + } + } + logger.debug( + "Fetching authors for institution_id=%s with query: %s", + raw_institution_id, + query, + ) + async with httpx.AsyncClient() as client: + response = await client.post( + "https://project.nes.uni-due.de/elastic/openalex-authors/_search", + json=query, + headers=self.headers, + ) + try: + response.raise_for_status() + except httpx.HTTPStatusError as e: + logger.exception( + "Error fetching authors for institution_id=%s: %s, response content: %s", + raw_institution_id, + str(e), + response.text, + ) + return [] + hits = response.json().get("hits", {}).get("hits", []) + authors = set() + for hit in hits: + authors.update( + auth["author"]["display_name"] + for auth in hit["_source"].get("authorships", []) + ) + return list(authors) + + async def get_institution_aliases_by_id(self, raw_institution_id: str) -> List[str]: + """Get a list of institution aliases for a given institution ID, including both display name alternatives and predefined aliases. + + Args: + raw_institution_id (str): The raw institution ID for which to retrieve aliases. + + Returns: + List[str]: A list of aliases for the given institution ID. + """ + institution = await self.get_institution_by_id(raw_institution_id) + aliases = list( + self.augment_aliases(set(institution.display_name_alternatives or [])) + | self.get_predefined_institution_aliases(raw_institution_id) + ) + logger.debug( + "Retrieved aliases for institution_id=%s: %s", raw_institution_id, aliases + ) + return aliases + + def get_predefined_institution_aliases(self, raw_institution_id: str) -> Set[str]: + """Get predefined aliases for a given institution ID. + + Args: + raw_institution_id (str): The raw institution ID for which to retrieve predefined aliases. + + Returns: + Set[str]: A set of predefined aliases for the given institution ID. + """ + raw_institution_id = raw_institution_id.upper() + predefined_aliases = { + "I62318514": [ + "universität duisburg-essen", + "university of duisburg-essen", + "universitaet duisburg-essen", + "universität duisburg-essen", + "universitat duisburg-essen", + ], + } + + return self.augment_aliases(set(predefined_aliases.get(raw_institution_id, []))) + + def augment_aliases(self, aliases: Set[str]) -> Set[str]: + """Augment a set of aliases by applying the augment_alias function to each alias. + + Args: + aliases (Set[str]): A set of aliases to augment. + + Returns: + Set[str]: A set of augmented aliases. + """ + augmented_aliases = set() + for alias in aliases: + augmented_aliases.update(self.augment_alias(alias)) + return augmented_aliases + + def augment_alias(self, alias: str) -> List[str]: + """Augment an alias by replacing German umlauts and ß with their alternative spellings. + + Args: + alias (str): The alias to augment. + + Returns: + List[str]: A list of augmented aliases. + """ + alias = alias.lower() + aliases = [alias] + aliases.append( + alias.replace("ä", "ae") + .replace("ö", "oe") + .replace("ü", "ue") + .replace("ß", "ss") + ) + aliases.append( + alias.replace("ae", "ä") + .replace("oe", "ö") + .replace("ue", "ü") + .replace("ss", "ß") + ) + aliases.append( + alias.replace("ä", "a") + .replace("ö", "o") + .replace("ü", "u") + .replace("ß", "s") + ) + aliases.append(alias.replace("-", " ")) + return aliases diff --git a/service/src/main/inse/institutions/logic.py b/service/src/main/inse/institutions/logic.py index 65a49ed6..a4f834ee 100644 --- a/service/src/main/inse/institutions/logic.py +++ b/service/src/main/inse/institutions/logic.py @@ -3,9 +3,10 @@ """ Business logic for OpenAlex institutions. """ + import logging from copy import deepcopy -from typing import Any +from typing import Any, Optional import httpx from fastapi import HTTPException @@ -15,9 +16,13 @@ from starlette.status import HTTP_502_BAD_GATEWAY from inse.models.openalex.autocomplete_response import AutocompleteResponse from inse.models.openalex.autocomplete_response_meta import AutocompleteResponseMeta -from inse.models.openalex.autocomplete_response_results_inner import AutocompleteResponseResultsInner +from inse.models.openalex.autocomplete_response_results_inner import ( + AutocompleteResponseResultsInner, +) from inse.models.openalex.institutions_list_response import InstitutionsListResponse +from inse.models.openalex.institution import Institution from .search_client import OpenAlexInstitutionsClient +from inse.institutions.institutions_search_client import InstitutionsSearchClient logger = logging.getLogger(__name__) @@ -33,6 +38,12 @@ _VALID_INSTITUTION_TYPES = { } +async def get_institution_by_id( + raw_institution_id: str, client: InstitutionsSearchClient +) -> Institution: + return await client.get_institution_by_id(raw_institution_id) + + async def list_institutions( *, search: str | None = None, @@ -85,7 +96,10 @@ async def list_institutions( try: normalized_data = _normalize_institutions_response(data) - return InstitutionsListResponse.from_dict(normalized_data) or InstitutionsListResponse() + return ( + InstitutionsListResponse.from_dict(normalized_data) + or InstitutionsListResponse() + ) except ValidationError as exc: logger.exception("OpenAlex institutions response could not be parsed.") raise HTTPException( @@ -114,10 +128,7 @@ async def autocomplete_institutions( sort="works_count:desc", per_page=limit, page=1, - select=( - "id,ror,display_name,country_code,type,works_count," - "cited_by_count,geo" - ), + select=("id,ror,display_name,country_code,type,works_count,cited_by_count,geo"), client=client, ) @@ -165,7 +176,13 @@ def _normalize_institutions_response(data: dict[str, Any]) -> dict[str, Any]: meta = normalized.get("meta") if isinstance(meta, dict): - for field in ["count", "db_response_time_ms", "page", "per_page", "groups_count"]: + for field in [ + "count", + "db_response_time_ms", + "page", + "per_page", + "groups_count", + ]: meta[field] = _int_or_none(meta.get(field)) meta["next_cursor"] = _str_or_none(meta.get("next_cursor")) meta["cost_usd"] = _number_or_none(meta.get("cost_usd")) @@ -187,7 +204,10 @@ def _normalize_institutions_response(data: dict[str, Any]) -> dict[str, Any]: institution[field] = _str_or_none(institution.get(field)) institution_type = institution.get("type") - if institution_type is not None and institution_type not in _VALID_INSTITUTION_TYPES: + if ( + institution_type is not None + and institution_type not in _VALID_INSTITUTION_TYPES + ): institution["type"] = None else: institution["type"] = _str_or_none(institution_type) @@ -202,7 +222,9 @@ def _normalize_institutions_response(data: dict[str, Any]) -> dict[str, Any]: institution["works_count"] = _int_or_none(institution.get("works_count")) institution["cited_by_count"] = _int_or_none(institution.get("cited_by_count")) institution["created_date"] = _date_str_or_none(institution.get("created_date")) - institution["updated_date"] = _datetime_str_or_none(institution.get("updated_date")) + institution["updated_date"] = _datetime_str_or_none( + institution.get("updated_date") + ) summary_stats = institution.get("summary_stats") if isinstance(summary_stats, dict): diff --git a/service/src/main/inse/institutions/search_client.py b/service/src/main/inse/institutions/search_client.py index 3db5e1dd..9839e24c 100644 --- a/service/src/main/inse/institutions/search_client.py +++ b/service/src/main/inse/institutions/search_client.py @@ -3,6 +3,7 @@ """ HTTP client for OpenAlex institutions. """ + from typing import Any import httpx @@ -19,8 +20,14 @@ class OpenAlexInstitutionsClient: transport: httpx.AsyncBaseTransport | None = None, ): self.base_url = (base_url or config.settings.openalex_api_base_url).rstrip("/") - self.api_key = api_key if api_key is not None else config.settings.openalex_api_key - self.timeout = timeout if timeout is not None else config.settings.openalex_api_timeout_seconds + self.api_key = ( + api_key if api_key is not None else config.settings.openalex_api_key + ) + self.timeout = ( + timeout + if timeout is not None + else config.settings.openalex_api_timeout_seconds + ) self.transport = transport def list_institutions_params( diff --git a/service/src/main/inse/institutions/service.py b/service/src/main/inse/institutions/service.py index 424fb7af..dd13b718 100644 --- a/service/src/main/inse/institutions/service.py +++ b/service/src/main/inse/institutions/service.py @@ -3,20 +3,60 @@ """ REST API for OpenAlex institutions. """ + +from functools import lru_cache from typing import Annotated -from fastapi import APIRouter -from fastapi import Query +from fastapi import APIRouter, Depends, status, Query from inse.models.openalex.autocomplete_response import AutocompleteResponse from inse.models.openalex.institutions_list_response import InstitutionsListResponse from inse.tags import Tags +from inse.config import get_settings +from inse.models.openalex.institution import Institution from . import logic +from inse.institutions.institutions_search_client import InstitutionsSearchClient router = APIRouter(prefix="/api/institutions", tags=[Tags.INSTITUTIONS]) +@lru_cache +def get_institutions_search_client() -> InstitutionsSearchClient: + settings = get_settings() + if not settings.elasticsearch_url: + raise ValueError("Elasticsearch URL is missing in settings.") + if not settings.elasticsearch_api_key: + raise ValueError("Elasticsearch API key is missing in settings.") + + return InstitutionsSearchClient( + api_key=settings.elasticsearch_api_key, + base_url=settings.elasticsearch_url, + ) + + +@router.get( + "/{id}", + summary="Returns a single institution by ID.", + description="Returns a single institution by its OpenAlex ID.", + operation_id="getInstitutionById", + responses={ + status.HTTP_200_OK: { + "description": "Successful Response", + "model": Institution, + }, + status.HTTP_404_NOT_FOUND: {"description": "Institution not found"}, + }, +) +async def get_institution( + id: str, + client: Annotated[ + InstitutionsSearchClient, Depends(get_institutions_search_client) + ], +) -> Institution: + return await logic.get_institution_by_id(raw_institution_id=id, client=client) + + @router.get( "/autocomplete", operation_id="autocompleteInstitutions", @@ -27,7 +67,10 @@ router = APIRouter(prefix="/api/institutions", tags=[Tags.INSTITUTIONS]) async def autocomplete_institutions( query: Annotated[ str, - Query(description="Institution search text, for example 'Duisburg Essen'.", min_length=1), + Query( + description="Institution search text, for example 'Duisburg Essen'.", + min_length=1, + ), ], country_code: Annotated[ str | None, @@ -64,7 +107,9 @@ async def list_institutions( ] = None, filter: Annotated[ str | None, - Query(description="OpenAlex filter, for example 'country_code:DE,type:education'."), + Query( + description="OpenAlex filter, for example 'country_code:DE,type:education'." + ), ] = None, sort: Annotated[ str | None, @@ -88,7 +133,11 @@ async def list_institutions( ] = None, sample: Annotated[ int | None, - Query(description="Random sample size. Cannot be combined with sort or page.", ge=1, le=10000), + Query( + description="Random sample size. Cannot be combined with sort or page.", + ge=1, + le=10000, + ), ] = None, select: Annotated[ str | None, diff --git a/service/src/main/inse/main.py b/service/src/main/inse/main.py index 0ec0a2a4..56d462f7 100644 --- a/service/src/main/inse/main.py +++ b/service/src/main/inse/main.py @@ -7,8 +7,8 @@ webapp. """ import logging -from fastapi import FastAPI -from fastapi.responses import RedirectResponse +from fastapi import FastAPI, Request +from fastapi.responses import JSONResponse, RedirectResponse from fastapi.middleware.cors import CORSMiddleware from inse.collaboration_network.router import router as collaboration_network_router from inse.institutions.service import router as institutions_service_router @@ -17,7 +17,11 @@ from inse.works.service import router as works_service_router from inse.persons.service import router as persons_service_router from inse.funders.service import router as funders_service_router from inse.news.service import router as news_service_router +from inse.projects.router import router as projects_router +# caching +from inse.middleware.etag_cache import ETagCacheMiddleware +from inse.exceptions import NotFoundException from . import config from .service import router as service_router from .account.service import router as account_router @@ -45,15 +49,27 @@ app.include_router(news_service_router) app.include_router(service_router) app.include_router(account_router) +app.include_router(projects_router) + +app.add_middleware( + ETagCacheMiddleware, + ttl=300, # 5 minutes expiration time +) app.add_middleware( CORSMiddleware, allow_origins=settings.allowed_origins, allow_credentials=True, allow_methods=["*"], allow_headers=["*"], + expose_headers=["ETag"], ) +@app.exception_handler(NotFoundException) +async def handle_not_found(request: Request, exc: NotFoundException): + return JSONResponse(status_code=404, content={"message": str(exc)}) + + @app.exception_handler(404) async def redirect(_, __): return RedirectResponse(url="/inse-webapp/") diff --git a/service/src/main/inse/middleware/etag_cache.py b/service/src/main/inse/middleware/etag_cache.py new file mode 100644 index 00000000..547aecb4 --- /dev/null +++ b/service/src/main/inse/middleware/etag_cache.py @@ -0,0 +1,52 @@ +# middleware/etag_cache.py +import hashlib, json, time +from starlette.middleware.base import BaseHTTPMiddleware +from starlette.requests import Request +from starlette.responses import Response + +class ETagCacheMiddleware(BaseHTTPMiddleware): + def __init__(self, app, ttl: int = 60): + super().__init__(app) + self.ttl = ttl # timeout in seconds + self.cache: dict[str, dict] = {} # key → {body, etag, expires} + + def _cache_key(self, request: Request) -> str: + # Include query params and relevant headers in the key + return f"{request.url.path}?{request.url.query}" + + async def dispatch(self, request: Request, call_next): + if request.method != "GET": + return await call_next(request) + + key = self._cache_key(request) + entry = self.cache.get(key) + client_etag = request.headers.get("if-none-match") + + # Cache hit + not expired + if entry and time.time() < entry["expires"]: + if client_etag == entry["etag"]: + return Response(status_code=304, headers={"ETag": entry["etag"]}) + + # Client has stale ETag - return fresh cached body + return Response( + content=entry["body"], + media_type="application/json", + headers={"ETag": entry["etag"], "Cache-Control": f"max-age={self.ttl}"} + ) + + # Cache miss or expired → hit the actual route + response = await call_next(request) + body = b"".join([chunk async for chunk in response.body_iterator]) + etag = f'"{hashlib.md5(body).hexdigest()}"' + + self.cache[key] = { + "body": body, + "etag": etag, + "expires": time.time() + self.ttl + } + return Response( + content=body, + status_code=response.status_code, + media_type="application/json", + headers={"ETag": etag, "Cache-Control": f"max-age={self.ttl}"} + ) \ No newline at end of file diff --git a/service/src/main/inse/models/bund_project.py b/service/src/main/inse/models/bund_project.py new file mode 100644 index 00000000..6599ed41 --- /dev/null +++ b/service/src/main/inse/models/bund_project.py @@ -0,0 +1,226 @@ +from datetime import datetime, date +from typing import Annotated, Optional + +from pydantic import BaseModel, BeforeValidator, ConfigDict, Field + + +def parse_german_date(value: Optional[str]) -> Optional[date]: + if value is None or isinstance(value, date): + return value + + return datetime.strptime(value, "%d.%m.%Y").date() + + +class BundProject(BaseModel): + model_config = ConfigDict( + populate_by_name=True, + extra="ignore", + ) + + funding_code: Optional[str] = Field( + default=None, + validation_alias="Förderkennzeichen", + description="The funding code of the project", + examples=["19F2266G"], + ) + + department: Optional[str] = Field( + default=None, + validation_alias="Ressort", + description="The department of the project", + examples=["BMDV"], + ) + + department_fullname: Optional[str] = Field( + default=None, + validation_alias="Ressort_fullname", + description="The full name of the department of the project", + examples=["Bundesministerium für Digitales und Verkehr"], + ) + + referat: Optional[str] = Field( + default=None, + validation_alias="Referat", + description="The referat of the project", + examples=["DP20"], + ) + + project_sponsor: Optional[str] = Field( + default=None, + validation_alias="Projektträger", + description="The project sponsor of the project", + examples=["PT-TÜV"], + ) + + project_sponsor_fullname: Optional[str] = Field( + default=None, + validation_alias="Projektträger_fullname", + description="The full name of the project sponsor of the project", + examples=["Projektträger TÜV Rheinland"], + ) + + work_unit: Optional[str] = Field( + default=None, + validation_alias="Arb.-Einh.", + description="The work unit of the project", + examples=["mFUND"], + ) + + recipient: Optional[str] = Field( + default=None, + validation_alias="Zuwendungsempfänger", + description="The recipient of the project", + examples=["Universität Duisburg-Essen"], + ) + + municipal_code: Optional[str] = Field( + default=None, + validation_alias="Gemeindekennziffer", + description="The municipal code of the project", + examples=["05113000"], + ) + + municipality: Optional[str] = Field( + default=None, + validation_alias="Stadt/Gemeinde", + description="The municipality of the project", + examples=["Essen"], + ) + + place: Optional[str] = Field( + default=None, + validation_alias="Ort", + description="The place of the project", + examples=["Essen"], + ) + + state: Optional[str] = Field( + default=None, + validation_alias="Bundesland", + description="The state of the project", + examples=["Nordrhein-Westfalen"], + ) + + country: Optional[str] = Field( + default=None, + validation_alias="Staat", + description="The country of the project", + examples=["Deutschland"], + ) + + implementing_agency: Optional[str] = Field( + default=None, + validation_alias="Ausführende Stelle", + description="The implementing agency of the project", + examples=[ + "Universität Duisburg-Essen - Fachbereich Allgemeine Informatik - Lehrstuhl Networked Embedded Systems (NES)" + ], + ) + + topic: Optional[str] = Field( + default=None, + validation_alias="Thema", + description="The topic of the project", + examples=[ + "Verbundprojekt: Multimodaler Mobilitäts-Index - Moby_Dex -, Teilvorhaben: Universität Duisburg-Essen" + ], + ) + + performance_plan_system: Optional[str] = Field( + default=None, + validation_alias="Leistungsplansystematik", + description="The performance plan system of the project", + examples=["GA6011"], + ) + + performance_plan_system_text: Optional[str] = Field( + default=None, + validation_alias="Klartext Leistungsplansystematik", + description="The performance plan system text of the project", + examples=["Angewandte Forschung und Experimentelle Entwicklung"], + ) + + funding_start: Annotated[ + Optional[date], + Field( + default=None, + validation_alias="Förderbeginn", + description="The funding start date of the project", + examples=["01.09.2023"], + ), + BeforeValidator(parse_german_date), + ] + + funding_end: Annotated[ + Optional[date], + Field( + default=None, + validation_alias="Förderende", + description="The funding end date of the project", + examples=["31.08.2026"], + ), + BeforeValidator(parse_german_date), + ] + + grant_amount: Optional[float] = Field( + default=None, + validation_alias="Fördersumme", + description="The grant amount of the project", + examples=[367651.00], + ) + + funding_profile: Optional[str] = Field( + default=None, + validation_alias="Förderprofil", + description="The funding profile of the project", + examples=["Technologie- und Innovationsförderung"], + ) + + joint_project: Optional[str] = Field( + default=None, + validation_alias="Verbundprojekt", + description="Whether the project is a joint project", + examples=["Moby_Dex"], + ) + + funding_type: Optional[str] = Field( + default=None, + validation_alias="Förderart", + description="The funding type of the project", + examples=["PDIR"], + ) + + publication_date: Optional[str] = Field( + default=None, + validation_alias="Publikationsdatum", + description="The publication date of the project", + examples=["2023"], + ) + + unix_timestamp: Optional[int] = Field( + default=None, + validation_alias="Unix-Timestamp", + description="The unix timestamp of the project", + examples=[1737411518], + ) + + date: Optional[str] = Field( + default=None, + validation_alias="datum", + description="The date of the project", + examples=["20.01.2025"], + ) + + new: Optional[bool] = Field( + default=None, + validation_alias="neu", + description="Whether the project is new", + examples=[False], + ) + + duration: Optional[str] = Field( + default=None, + validation_alias="Laufzeit", + description="The duration of the project", + examples=["von 01.09.2023 bis 31.08.2026"], + ) diff --git a/service/src/main/inse/models/dfg_project.py b/service/src/main/inse/models/dfg_project.py new file mode 100644 index 00000000..409e0fe5 --- /dev/null +++ b/service/src/main/inse/models/dfg_project.py @@ -0,0 +1,94 @@ +from datetime import date +from typing import Optional, Set + +from pydantic import BaseModel, Field + + +class DfgProject(BaseModel): + id: str = Field(description="The ID of the DFG project") + link: str = Field(description="The link to the DFG project") + title: str = Field(description="The title of the DFG project") + description: str = Field(description="The description of the DFG project") + + project_identifier: str = Field( + description="The project identifier of the DFG project" + ) + + funding_start_date: str = Field( + description="The funding start date of the DFG project" + ) + funding_end_date: str = Field(description="The funding end date of the DFG project") + + associated_persons: list[str] = Field( + description="The associated persons of the DFG project" + ) + + institutions: list[str] = Field( + description="The institutions associated with the DFG project" + ) + + @classmethod + def from_elastic_hit(cls, hit: dict): + source = hit["_source"] + + associated_persons: Set[str] = set() + institutions: Set[str] = set() + + # persons + + if "Antragsteller" in source: + associated_persons.update(source["Antragsteller"].split(";")) + + if "Antragstellerin" in source: + associated_persons.add(source["Antragstellerin"]) + + if "Sprecher" in source: + associated_persons.add(source["Sprecher"]) + + if "Sprecherin" in source: + associated_persons.add(source["Sprecherin"]) + + if "Leiter" in source: + associated_persons.add(source["Leiter"]) + + if "Leiterin" in source: + associated_persons.add(source["Leiterin"]) + + if "beteiligte Wissenschaftlerinnen / beteiligte Wissenschaftler" in source: + associated_persons.update( + source[ + "beteiligte Wissenschaftlerinnen / beteiligte Wissenschaftler" + ].split(";") + ) + + if "Beteiligte Personen" in source: + associated_persons.update(source["Beteiligte Personen"].split(";")) + + if "Teilprojektleiter" in source: + associated_persons.update(source["Teilprojektleiter"].split(";")) + + # institutions + + if "Antragstellende Institution" in source: + institutions.add(source["Antragstellende Institution"]) + + if "Mitantragstellende Institution" in source: + institutions.add(source["Mitantragstellende Institution"]) + + if "Beteiligte Institution" in source: + institutions.add(source["Beteiligte Institution"]) + + if "Beteiligte Hochschule" in source: + institutions.add(source["Beteiligte Hochschule"]) + + return cls( + id=hit["_id"], + link=source["link"], + title=source["title"], + description=source["description"], + project_identifier=source["Projektkennzeichen"], + funding_start_date=source["funding_start"], + funding_end_date=source["funding_end"], + associated_persons=list(associated_persons), + institutions=list(institutions), + ) diff --git a/service/src/main/inse/models/eu_project.py b/service/src/main/inse/models/eu_project.py new file mode 100644 index 00000000..a499216a --- /dev/null +++ b/service/src/main/inse/models/eu_project.py @@ -0,0 +1,192 @@ +from typing import List, Optional +from pydantic import BaseModel, ConfigDict, Field + + +class DisplayCodeSplittedNested(BaseModel): + model_config = ConfigDict(populate_by_name=True) + + single_display_code: Optional[str] = Field( + default=None, + validation_alias="singleDisplayCode", + description="A solitary segment or specific component broken out from the main display code.", + ) + + +class CategoryNested(BaseModel): + model_config = ConfigDict(populate_by_name=True) + + category: Optional[str] = Field( + default=None, + description="The descriptive classification title or taxonomy name for the project.", + ) + code: Optional[str] = Field( + default=None, description="The system code representing the specific category." + ) + display_code: Optional[str] = Field( + default=None, + validation_alias="displayCode", + description="The alphanumeric code formatted for user interface display purposes.", + ) + # REFINED: Mapped to List[str] because the real data provides an array of strings + display_code_splitted: List[str] = Field( + default_factory=list, + validation_alias="displayCode_splitted", + description="A tokenized hierarchy breakdown of the display code represented as an array of strings.", + ) + display_code_splitted_nested: List[DisplayCodeSplittedNested] = Field( + default_factory=list, + validation_alias="displayCode_splitted_nested", + description="Granular, nested breakdowns of the split parts of the display code.", + ) + + +class KeywordNested(BaseModel): + model_config = ConfigDict(populate_by_name=True) + + keyword: Optional[str] = Field( + default=None, + description="An individual standalone keyword or tag used for granular search index filtering.", + ) + + +class OrganizationNested(BaseModel): + model_config = ConfigDict(populate_by_name=True) + + ec_contribution: Optional[str] = Field( + default=None, + validation_alias="ecContribution", + description="The gross European Commission financial contribution allocated to this specific participant organization.", + ) + id: Optional[str] = Field( + default=None, + description="The unique identifier or Participant Identification Code (PIC) of the organization.", + ) + name: Optional[str] = Field( + default=None, + description="The full legal name of the participating organization or institution.", + ) + net_ec_contribution: Optional[str] = Field( + default=None, + validation_alias="netEcContribution", + description="The net European Commission financial funding provided to the organization after adjustments.", + ) + total_cost: Optional[str] = Field( + default=None, + validation_alias="totalCost", + description="The overall individual budget or total cost declared by this organization for its share of work.", + ) + organization_type: Optional[str] = Field( + default=None, + validation_alias="type", + description="The legal entity type or role of the organization (e.g., coordinator, participant).", + ) + + +class ProgrammeNested(BaseModel): + model_config = ConfigDict(populate_by_name=True) + + code: Optional[str] = Field( + default=None, + description="The structural code identifying the framework or specific funding sub-programme.", + ) + id: Optional[str] = Field( + default=None, + description="The unique identifier of the funding program within the registry.", + ) + programme: Optional[str] = Field( + default=None, + description="The official title or description of the EU funding program.", + ) + + +class EuProject(BaseModel): + model_config = ConfigDict(populate_by_name=True) + + acronym: Optional[str] = Field( + default=None, + description="The official, short acronym chosen to identify the EU project.", + ) + categories_nested: List[CategoryNested] = Field( + default_factory=list, + description="Structured lists of classification categories and taxonomy mappings assigned to the project.", + ) + doc_number: Optional[str] = Field( + default=None, + description="The internal administrative document control number or record tracking identifier.", + ) + doi: Optional[str] = Field( + default=None, + description="The Digital Object Identifier (DOI) linked to the project's official metadata or primary publication.", + ) + ec_max_contribution: Optional[str] = Field( + default=None, + validation_alias="ecMaxContribution", + description="The maximum authorized limit for the European Commission's financial grant contribution to the project.", + ) + end_date: Optional[str] = Field( + default=None, + validation_alias="endDate", + description="The calendar date marking the official structural conclusion of the project execution timeline.", + ) + funding_end: Optional[str] = Field( + default=None, + description="The exact calendar termination year for the project's financial eligibility period.", + ) + funding_start: Optional[str] = Field( + default=None, + description="The exact calendar activation year from which project expenses can be billed against the grant.", + ) + id: Optional[str] = Field( + default=None, + description="The unique global record ID for the project document (typically the Grant Agreement Number).", + ) + keywords: Optional[str] = Field( + default=None, + description="A general text string or comma-separated list of keywords applied to the project record.", + ) + keywords_nested: List[KeywordNested] = Field( + default_factory=list, + description="Strictly tokenized and isolated keywords nested for targeted search engine aggregations.", + ) + link: Optional[str] = Field( + default=None, + description="The web URL linking directly to the project's public profile page on CORDIS or an equivalent registry.", + ) + objective: Optional[str] = Field( + default=None, + description="The complete, detailed abstract outlining the goals, methodology, and expected impact of the project.", + ) + organization_nested: List[OrganizationNested] = Field( + default_factory=list, + description="The full roster of academic, public, or private organizations participating in the project consortium.", + ) + programme_nested: List[ProgrammeNested] = Field( + default_factory=list, + description="The nested historical line of EU funding frameworks and structural grants supporting this project.", + ) + source: Optional[str] = Field( + default=None, + description="The specific upstream system or database repository from which this document was fetched or synced.", + ) + start_date: Optional[str] = Field( + default=None, + validation_alias="startDate", + description="The official calendar date marking the active kickoff and formal initiation of the project.", + ) + status: Optional[str] = Field( + default=None, + description="The lifecycle phase of the project (e.g., 'CLOSED', 'ONGOING').", + ) + teaser: Optional[str] = Field( + default=None, + description="A brief, high-level summary or editorial sentence written for general public consumption.", + ) + title: Optional[str] = Field( + default=None, + description="The comprehensive, full legal title describing the scope of the project.", + ) + total_cost: Optional[str] = Field( + default=None, + validation_alias="totalCost", + description="The combined sum total budget estimated for the implementation of the entire project.", + ) diff --git a/service/src/main/inse/persons/logic.py b/service/src/main/inse/persons/logic.py index 409ce5ae..88b36788 100644 --- a/service/src/main/inse/persons/logic.py +++ b/service/src/main/inse/persons/logic.py @@ -20,9 +20,35 @@ from inse import util from inse.integrations import elasticsearch from inse.models.openalex.meta import Meta from inse.persons.query_builder import build_authors_search_rescored -from inse.persons.model import CustomAuthor, CustomAuthorsListResponse, PersonSearchRequest +from inse.persons.model import ( + CustomAuthor, + CustomAuthorsListResponse, + PersonSearchRequest, +) + logger = logging.getLogger(__name__) -INDEX_NAME="openalex-authors" +INDEX_NAME = "openalex-authors" + + +def get_author_name_by_id(author_id: str) -> Optional[str]: + try: + query = { + "_source": ["id", "display_name"], + "query": { + "term": {"id": {"value": f"https://openalex.org/{author_id.upper()}"}} + }, + "size": 1, + } + + data = elasticsearch.search(index=INDEX_NAME, body=query) + hits = data.get("hits", {}).get("hits", []) + if not hits: + return None + return hits[0].get("_source", {}).get("display_name") + except Exception as e: + logger.exception(f"Error fetching author name for id {author_id}: {str(e)}") + return None + def search_persons( author_id: Optional[str] = None, @@ -83,7 +109,7 @@ def _fetch_author_display_name(author_id: str) -> Optional[str]: if not hits: return None - + return hits[0].get("_source", {}).get("display_name") @@ -96,7 +122,7 @@ def _fetch_works_and_topics(author_id: str) -> tuple[list, list]: "cited_by_count", "primary_topic", ] - + author_url = f"https://openalex.org/{author_id.strip()}" authorship_query = { @@ -140,18 +166,22 @@ def _fetch_works_and_topics(author_id: str) -> tuple[list, list]: works.append(hit.get("_source", {})) topics = [] - buckets = response.get("aggregations", {}).get("primary_topics", {}).get("buckets", []) + buckets = ( + response.get("aggregations", {}).get("primary_topics", {}).get("buckets", []) + ) for bucket in buckets: topic_hits = bucket.get("topic_name", {}).get("hits", {}).get("hits", []) display_name = None if topic_hits: primary_topic = topic_hits[0].get("_source", {}).get("primary_topic", {}) display_name = primary_topic.get("display_name") - topics.append({ - "id": bucket.get("key"), - "display_name": display_name, - "count": bucket.get("doc_count"), - }) + topics.append( + { + "id": bucket.get("key"), + "display_name": display_name, + "count": bucket.get("doc_count"), + } + ) return works, topics @@ -162,13 +192,15 @@ def _build_papers(works: list) -> list: for work in works: name = work.get("title") or work.get("display_name") abstract = work.get("abstract") - papers.append({ - "name": name, - "abstract": abstract, - "stats": { - "cited_by_count": work.get("cited_by_count"), - }, - }) + papers.append( + { + "name": name, + "abstract": abstract, + "stats": { + "cited_by_count": work.get("cited_by_count"), + }, + } + ) return papers @@ -205,7 +237,12 @@ def generate_person_bio(author_id: str, include: Optional[set[str]] = None) -> s user_prompt = f"Daten zur Person:\n{person_json}" - bio = llm.call(system_prompt=system_prompt, user_prompt=user_prompt, temperature=0.8, top_p=0.95) + bio = llm.call( + system_prompt=system_prompt, + user_prompt=user_prompt, + temperature=0.8, + top_p=0.95, + ) elapsed_time = time.time() - start_time logger.info( @@ -214,17 +251,16 @@ def generate_person_bio(author_id: str, include: Optional[set[str]] = None) -> s return bio -def get_person_by_id(author_id: str, include: Optional[str] = None) -> AuthorsListResponse: + +def get_person_by_id( + author_id: str, include: Optional[str] = None +) -> AuthorsListResponse: body = { - "_source":include.split(",") if include else True, + "_source": include.split(",") if include else True, } try: - hit = elasticsearch.get( - index="openalex-authors", - body=body, - doc_id=author_id - ) + hit = elasticsearch.get(index="openalex-authors", body=body, doc_id=author_id) except NotFoundError: raise HTTPException( status_code=404, detail=f"Person with id {author_id} not found" @@ -238,7 +274,10 @@ def get_person_by_id(author_id: str, include: Optional[str] = None) -> AuthorsLi def search_persons_by_name( - author_name: str, limit: Optional[int] = 10, page_offset: Optional[int] = 0, include: Optional[str] = None + author_name: str, + limit: Optional[int] = 10, + page_offset: Optional[int] = 0, + include: Optional[str] = None, ) -> AuthorsListResponse: if not author_name: raise HTTPException(status_code=400, detail="name must be provided") @@ -270,78 +309,73 @@ def search_persons_by_name( offset=page_offset, source=include.split(",") if include else True, size=limit, - track_total_hits=True + track_total_hits=True, ) except Exception as e: raise HTTPException( status_code=500, detail=f"Elasticsearch search failed: {str(e)}" ) - total_count = response.get("hits",{}).get("total",{}).get("value",0) + total_count = response.get("hits", {}).get("total", {}).get("value", 0) hits = response.get("hits", {}).get("hits", []) persons = [util.get_persons_data(hit) for hit in hits] - return AuthorsListResponse(results=persons,meta=Meta(count=total_count,page=page_offset)) + return AuthorsListResponse( + results=persons, meta=Meta(count=total_count, page=page_offset) + ) -def search_persons_autocomplete(author_name: str, limit: Optional[int] = 5, include: Optional[str] = None) -> AuthorsListResponse: +def search_persons_autocomplete( + author_name: str, limit: Optional[int] = 5, include: Optional[str] = None +) -> AuthorsListResponse: if not author_name: - raise HTTPException( - status_code=400, - detail="name must be provided" - ) + raise HTTPException(status_code=400, detail="name must be provided") search_query = { "function_score": { - "query": { - "wildcard": { - "display_name.keyword": { - "value": author_name + "*", - "case_insensitive": True - } - } - }, - "functions": [ - { - "script_score": { - "script": { - "lang": "painless", - "source": "String name = doc['display_name.keyword'].value.toLowerCase(); String[] parts = name.splitOnToken(' '); Set unique = new HashSet(); for (String p : parts) { unique.add(p); } return unique.size() > 1 ? 1.0 : 0.3;" + "query": { + "wildcard": { + "display_name.keyword": { + "value": author_name + "*", + "case_insensitive": True, + } } - } - } - ], - "boost_mode": "multiply" + }, + "functions": [ + { + "script_score": { + "script": { + "lang": "painless", + "source": "String name = doc['display_name.keyword'].value.toLowerCase(); String[] parts = name.splitOnToken(' '); Set unique = new HashSet(); for (String p : parts) { unique.add(p); } return unique.size() > 1 ? 1.0 : 0.3;", + } + } + } + ], + "boost_mode": "multiply", } - } - collapse ={ - "field":"display_name.keyword" } + collapse = {"field": "display_name.keyword"} body = { - "size":limit, - "query":search_query, - "_source":include.split(",") if include else True, - "sort":[{"works_count": {"order": "desc"}}], - "collapse":collapse + "size": limit, + "query": search_query, + "_source": include.split(",") if include else True, + "sort": [{"works_count": {"order": "desc"}}], + "collapse": collapse, } try: - response = elasticsearch.search( - index="openalex-authors", - body=body - ) + response = elasticsearch.search(index="openalex-authors", body=body) except Exception as e: raise HTTPException( - status_code=500, - detail=f"Elasticsearch search failed: {str(e)}" + status_code=500, detail=f"Elasticsearch search failed: {str(e)}" ) hits = response.get("hits", {}).get("hits", []) persons = [] for hit in hits: - fields = hit.get("fields",{}) - source = hit.get("_source",{}) - source_copy = dict (source) + fields = hit.get("fields", {}) + source = hit.get("_source", {}) + source_copy = dict(source) source_copy["id"] = hit.get("_id", "") or source_copy.get("id") # Resilient sanitization of IDs to protect against model regeneration type conflicts (#Generated) @@ -352,16 +386,20 @@ def search_persons_autocomplete(author_name: str, limit: Optional[int] = 5, incl if orcid_val: ids_copy["orcid"] = str(orcid_val) source_copy["ids"] = ids_copy - - for key,value in fields.items(): - source_copy[key] = value + + for key, value in fields.items(): + source_copy[key] = value author = Author.from_dict(source_copy) persons.append(author) - + return AuthorsListResponse(results=persons) + def search_persons_by_institution( - institution_name: str, limit: Optional[int] = 10, page_offset: Optional[int] = 0, include: Optional[str] = None + institution_name: str, + limit: Optional[int] = 10, + page_offset: Optional[int] = 0, + include: Optional[str] = None, ) -> AuthorsListResponse: if not institution_name: @@ -380,7 +418,7 @@ def search_persons_by_institution( } ] } - } + }, } } try: @@ -391,32 +429,34 @@ def search_persons_by_institution( size=limit, offset=page_offset, sort=[{"works_count": {"order": "desc"}}], - track_total_hits=True + track_total_hits=True, ) except Exception as e: raise HTTPException( status_code=500, detail=f"Elasticsearch search failed: {str(e)}" ) - total_count = response.get("hits",{}).get("total",{}).get("value",0) + total_count = response.get("hits", {}).get("total", {}).get("value", 0) hits = response.get("hits", {}).get("hits", []) persons = [util.get_persons_data(hit) for hit in hits] - return AuthorsListResponse(results=persons,meta=Meta(count=total_count,page=page_offset)) + return AuthorsListResponse( + results=persons, meta=Meta(count=total_count, page=page_offset) + ) + def _enrich_author_data(author_data) -> Optional[CustomAuthor]: if not author_data: return None if not isinstance(author_data, dict): - if hasattr(author_data, 'model_dump'): + if hasattr(author_data, "model_dump"): author_data = author_data.model_dump() - elif hasattr(author_data, 'to_dict'): + elif hasattr(author_data, "to_dict"): author_data = author_data.to_dict() else: return None author_id = author_data.get("id", "") or "" # Not implemented yet - h = int(hashlib.md5(author_id.encode('utf-8')).hexdigest(), 16) - + h = int(hashlib.md5(author_id.encode("utf-8")).hexdigest(), 16) # Experimental suitability rating suitability_score = h % 100 @@ -446,6 +486,7 @@ def _enrich_author_data(author_data) -> Optional[CustomAuthor]: ) return author + def advanced_search_persons( query: Optional[str] = None, institution_name: Optional[str] = None, @@ -470,9 +511,9 @@ def advanced_search_persons( page_size=page_size, include=include, strict=strict, - track_total_hits = True, + track_total_hits=True, filter_mode=filter_mode, - filter_year=filter_year + filter_year=filter_year, ) response_dict = elasticsearch.search( index=INDEX_NAME, @@ -482,12 +523,7 @@ def advanced_search_persons( if e.response.status_code == 404: logger.warning(f"Elasticsearch index '{INDEX_NAME}' not found.") return CustomAuthorsListResponse( - results=[], - meta=Meta( - count=0, - page=page, - per_page=page_size - ) + results=[], meta=Meta(count=0, page=page, per_page=page_size) ) elif e.response.status_code == 400: logger.error(f"Elasticsearch request error: {str(e)}") @@ -509,7 +545,7 @@ def advanced_search_persons( raise HTTPException( status_code=500, detail=f"Elasticsearch search failed: {str(e)}" ) - total_count = response_dict.get("hits",{}).get("total",{}).get("value",0) + total_count = response_dict.get("hits", {}).get("total", {}).get("value", 0) hits = response_dict.get("hits", {}).get("hits", []) total_count = response_dict.get("hits", {}).get("total", {}).get("value", 0) @@ -521,10 +557,5 @@ def advanced_search_persons( results.append(custom_author) return CustomAuthorsListResponse( - results=results, - meta=Meta( - count=total_count, - page=page, - per_page=page_size - ) + results=results, meta=Meta(count=total_count, page=page, per_page=page_size) ) diff --git a/service/src/main/inse/persons/query_builder.py b/service/src/main/inse/persons/query_builder.py index a258b99a..7431558d 100644 --- a/service/src/main/inse/persons/query_builder.py +++ b/service/src/main/inse/persons/query_builder.py @@ -418,16 +418,16 @@ def build_authors_search_rescored( functions = [] if not sort_by: - if (name_quality_boost): # Name quality boost, boost names which are not "Value Value" - name_boost_query={ - "script_score": { - "script": { - "lang": "painless", - "source": "String name = doc['display_name.keyword'].value.toLowerCase(); String[] parts = name.splitOnToken(' ');Set unique = new HashSet();for (String p : parts) { unique.add(p); }return unique.size() > 1 ? 1.0 : 0.3;" - } - } - } - functions.append(name_boost_query) + # if (name_quality_boost): # Name quality boost, boost names which are not "Value Value" + # name_boost_query={ + # "script_score": { + # "script": { + # "lang": "painless", + # "source": "String name = doc['display_name.keyword'].value.toLowerCase(); String[] parts = name.splitOnToken(' ');Set unique = new HashSet();for (String p : parts) { unique.add(p); }return unique.size() > 1 ? 1.0 : 0.3;" + # } + # } + # } + # functions.append(name_boost_query) if (h_index_boost): # h_index boost h_index_boost_query={ "script_score": { @@ -449,17 +449,6 @@ def build_authors_search_rescored( } functions.append(cited_by_count_boost_query) - if (_2yr_mean_citedness_boost): # 2yr mean citedness boost - mean_citedness_boost_query = { - "script_score": { - "script": { - "lang": "painless", - "source": "if (!doc.containsKey('summary_stats.2yr_mean_citedness') || doc['summary_stats.2yr_mean_citedness'].empty) return 1.0;double recent = doc['summary_stats.2yr_mean_citedness'].value;return 1.0 + Math.log1p(recent) / 8.0;" - } - } - } - functions.append(mean_citedness_boost_query) - if (works_boost): # works_count boost works_count_boost_query = { "script_score": { diff --git a/service/src/main/inse/projects/model.py b/service/src/main/inse/projects/model.py new file mode 100644 index 00000000..03a3caa3 --- /dev/null +++ b/service/src/main/inse/projects/model.py @@ -0,0 +1,75 @@ +from typing import List, Optional + +from pydantic import BaseModel, Field + +from inse.models.bund_project import BundProject +from inse.models.eu_project import EuProject + + +class Page(BaseModel): + page: int = Field(default=0, description="The current page number.") + size: int = Field(default=20, description="The requested page size.") + total: int = Field(default=0, description="The total number of items.") + + +class BundProjectPage(Page): + elements: List[BundProject] = Field( + default_factory=list, description="The bund projects on this page." + ) + + +class BundProjectList(BaseModel): + elements: List[BundProject] = Field( + default_factory=list, description="All bund projects." + ) + total: int = Field(default=0, description="The total number of bund projects.") + + +class EuProjectPage(Page): + elements: List[EuProject] = Field( + default_factory=list, description="The EU projects on this page." + ) + + +class DfgProjectSummary(BaseModel): + id: str = Field(description="The unique identifier of the DFG project.") + link: Optional[str] = Field( + default=None, description="The link to the DFG project details." + ) + title: Optional[str] = Field( + default=None, description="The title of the DFG project." + ) + professional_classification: Optional[str] = Field( + default=None, description="The professional classification of the DFG project." + ) + funding_start: Optional[str] = Field( + default=None, description="The funding start date of the DFG project." + ) + funding_end: Optional[str] = Field( + default=None, description="The funding end date of the DFG project." + ) + names: List[str] = Field( + default_factory=list, + description="The names of the researchers involved in the DFG project.", + ) + + @classmethod + def from_hit(cls, hit: dict) -> "DfgProjectSummary": + source = hit.get("_source", {}) + fields = hit.get("fields", {}) + + return cls( + id=hit.get("_id", ""), + link=source.get("link"), + title=source.get("title"), + professional_classification=source.get("Fachliche Zuordnung"), + funding_start=source.get("funding_start"), + funding_end=source.get("funding_end"), + names=fields.get("all_found_names", []), + ) + + +class DfgProjectPage(Page): + elements: List[DfgProjectSummary] = Field( + default_factory=list, description="The DFG projects on this page." + ) diff --git a/service/src/main/inse/projects/projects_search_client.py b/service/src/main/inse/projects/projects_search_client.py new file mode 100644 index 00000000..c448c704 --- /dev/null +++ b/service/src/main/inse/projects/projects_search_client.py @@ -0,0 +1,625 @@ +import json +import logging +from typing import Any, Dict, List, Optional + +import httpx + +from inse.config import get_settings +from inse.models.bund_project import BundProject +from inse.projects.model import ( + BundProjectPage, + DfgProjectPage, + DfgProjectSummary, + EuProjectPage, +) +from inse.models.eu_project import EuProject + + +settings = get_settings() + +logger = logging.getLogger(__name__) + +logger.setLevel(settings.logging_level) + +DFG_PERSON_FIELDS: List[str] = [ + "Antragsteller", + "Antragstellerin", + "Antragstellerinnen", + "Antragstellerinnen / Antragsteller", + "Beteiligte Person", + "Beteiligte Personen", + "Co-Sprecher", + "Co-Sprecherinnen / Co-Sprecher", + "Ehemalige Antragsteller", + "Ehemalige Antragstellerin", + "Ehemalige Antragstellerinnen", + "Ehemalige Antragstellerinnen / Ehemalige Antragsteller", + "Ehemaliger Antragsteller", + "Gastgeber", + "Gastgeberin", + "Gastgeberinnen", + "Gastgeberinnen / Gastgeber", + "Kooperationspartner", + "Kooperationspartnerin", + "Kooperationspartnerinnen", + "Kooperationspartnerinnen / Kooperationspartner", + "Leiter", + "Leiterin", + "Leiterinnen", + "Leiterinnen / Leiter", + "Mitantragsteller", + "Mitantragstellerin", + "Mitantragstellerinnen", + "Mitantragstellerinnen / Mitantragsteller", + "Mitverantwortlich", + "Mitverantwortlich(e)", + "Mitverantwortliche", + "Sprecher", + "Sprecher (IGK-Partner)", + "Sprecherin", + "Sprecherin (IGK-Partner)", + "Sprecherinnen", + "Sprecherinnen (IGK-Partner) / Sprecher (IGK-Partner)", + "Sprecherinnen / Sprecher", + "Teilprojektleiter", + "Teilprojektleiterin", + "Teilprojektleiterinnen", + "Teilprojektleiterinnen / Teilprojektleiter", + "ausländ. Mitantragstellerin", + "ausländ. Mitantragstellerinnen", + "ausländ. Mitantragstellerinnen / ausländische Mitantragsteller", + "ausländische Mitantragsteller", + "ausländischer Mitantragsteller", + "beteiligte Wissenschaftler", + "beteiligte Wissenschaftlerin", + "beteiligte Wissenschaftlerinnen", + "beteiligte Wissenschaftlerinnen / beteiligte Wissenschaftler", + "beteiligter Wissenschaftler", + "person_creater_name", + "stellvertr. Sprecher", + "stellvertr. Sprecherin", + "stellvertr. Sprecherinnen / stellvertr. Sprecher", +] + + +class ProjectsSearchClient: + def __init__( + self, + base_url: str, + index: str, + api_key: str, + ): + self.base_url = base_url + self.index = index + self.api_key = api_key + self.headers = { + "Content-Type": "application/json", + "Authorization": f"ApiKey {self.api_key}", + } + + async def make_search_request(self, query: dict) -> dict: + async with httpx.AsyncClient() as client: + response = await client.post( + f"{self.base_url}/{self.index}/_search", + json=query, + headers=self.headers, + ) + + try: + response.raise_for_status() + except httpx.HTTPStatusError as e: + logger.exception( + f"HTTP error occurred: {e.response.status_code} - {e.response.text}" + ) + raise + + return response.json() + + +class BundProjectsSearchClient(ProjectsSearchClient): + def __init__(self): + if not settings.elasticsearch_inse_url: + raise ValueError("Elasticsearch INSE URL is missing in settings.") + if not settings.elasticsearch_inse_api_key: + raise ValueError("Elasticsearch INSE API key is missing in settings.") + super().__init__( + base_url=settings.elasticsearch_inse_url, + index="projects_bund", + api_key=settings.elasticsearch_inse_api_key, + ) + + def bund_projects_query( + self, + page: int, + size: int, + id: Optional[str] = None, + institution_names: List[str] = [], + topic: Optional[str] = None, + sort_by: str = "topic", + sort_direction: str = "asc", + ) -> dict: + from_ = page * size + query: Dict[str, Any] = {"size": size, "from": from_, "query": {}} + + must_clauses: List[Dict[str, Any]] = [] + if id: + must_clauses.append({"match": {"id": id}}) + + if len(institution_names) > 0: + must_clauses.append( + { + "bool": { + "should": [ + { + "match": { + "Zuwendungsempfänger": { + "query": name, + "operator": "and", + } + } + } + for name in institution_names + ], + "minimum_should_match": 1, + } + } + ) + + if topic is not None and topic.strip() != "": + must_clauses.append( + { + "match_phrase_prefix": { + "Thema": { + "query": topic, + "max_expansions": 50, + } + } + } + ) + + if must_clauses: + query["query"] = {"bool": {"must": must_clauses}} + else: + query["query"] = {"match_all": {}} + + sort_by = sort_by.strip() + if sort_by == "topic": + sort_by = "Thema.keyword" + elif sort_by == "department": + sort_by = "Ressort_fullname.keyword" + elif sort_by == "grant_amount": + sort_by = "Fördersumme" + + sort_direction = sort_direction.strip().lower() + if sort_direction not in ["asc", "desc"]: + sort_direction = "asc" + + query["sort"] = [{f"{sort_by}": {"order": sort_direction}}] + + query_str = json.dumps(query, indent=2) + logger.debug(f"Constructed Bund project query: {query_str}") + + return query + + def response_to_bund_project_page( + self, response: dict, page: int, size: int + ) -> BundProjectPage: + hits_block = response.get("hits", {}) + total_hits = hits_block.get("total", {}).get("value", 0) + elements = [ + BundProject.model_validate(hit["_source"]) + for hit in hits_block.get("hits", []) + ] + return BundProjectPage( + elements=elements, total=total_hits, page=page, size=size + ) + + async def search_bund_projects( + self, + page: int, + size: int, + id: Optional[str] = None, + institution_names: List[str] = [], + topic: Optional[str] = None, + sort_by: str = "topic", + sort_direction: str = "asc", + ) -> BundProjectPage: + query = self.bund_projects_query( + page=page, + size=size, + id=id, + institution_names=institution_names, + topic=topic, + sort_by=sort_by, + sort_direction=sort_direction, + ) + response = await self.make_search_request(query) + return self.response_to_bund_project_page(response, page, size) + + async def get_bund_projects_by_institution_name( + self, + institution_names: List[str], + page: int, + size: int, + sort_by: str = "topic", + sort_direction: str = "asc", + ) -> BundProjectPage: + query = self.bund_projects_query( + page=page, + size=size, + institution_names=institution_names, + sort_by=sort_by, + sort_direction=sort_direction, + ) + response = await self.make_search_request(query) + return self.response_to_bund_project_page(response, page, size) + + +class EuProjectsSearchClient(ProjectsSearchClient): + def __init__(self): + if not settings.elasticsearch_inse_url: + raise ValueError("Elasticsearch INSE URL is missing in settings.") + if not settings.elasticsearch_inse_api_key: + raise ValueError("Elasticsearch INSE API key is missing in settings.") + super().__init__( + base_url=settings.elasticsearch_inse_url, + index="projects_eu_all", + api_key=settings.elasticsearch_inse_api_key, + ) + + def eu_projects_query( + self, + page: int, + size: int, + id: Optional[str] = None, + institution_names: List[str] = [], + topic: Optional[str] = "Network", + sort_by: str = "topic", + sort_direction: str = "asc", + ) -> dict: + from_ = page * size + query: Dict[str, Any] = {"size": size, "from": from_, "query": {}} + + must_clauses: List[Dict[str, Any]] = [] + if id: + must_clauses.append({"match": {"id": id}}) + + if topic is not None and topic.strip() != "": + must_clauses.append( + { + "match_phrase_prefix": { + "title": { + "query": topic, + "max_expansions": 50, + } + } + } + ) + + if institution_names: + must_clauses.append( + { + "nested": { + "path": "organization_nested", + "query": { + "bool": { + "should": [ + { + "match": { + "organization_nested.name": { + "query": name, + "operator": "and", + } + } + } + for name in institution_names + ], + "minimum_should_match": 1, + } + }, + } + } + ) + + if must_clauses: + query["query"] = {"bool": {"must": must_clauses}} + else: + query["query"] = {"match_all": {}} + + sort_by = sort_by.strip().lower() + sort_direction = sort_direction.strip().lower() + if sort_direction not in ["asc", "desc"]: + sort_direction = "asc" + + sort_config: Dict[str, Any] = {} + + if sort_by == "topic": + sort_config = {"title.keyword": {"order": sort_direction}} + + elif sort_by == "grant_amount": + sort_config = {"totalCost.keyword": {"order": sort_direction}} + + elif sort_by == "department": + sort_config = { + "programme_nested.programme.keyword": { + "order": sort_direction, + "nested": {"path": "programme_nested"}, + } + } + else: + sort_config = {"id.keyword": {"order": sort_direction}} + + query["sort"] = [sort_config] + + query_str = json.dumps(query, indent=2) + logger.debug(f"Constructed EU project query: {query_str}") + + return query + + def response_to_eu_project_page( + self, response: dict, page: int, size: int + ) -> EuProjectPage: + hits_block = response.get("hits", {}) + total_hits = hits_block.get("total", {}).get("value", 0) + elements = [ + EuProject.model_validate(hit["_source"]) + for hit in hits_block.get("hits", []) + ] + return EuProjectPage(elements=elements, total=total_hits, page=page, size=size) + + async def search_eu_projects( + self, + page: int, + size: int, + id: Optional[str] = None, + institution_names: List[str] = [], + topic: Optional[str] = None, + sort_by: str = "topic", + sort_direction: str = "asc", + ) -> EuProjectPage: + query = self.eu_projects_query( + page=page, + size=size, + id=id, + institution_names=institution_names, + topic=topic, + sort_by=sort_by, + sort_direction=sort_direction, + ) + response = await self.make_search_request(query) + return self.response_to_eu_project_page(response, page, size) + + async def get_eu_projects_by_institution_name( + self, + institution_names: List[str], + page: int, + size: int, + sort_by: str = "topic", + sort_direction: str = "asc", + ) -> EuProjectPage: + query = self.eu_projects_query( + page=page, + size=size, + institution_names=institution_names, + sort_by=sort_by, + sort_direction=sort_direction, + ) + response = await self.make_search_request(query) + return self.response_to_eu_project_page(response, page, size) + + +class DfgProjectsSearchClient(ProjectsSearchClient): + def __init__(self): + if not settings.elasticsearch_inse_url: + raise ValueError("Elasticsearch INSE URL is missing in settings.") + if not settings.elasticsearch_inse_api_key: + raise ValueError("Elasticsearch INSE API key is missing in settings.") + super().__init__( + base_url=settings.elasticsearch_inse_url, + index="projects_dfg_all", + api_key=settings.elasticsearch_inse_api_key, + ) + + def dfg_projects_query( + self, + page: int, + size: int, + names: Optional[List[str]] = None, + topic: Optional[str] = None, + sort_by: str = "id", + sort_direction: str = "asc", + ) -> dict: + + from_ = page * size + + painless_fields_string = ", ".join( + [f"'{f}.keyword'" for f in DFG_PERSON_FIELDS] + ) + + query: Dict[str, Any] = { + "size": size, + "from": from_, + "_source": [ + "id", + "link", + "title", + "funding_start", + "funding_end", + "Fachliche Zuordnung", + ], + "query": {}, + "script_fields": { + "all_found_names": { + "script": { + "lang": "painless", + "source": ( + f"def names = new HashSet(); " + f"def fields = [{painless_fields_string}]; " + f"for (field in fields) {{ " + f" if (doc.containsKey(field) && !doc[field].empty) {{ " + f" for (value in doc[field]) {{ " + f" if (value.contains(';')) {{ " + f" def splitNames = value.splitOnToken(';'); " + f" for (sn in splitNames) {{ names.add(sn.trim()); }} " + f" }} else {{ " + f" names.add(value.trim()); " + f" }} " + f" }} " + f" }} " + f"}} " + f"return new ArrayList(names);" + ), + } + } + }, + } + + must_clauses: List[Dict[str, Any]] = [] + filter_clauses: List[Dict[str, Any]] = [] + + if topic is not None and topic.strip() != "": + must_clauses.append( + { + "match_phrase_prefix": { + "title": { + "query": topic, + "max_expansions": 100, + } + } + } + ) + + if names: + name_should_clauses = [] + script_conditions = [] + + for full_name in names: + name_parts = full_name.strip().split() + if not name_parts: + continue + + match_musts = [] + for part in name_parts: + match_musts.append( + {"multi_match": {"query": part, "fields": DFG_PERSON_FIELDS}} + ) + + name_should_clauses.append({"bool": {"must": match_musts}}) + + script_parts = [ + f"singlePerson.contains('{part.lower()}')" for part in name_parts + ] + script_conditions.append(f"({' && '.join(script_parts)})") + + if name_should_clauses: + must_clauses.append( + {"bool": {"should": name_should_clauses, "minimum_should_match": 1}} + ) + + combined_script_condition = " || ".join(script_conditions) + painless_source = ( + f"def fields = [{painless_fields_string}]; " + f"for (field in fields) {{ " + f" if (doc.containsKey(field) && !doc[field].empty) {{ " + f" for (value in doc[field]) {{ " + f" if (value.contains(';')) {{ " + f" def splitValues = value.splitOnToken(';'); " + f" for (singlePersonRaw in splitValues) {{ " + f" def singlePerson = singlePersonRaw.toLowerCase(); " + f" if ({combined_script_condition}) {{ return true; }} " + f" }} " + f" }} else {{ " + f" def singlePerson = value.toLowerCase(); " + f" if ({combined_script_condition}) {{ return true; }} " + f" }} " + f" }} " + f" }} " + f"}} " + f"return false;" + ) + + filter_clauses.append( + { + "script": { + "script": {"lang": "painless", "source": painless_source} + } + } + ) + + if must_clauses or filter_clauses: + query["query"] = {"bool": {}} + if must_clauses: + query["query"]["bool"]["must"] = must_clauses + if filter_clauses: + query["query"]["bool"]["filter"] = filter_clauses + else: + query["query"] = {"match_all": {}} + + sort_by = sort_by.strip().lower() + sort_direction = sort_direction.strip().lower() + if sort_direction not in ["asc", "desc"]: + sort_direction = "asc" + logger.debug( + f"Sorting DFG projects by {sort_by} with direction {sort_direction}" + ) + + if sort_by in ["topic", "title"]: + logger.debug( + f"Sorting DFG projects by title with direction {sort_direction}" + ) + sort_config = {"title.keyword": {"order": sort_direction}} + elif sort_by == "funding_start": + logger.debug( + f"Sorting DFG projects by funding_start with direction {sort_direction}" + ) + sort_config = {"funding_start.keyword": {"order": sort_direction}} + elif sort_by == "funding_end": + logger.debug( + f"Sorting DFG projects by funding_end with direction {sort_direction}" + ) + sort_config = {"funding_end.keyword": {"order": sort_direction}} + elif sort_by == "professional_classification": + logger.debug( + f"Sorting DFG projects by Fachliche Zuordnung with direction {sort_direction}" + ) + sort_config = {"Fachliche Zuordnung.keyword": {"order": sort_direction}} + else: + logger.debug(f"Sorting DFG projects by id with direction {sort_direction}") + sort_config = {"id.keyword": {"order": sort_direction}} + + query["sort"] = [sort_config] + + query_str = json.dumps(query, indent=2) + logger.debug(f"Constructed DFG project query: {query_str}") + + return query + + def response_to_dfg_project_page( + self, response: dict, page: int, size: int + ) -> DfgProjectPage: + hits_block = response.get("hits", {}) + total_hits = hits_block.get("total", {}).get("value", 0) + elements = [ + DfgProjectSummary.from_hit(hit) for hit in hits_block.get("hits", []) + ] + return DfgProjectPage(elements=elements, total=total_hits, page=page, size=size) + + async def search_dfg_projects( + self, + page: int, + size: int, + names: Optional[List[str]] = None, + topic: Optional[str] = None, + sort_by: str = "id", + sort_direction: str = "asc", + ) -> DfgProjectPage: + query = self.dfg_projects_query( + page=page, + size=size, + names=names, + topic=topic, + sort_by=sort_by, + sort_direction=sort_direction, + ) + response = await self.make_search_request(query) + return self.response_to_dfg_project_page(response, page, size) diff --git a/service/src/main/inse/projects/router.py b/service/src/main/inse/projects/router.py new file mode 100644 index 00000000..cf8e2a12 --- /dev/null +++ b/service/src/main/inse/projects/router.py @@ -0,0 +1,176 @@ +from functools import lru_cache +import logging +from typing import Annotated, Optional + +from fastapi import APIRouter, Depends, Query, status + +from inse.projects.model import BundProjectPage, DfgProjectPage, EuProjectPage +from inse.tags import Tags +from inse.projects import service as projects_service +from inse.projects.projects_search_client import ( + BundProjectsSearchClient, + DfgProjectsSearchClient, + EuProjectsSearchClient, +) +from inse.institutions.institutions_search_client import ( + InstitutionsSearchClient, +) +from inse.institutions.service import get_institutions_search_client + +logger = logging.getLogger(__name__) + +router = APIRouter(prefix="/api/projects", tags=[Tags.PROJECTS]) + + +@lru_cache +def get_bund_search_client() -> BundProjectsSearchClient: + return BundProjectsSearchClient() + + +@lru_cache +def get_eu_search_client() -> EuProjectsSearchClient: + return EuProjectsSearchClient() + + +@lru_cache +def get_dfg_search_client() -> DfgProjectsSearchClient: + return DfgProjectsSearchClient() + + +@router.get( + "/institution/bund/search", + summary="Get bund projects.", + description="Returns a page of bund projects based on the provided pagination parameters and optional institution filter.", + operation_id="getBundProjects", + responses={ + status.HTTP_200_OK: { + "description": "Successful Response", + "model": BundProjectPage, + }, + status.HTTP_404_NOT_FOUND: {"description": "Institution not found"}, + }, + response_model_by_alias=False, +) +async def get_bund_projects( + bund_search_client: Annotated[ + BundProjectsSearchClient, Depends(get_bund_search_client) + ], + institutions_search_client: Annotated[ + InstitutionsSearchClient, Depends(get_institutions_search_client) + ], + institution_id: Annotated[ + str, Query(description="The institution ID to filter by.") + ], + topic: Annotated[ + Optional[str], Query(description="The topic to filter by.") + ] = None, + page: Annotated[int, Query(description="The page number.", ge=0)] = 0, + size: Annotated[int, Query(description="The page size.", ge=1)] = 20, + sort_by: Annotated[str, Query(description="The field to sort by.")] = "topic", + sort_direction: Annotated[ + str, Query(description="The sort direction (asc or desc).") + ] = "asc", +) -> BundProjectPage: + return await projects_service.get_bund_projects_by_institution_id( + bund_search_client=bund_search_client, + institutions_search_client=institutions_search_client, + institution_id=institution_id, + page=page, + size=size, + topic=topic, + sort_by=sort_by, + sort_direction=sort_direction, + ) + + +@router.get( + "/institution/eu/search", + summary="Get EU projects.", + description="Returns a page of EU projects based on the provided pagination parameters and optional institution filter.", + operation_id="getEuProjects", + responses={ + status.HTTP_200_OK: { + "description": "Successful Response", + "model": EuProjectPage, + }, + status.HTTP_404_NOT_FOUND: {"description": "Institution not found"}, + }, + response_model_by_alias=False, +) +async def get_eu_projects( + eu_search_client: Annotated[EuProjectsSearchClient, Depends(get_eu_search_client)], + institutions_search_client: Annotated[ + InstitutionsSearchClient, Depends(get_institutions_search_client) + ], + institution_id: Annotated[ + str, Query(description="The institution ID to filter by.") + ], + topic: Annotated[ + Optional[str], Query(description="The topic to filter by.") + ] = None, + page: Annotated[int, Query(description="The page number.", ge=0)] = 0, + size: Annotated[int, Query(description="The page size.", ge=1)] = 20, + sort_by: Annotated[str, Query(description="The field to sort by.")] = "topic", + sort_direction: Annotated[ + str, Query(description="The sort direction (asc or desc).") + ] = "asc", +) -> EuProjectPage: + return await projects_service.get_eu_projects_by_institution_id( + eu_search_client=eu_search_client, + institutions_search_client=institutions_search_client, + institution_id=institution_id, + topic=topic, + page=page, + size=size, + sort_by=sort_by, + sort_direction=sort_direction, + ) + + +@router.get( + "/person/dfg/search", + summary="Get DFG projects.", + description="Returns a page of DFG projects based on the provided pagination parameters and optional institution filter.", + operation_id="getDfgProjects", + responses={ + status.HTTP_200_OK: { + "description": "Successful Response", + "model": DfgProjectPage, + }, + status.HTTP_404_NOT_FOUND: {"description": "Institution not found"}, + }, + response_model_by_alias=False, +) +async def get_dfg_projects( + dfg_search_client: Annotated[ + DfgProjectsSearchClient, Depends(get_dfg_search_client) + ], + author_id: Annotated[str, Query(description="The author ID to filter by.")], + topic: Annotated[ + Optional[str], Query(description="The topic to filter by.") + ] = None, + page: Annotated[int, Query(description="The page number.", ge=0)] = 0, + size: Annotated[int, Query(description="The page size.", ge=1)] = 20, + sort_by: Annotated[str, Query(description="The field to sort by.")] = "topic", + sort_direction: Annotated[ + str, Query(description="The sort direction (asc or desc).") + ] = "asc", +) -> DfgProjectPage: + logger.debug( + "Received request to get DFG projects for author_id=%s, topic=%s, page=%d, size=%d, sort_by=%s, sort_direction=%s", + author_id, + topic, + page, + size, + sort_by, + sort_direction, + ) + return await projects_service.get_dfg_projects_by_author_id( + dfg_search_client=dfg_search_client, + author_id=author_id, + topic=topic, + page=page, + size=size, + sort_by=sort_by, + sort_direction=sort_direction, + ) diff --git a/service/src/main/inse/projects/service.py b/service/src/main/inse/projects/service.py new file mode 100644 index 00000000..f6693a57 --- /dev/null +++ b/service/src/main/inse/projects/service.py @@ -0,0 +1,133 @@ +import logging +from typing import List, Optional + +from inse.projects.projects_search_client import ( + BundProjectsSearchClient, + DfgProjectsSearchClient, + EuProjectsSearchClient, +) +from inse.projects.model import BundProjectPage, DfgProjectPage, EuProjectPage +from inse.institutions.institutions_search_client import ( + InstitutionsSearchClient, +) +from inse.exceptions import NotFoundException +from inse.persons.logic import get_author_name_by_id + +logger = logging.getLogger(__name__) + + +async def get_bund_projects_by_institution_id( + bund_search_client: BundProjectsSearchClient, + institutions_search_client: InstitutionsSearchClient, + institution_id: str, + page: int, + size: int, + topic: Optional[str], + sort_by: str = "topic", + sort_direction: str = "asc", +) -> BundProjectPage: + logger.info( + f"Fetching bund projects for institution_id={institution_id}, page={page}, size={size}" + ) + institution_aliases = ( + await institutions_search_client.get_institution_aliases_by_id(institution_id) + ) + logger.debug( + f"Found institution aliases for institution_id={institution_id}: {institution_aliases}" + ) + response = await bund_search_client.search_bund_projects( + page=page, + size=size, + institution_names=institution_aliases, + topic=topic, + sort_by=sort_by, + sort_direction=sort_direction, + ) + logger.debug(f"get_bund_projects_by_institution_id response: {response}") + return response + + +async def get_eu_projects_by_institution_id( + eu_search_client: EuProjectsSearchClient, + institutions_search_client: InstitutionsSearchClient, + institution_id: str, + topic: Optional[str], + page: int, + size: int, + sort_by: str = "topic", + sort_direction: str = "asc", +) -> EuProjectPage: + logger.info( + f"Fetching EU projects for institution_id={institution_id}, page={page}, size={size}" + ) + institution_aliases = ( + await institutions_search_client.get_institution_aliases_by_id(institution_id) + ) + logger.debug( + f"Found institution aliases for institution_id={institution_id}: {institution_aliases}" + ) + response = await eu_search_client.search_eu_projects( + page=page, + size=size, + institution_names=institution_aliases, + topic=topic, + sort_by=sort_by, + sort_direction=sort_direction, + ) + logger.debug(f"get_eu_projects_by_institution_id response: {response}") + return response + + +async def get_bund_projects_by_institution_name( + bund_search_client: BundProjectsSearchClient, + page: int, + size: int, + institution_names: List[str] = [], + sort_by: str = "topic", + sort_direction: str = "asc", +) -> BundProjectPage: + logger.info( + f"Fetching bund projects for institution_names={institution_names}, page={page}, size={size}" + ) + response = await bund_search_client.search_bund_projects( + page=page, + size=size, + institution_names=institution_names, + sort_by=sort_by, + sort_direction=sort_direction, + ) + + logger.debug(f"get_bund_projects_by_institution_name response: {response}") + + return response + + +async def get_dfg_projects_by_author_id( + dfg_search_client: DfgProjectsSearchClient, + author_id: str, + topic: Optional[str], + page: int, + size: int, + sort_by: str = "topic", + sort_direction: str = "asc", +) -> DfgProjectPage: + logger.debug( + f"Fetching DFG projects for author_id={author_id}, topic={topic}, page={page}, size={size}, sort_by={sort_by}, sort_direction={sort_direction}" + ) + name = get_author_name_by_id(author_id) + if not name: + logger.debug(f"No author name found for author_id={author_id}") + raise NotFoundException( + f"Display name for author with id {author_id} not found" + ) + logger.debug(f"Found author name for author_id={author_id}: {name}") + + response = await dfg_search_client.search_dfg_projects( + page=page, + size=size, + names=[name], + topic=topic, + sort_by=sort_by, + sort_direction=sort_direction, + ) + return response diff --git a/service/src/main/inse/tags.py b/service/src/main/inse/tags.py index 9142f3eb..bd0b79c0 100644 --- a/service/src/main/inse/tags.py +++ b/service/src/main/inse/tags.py @@ -8,3 +8,4 @@ class Tags(Enum): TOPICS = "Topics" WORKS = "Works" NEWS = "News" + PROJECTS = "Projects" diff --git a/service/src/main/inse/topics/logic.py b/service/src/main/inse/topics/logic.py index 30fa51d1..adc56a7a 100644 --- a/service/src/main/inse/topics/logic.py +++ b/service/src/main/inse/topics/logic.py @@ -255,3 +255,131 @@ def _datetime_str_or_none(value: Any) -> str | None: if len(text) == 10: return f"{text}T00:00:00Z" return text + +async def vector_search_topics( + *, + query: str, + limit: int = 25, +) -> TopicsListResponse: + """ + Perform a semantic similarity search on the topicvectors index. + """ + try: + from inse.integrations import elasticsearch + from inse.util import get_model + + except Exception as exc: + logger.exception("Failed to load elasticsearch integration.") + raise HTTPException( + status_code=HTTP_502_BAD_GATEWAY, + detail=f"Failed to load elasticsearch integration: {exc}" + ) + + # 1. Vectorize query + try: + model = get_model() + query_vector = model.encode(query).tolist() + except Exception as exc: + logger.exception("Failed to encode query text.") + raise HTTPException( + status_code=HTTP_502_BAD_GATEWAY, + detail=f"Failed to encode query text: {exc}" + ) + + # 2. Query Elasticsearch using standard Bool Should hybrid search + + body = { + "query": { + "bool": { + "should": [ + { + "multi_match": { + "query": query, + "fields": [ + "display_name^3", + "keywords^2", + "description^1" + ], + "boost": 1.0 + } + }, + { + "knn": { + "field": "display_name_vector", + "query_vector": query_vector, + "k": limit, + "num_candidates": 100, + "similarity": 0.62, + "boost": 2.0 + } + }, + { + "nested": { + "path": "description_vectors", + "query": { + "knn": { + "field": "description_vectors.vector", + "query_vector": query_vector, + "k": limit, + "num_candidates": 100, + "similarity": 0.62 + } + }, + "score_mode": "max", + "boost": 1.0 + } + } + ] + } + }, + "_source": { + "excludes": ["display_name_vector", "description_vectors", "description", "siblings"] # remove unrequired fields (description, sibling currently not needed) + }, + "size": limit + } + + try: + raw_results = elasticsearch.search( + index="topicvectors", + body=body, + cluster="nes" + ) + except Exception as exc: + logger.exception("Elasticsearch vector search failed.") + raise HTTPException( + status_code=HTTP_502_BAD_GATEWAY, + detail=f"Elasticsearch vector search failed: {exc}" + ) + + # 3. Format result + hits = raw_results.get("hits", {}).get("hits", []) + + # Log scores to JSON for threshold analysis TODO: Remove after finetune + try: + from .score_logger import log_scores_to_json + log_scores_to_json(hits, query) + except Exception as exc: + logger.warning(f"Could not log search scores: {exc}") + + total = len(hits) + results = [hit.get("_source", {}) for hit in hits] + + data = { + "meta": { + "count": total, + "page": 1, + "per_page": limit + }, + "results": results + } + + try: + normalized_data = _normalize_topics_response(data) + return TopicsListResponse.from_dict(normalized_data) or TopicsListResponse() + except ValidationError as exc: + logger.exception("Vector search response could not be parsed.") + raise HTTPException( + status_code=HTTP_502_BAD_GATEWAY, + detail="Vector search response could not be parsed.", + ) from exc + diff --git a/service/src/main/inse/topics/score_logger.py b/service/src/main/inse/topics/score_logger.py new file mode 100644 index 00000000..0493d9ad --- /dev/null +++ b/service/src/main/inse/topics/score_logger.py @@ -0,0 +1,36 @@ +import json +from pathlib import Path +from typing import Any, Dict, List + +def log_scores_to_json(hits: List[Dict[str, Any]], query: str) -> None: + """ + Utility function to log the names and scores of all vector search hits to a JSON file. + This helps in debugging and manually tweaking the similarity score thresholds. + """ + scores_data = [] + for hit in hits: + source = hit.get("_source", {}) + topic_name = source.get("display_name") or source.get("name") or "Unknown" + score = hit.get("_score", 0.0) + scores_data.append({ + "topic_name": topic_name, + "score": score + }) + + + data_dir = Path("/data") + + output_file = data_dir / "search_scores.json" + + log_payload = { + "query": query, + "max_score": hits[0].get("_score", 0.0) if hits else 0.0, + "results": scores_data + } + + try: + with open(output_file, "w", encoding="utf-8") as f: + json.dump(log_payload, f, indent=2, ensure_ascii=False) + print(f"DEBUG: Saved search scores for query '{query}' to {output_file}") + except Exception as exc: + print(f"DEBUG: Failed to save search scores: {exc}") diff --git a/service/src/main/inse/topics/service.py b/service/src/main/inse/topics/service.py index 1551b6d9..bf6346fc 100644 --- a/service/src/main/inse/topics/service.py +++ b/service/src/main/inse/topics/service.py @@ -111,3 +111,27 @@ async def list_topics( sample=sample, select=select, ) + + +@router.get( + "/vector-search", + operation_id="vectorSearchTopics", + response_model=TopicsListResponse, + response_model_exclude_none=True, + summary="Semantic / vector search for topics using a keyword/sentence.", +) +async def vector_search_topics( + query: Annotated[ + str, + Query(description="Word or sentence to search by similarity.", min_length=1), + ], + limit: Annotated[ + int, + Query(description="Maximum number of topics to return.", ge=1, le=100), + ] = 25, +): + return await logic.vector_search_topics( + query=query, + limit=limit, + ) + diff --git a/service/src/main/inse/util.py b/service/src/main/inse/util.py index 38ed5e41..1acf6d2e 100644 --- a/service/src/main/inse/util.py +++ b/service/src/main/inse/util.py @@ -35,4 +35,25 @@ def get_persons_data(hit:dict): source_copy["ids"] = ids_copy author = Author.from_dict(source_copy) - return author \ No newline at end of file + return author + +from sentence_transformers import SentenceTransformer +# Sentence Transformer Model +_model: SentenceTransformer | None = None + +def get_model(): + global _model + if _model is None: + import os + # If SENTENCE_TRANSFORMERS_HOME is not set, check if container-baked /models folder is available + if "SENTENCE_TRANSFORMERS_HOME" not in os.environ: + if os.path.exists("/models"): + os.environ["SENTENCE_TRANSFORMERS_HOME"] = "/models" + os.environ["HF_HUB_OFFLINE"] = "1" + else: + # If it is set to /models, enforce offline mode as it is baked into the image + if os.environ.get("SENTENCE_TRANSFORMERS_HOME") == "/models": + os.environ["HF_HUB_OFFLINE"] = "1" + + _model = SentenceTransformer("paraphrase-multilingual-mpnet-base-v2") + return _model \ No newline at end of file diff --git a/service/src/main/inse/works/logic.py b/service/src/main/inse/works/logic.py index 3b1f61fe..40e2c9f1 100644 --- a/service/src/main/inse/works/logic.py +++ b/service/src/main/inse/works/logic.py @@ -391,6 +391,19 @@ async def get_topics_by_time_by_author( years[year]["primary_topics"][primary_topic_name]["count"] += 1 + topic_ids = set() + + for year_data in years.values(): + for topic in year_data["topics"].values(): + if topic["id"]: + topic_ids.add(topic["id"]) + + for topic in year_data["primary_topics"].values(): + if topic["id"]: + topic_ids.add(topic["id"]) + + topic_details = _get_topic_details(list(topic_ids)) + elements = [] for year in sorted(years.keys()): @@ -400,11 +413,14 @@ async def get_topics_by_time_by_author( topics = [] for topic in topic_items[:max_topics_per_year]: + info = topic_details.get(topic["id"], {}) + topics.append( TopicCount( id=topic["id"], name=topic["name"], count=topic["count"], + description=info.get("description"), ) ) @@ -414,11 +430,14 @@ async def get_topics_by_time_by_author( primary_topics = [] for topic in primary_topic_items[:max_topics_per_year]: + info = topic_details.get(topic["id"], {}) + primary_topics.append( TopicCount( id=topic["id"], name=topic["name"], count=topic["count"], + description=info.get("description"), ) ) diff --git a/service/uv.lock b/service/uv.lock index 8564595c..d4016c83 100644 --- a/service/uv.lock +++ b/service/uv.lock @@ -1,6 +1,19 @@ version = 1 revision = 3 requires-python = ">=3.12" +resolution-markers = [ + "sys_platform != 'darwin'", + "sys_platform == 'darwin'", +] + +[[package]] +name = "annotated-doc" +version = "0.0.4" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/57/ba/046ceea27344560984e26a590f90bc7f4a75b06701f653222458922b558c/annotated_doc-0.0.4.tar.gz", hash = "sha256:fbcda96e87e9c92ad167c2e53839e57503ecfda18804ea28102353485033faa4", size = 7288, upload-time = "2025-11-10T22:07:42.062Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/1e/d3/26bf1008eb3d2daa8ef4cacc7f3bfdc11818d111f7e2d0201bc6e3b49d45/annotated_doc-0.0.4-py3-none-any.whl", hash = "sha256:571ac1dc6991c450b25a9c2d84a3705e2ae7a53467b5d111c24fa8baabbed320", size = 5303, upload-time = "2025-11-10T22:07:40.673Z" }, +] [[package]] name = "annotated-types" @@ -209,6 +222,24 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/53/50/b1222562c6d270fea83e9c9075b8e8600b8479150a18e4516a6138b980d1/fastapi-0.115.14-py3-none-any.whl", hash = "sha256:6c0c8bf9420bd58f565e585036d971872472b4f7d3f6c73b698e10cffdefb3ca", size = 95514, upload-time = "2025-06-26T15:29:06.49Z" }, ] +[[package]] +name = "filelock" +version = "3.29.3" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/91/f5/3557bf28e0f1943e4849154c821533706e6dea010f96fb6aa0b6949037d1/filelock-3.29.3.tar.gz", hash = "sha256:7fc1b3f39cf172fd8203812043c57b8a65aef9969f38b6704f628b881f761a84", size = 61956, upload-time = "2026-06-10T17:37:11.832Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/81/8f/b61d427c4f49a8bdadc93f4e7e74df8a6df6f77ee6e26bf0df53d3925363/filelock-3.29.3-py3-none-any.whl", hash = "sha256:e58333029cc9b925f39aad59b1d8f0a1ad836af4e60d7217f4a4dba87461261d", size = 42324, upload-time = "2026-06-10T17:37:10.37Z" }, +] + +[[package]] +name = "fsspec" +version = "2026.4.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/d5/8d/1c51c094345df128ca4a990d633fe1a0ff28726c9e6b3c41ba65087bba1d/fsspec-2026.4.0.tar.gz", hash = "sha256:301d8ac70ae90ef3ad05dcf94d6c3754a097f9b5fe4667d2787aa359ec7df7e4", size = 312760, upload-time = "2026-04-29T20:42:38.635Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/d5/0c/043d5e551459da400957a1395e0febbf771446ff34291afcbe3d8be2a279/fsspec-2026.4.0-py3-none-any.whl", hash = "sha256:11ef7bb35dab8a394fde6e608221d5cf3e8499401c249bebaeaad760a1a8dec2", size = 203402, upload-time = "2026-04-29T20:42:36.842Z" }, +] + [[package]] name = "greenlet" version = "3.5.1" @@ -273,6 +304,38 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/04/4b/29cac41a4d98d144bf5f6d33995617b185d14b22401f75ca86f384e87ff1/h11-0.16.0-py3-none-any.whl", hash = "sha256:63cf8bbe7522de3bf65932fda1d9c2772064ffb3dae62d55932da54b31cb6c86", size = 37515, upload-time = "2025-04-24T03:35:24.344Z" }, ] +[[package]] +name = "hf-xet" +version = "1.5.1" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/4b/2d/57fd21d84d93efb4bd0b962383790e19dd1bc053501b4264c97903b4e83e/hf_xet-1.5.1.tar.gz", hash = "sha256:51ef4500dab3764b41135ee1381a4b62ce56fc54d4c92b719b59e597d6df5bf6", size = 876636, upload-time = "2026-06-08T23:02:53.897Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/64/ee/dd9ba7beae1005e54131b7d45263cc74c8a066d47d354e6d58ae9445a388/hf_xet-1.5.1-cp313-cp313t-macosx_10_12_x86_64.whl", hash = "sha256:dbf48c0d02cf0b2e568944330c60d9120c272dabe013bd892d48e25bc6797577", size = 4069485, upload-time = "2026-06-08T23:02:13.193Z" }, + { url = "https://files.pythonhosted.org/packages/b6/bc/9cae6cfeb4e03070874e73e5c97c66eb90369d3206b6a2b1ef5f96520888/hf_xet-1.5.1-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:e78e4e5192ad2b674c2e1160b651cb9134db974f8ae1835bdfbfb0166b894a43", size = 3838493, upload-time = "2026-06-08T23:02:15.282Z" }, + { url = "https://files.pythonhosted.org/packages/ba/b4/d5c01e0eb6d9f2ca2dacd84d0d1b71e6cfbb2ef3208c968528e010e9b3d7/hf_xet-1.5.1-cp313-cp313t-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:6f7a04a8ad962422e225bc49fbbac99dc1806764b1f3e54dbd154bffa7593947", size = 4505658, upload-time = "2026-06-08T23:02:17.196Z" }, + { url = "https://files.pythonhosted.org/packages/76/c5/29a7598c0c6383c523dc22186d577f4e04267a626cd95ae60f67c00bfe66/hf_xet-1.5.1-cp313-cp313t-manylinux_2_28_aarch64.whl", hash = "sha256:d48199c2bf4f8df0adc55d31d1368b6ec0e4d4f45bc86b08038089c23db0bed8", size = 4292822, upload-time = "2026-06-08T23:02:18.608Z" }, + { url = "https://files.pythonhosted.org/packages/04/9a/dceaf6ca69390126b86ea825fb354b93d01163199070b7bd849225de9468/hf_xet-1.5.1-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:97f212a88d14bbf573619a74b7fecb238de77d08fc702e54dec6f78276ca3283", size = 4491255, upload-time = "2026-06-08T23:02:20.124Z" }, + { url = "https://files.pythonhosted.org/packages/48/a7/e5a7afaacf6c1791fdbeeac42951fb81c3d2bc482992b115dedcc86d963e/hf_xet-1.5.1-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:f61e3665892a6c8c5e765395838b8ddf36185da835253d4bc4509a81e49fb342", size = 4711062, upload-time = "2026-06-08T23:02:21.863Z" }, + { url = "https://files.pythonhosted.org/packages/53/49/2802f8433c9742ce281bddc1e65c02c32268ca3098d66828b05e12e45ee2/hf_xet-1.5.1-cp313-cp313t-win_amd64.whl", hash = "sha256:f4ad3ebd4c32dd2b27099d69dc7b2df821e30767e46fb6ee6a0713778243b8ff", size = 4017205, upload-time = "2026-06-08T23:02:23.495Z" }, + { url = "https://files.pythonhosted.org/packages/9e/5a/50c71195b9fb883659f596e7252faf4c18c58e753a9013bdbf9bac5d2250/hf_xet-1.5.1-cp313-cp313t-win_arm64.whl", hash = "sha256:8298485c1e36e7e67cbd01eeb1376619b7af43d4f1ec245caae306f890a8a32d", size = 3845426, upload-time = "2026-06-08T23:02:25.124Z" }, + { url = "https://files.pythonhosted.org/packages/05/24/5e0c28f80371c17d49fed004597d9d132cb75c1f6f53db2cb95f459d2312/hf_xet-1.5.1-cp314-cp314t-macosx_10_12_x86_64.whl", hash = "sha256:3474760d10e3bb6f92ff3f024fcb00c0b3e4001e9b035c7483e49a5dd17aa70f", size = 4069676, upload-time = "2026-06-08T23:02:26.759Z" }, + { url = "https://files.pythonhosted.org/packages/d2/17/261ba565b6a4d960fb478f61fdf919c0be5824645aaf1c319eca660c1611/hf_xet-1.5.1-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:6762d89b9e3267dfd502b29b2a327b4525f33b17e7b509a78d94e2151a30ce30", size = 3838509, upload-time = "2026-06-08T23:02:28.573Z" }, + { url = "https://files.pythonhosted.org/packages/4e/44/7ffdc2e184b0d41fc0f683ba3936ef669ab63cf242cf36ef50e57d683668/hf_xet-1.5.1-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:bf67e6ed10260cef62e852789dc91ebb03f382d5bdc4b1dbeb64763ea275e7d6", size = 4505881, upload-time = "2026-06-08T23:02:30.257Z" }, + { url = "https://files.pythonhosted.org/packages/63/b6/788060d5aa4d5e671f1a31bf69624c314eb2d8babab3aa562f9e5d53444e/hf_xet-1.5.1-cp314-cp314t-manylinux_2_28_aarch64.whl", hash = "sha256:c6b6cd08ca095058780b50b8ce4d6cbf6787bcf27841705d58a9d32246e3e47a", size = 4292995, upload-time = "2026-06-08T23:02:31.993Z" }, + { url = "https://files.pythonhosted.org/packages/22/93/c5540cbd6b55529b7dc42f6734e88cebee21aefbea34128b66229df56c57/hf_xet-1.5.1-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:e1af0de8ca6f190d4294a28b88023db64a1e2d1d719cab044baf75bec569e7a9", size = 4491570, upload-time = "2026-06-08T23:02:33.86Z" }, + { url = "https://files.pythonhosted.org/packages/03/f3/9d8ceab30f44f36c1679b1b8683054c71a0dadc787dbf07421891742d3ca/hf_xet-1.5.1-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:4f561cbbb92f80960772059864b7fb07eae879adde1b2e781ec6f86f6ac26c59", size = 4711565, upload-time = "2026-06-08T23:02:35.454Z" }, + { url = "https://files.pythonhosted.org/packages/cd/54/27ed9a5e2cc583b4df82f75a03a4df8dbf55f5a9fa1f47f1fadfb20dbeac/hf_xet-1.5.1-cp314-cp314t-win_amd64.whl", hash = "sha256:e7dbb40617410f432182d918e37c12303fe6700fd6aa6c5964e30a535a4461d6", size = 4017343, upload-time = "2026-06-08T23:02:37.14Z" }, + { url = "https://files.pythonhosted.org/packages/ae/12/ecb2fc8d45e767580e3a37faa97cb895608b614965567efb4f18cff67e27/hf_xet-1.5.1-cp314-cp314t-win_arm64.whl", hash = "sha256:6071d5ccb4d8d2cbd5fea5cc798da4f0ba3f44e25369591c4e89a4987050e61d", size = 3845716, upload-time = "2026-06-08T23:02:39.073Z" }, + { url = "https://files.pythonhosted.org/packages/7a/d8/5e54cf37434759d1f4f2ba9b66077ff9d4c4e1f37b6bd7975da5c40d94ab/hf_xet-1.5.1-cp37-abi3-macosx_10_12_x86_64.whl", hash = "sha256:6abd35c3221eff63836618ddfb954dcf84798603f71d8e33e3ed7b04acfdbe6e", size = 4077794, upload-time = "2026-06-08T23:02:40.656Z" }, + { url = "https://files.pythonhosted.org/packages/35/94/4b2ecfbad8f8b04701a23aefb62f540b9137d058b7e1dbef16a32676f0e9/hf_xet-1.5.1-cp37-abi3-macosx_11_0_arm64.whl", hash = "sha256:94e761bbd266bf4c03cee73753916062665ce8365aa40ed321f45afcb934b41e", size = 3845354, upload-time = "2026-06-08T23:02:42.702Z" }, + { url = "https://files.pythonhosted.org/packages/de/cc/f99f4bc7295023d7bd9ebbfd51f75cc530ca262c1227666268b8208f4b77/hf_xet-1.5.1-cp37-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:892e3a3a3aecc12aded8b93cf4f9cd059282c7de0732f7d55026f3abdf474350", size = 4514864, upload-time = "2026-06-08T23:02:44.497Z" }, + { url = "https://files.pythonhosted.org/packages/cd/6e/21f7e5a2381278bd3b7b7a5a4d90038518bb6308a0c1daf5d9f8268bb178/hf_xet-1.5.1-cp37-abi3-manylinux_2_28_aarch64.whl", hash = "sha256:a93df2039190502835b1db8cd7e178b0b7b889fe9ab51299d5ced26e0dd879a4", size = 4303784, upload-time = "2026-06-08T23:02:46.203Z" }, + { url = "https://files.pythonhosted.org/packages/35/0e/f992bb6927ac1cb30ef74e62268f551f338bc32b2191f7c96a44c6f7283e/hf_xet-1.5.1-cp37-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:0c97106032ef70467b4f6bc2d0ccc266d7613ee076afc56516c502f87ce1c4a6", size = 4500703, upload-time = "2026-06-08T23:02:47.628Z" }, + { url = "https://files.pythonhosted.org/packages/fb/d1/90a498d05447980b977b1669246eeeeae4cfb0ea3e7a286eaba627f91bf9/hf_xet-1.5.1-cp37-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:6208adb15d192b90e4c2ad2a27ed864359b2cb0f2494eb6d7c7f3699ac02e2bf", size = 4719498, upload-time = "2026-06-08T23:02:49.268Z" }, + { url = "https://files.pythonhosted.org/packages/6d/b6/20f99cfe97cc663a711f7b33cc21d4793e51968e9a26125b4afcd77315ba/hf_xet-1.5.1-cp37-abi3-win_amd64.whl", hash = "sha256:f7b3002f95d1c13e24bcb4537baa8f0eb3838957067c91bb4959bc004a6435f5", size = 4026419, upload-time = "2026-06-08T23:02:50.829Z" }, + { url = "https://files.pythonhosted.org/packages/f9/fa/77453694888f03e5a8c8852d1514a0894d8e81c622d39edbaf308ea0dcf4/hf_xet-1.5.1-cp37-abi3-win_arm64.whl", hash = "sha256:93d090b57b211133f6c0dab0205ef5cb6d89162979ba75a74845045cc3063b8e", size = 3855178, upload-time = "2026-06-08T23:02:52.452Z" }, +] + [[package]] name = "httpcore" version = "1.0.9" @@ -302,6 +365,27 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/56/95/9377bcb415797e44274b51d46e3249eba641711cf3348050f76ee7b15ffc/httpx-0.27.2-py3-none-any.whl", hash = "sha256:7bb2708e112d8fdd7829cd4243970f0c223274051cb35ee80c03301ee29a3df0", size = 76395, upload-time = "2024-08-27T12:53:59.653Z" }, ] +[[package]] +name = "huggingface-hub" +version = "1.19.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "click" }, + { name = "filelock" }, + { name = "fsspec" }, + { name = "hf-xet", marker = "platform_machine == 'AMD64' or platform_machine == 'aarch64' or platform_machine == 'amd64' or platform_machine == 'arm64' or platform_machine == 'x86_64'" }, + { name = "httpx" }, + { name = "packaging" }, + { name = "pyyaml" }, + { name = "tqdm" }, + { name = "typer" }, + { name = "typing-extensions" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/88/27/629cfe58c582f92ded066c4a07d1a057ff617118ab7973200f770bd853cb/huggingface_hub-1.19.0.tar.gz", hash = "sha256:fd771622182d40977272a923953ee3b1b13538f9f8a7f5d78398f10af0f1c0bd", size = 824721, upload-time = "2026-06-11T12:33:18.665Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/b2/a5/558da89f66464d8d0229ff497e8b8666977de2d8cf48c28a2862ecf1250f/huggingface_hub-1.19.0-py3-none-any.whl", hash = "sha256:1dc72e1f6b4d6df6b30eb72e57d00514ef453d660f04af2b87f0e67267f31ee0", size = 693398, upload-time = "2026-06-11T12:33:16.695Z" }, +] + [[package]] name = "idna" version = "3.16" @@ -320,6 +404,18 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/cb/b1/3846dd7f199d53cb17f49cba7e651e9ce294d8497c8c150530ed11865bb8/iniconfig-2.3.0-py3-none-any.whl", hash = "sha256:f631c04d2c48c52b84d0d0549c99ff3859c98df65b3101406327ecc7d53fbf12", size = 7484, upload-time = "2025-10-18T21:55:41.639Z" }, ] +[[package]] +name = "jinja2" +version = "3.1.6" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "markupsafe" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/df/bf/f7da0350254c0ed7c72f3e33cef02e048281fec7ecec5f032d4aac52226b/jinja2-3.1.6.tar.gz", hash = "sha256:0137fb05990d35f1275a587e9aee6d56da821fc83491a0fb838183be43f66d6d", size = 245115, upload-time = "2025-03-05T20:05:02.478Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/62/a1/3d680cbfd5f4b8f15abc1d571870c5fc3e594bb582bc3b64ea099db13e56/jinja2-3.1.6-py3-none-any.whl", hash = "sha256:85ece4451f492d0c13c5dd7c13a64681a86afae63a5f347908daf103ce6d2f67", size = 134899, upload-time = "2025-03-05T20:05:00.369Z" }, +] + [[package]] name = "jiter" version = "0.15.0" @@ -392,6 +488,187 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/c8/8d/302cb2057b7513327b4d575cff6b1d066ee6431a5357fc3f8867cd684406/jiter-0.15.0-graalpy312-graalpy250_312_native-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:54d5d6090cdc1b7c9e780dfb04949a990adb1e301a2fc0bbcee7de4638d33f9a", size = 344469, upload-time = "2026-05-19T10:09:46.864Z" }, ] +[[package]] +name = "joblib" +version = "1.5.3" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/41/f2/d34e8b3a08a9cc79a50b2208a93dce981fe615b64d5a4d4abee421d898df/joblib-1.5.3.tar.gz", hash = "sha256:8561a3269e6801106863fd0d6d84bb737be9e7631e33aaed3fb9ce5953688da3", size = 331603, upload-time = "2025-12-15T08:41:46.427Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/7b/91/984aca2ec129e2757d1e4e3c81c3fcda9d0f85b74670a094cc443d9ee949/joblib-1.5.3-py3-none-any.whl", hash = "sha256:5fc3c5039fc5ca8c0276333a188bbd59d6b7ab37fe6632daa76bc7f9ec18e713", size = 309071, upload-time = "2025-12-15T08:41:44.973Z" }, +] + +[[package]] +name = "markdown-it-py" +version = "4.2.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "mdurl" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/06/ff/7841249c247aa650a76b9ee4bbaeae59370dc8bfd2f6c01f3630c35eb134/markdown_it_py-4.2.0.tar.gz", hash = "sha256:04a21681d6fbb623de53f6f364d352309d4094dd4194040a10fd51833e418d49", size = 82454, upload-time = "2026-05-07T12:08:28.36Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/b3/81/4da04ced5a082363ecfa159c010d200ecbd959ae410c10c0264a38cac0f5/markdown_it_py-4.2.0-py3-none-any.whl", hash = "sha256:9f7ebbcd14fe59494226453aed97c1070d83f8d24b6fc3a3bcf9a38092641c4a", size = 91687, upload-time = "2026-05-07T12:08:27.182Z" }, +] + +[[package]] +name = "markupsafe" +version = "3.0.3" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/7e/99/7690b6d4034fffd95959cbe0c02de8deb3098cc577c67bb6a24fe5d7caa7/markupsafe-3.0.3.tar.gz", hash = "sha256:722695808f4b6457b320fdc131280796bdceb04ab50fe1795cd540799ebe1698", size = 80313, upload-time = "2025-09-27T18:37:40.426Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/5a/72/147da192e38635ada20e0a2e1a51cf8823d2119ce8883f7053879c2199b5/markupsafe-3.0.3-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:d53197da72cc091b024dd97249dfc7794d6a56530370992a5e1a08983ad9230e", size = 11615, upload-time = "2025-09-27T18:36:30.854Z" }, + { url = "https://files.pythonhosted.org/packages/9a/81/7e4e08678a1f98521201c3079f77db69fb552acd56067661f8c2f534a718/markupsafe-3.0.3-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:1872df69a4de6aead3491198eaf13810b565bdbeec3ae2dc8780f14458ec73ce", size = 12020, upload-time = "2025-09-27T18:36:31.971Z" }, + { url = "https://files.pythonhosted.org/packages/1e/2c/799f4742efc39633a1b54a92eec4082e4f815314869865d876824c257c1e/markupsafe-3.0.3-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:3a7e8ae81ae39e62a41ec302f972ba6ae23a5c5396c8e60113e9066ef893da0d", size = 24332, upload-time = "2025-09-27T18:36:32.813Z" }, + { url = "https://files.pythonhosted.org/packages/3c/2e/8d0c2ab90a8c1d9a24f0399058ab8519a3279d1bd4289511d74e909f060e/markupsafe-3.0.3-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:d6dd0be5b5b189d31db7cda48b91d7e0a9795f31430b7f271219ab30f1d3ac9d", size = 22947, upload-time = "2025-09-27T18:36:33.86Z" }, + { url = "https://files.pythonhosted.org/packages/2c/54/887f3092a85238093a0b2154bd629c89444f395618842e8b0c41783898ea/markupsafe-3.0.3-cp312-cp312-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:94c6f0bb423f739146aec64595853541634bde58b2135f27f61c1ffd1cd4d16a", size = 21962, upload-time = "2025-09-27T18:36:35.099Z" }, + { url = "https://files.pythonhosted.org/packages/c9/2f/336b8c7b6f4a4d95e91119dc8521402461b74a485558d8f238a68312f11c/markupsafe-3.0.3-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:be8813b57049a7dc738189df53d69395eba14fb99345e0a5994914a3864c8a4b", size = 23760, upload-time = "2025-09-27T18:36:36.001Z" }, + { url = "https://files.pythonhosted.org/packages/32/43/67935f2b7e4982ffb50a4d169b724d74b62a3964bc1a9a527f5ac4f1ee2b/markupsafe-3.0.3-cp312-cp312-musllinux_1_2_riscv64.whl", hash = "sha256:83891d0e9fb81a825d9a6d61e3f07550ca70a076484292a70fde82c4b807286f", size = 21529, upload-time = "2025-09-27T18:36:36.906Z" }, + { url = "https://files.pythonhosted.org/packages/89/e0/4486f11e51bbba8b0c041098859e869e304d1c261e59244baa3d295d47b7/markupsafe-3.0.3-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:77f0643abe7495da77fb436f50f8dab76dbc6e5fd25d39589a0f1fe6548bfa2b", size = 23015, upload-time = "2025-09-27T18:36:37.868Z" }, + { url = "https://files.pythonhosted.org/packages/2f/e1/78ee7a023dac597a5825441ebd17170785a9dab23de95d2c7508ade94e0e/markupsafe-3.0.3-cp312-cp312-win32.whl", hash = "sha256:d88b440e37a16e651bda4c7c2b930eb586fd15ca7406cb39e211fcff3bf3017d", size = 14540, upload-time = "2025-09-27T18:36:38.761Z" }, + { url = "https://files.pythonhosted.org/packages/aa/5b/bec5aa9bbbb2c946ca2733ef9c4ca91c91b6a24580193e891b5f7dbe8e1e/markupsafe-3.0.3-cp312-cp312-win_amd64.whl", hash = "sha256:26a5784ded40c9e318cfc2bdb30fe164bdb8665ded9cd64d500a34fb42067b1c", size = 15105, upload-time = "2025-09-27T18:36:39.701Z" }, + { url = "https://files.pythonhosted.org/packages/e5/f1/216fc1bbfd74011693a4fd837e7026152e89c4bcf3e77b6692fba9923123/markupsafe-3.0.3-cp312-cp312-win_arm64.whl", hash = "sha256:35add3b638a5d900e807944a078b51922212fb3dedb01633a8defc4b01a3c85f", size = 13906, upload-time = "2025-09-27T18:36:40.689Z" }, + { url = "https://files.pythonhosted.org/packages/38/2f/907b9c7bbba283e68f20259574b13d005c121a0fa4c175f9bed27c4597ff/markupsafe-3.0.3-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:e1cf1972137e83c5d4c136c43ced9ac51d0e124706ee1c8aa8532c1287fa8795", size = 11622, upload-time = "2025-09-27T18:36:41.777Z" }, + { url = "https://files.pythonhosted.org/packages/9c/d9/5f7756922cdd676869eca1c4e3c0cd0df60ed30199ffd775e319089cb3ed/markupsafe-3.0.3-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:116bb52f642a37c115f517494ea5feb03889e04df47eeff5b130b1808ce7c219", size = 12029, upload-time = "2025-09-27T18:36:43.257Z" }, + { url = "https://files.pythonhosted.org/packages/00/07/575a68c754943058c78f30db02ee03a64b3c638586fba6a6dd56830b30a3/markupsafe-3.0.3-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:133a43e73a802c5562be9bbcd03d090aa5a1fe899db609c29e8c8d815c5f6de6", size = 24374, upload-time = "2025-09-27T18:36:44.508Z" }, + { url = "https://files.pythonhosted.org/packages/a9/21/9b05698b46f218fc0e118e1f8168395c65c8a2c750ae2bab54fc4bd4e0e8/markupsafe-3.0.3-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:ccfcd093f13f0f0b7fdd0f198b90053bf7b2f02a3927a30e63f3ccc9df56b676", size = 22980, upload-time = "2025-09-27T18:36:45.385Z" }, + { url = "https://files.pythonhosted.org/packages/7f/71/544260864f893f18b6827315b988c146b559391e6e7e8f7252839b1b846a/markupsafe-3.0.3-cp313-cp313-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:509fa21c6deb7a7a273d629cf5ec029bc209d1a51178615ddf718f5918992ab9", size = 21990, upload-time = "2025-09-27T18:36:46.916Z" }, + { url = "https://files.pythonhosted.org/packages/c2/28/b50fc2f74d1ad761af2f5dcce7492648b983d00a65b8c0e0cb457c82ebbe/markupsafe-3.0.3-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:a4afe79fb3de0b7097d81da19090f4df4f8d3a2b3adaa8764138aac2e44f3af1", size = 23784, upload-time = "2025-09-27T18:36:47.884Z" }, + { url = "https://files.pythonhosted.org/packages/ed/76/104b2aa106a208da8b17a2fb72e033a5a9d7073c68f7e508b94916ed47a9/markupsafe-3.0.3-cp313-cp313-musllinux_1_2_riscv64.whl", hash = "sha256:795e7751525cae078558e679d646ae45574b47ed6e7771863fcc079a6171a0fc", size = 21588, upload-time = "2025-09-27T18:36:48.82Z" }, + { url = "https://files.pythonhosted.org/packages/b5/99/16a5eb2d140087ebd97180d95249b00a03aa87e29cc224056274f2e45fd6/markupsafe-3.0.3-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:8485f406a96febb5140bfeca44a73e3ce5116b2501ac54fe953e488fb1d03b12", size = 23041, upload-time = "2025-09-27T18:36:49.797Z" }, + { url = "https://files.pythonhosted.org/packages/19/bc/e7140ed90c5d61d77cea142eed9f9c303f4c4806f60a1044c13e3f1471d0/markupsafe-3.0.3-cp313-cp313-win32.whl", hash = "sha256:bdd37121970bfd8be76c5fb069c7751683bdf373db1ed6c010162b2a130248ed", size = 14543, upload-time = "2025-09-27T18:36:51.584Z" }, + { url = "https://files.pythonhosted.org/packages/05/73/c4abe620b841b6b791f2edc248f556900667a5a1cf023a6646967ae98335/markupsafe-3.0.3-cp313-cp313-win_amd64.whl", hash = "sha256:9a1abfdc021a164803f4d485104931fb8f8c1efd55bc6b748d2f5774e78b62c5", size = 15113, upload-time = "2025-09-27T18:36:52.537Z" }, + { url = "https://files.pythonhosted.org/packages/f0/3a/fa34a0f7cfef23cf9500d68cb7c32dd64ffd58a12b09225fb03dd37d5b80/markupsafe-3.0.3-cp313-cp313-win_arm64.whl", hash = "sha256:7e68f88e5b8799aa49c85cd116c932a1ac15caaa3f5db09087854d218359e485", size = 13911, upload-time = "2025-09-27T18:36:53.513Z" }, + { url = "https://files.pythonhosted.org/packages/e4/d7/e05cd7efe43a88a17a37b3ae96e79a19e846f3f456fe79c57ca61356ef01/markupsafe-3.0.3-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:218551f6df4868a8d527e3062d0fb968682fe92054e89978594c28e642c43a73", size = 11658, upload-time = "2025-09-27T18:36:54.819Z" }, + { url = "https://files.pythonhosted.org/packages/99/9e/e412117548182ce2148bdeacdda3bb494260c0b0184360fe0d56389b523b/markupsafe-3.0.3-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:3524b778fe5cfb3452a09d31e7b5adefeea8c5be1d43c4f810ba09f2ceb29d37", size = 12066, upload-time = "2025-09-27T18:36:55.714Z" }, + { url = "https://files.pythonhosted.org/packages/bc/e6/fa0ffcda717ef64a5108eaa7b4f5ed28d56122c9a6d70ab8b72f9f715c80/markupsafe-3.0.3-cp313-cp313t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:4e885a3d1efa2eadc93c894a21770e4bc67899e3543680313b09f139e149ab19", size = 25639, upload-time = "2025-09-27T18:36:56.908Z" }, + { url = "https://files.pythonhosted.org/packages/96/ec/2102e881fe9d25fc16cb4b25d5f5cde50970967ffa5dddafdb771237062d/markupsafe-3.0.3-cp313-cp313t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:8709b08f4a89aa7586de0aadc8da56180242ee0ada3999749b183aa23df95025", size = 23569, upload-time = "2025-09-27T18:36:57.913Z" }, + { url = "https://files.pythonhosted.org/packages/4b/30/6f2fce1f1f205fc9323255b216ca8a235b15860c34b6798f810f05828e32/markupsafe-3.0.3-cp313-cp313t-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:b8512a91625c9b3da6f127803b166b629725e68af71f8184ae7e7d54686a56d6", size = 23284, upload-time = "2025-09-27T18:36:58.833Z" }, + { url = "https://files.pythonhosted.org/packages/58/47/4a0ccea4ab9f5dcb6f79c0236d954acb382202721e704223a8aafa38b5c8/markupsafe-3.0.3-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:9b79b7a16f7fedff2495d684f2b59b0457c3b493778c9eed31111be64d58279f", size = 24801, upload-time = "2025-09-27T18:36:59.739Z" }, + { url = "https://files.pythonhosted.org/packages/6a/70/3780e9b72180b6fecb83a4814d84c3bf4b4ae4bf0b19c27196104149734c/markupsafe-3.0.3-cp313-cp313t-musllinux_1_2_riscv64.whl", hash = "sha256:12c63dfb4a98206f045aa9563db46507995f7ef6d83b2f68eda65c307c6829eb", size = 22769, upload-time = "2025-09-27T18:37:00.719Z" }, + { url = "https://files.pythonhosted.org/packages/98/c5/c03c7f4125180fc215220c035beac6b9cb684bc7a067c84fc69414d315f5/markupsafe-3.0.3-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:8f71bc33915be5186016f675cd83a1e08523649b0e33efdb898db577ef5bb009", size = 23642, upload-time = "2025-09-27T18:37:01.673Z" }, + { url = "https://files.pythonhosted.org/packages/80/d6/2d1b89f6ca4bff1036499b1e29a1d02d282259f3681540e16563f27ebc23/markupsafe-3.0.3-cp313-cp313t-win32.whl", hash = "sha256:69c0b73548bc525c8cb9a251cddf1931d1db4d2258e9599c28c07ef3580ef354", size = 14612, upload-time = "2025-09-27T18:37:02.639Z" }, + { url = "https://files.pythonhosted.org/packages/2b/98/e48a4bfba0a0ffcf9925fe2d69240bfaa19c6f7507b8cd09c70684a53c1e/markupsafe-3.0.3-cp313-cp313t-win_amd64.whl", hash = "sha256:1b4b79e8ebf6b55351f0d91fe80f893b4743f104bff22e90697db1590e47a218", size = 15200, upload-time = "2025-09-27T18:37:03.582Z" }, + { url = "https://files.pythonhosted.org/packages/0e/72/e3cc540f351f316e9ed0f092757459afbc595824ca724cbc5a5d4263713f/markupsafe-3.0.3-cp313-cp313t-win_arm64.whl", hash = "sha256:ad2cf8aa28b8c020ab2fc8287b0f823d0a7d8630784c31e9ee5edea20f406287", size = 13973, upload-time = "2025-09-27T18:37:04.929Z" }, + { url = "https://files.pythonhosted.org/packages/33/8a/8e42d4838cd89b7dde187011e97fe6c3af66d8c044997d2183fbd6d31352/markupsafe-3.0.3-cp314-cp314-macosx_10_13_x86_64.whl", hash = "sha256:eaa9599de571d72e2daf60164784109f19978b327a3910d3e9de8c97b5b70cfe", size = 11619, upload-time = "2025-09-27T18:37:06.342Z" }, + { url = "https://files.pythonhosted.org/packages/b5/64/7660f8a4a8e53c924d0fa05dc3a55c9cee10bbd82b11c5afb27d44b096ce/markupsafe-3.0.3-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:c47a551199eb8eb2121d4f0f15ae0f923d31350ab9280078d1e5f12b249e0026", size = 12029, upload-time = "2025-09-27T18:37:07.213Z" }, + { url = "https://files.pythonhosted.org/packages/da/ef/e648bfd021127bef5fa12e1720ffed0c6cbb8310c8d9bea7266337ff06de/markupsafe-3.0.3-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:f34c41761022dd093b4b6896d4810782ffbabe30f2d443ff5f083e0cbbb8c737", size = 24408, upload-time = "2025-09-27T18:37:09.572Z" }, + { url = "https://files.pythonhosted.org/packages/41/3c/a36c2450754618e62008bf7435ccb0f88053e07592e6028a34776213d877/markupsafe-3.0.3-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:457a69a9577064c05a97c41f4e65148652db078a3a509039e64d3467b9e7ef97", size = 23005, upload-time = "2025-09-27T18:37:10.58Z" }, + { url = "https://files.pythonhosted.org/packages/bc/20/b7fdf89a8456b099837cd1dc21974632a02a999ec9bf7ca3e490aacd98e7/markupsafe-3.0.3-cp314-cp314-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:e8afc3f2ccfa24215f8cb28dcf43f0113ac3c37c2f0f0806d8c70e4228c5cf4d", size = 22048, upload-time = "2025-09-27T18:37:11.547Z" }, + { url = "https://files.pythonhosted.org/packages/9a/a7/591f592afdc734f47db08a75793a55d7fbcc6902a723ae4cfbab61010cc5/markupsafe-3.0.3-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:ec15a59cf5af7be74194f7ab02d0f59a62bdcf1a537677ce67a2537c9b87fcda", size = 23821, upload-time = "2025-09-27T18:37:12.48Z" }, + { url = "https://files.pythonhosted.org/packages/7d/33/45b24e4f44195b26521bc6f1a82197118f74df348556594bd2262bda1038/markupsafe-3.0.3-cp314-cp314-musllinux_1_2_riscv64.whl", hash = "sha256:0eb9ff8191e8498cca014656ae6b8d61f39da5f95b488805da4bb029cccbfbaf", size = 21606, upload-time = "2025-09-27T18:37:13.485Z" }, + { url = "https://files.pythonhosted.org/packages/ff/0e/53dfaca23a69fbfbbf17a4b64072090e70717344c52eaaaa9c5ddff1e5f0/markupsafe-3.0.3-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:2713baf880df847f2bece4230d4d094280f4e67b1e813eec43b4c0e144a34ffe", size = 23043, upload-time = "2025-09-27T18:37:14.408Z" }, + { url = "https://files.pythonhosted.org/packages/46/11/f333a06fc16236d5238bfe74daccbca41459dcd8d1fa952e8fbd5dccfb70/markupsafe-3.0.3-cp314-cp314-win32.whl", hash = "sha256:729586769a26dbceff69f7a7dbbf59ab6572b99d94576a5592625d5b411576b9", size = 14747, upload-time = "2025-09-27T18:37:15.36Z" }, + { url = "https://files.pythonhosted.org/packages/28/52/182836104b33b444e400b14f797212f720cbc9ed6ba34c800639d154e821/markupsafe-3.0.3-cp314-cp314-win_amd64.whl", hash = "sha256:bdc919ead48f234740ad807933cdf545180bfbe9342c2bb451556db2ed958581", size = 15341, upload-time = "2025-09-27T18:37:16.496Z" }, + { url = "https://files.pythonhosted.org/packages/6f/18/acf23e91bd94fd7b3031558b1f013adfa21a8e407a3fdb32745538730382/markupsafe-3.0.3-cp314-cp314-win_arm64.whl", hash = "sha256:5a7d5dc5140555cf21a6fefbdbf8723f06fcd2f63ef108f2854de715e4422cb4", size = 14073, upload-time = "2025-09-27T18:37:17.476Z" }, + { url = "https://files.pythonhosted.org/packages/3c/f0/57689aa4076e1b43b15fdfa646b04653969d50cf30c32a102762be2485da/markupsafe-3.0.3-cp314-cp314t-macosx_10_13_x86_64.whl", hash = "sha256:1353ef0c1b138e1907ae78e2f6c63ff67501122006b0f9abad68fda5f4ffc6ab", size = 11661, upload-time = "2025-09-27T18:37:18.453Z" }, + { url = "https://files.pythonhosted.org/packages/89/c3/2e67a7ca217c6912985ec766c6393b636fb0c2344443ff9d91404dc4c79f/markupsafe-3.0.3-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:1085e7fbddd3be5f89cc898938f42c0b3c711fdcb37d75221de2666af647c175", size = 12069, upload-time = "2025-09-27T18:37:19.332Z" }, + { url = "https://files.pythonhosted.org/packages/f0/00/be561dce4e6ca66b15276e184ce4b8aec61fe83662cce2f7d72bd3249d28/markupsafe-3.0.3-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:1b52b4fb9df4eb9ae465f8d0c228a00624de2334f216f178a995ccdcf82c4634", size = 25670, upload-time = "2025-09-27T18:37:20.245Z" }, + { url = "https://files.pythonhosted.org/packages/50/09/c419f6f5a92e5fadde27efd190eca90f05e1261b10dbd8cbcb39cd8ea1dc/markupsafe-3.0.3-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:fed51ac40f757d41b7c48425901843666a6677e3e8eb0abcff09e4ba6e664f50", size = 23598, upload-time = "2025-09-27T18:37:21.177Z" }, + { url = "https://files.pythonhosted.org/packages/22/44/a0681611106e0b2921b3033fc19bc53323e0b50bc70cffdd19f7d679bb66/markupsafe-3.0.3-cp314-cp314t-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:f190daf01f13c72eac4efd5c430a8de82489d9cff23c364c3ea822545032993e", size = 23261, upload-time = "2025-09-27T18:37:22.167Z" }, + { url = "https://files.pythonhosted.org/packages/5f/57/1b0b3f100259dc9fffe780cfb60d4be71375510e435efec3d116b6436d43/markupsafe-3.0.3-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:e56b7d45a839a697b5eb268c82a71bd8c7f6c94d6fd50c3d577fa39a9f1409f5", size = 24835, upload-time = "2025-09-27T18:37:23.296Z" }, + { url = "https://files.pythonhosted.org/packages/26/6a/4bf6d0c97c4920f1597cc14dd720705eca0bf7c787aebc6bb4d1bead5388/markupsafe-3.0.3-cp314-cp314t-musllinux_1_2_riscv64.whl", hash = "sha256:f3e98bb3798ead92273dc0e5fd0f31ade220f59a266ffd8a4f6065e0a3ce0523", size = 22733, upload-time = "2025-09-27T18:37:24.237Z" }, + { url = "https://files.pythonhosted.org/packages/14/c7/ca723101509b518797fedc2fdf79ba57f886b4aca8a7d31857ba3ee8281f/markupsafe-3.0.3-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:5678211cb9333a6468fb8d8be0305520aa073f50d17f089b5b4b477ea6e67fdc", size = 23672, upload-time = "2025-09-27T18:37:25.271Z" }, + { url = "https://files.pythonhosted.org/packages/fb/df/5bd7a48c256faecd1d36edc13133e51397e41b73bb77e1a69deab746ebac/markupsafe-3.0.3-cp314-cp314t-win32.whl", hash = "sha256:915c04ba3851909ce68ccc2b8e2cd691618c4dc4c4232fb7982bca3f41fd8c3d", size = 14819, upload-time = "2025-09-27T18:37:26.285Z" }, + { url = "https://files.pythonhosted.org/packages/1a/8a/0402ba61a2f16038b48b39bccca271134be00c5c9f0f623208399333c448/markupsafe-3.0.3-cp314-cp314t-win_amd64.whl", hash = "sha256:4faffd047e07c38848ce017e8725090413cd80cbc23d86e55c587bf979e579c9", size = 15426, upload-time = "2025-09-27T18:37:27.316Z" }, + { url = "https://files.pythonhosted.org/packages/70/bc/6f1c2f612465f5fa89b95bead1f44dcb607670fd42891d8fdcd5d039f4f4/markupsafe-3.0.3-cp314-cp314t-win_arm64.whl", hash = "sha256:32001d6a8fc98c8cb5c947787c5d08b0a50663d139f1305bac5885d98d9b40fa", size = 14146, upload-time = "2025-09-27T18:37:28.327Z" }, +] + +[[package]] +name = "mdurl" +version = "0.1.2" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/d6/54/cfe61301667036ec958cb99bd3efefba235e65cdeb9c84d24a8293ba1d90/mdurl-0.1.2.tar.gz", hash = "sha256:bb413d29f5eea38f31dd4754dd7377d4465116fb207585f97bf925588687c1ba", size = 8729, upload-time = "2022-08-14T12:40:10.846Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/b3/38/89ba8ad64ae25be8de66a6d463314cf1eb366222074cfda9ee839c56a4b4/mdurl-0.1.2-py3-none-any.whl", hash = "sha256:84008a41e51615a49fc9966191ff91509e3c40b939176e643fd50a5c2196b8f8", size = 9979, upload-time = "2022-08-14T12:40:09.779Z" }, +] + +[[package]] +name = "mpmath" +version = "1.3.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/e0/47/dd32fa426cc72114383ac549964eecb20ecfd886d1e5ccf5340b55b02f57/mpmath-1.3.0.tar.gz", hash = "sha256:7a28eb2a9774d00c7bc92411c19a89209d5da7c4c9a9e227be8330a23a25b91f", size = 508106, upload-time = "2023-03-07T16:47:11.061Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/43/e3/7d92a15f894aa0c9c4b49b8ee9ac9850d6e63b03c9c32c0367a13ae62209/mpmath-1.3.0-py3-none-any.whl", hash = "sha256:a0b2b9fe80bbcd81a6647ff13108738cfb482d481d826cc0e02f5b35e5c88d2c", size = 536198, upload-time = "2023-03-07T16:47:09.197Z" }, +] + +[[package]] +name = "narwhals" +version = "2.22.1" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/62/3c/c4ef2164a71c1a63d7f1ae411c4082c5fa872405106db60a4b7114989ad7/narwhals-2.22.1.tar.gz", hash = "sha256:d62920805a0a43b7ff8b54b0c0d3142d796f8a9301836ada37e573d6a33cbcd9", size = 647493, upload-time = "2026-06-05T12:34:34.051Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/48/ca/36339329c4604adbcc99c899b7eb1ce1a555c499b6a6860757dc9bfed36d/narwhals-2.22.1-py3-none-any.whl", hash = "sha256:60567d774edf77db53906f89d9fbd164e66e56d66d388e1e6990f17ac33cfb53", size = 454815, upload-time = "2026-06-05T12:34:32.289Z" }, +] + +[[package]] +name = "networkx" +version = "3.6.1" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/6a/51/63fe664f3908c97be9d2e4f1158eb633317598cfa6e1fc14af5383f17512/networkx-3.6.1.tar.gz", hash = "sha256:26b7c357accc0c8cde558ad486283728b65b6a95d85ee1cd66bafab4c8168509", size = 2517025, upload-time = "2025-12-08T17:02:39.908Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/9e/c9/b2622292ea83fbb4ec318f5b9ab867d0a28ab43c5717bb85b0a5f6b3b0a4/networkx-3.6.1-py3-none-any.whl", hash = "sha256:d47fbf302e7d9cbbb9e2555a0d267983d2aa476bac30e90dfbe5669bd57f3762", size = 2068504, upload-time = "2025-12-08T17:02:38.159Z" }, +] + +[[package]] +name = "numpy" +version = "2.4.6" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/d0/ad/fed0499ce6a338d2a03ebae59cd15093910c8875328855781952abf6c2fe/numpy-2.4.6.tar.gz", hash = "sha256:f3a3570c4a2a16746ac2c31a7c7c7b0c186b95ce902e33db6f28094ed7387dda", size = 20735807, upload-time = "2026-05-18T23:37:14.07Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/95/2a/3d7b5ac8aac24feaf9ad7ed58f45b0bbc06d37e4338ae84c9f2298b570f9/numpy-2.4.6-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:001fbb8e08d942dd57599e781f2472269ee7f2755fae407b4f67b2f0b17da3f1", size = 16689119, upload-time = "2026-05-18T23:33:54.065Z" }, + { url = "https://files.pythonhosted.org/packages/ea/12/92c4c131527599e8288d6918e888d88726f84d805d784b771f32408aeaef/numpy-2.4.6-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:ebfb099f8dcf083deef3ac1ca4c1503f387cf76296fcb3816b66f5ecb5f54fdb", size = 14699246, upload-time = "2026-05-18T23:33:57.621Z" }, + { url = "https://files.pythonhosted.org/packages/ad/fe/c0a6b7b2ca128a8fb228575147073b660656734b8ebe4d76c8fd748dcc79/numpy-2.4.6-cp312-cp312-macosx_14_0_arm64.whl", hash = "sha256:3213d622a0283a39a93d188f3cf72b26862df52fbb4ca3697f51705016523d41", size = 5204410, upload-time = "2026-05-18T23:34:00.302Z" }, + { url = "https://files.pythonhosted.org/packages/f3/d4/9770d14ba719432bb90a421bfd443872ed0f70f7264b64bec12ea363d5fd/numpy-2.4.6-cp312-cp312-macosx_14_0_x86_64.whl", hash = "sha256:357cc07a6d7b0b182ff02249616a03742827ebb1277546b5c7cd7f7620a45698", size = 6551240, upload-time = "2026-05-18T23:34:02.852Z" }, + { url = "https://files.pythonhosted.org/packages/c9/c6/50a46a6205feba2343f1d6d17438107c5dc491ed1c736e6ea68689fd906b/numpy-2.4.6-cp312-cp312-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:5f9fb9157b4ce2971008323afe46053787b526ef624fea915b261468a8421a0f", size = 15671012, upload-time = "2026-05-18T23:34:05.485Z" }, + { url = "https://files.pythonhosted.org/packages/99/60/14115e6364fa676c5397c2ad3004e527e9aa487abf5d0706ec81bbd08529/numpy-2.4.6-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:90f9849678c75fe7afa2d348ac842c168b0a4d3d61919687216dfc547976d853", size = 16645538, upload-time = "2026-05-18T23:34:09.265Z" }, + { url = "https://files.pythonhosted.org/packages/ae/c5/693cbe59e57db94d2231fa519ca3978dc9e19da5a8f088588f5c6e947ff2/numpy-2.4.6-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:c1a2af6c6ef86344a6b0db6b97834208bf598db514f2b155042439b62605601a", size = 17020706, upload-time = "2026-05-18T23:34:13.053Z" }, + { url = "https://files.pythonhosted.org/packages/ef/fc/85b7c4eff9b4966ade25c2273cf7e7012e92366c032058653934b37de044/numpy-2.4.6-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:e5805d5a22fd19c8ccff10a9561f9df94436b0545619ea579db2d3c35294bce2", size = 18368541, upload-time = "2026-05-18T23:34:17.024Z" }, + { url = "https://files.pythonhosted.org/packages/f6/81/e1b27545deedce7f4a0b348618c6b62d74e36a4dc9ccd42f3eb2f85eee32/numpy-2.4.6-cp312-cp312-win32.whl", hash = "sha256:e3eeb0aabd6bd5ce64faae67e9935203a6991b4bc2a485a767fbafb2c5125f45", size = 5962825, upload-time = "2026-05-18T23:34:20.3Z" }, + { url = "https://files.pythonhosted.org/packages/ab/ca/feab00bd44aa5fe1ad2c18f08b4d3bb92e26484b0b1d1443897809ed528c/numpy-2.4.6-cp312-cp312-win_amd64.whl", hash = "sha256:d8e8286dd7cea7895157318d1b91cdacac64c479f3cbc8dce548331728484751", size = 12321687, upload-time = "2026-05-18T23:34:23.095Z" }, + { url = "https://files.pythonhosted.org/packages/63/cf/5a6d34850a39d1093558564f77ee8e8e0bee5061151b8f05a55711001ec7/numpy-2.4.6-cp312-cp312-win_arm64.whl", hash = "sha256:4081eb135ac24158bd51cdfbef16f1c64df7063b1143f24731387137c092bec8", size = 10221482, upload-time = "2026-05-18T23:34:25.876Z" }, + { url = "https://files.pythonhosted.org/packages/fb/82/bdab26d7438c6791ca31b7c024ca37c1eab8b726ba236129005cd4a06e45/numpy-2.4.6-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:511dbaf848decaaaf4b4ca48032619fb3138710c4bf7da7617765edad1ef96b0", size = 16684648, upload-time = "2026-05-18T23:34:29.41Z" }, + { url = "https://files.pythonhosted.org/packages/1b/30/a80189bcc7f5e4258b3fbc3968d909d1756f54d023299ecc39ad6fdb9ef8/numpy-2.4.6-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:bf162abab1c1a736333192707cef898e735a5ca00f38f27eeedf44b39d9e85eb", size = 14693902, upload-time = "2026-05-18T23:34:33.013Z" }, + { url = "https://files.pythonhosted.org/packages/97/12/70b5d0d7c15e1ebb8a6a84a8caa1d19e181d84fb58bb6d70aca29099dec1/numpy-2.4.6-cp313-cp313-macosx_14_0_arm64.whl", hash = "sha256:043191bfa8eab18c776647b62723ac9dddece59743b13f49b2016094129c2b3f", size = 5198992, upload-time = "2026-05-18T23:34:36.132Z" }, + { url = "https://files.pythonhosted.org/packages/ba/8c/ebd2a8f8a83541f8d38cc5667e8c2b69cecfd30da6e45693e8158857d44b/numpy-2.4.6-cp313-cp313-macosx_14_0_x86_64.whl", hash = "sha256:6180d8b35af935aed8ece3a85e0a43f87393ae0ac87c8d2c8bd2c993f7270ef3", size = 6546944, upload-time = "2026-05-18T23:34:38.484Z" }, + { url = "https://files.pythonhosted.org/packages/bb/c5/7b863a97a91671a0338f4253bd3b5a3d3852f0692dae91711c9f4a10e787/numpy-2.4.6-cp313-cp313-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:72fbe16c6fac95aedf5937fa873445cec2110be35d8a4e9433d7501fd98dae6b", size = 15669392, upload-time = "2026-05-18T23:34:41.257Z" }, + { url = "https://files.pythonhosted.org/packages/a5/9d/3584b9984ca4c047aea75214ce1a4c4c73d849bd71b604264b7f5653f8a8/numpy-2.4.6-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:a7830bab239b79cda9c08c2da014761cafb48da6150e1da17ac06283f43b6089", size = 16633220, upload-time = "2026-05-18T23:34:45.075Z" }, + { url = "https://files.pythonhosted.org/packages/05/ae/7c67fba23bd98caec7c99261f3a16072ade14813486b0282cb29846de832/numpy-2.4.6-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:ef4aea96ce4d3b074422cb4f2f64e216bf9e213004bb58ecfdf50ea02ea8eb9a", size = 17020800, upload-time = "2026-05-18T23:34:49.065Z" }, + { url = "https://files.pythonhosted.org/packages/d9/5d/3b6725cb31d983c5e66916f5d36f6d7e5521129e4c4404d64f918292a5b6/numpy-2.4.6-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:dfa20cc6ca228e6b155b11da03825975ce66aea520985dbbddf0f2a5a495c605", size = 18357600, upload-time = "2026-05-18T23:34:52.709Z" }, + { url = "https://files.pythonhosted.org/packages/f7/da/2ccc6c2fe8898dee01d90c75c5f5f914a23daf99e3e0f59516a08760c8b5/numpy-2.4.6-cp313-cp313-win32.whl", hash = "sha256:56b39e5e0622a09a25bf5baf62f4bcf0cb8a41ae6e2819cf49bbc5a74c083f91", size = 5961134, upload-time = "2026-05-18T23:34:55.618Z" }, + { url = "https://files.pythonhosted.org/packages/b5/cd/9cc4dc876fb065d5c220aae4d5e14826b2715331bb7618ce1fb07a679d99/numpy-2.4.6-cp313-cp313-win_amd64.whl", hash = "sha256:c4fc99836233ea196540b17ab0983aff60ed07941751930f5f4d05bc3b3b7359", size = 12318598, upload-time = "2026-05-18T23:34:58.928Z" }, + { url = "https://files.pythonhosted.org/packages/39/1e/c0bcba1f8694116485fe28fd1be698c278fcda4141c5b0e53a2aed8b12a8/numpy-2.4.6-cp313-cp313-win_arm64.whl", hash = "sha256:a7c711e21628b52034bb5ab8d1bce291f752fcc5e92accc615778acee1ff4778", size = 10222272, upload-time = "2026-05-18T23:35:02.167Z" }, + { url = "https://files.pythonhosted.org/packages/63/6d/cc5619247c8f4204e507f5883528372e4ac4bb189e579fb859a12e480b1f/numpy-2.4.6-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:112b06a867b235ef466ed3508ddf0238050df9c727cafb5301ac385b899189a1", size = 14821197, upload-time = "2026-05-18T23:35:05.468Z" }, + { url = "https://files.pythonhosted.org/packages/00/58/f1c39161c87d9e9bed660f1ed4bafc0e403d5ec9650b6dd77aead07d489b/numpy-2.4.6-cp313-cp313t-macosx_14_0_arm64.whl", hash = "sha256:eaf7fa2de5c0be8ae6ff8e9bea2ccd725e980541244521d8d4b5f3354a27babe", size = 5326287, upload-time = "2026-05-18T23:35:08.693Z" }, + { url = "https://files.pythonhosted.org/packages/af/57/3917ab0fd97f271a8694513581b8a36c655f111c446852c302f04ccdb6fc/numpy-2.4.6-cp313-cp313t-macosx_14_0_x86_64.whl", hash = "sha256:7265a2f3d436e54ef9f2b52b5c937e6be778781bd97a590319d7348f1c1ca997", size = 6646763, upload-time = "2026-05-18T23:35:11.459Z" }, + { url = "https://files.pythonhosted.org/packages/eb/0f/037e64c494b67581ae18193d770adef354c41f3f2c8ebf865602d949bf8f/numpy-2.4.6-cp313-cp313t-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:f74a575920ab21fe304421a3fc28793d82e299cae9eccb37084e9fc7f3617c20", size = 15728070, upload-time = "2026-05-18T23:35:14.79Z" }, + { url = "https://files.pythonhosted.org/packages/21/a6/5d2bae9c9542eb4df16dc9c46dc79c186e9bad53805dfa5399a6023c6db0/numpy-2.4.6-cp313-cp313t-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:ede83e07a75dd06bc501566c1eca2afc0d61677c1472ac9ad93fdee6e638a48d", size = 16681752, upload-time = "2026-05-18T23:35:18.836Z" }, + { url = "https://files.pythonhosted.org/packages/92/14/23d1dfb410ae362cd59ce53e936b1513d545eb40db3949ced632e19a459e/numpy-2.4.6-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:68bb27509ac1b9a3443094260f6326150663b06abe40b73a2f81160623da5b67", size = 17086024, upload-time = "2026-05-18T23:35:22.52Z" }, + { url = "https://files.pythonhosted.org/packages/4b/6e/23595a2c642cdf3bc567877064bdd7f91c8b0038a4453cf2daf7248eafe9/numpy-2.4.6-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:a0df0043bdb289bde1f62da130d20df23d58b45429f752bc7a8fc5325a225ecd", size = 18403398, upload-time = "2026-05-18T23:35:26.398Z" }, + { url = "https://files.pythonhosted.org/packages/8a/90/0ac3bc947217e66dec77e7cbc6a1979d1af70b6461b82f620d3bccd5e4c8/numpy-2.4.6-cp313-cp313t-win32.whl", hash = "sha256:29a287e0cf63ff528da061de6b9f64a4618da591ca1046aafc54062e40ca7eab", size = 6084971, upload-time = "2026-05-18T23:35:29.387Z" }, + { url = "https://files.pythonhosted.org/packages/77/71/5673e351671a1d2bd6063b91b44f70c0affea7d1516fa7a6572941ba4aa1/numpy-2.4.6-cp313-cp313t-win_amd64.whl", hash = "sha256:25c692919ac5a01f170a3bfcd62d745b24fd095c353d50812637d6fcab442e75", size = 12458532, upload-time = "2026-05-18T23:35:32.175Z" }, + { url = "https://files.pythonhosted.org/packages/3f/88/19d3503c5046e688f049274b27a3ef3d771152fa80d3ba3d01a3dff61abe/numpy-2.4.6-cp313-cp313t-win_arm64.whl", hash = "sha256:1e978ec1e8bd0e0e4de6bb75de9d30cbb74db6b6a2bb727618613703ca0167dd", size = 10291881, upload-time = "2026-05-18T23:35:35.465Z" }, + { url = "https://files.pythonhosted.org/packages/f8/91/3ab2044d05fd16d343c5ac2e69b127f1b2854040dd20b193257c78028bd3/numpy-2.4.6-cp314-cp314-macosx_10_15_x86_64.whl", hash = "sha256:06ca2f61ec4385a07a6977c55ba998a4466c123642b4a32694d3128fce18c079", size = 16683458, upload-time = "2026-05-18T23:35:38.353Z" }, + { url = "https://files.pythonhosted.org/packages/8e/62/764ce66fa4147ae6d73071a3abf804ffe606f174618697c571acdf26a7c9/numpy-2.4.6-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:38efbc8de75c7a0fc1ac190162d892787f3f47b57cc291231aafee36b80982b7", size = 14704559, upload-time = "2026-05-18T23:35:42.14Z" }, + { url = "https://files.pythonhosted.org/packages/60/61/23f27c172f022e04025b7dc2367f4d63c1a398120607ec896228649a6f48/numpy-2.4.6-cp314-cp314-macosx_14_0_arm64.whl", hash = "sha256:d581b735e177fdcdce6fed8e7e8880a3fb6ee4e3653a3ac6af01c6f4c03effc5", size = 5209716, upload-time = "2026-05-18T23:35:45.377Z" }, + { url = "https://files.pythonhosted.org/packages/03/71/21cf70dc6ea3e3acb95fc53a265b2fc248b981f0194ceb5b475271b8809d/numpy-2.4.6-cp314-cp314-macosx_14_0_x86_64.whl", hash = "sha256:0a041d3d761dc3c35cc56ce0351506a02bcbc25f7b169f652435141a17db9096", size = 6543947, upload-time = "2026-05-18T23:35:47.926Z" }, + { url = "https://files.pythonhosted.org/packages/d5/91/64288395ee1799bd2e0b04a305dce9666da90c961e1f3fe982a05ee1c036/numpy-2.4.6-cp314-cp314-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:40fdc1ae7125e518ea98e53e69a4ebc27e1fd50510c47b7ea130cf21e5e1d42b", size = 15685197, upload-time = "2026-05-18T23:35:50.863Z" }, + { url = "https://files.pythonhosted.org/packages/f3/eb/ebffaa97dc55502df69584a8f0dcf07f69a3e0b3e2323670a2722db9aa39/numpy-2.4.6-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:a2c306dea656c12c68f51f4cea133cbe78ca7435eb28c735eac1d3ebe73be6e8", size = 16638245, upload-time = "2026-05-18T23:35:54.752Z" }, + { url = "https://files.pythonhosted.org/packages/b8/0b/54f9da33128d7e350fab89c7455902eeae70349ee52bddb448dc4a576f45/numpy-2.4.6-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:33111801a01c12a8a1e3721f0a9232f8cfc8ae2c6b7098167e6f623c6073f402", size = 17036587, upload-time = "2026-05-18T23:35:58.355Z" }, + { url = "https://files.pythonhosted.org/packages/b6/f0/fdebc1052db1cc37c64beb22072d67cd6d1c71adca1299f53dec2b5e20d3/numpy-2.4.6-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:ae506e6902902557576a26ff33eda8695e7ecb3cb36c3b573a0765dee114ebdb", size = 18363226, upload-time = "2026-05-18T23:36:02.845Z" }, + { url = "https://files.pythonhosted.org/packages/aa/b4/298628d98c72b57e57f7165ae6a481a1deaf6f3c28262a6e4c739c275930/numpy-2.4.6-cp314-cp314-win32.whl", hash = "sha256:aaf159caa35993cb1f56fb9b8e4610d35758e7ca005412eb1daa856a78c9c4b1", size = 6010196, upload-time = "2026-05-18T23:36:05.92Z" }, + { url = "https://files.pythonhosted.org/packages/df/ac/46de6dda46478f7942f839e094970be2d4a861e005c4b3bf07c92e291a09/numpy-2.4.6-cp314-cp314-win_amd64.whl", hash = "sha256:b507f5c4c1d508876d1819b6bf9a49d365b96320b5d4993426b33a23ca4b8261", size = 12450334, upload-time = "2026-05-18T23:36:09.107Z" }, + { url = "https://files.pythonhosted.org/packages/78/92/b8b798ac784102c0da830d2257d59358e3d3d90d1e2b3f2575dad976c5cf/numpy-2.4.6-cp314-cp314-win_arm64.whl", hash = "sha256:6f41ae150c4e32db4f3310cdaf64b1593a03dbabe29eec77fc9b50fe64061df6", size = 10495678, upload-time = "2026-05-18T23:36:12.766Z" }, + { url = "https://files.pythonhosted.org/packages/30/34/ec28d1aa8115971537c01469ab2011ee96827930f0a124de1000cc2a7ed7/numpy-2.4.6-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:ece3d2cfe132e7d51f44a832b303895e6f2d499c5e74dfbdb06ee246147a304a", size = 14823672, upload-time = "2026-05-18T23:36:16.473Z" }, + { url = "https://files.pythonhosted.org/packages/16/bd/f6d1fede4e54e8042a7ff97bb495510f3c220f94bcd9e8b228e87c92cc0d/numpy-2.4.6-cp314-cp314t-macosx_14_0_arm64.whl", hash = "sha256:e3e5193ef5a3dc73bceee50f7fdc2c90dbb76c42df8d8fae3d1067a583df579e", size = 5328731, upload-time = "2026-05-18T23:36:19.767Z" }, + { url = "https://files.pythonhosted.org/packages/f4/f0/e105b9e2fd728a9910103884decd6951d9dd73896b914a98d9a231de02ee/numpy-2.4.6-cp314-cp314t-macosx_14_0_x86_64.whl", hash = "sha256:17f9ade344e7d9b464a084d69bcf18fc691cb1db67c62ed80820bf4926d78f0e", size = 6649805, upload-time = "2026-05-18T23:36:22.266Z" }, + { url = "https://files.pythonhosted.org/packages/82/dd/1206a7ca6ab15e3f02069707ca96222e202af681bb73756da7527f3cb837/numpy-2.4.6-cp314-cp314t-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:9cd5ffd25db4e7ba6a375693b3fc0fc1791ec636c17db3720da19bde7180ec43", size = 15730496, upload-time = "2026-05-18T23:36:25.713Z" }, + { url = "https://files.pythonhosted.org/packages/51/e7/38d3ea825dcab85a591734decb2f6c67caa7c8367d374df1a1c3842f9b07/numpy-2.4.6-cp314-cp314t-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:7d92c3819208a60205a12a245c91ad70cb0a85336659b19b834205573ac8456e", size = 16679616, upload-time = "2026-05-18T23:36:29.652Z" }, + { url = "https://files.pythonhosted.org/packages/93/b7/caabfdf53edf663e0b4eb74d7d405d83baef09eb5e83bcd32d601d72b93e/numpy-2.4.6-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:e85b752a1e912b70eaad4fafbd4d1238007ab221de2009b9a2f5ae7461239895", size = 17085145, upload-time = "2026-05-18T23:36:33.449Z" }, + { url = "https://files.pythonhosted.org/packages/f9/45/68d7c33a6bcf3e5aa3bdbd57a367e6f615286dfd6482f97e8ffeb734306e/numpy-2.4.6-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:29cb7f67d10b479ff07c17d33e39f78c07f71c40ef30d63c153d340e96cd3fb4", size = 18403813, upload-time = "2026-05-18T23:36:37.369Z" }, + { url = "https://files.pythonhosted.org/packages/9c/50/0753655aa844c99cd9e018aacf76f130f1bd81d881bb74bc0aef5d73a8ba/numpy-2.4.6-cp314-cp314t-win32.whl", hash = "sha256:260a5d70215b61ab4fadf5c7baacd64821842975eea312125ed3c39a6391b063", size = 6156982, upload-time = "2026-05-18T23:36:40.817Z" }, + { url = "https://files.pythonhosted.org/packages/b2/d4/7c67becf668f973cb490cec3e98dfd799d866f9c989a54d355672cfa0db6/numpy-2.4.6-cp314-cp314t-win_amd64.whl", hash = "sha256:81a1cca95ed5bb92aa8b10dd2cdc9a0d3853a50fad926c28b5d7e8ea54389627", size = 12638908, upload-time = "2026-05-18T23:36:43.996Z" }, + { url = "https://files.pythonhosted.org/packages/43/bb/e1c71a4295b1b1d1393d50dbb4f2a36283c6859d9d3892e84f00ec5a91d5/numpy-2.4.6-cp314-cp314t-win_arm64.whl", hash = "sha256:0c9136e14ed34a9e343a31c533d78a9813a69a3148332bce5e9821cb2f996e66", size = 10565867, upload-time = "2026-05-18T23:36:47.114Z" }, +] + [[package]] name = "openai" version = "2.41.0" @@ -489,6 +766,15 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/99/ee/24ec87e3a91426497c5a2b9880662d19cfd640342d477334ebc60fc2c276/pydantic_settings-2.2.1-py3-none-any.whl", hash = "sha256:0235391d26db4d2190cb9b31051c4b46882d28a51533f97440867f012d4da091", size = 13150, upload-time = "2024-02-19T19:50:19.747Z" }, ] +[[package]] +name = "pygments" +version = "2.20.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/c3/b2/bc9c9196916376152d655522fdcebac55e66de6603a76a02bca1b6414f6c/pygments-2.20.0.tar.gz", hash = "sha256:6757cd03768053ff99f3039c1a36d6c0aa0b263438fcab17520b30a303a82b5f", size = 4955991, upload-time = "2026-03-29T13:29:33.898Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/f4/7e/a72dd26f3b0f4f2bf1dd8923c85f7ceb43172af56d63c7383eb62b332364/pygments-2.20.0-py3-none-any.whl", hash = "sha256:81a9e26dd42fd28a23a2d169d86d7ac03b46e2f8b59ed4698fb4785f946d0176", size = 1231151, upload-time = "2026-03-29T13:29:30.038Z" }, +] + [[package]] name = "pyjwt" version = "2.8.0" @@ -589,6 +875,251 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/f1/12/de94a39c2ef588c7e6455cfbe7343d3b2dc9d6b6b2f40c4c6565744c873d/pyyaml-6.0.3-cp314-cp314t-win_arm64.whl", hash = "sha256:ebc55a14a21cb14062aa4162f906cd962b28e2e9ea38f9b4391244cd8de4ae0b", size = 149341, upload-time = "2025-09-25T21:32:56.828Z" }, ] +[[package]] +name = "regex" +version = "2026.5.9" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/dc/0e/49aee608ad09480e7fd276898c99ec6192985fa331abe4eb3a986094490b/regex-2026.5.9.tar.gz", hash = "sha256:a8234aa23ec39894bfe4a3f1b85616a7032481964a13ac6fc9f10de4f6fca270", size = 416074, upload-time = "2026-05-09T23:15:19.37Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/50/9b/6550044bc44e17c84d312c031c2ec42fbdb6a4ec4e29093be3a172d08772/regex-2026.5.9-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:57eeeb05db7979413dec5438f2db21d7ecbba787cde7a711df1a6f6df672aa06", size = 490451, upload-time = "2026-05-09T23:12:34.72Z" }, + { url = "https://files.pythonhosted.org/packages/1e/95/fc7ba4303b5a0f92446a12ee6778ef2c6c799233f5060042a31bf390cfe9/regex-2026.5.9-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:398c521292f4c7fb807001dcd54694d3a1fcafc179a36ad9cc56f98df85930b6", size = 292112, upload-time = "2026-05-09T23:12:36.285Z" }, + { url = "https://files.pythonhosted.org/packages/54/4b/ee27938d1b2c443e89a9a10e00d2d19aa5ee300cd3d61140644e93bb083e/regex-2026.5.9-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:f7a7c26137296beba7784de6eba69c6a93a63ccebc385e4962fe67e267a91225", size = 289599, upload-time = "2026-05-09T23:12:38.089Z" }, + { url = "https://files.pythonhosted.org/packages/d8/dd/ba103dc19614e25f3880800ca67ce093d6e21b325d72b8383c7bf906e9fa/regex-2026.5.9-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:6441cc660d76107934a09c22167200839a0e89604a6297f78a974e66e931d2c0", size = 796732, upload-time = "2026-05-09T23:12:40.062Z" }, + { url = "https://files.pythonhosted.org/packages/cf/e7/f035b4fd858b050b0080bf302968dc0f59ba34e391872d54936758e6844e/regex-2026.5.9-cp312-cp312-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:91328f1c23d47595ca3ef0a7557fa129c5a23404b775c770697d2f35b33e0107", size = 865440, upload-time = "2026-05-09T23:12:42.059Z" }, + { url = "https://files.pythonhosted.org/packages/0a/51/8cd301ecc899aea28124357f729f4272f44de7806fc7ca02490bfbe253e8/regex-2026.5.9-cp312-cp312-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:93a7860539414dddaefba2b40f8771765ae17949d4c7182b876ce429e11a8309", size = 912329, upload-time = "2026-05-09T23:12:44.373Z" }, + { url = "https://files.pythonhosted.org/packages/cc/1e/3fbe2fa1e8cebd62f3bb7d3321cff1640aca2e240b51d9bd624aad949260/regex-2026.5.9-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:dd2810d22146b6d838acc5ec15602cb6b47920aa4e33015df3868eedfd20bab8", size = 801239, upload-time = "2026-05-09T23:12:46.268Z" }, + { url = "https://files.pythonhosted.org/packages/17/2f/6f6008682bf2cf98040a0d3153a8e557b6ab728d7713d045cee4ce544ab8/regex-2026.5.9-cp312-cp312-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:daff2bdbaf1d23e52fdff7c0b7bc2048b68f978df6a4d107ac981f94caef2e66", size = 777054, upload-time = "2026-05-09T23:12:48.051Z" }, + { url = "https://files.pythonhosted.org/packages/19/2b/eee0d20a6842ba04df4b8847a920b57ef56853f14ef85405473e586b605a/regex-2026.5.9-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:4eeb011098fcb77af513dcef521a3dbecbf8849b1e38940759d293b7a93f5026", size = 785098, upload-time = "2026-05-09T23:12:49.851Z" }, + { url = "https://files.pythonhosted.org/packages/4a/98/6fc1e6410feefb92159edaed5041992bfe390e8d26c721865434acbca558/regex-2026.5.9-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:ea9c8ecfa1b73c73b626534d6626e5340d429630943672b8480724f44e84b962", size = 860095, upload-time = "2026-05-09T23:12:51.666Z" }, + { url = "https://files.pythonhosted.org/packages/18/a3/bd855e0f2cb1a978ecf6fa6bb69632dd9c3f6ea3b81cde62fde14c9daec7/regex-2026.5.9-cp312-cp312-musllinux_1_2_riscv64.whl", hash = "sha256:cd2846168eb9ee3c513902bc8225409cb1caab31d04728b145171fa1625d9621", size = 765762, upload-time = "2026-05-09T23:12:53.413Z" }, + { url = "https://files.pythonhosted.org/packages/dc/66/0ae8c092e60b14c79d24f8e0b7f0aea5bfbffdcab00b5483d13404d3c3a5/regex-2026.5.9-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:39617fb0cde9c0e6306dc70e3bfc096f3da793219879f7ae7aa341a69fbdcf6d", size = 852100, upload-time = "2026-05-09T23:12:55.256Z" }, + { url = "https://files.pythonhosted.org/packages/21/de/8dfde60fc1b21c946a893ba273403b72617edb261370cb1087099a83f088/regex-2026.5.9-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:fd03c4f0e33280d15cae17159b899245d6b7c53d21def19b263b39655061f5ce", size = 789479, upload-time = "2026-05-09T23:12:57.573Z" }, + { url = "https://files.pythonhosted.org/packages/c3/1c/bdcc98f9a4af4fdd166c74941174619ccff4726d3ce32faa8e9a2ecd38dd/regex-2026.5.9-cp312-cp312-win32.whl", hash = "sha256:164eba9b755ea6f244b0d881196fbc1fac09714e9782c9e2732b813142033c8e", size = 266699, upload-time = "2026-05-09T23:12:59.14Z" }, + { url = "https://files.pythonhosted.org/packages/78/87/240d36864f9e48ace85f72e79ced97ceb7f27ce87739a947dcb834b4e6bc/regex-2026.5.9-cp312-cp312-win_amd64.whl", hash = "sha256:86f40a5d6444db30a125c9c9177e6b25dad981cbc37451fd838f145e6edac92e", size = 277783, upload-time = "2026-05-09T23:13:00.789Z" }, + { url = "https://files.pythonhosted.org/packages/4f/b5/7b30f312b0669dff5beebe5b0989dc2d1a312b1a44fab852199c387a5b96/regex-2026.5.9-cp312-cp312-win_arm64.whl", hash = "sha256:96f5f58b54a063d7ea9dca08e1cf57bfe10499c4d579ee672da284f57f5f0070", size = 270513, upload-time = "2026-05-09T23:13:02.426Z" }, + { url = "https://files.pythonhosted.org/packages/aa/da/797e91ecec6f84135da778ddce78c20e0af5d2a15c26f87a81bc3eadb6db/regex-2026.5.9-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:d626b84406444b165fc0ba981604edea39f0588ff1f92baa23fe50799ea9afdb", size = 490303, upload-time = "2026-05-09T23:13:04.382Z" }, + { url = "https://files.pythonhosted.org/packages/44/da/bf30abaaa737b58f4a4b8c4a03659e02fd92092c822e0197ed9e0daab917/regex-2026.5.9-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:d7bdc0ab8f3dd7e1b4f9ab88634e13374669db86bb3c72e8292f07ae313f539f", size = 292019, upload-time = "2026-05-09T23:13:06.022Z" }, + { url = "https://files.pythonhosted.org/packages/2d/e7/d0eaf5713828417b9e5648cf81fa9bacd4961f6ab98c380c2034f8716e35/regex-2026.5.9-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:a8820737949116ffff55fe18f9fc644530063ba6ebfcb8314239416e78f1347c", size = 289468, upload-time = "2026-05-09T23:13:08.214Z" }, + { url = "https://files.pythonhosted.org/packages/d3/9b/b3fdd62b003baa1a9b593cd8c8699c9651c2e80cc21a5c715707983c42d7/regex-2026.5.9-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:aa0fbdbac82cb3e4450d0ccde7d7a35607f4cb2dd9fba4b8b69bfaf8c9fa6aed", size = 796749, upload-time = "2026-05-09T23:13:10.573Z" }, + { url = "https://files.pythonhosted.org/packages/d4/30/66ab84588765f5b4b271a9ca09ef7ce2b87caa95176ec3d2ad65d7bc4902/regex-2026.5.9-cp313-cp313-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:57e8915c7986aa33d25e4d3629cef711cd2863f2961b10409f0c04cb8b7d9020", size = 865445, upload-time = "2026-05-09T23:13:12.523Z" }, + { url = "https://files.pythonhosted.org/packages/1a/89/f05169e8588aac365f35ffc7f3bc3184f095ef4cfded7cfaa3c7fd5dbd89/regex-2026.5.9-cp313-cp313-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:508f56a89ba9cb26e4168cbc37dbd60a28d82430a9e18ad1d25fe0883c314ca2", size = 912322, upload-time = "2026-05-09T23:13:14.281Z" }, + { url = "https://files.pythonhosted.org/packages/30/e1/c93444052cf41581f3c884ab3fb5823daf0992f11cd4388d4275ca610558/regex-2026.5.9-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:b6d189041f15691cfa2b6c4290448ec221244d225b3f5fe9e7771b34ffcdf6e2", size = 801269, upload-time = "2026-05-09T23:13:16.569Z" }, + { url = "https://files.pythonhosted.org/packages/50/fe/0cf96b882f540e62e8b9956599798203d599c44cf4c77917ca27400ff69b/regex-2026.5.9-cp313-cp313-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:e82db382b44d0111b22601c509c89f64434816c9e0eef9d1989cda8cc6ff1c04", size = 777085, upload-time = "2026-05-09T23:13:18.675Z" }, + { url = "https://files.pythonhosted.org/packages/23/5c/d78d4924e7fc875557b9e9b768423925fdfaac5549d06da7810019a9bd26/regex-2026.5.9-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:2acfb48634f64996b57f90f39afa692ff362162722581921fe92239a59960f3c", size = 785153, upload-time = "2026-05-09T23:13:20.525Z" }, + { url = "https://files.pythonhosted.org/packages/bf/e0/5214774090e7b4524dcea3e3c4aa74141d43043f8beb49c1599db1c8b53a/regex-2026.5.9-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:d29eebfc9525db68cad3c97eedd7f754fa265aa5cd0cf4f863b2421e1b48fc9f", size = 860164, upload-time = "2026-05-09T23:13:22.263Z" }, + { url = "https://files.pythonhosted.org/packages/6e/e1/4a57a83350319b1271f0d7a249b8672513ed928b237a741631270de6caea/regex-2026.5.9-cp313-cp313-musllinux_1_2_riscv64.whl", hash = "sha256:debb893095e944091c16e641a6e33c1b0f4cb61ab945ec5afbf53ce7068834d8", size = 765731, upload-time = "2026-05-09T23:13:24.277Z" }, + { url = "https://files.pythonhosted.org/packages/12/f4/499e74a20c156fc75836ee04a72a38d1a063978f600937f9760467beb1b0/regex-2026.5.9-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:d659eee77986549c9ea45b861c7567e44d6287c3dc9a4565478853f7b9fe2ff6", size = 852062, upload-time = "2026-05-09T23:13:26.125Z" }, + { url = "https://files.pythonhosted.org/packages/5b/92/7eebc0d0a01e78629695f342ba17e0deaff8fb45e79cc0d7b98287da6e3e/regex-2026.5.9-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:2efa205e6d98b24d1f3ab395c11aa15cdf10935bca283d0285e0499c284fba21", size = 789577, upload-time = "2026-05-09T23:13:27.814Z" }, + { url = "https://files.pythonhosted.org/packages/05/a4/018e71f7d2ad48c1ebe6d3ae0026f9b7cb4802fd15c7cc02fdf724355102/regex-2026.5.9-cp313-cp313-win32.whl", hash = "sha256:f3844f134e834076677dd369976e9f5068679fcb8e50102fdf6b7ac96a3ec127", size = 266691, upload-time = "2026-05-09T23:13:29.549Z" }, + { url = "https://files.pythonhosted.org/packages/e6/1d/861a93719fb9ee7dbfc3761b3797b7a3e112a5d42c6129459d2d741be9b5/regex-2026.5.9-cp313-cp313-win_amd64.whl", hash = "sha256:3527bb4942d2c14552155406cdedd906567456821848aed1cb4933a391bf5eca", size = 277747, upload-time = "2026-05-09T23:13:31.859Z" }, + { url = "https://files.pythonhosted.org/packages/d9/c6/0a2436ae4da1ba76e51cb98943c6838a9a721faa40ebe2dce07694ae34e3/regex-2026.5.9-cp313-cp313-win_arm64.whl", hash = "sha256:56a33f191f17d8c417f99945ebdc1e691d3af9605d86ec68c7e54a57e3e17af6", size = 270500, upload-time = "2026-05-09T23:13:33.525Z" }, + { url = "https://files.pythonhosted.org/packages/e8/e9/d21346f7b60ed58789371358ed66b09d00f832e1bd7c06e55d9da5679882/regex-2026.5.9-cp313-cp313t-macosx_10_13_universal2.whl", hash = "sha256:01f28d868834624c934b8d2e0aa1c8341337e37831f4a012f18a5afcba4cbaf3", size = 494172, upload-time = "2026-05-09T23:13:35.935Z" }, + { url = "https://files.pythonhosted.org/packages/c4/43/fd1177a2032037c681baecdb3422ee4e1424aec4e4f470ef47793d325274/regex-2026.5.9-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:48036f6374aaa79eb3b754ec29c61d1c6b1606749d705a13f8854fa2539671f6", size = 293952, upload-time = "2026-05-09T23:13:38.307Z" }, + { url = "https://files.pythonhosted.org/packages/f2/7d/9fbf919768368d3f8a4f6c692cf2aa61e482b2b81ec6a298ace4cbf02480/regex-2026.5.9-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:b96350aa424e79d4fd6b567b344dcbe2b2d6bfc48dfe7717587e1fa6d43da6ff", size = 292314, upload-time = "2026-05-09T23:13:40.353Z" }, + { url = "https://files.pythonhosted.org/packages/e2/6c/e41bfeecb589716843e7c4df09ba46ff2a42961457afece19059d85caeef/regex-2026.5.9-cp313-cp313t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:8f3af7a4903c5c04a11a196a5aa75cdd7dd3f8508132f9fb3259d9f5908e3b88", size = 811681, upload-time = "2026-05-09T23:13:42.543Z" }, + { url = "https://files.pythonhosted.org/packages/87/83/a5c1c525fba0aa656e88ad0face0b1829788ef4c2fb6b26df58aa1151b84/regex-2026.5.9-cp313-cp313t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:7e87577720152d2caae19fe2baaf1f8d5ca12091e9e229f03915c37d1e4b9178", size = 871135, upload-time = "2026-05-09T23:13:44.326Z" }, + { url = "https://files.pythonhosted.org/packages/18/d4/80882e799e440dd878b0979cbebf8fa4d54624a332c83037c7a701649e3f/regex-2026.5.9-cp313-cp313t-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:c8b9b9d294cfea3cd19c718ade7cc93492b2c4991abd9a68d0b3477ae6d8e100", size = 917265, upload-time = "2026-05-09T23:13:47.295Z" }, + { url = "https://files.pythonhosted.org/packages/ae/ff/8db60211e2286e396aad7dc7725356c502bff0901ea05bd6cdc2e1a042b9/regex-2026.5.9-cp313-cp313t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:728d8bfd28a8845c8b6bc5dc7ce010453d206396786c0765c2740cb65f37791e", size = 816311, upload-time = "2026-05-09T23:13:49.885Z" }, + { url = "https://files.pythonhosted.org/packages/4c/47/742ef579c61730f8d268e5cf1f9ce0e37e2ea041ad0f5644724f2378e463/regex-2026.5.9-cp313-cp313t-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:7e30b874d341fac767d7df5a0870540541c2c054b80cfaac116e8d367a8a7ff2", size = 785498, upload-time = "2026-05-09T23:13:52.25Z" }, + { url = "https://files.pythonhosted.org/packages/7f/ab/cb0999802dcb0fb95b1ab005e8d4163d8afdd67efc2cb6b6630ac13f8cb1/regex-2026.5.9-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:fd190e88a895a8901325fad284a3f74ea52b1da8525b76cc811fa9b1edf0ce2b", size = 801348, upload-time = "2026-05-09T23:13:54.127Z" }, + { url = "https://files.pythonhosted.org/packages/7d/62/8ca59a24c55bc34d166eefaf3717bd77772f329fdbf984d86581e0a3571c/regex-2026.5.9-cp313-cp313t-musllinux_1_2_ppc64le.whl", hash = "sha256:8e76e8161ad00694cfce6767d5dea860c6391ac5b83e5c3a39661e696f11fc7e", size = 866493, upload-time = "2026-05-09T23:13:56.067Z" }, + { url = "https://files.pythonhosted.org/packages/8d/3d/30f2ae62cef3278bb5bb821f467277a55fb73f01032cf85997e15e8289a8/regex-2026.5.9-cp313-cp313t-musllinux_1_2_riscv64.whl", hash = "sha256:ddda5340e6c01a293027dd46232fa79eaff1b48058ce7a98f572b6445b088041", size = 772811, upload-time = "2026-05-09T23:13:57.867Z" }, + { url = "https://files.pythonhosted.org/packages/d8/ae/7d2089bcd78ad0c0161bc684339df50032acb438a7bd3305e7ddb1193cec/regex-2026.5.9-cp313-cp313t-musllinux_1_2_s390x.whl", hash = "sha256:205109e96b3cf5adf8f4cd62bedde9487feb282b9497a3535451e5a24cd706a0", size = 856584, upload-time = "2026-05-09T23:13:59.679Z" }, + { url = "https://files.pythonhosted.org/packages/a9/29/92ff47f75990131ea4f24ba17819e5a9d141e10819807e09addd73409af6/regex-2026.5.9-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:dfbe4579b9f08036aa7d101d1835437a20783574ac66327e6b29b4018a138081", size = 803453, upload-time = "2026-05-09T23:14:01.978Z" }, + { url = "https://files.pythonhosted.org/packages/04/99/eff29f1037dcab36702c9ee5d6858cf1ce2336ea8ea2987f64245b99ea5e/regex-2026.5.9-cp313-cp313t-win32.whl", hash = "sha256:ed2c9e8068b614c574d8d30e543d617cf5379b0535d46f97ef00e904745a08b5", size = 269951, upload-time = "2026-05-09T23:14:03.661Z" }, + { url = "https://files.pythonhosted.org/packages/0e/9d/8870b8981d27b22cda77bb26a5ac7ebfa9c7d9e0dea195a834a82380e748/regex-2026.5.9-cp313-cp313t-win_amd64.whl", hash = "sha256:b46b0f094dc1d3b90356c85a0bd2c9bafc4a6a190b9d6f8ddd5a033b6e088ed4", size = 281240, upload-time = "2026-05-09T23:14:05.56Z" }, + { url = "https://files.pythonhosted.org/packages/72/b1/3379415e8f135c13ac551353397cc4fe97b4978f3cac73c5fcbcded548b8/regex-2026.5.9-cp313-cp313t-win_arm64.whl", hash = "sha256:872acc074bd29ffc9913ecdfedf6ea77502312ca44a4aa0d3779089c6069d8de", size = 272383, upload-time = "2026-05-09T23:14:07.843Z" }, + { url = "https://files.pythonhosted.org/packages/13/3e/9c3cd292d8808b3645a2ce517e200179b6d0e903f176300bd8b542e14de5/regex-2026.5.9-cp314-cp314-macosx_10_13_universal2.whl", hash = "sha256:1bd7587a2948b4085195d5a3374eaf4a425dc3e55784c038175355ecf3bbbf8a", size = 490376, upload-time = "2026-05-09T23:14:09.64Z" }, + { url = "https://files.pythonhosted.org/packages/60/70/d43ee8a2ca0a8b68d167f21658b85520ac0574617c7f320367c5047f7556/regex-2026.5.9-cp314-cp314-macosx_10_13_x86_64.whl", hash = "sha256:dea2e88e1cce4522496cce630e11e67b98b7076620bc4336c3f674bc21a375f4", size = 291964, upload-time = "2026-05-09T23:14:11.424Z" }, + { url = "https://files.pythonhosted.org/packages/21/91/9d50b433828d8e74196904e168a43abf1e6e88b2a15d47ed742456720c37/regex-2026.5.9-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:2099f7e7ff7b6aa3192312650a56e91cc091e49d50b04e4f6f8b6e28b3b27f1c", size = 289682, upload-time = "2026-05-09T23:14:13.123Z" }, + { url = "https://files.pythonhosted.org/packages/3e/d2/b835e3cafbb9d977736912436259ff551d60919f7d7b3d37d46659c63564/regex-2026.5.9-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:ecd353045824e4477562a2ac718c25799cdaaa41f7aa925a806a8a3e6848a5b9", size = 796996, upload-time = "2026-05-09T23:14:14.923Z" }, + { url = "https://files.pythonhosted.org/packages/2c/a6/9f992d00019166b9de01c546dd4549bc679f2a68df11b877740b0760b7c2/regex-2026.5.9-cp314-cp314-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:65c8c8c37377794bd5b2f3ebe51919042bf17aec802e23c833d89782ed0c78af", size = 866089, upload-time = "2026-05-09T23:14:17.757Z" }, + { url = "https://files.pythonhosted.org/packages/e0/08/4d32af657e049b19cb62b02e46e38fe1518797bfb2203ee93a510b21b0dc/regex-2026.5.9-cp314-cp314-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:5b73ab8afcf66c622db143d1c6fda4e58e4d537ee4f125229ad47b1ab80f34c0", size = 911530, upload-time = "2026-05-09T23:14:20.353Z" }, + { url = "https://files.pythonhosted.org/packages/d9/27/2af43dd1dc201d1fecefda64a45f4ad0995855b92724f795a777b402ee69/regex-2026.5.9-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:0de5cf193997384ed2ca6f1cd4f78055b255d93d82d5a8cd6ba0d11c10b167e4", size = 800643, upload-time = "2026-05-09T23:14:22.265Z" }, + { url = "https://files.pythonhosted.org/packages/a4/dd/23a249047013b5321d4a60c4d2437462086f601b061776a525e5fba2a59f/regex-2026.5.9-cp314-cp314-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:d641a8c9a61618047796d572a39a79b26167b0411d2c3031937b2fe2d081e2cf", size = 777223, upload-time = "2026-05-09T23:14:24.179Z" }, + { url = "https://files.pythonhosted.org/packages/94/6a/e85ed9538cd19586d0465076a4578a12e093ce776d15f3f8ce92733a8dd6/regex-2026.5.9-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:24b2355ef5cc9aa5b8f07d17704face1c166fdcc2290fa7bd6e6c925655a8346", size = 785760, upload-time = "2026-05-09T23:14:26.065Z" }, + { url = "https://files.pythonhosted.org/packages/2a/c4/f25473209438638e947c55f9156fd8f236f74169229028cc99116380868e/regex-2026.5.9-cp314-cp314-musllinux_1_2_ppc64le.whl", hash = "sha256:a24852d3c29ad9e47593593d8a247c44ccc3d0548ef12c822d6ed0810affe676", size = 860891, upload-time = "2026-05-09T23:14:28.17Z" }, + { url = "https://files.pythonhosted.org/packages/f9/f7/f4f86e3c74419c37370e91f150ae0c2ef7d34b2e0e4cdd5da046a02e4022/regex-2026.5.9-cp314-cp314-musllinux_1_2_riscv64.whl", hash = "sha256:916714069da19329ef7de197dcbc77bb3104145c7c2c864dbfbe318f46b88b14", size = 765891, upload-time = "2026-05-09T23:14:30.06Z" }, + { url = "https://files.pythonhosted.org/packages/26/70/704d8e13765939146b1cd0ef4e2feb71d7929727d2290f026eed10095955/regex-2026.5.9-cp314-cp314-musllinux_1_2_s390x.whl", hash = "sha256:fa411799ca8da32a8d38d020a88faa5b6f91657d284761352940ecf9f7c3bbdd", size = 851380, upload-time = "2026-05-09T23:14:32.123Z" }, + { url = "https://files.pythonhosted.org/packages/26/29/1a13582a8460038edc38e49f64ceb0dd7c60f5caba77571f4bf6601965d9/regex-2026.5.9-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:1e6da47d679b7010ef27556b6e0f99771b744936db1792a10ceac6547ae1503e", size = 789350, upload-time = "2026-05-09T23:14:34.799Z" }, + { url = "https://files.pythonhosted.org/packages/73/56/3dcafe34fc72e271d62ad9a291801e88a1457bb251c132f15fcc2e5aad1a/regex-2026.5.9-cp314-cp314-win32.whl", hash = "sha256:98bd73080e8756255137e1bd3f3f00295bbc5aa383c0e0f973920e9134d7c4ad", size = 272130, upload-time = "2026-05-09T23:14:36.729Z" }, + { url = "https://files.pythonhosted.org/packages/d0/9c/02eebf0be95efe416c664db7fb8b6b05b7a0b06a7544f2884f2558b0526f/regex-2026.5.9-cp314-cp314-win_amd64.whl", hash = "sha256:ff8d372ac2acdc048d1c19916f27ee61bc5722728458ba6ca5052f2c72d51763", size = 280999, upload-time = "2026-05-09T23:14:39.126Z" }, + { url = "https://files.pythonhosted.org/packages/70/5a/1dd1abee76cb7a846a0bcf42fdc87e5720c3c33c24f3e37814310a513d9f/regex-2026.5.9-cp314-cp314-win_arm64.whl", hash = "sha256:e1d93bf647916292e8edcec150c07ddf3dc50179ccaf770c04a7f9e452155372", size = 273500, upload-time = "2026-05-09T23:14:41.059Z" }, + { url = "https://files.pythonhosted.org/packages/86/c1/c5f619b0057a7965cb78ec559c1d7a45ce8c99a35bea95483d64959a93d9/regex-2026.5.9-cp314-cp314t-macosx_10_13_universal2.whl", hash = "sha256:83d0ee4a57d1c87cb549e195ec300b8f0ec3a82eba66d835e4e2ed8634fe4499", size = 494269, upload-time = "2026-05-09T23:14:42.869Z" }, + { url = "https://files.pythonhosted.org/packages/05/2c/5d01f1aee33de4bbe60c8452945bfc8477ca7c5ae4450f6bfe711036cb36/regex-2026.5.9-cp314-cp314t-macosx_10_13_x86_64.whl", hash = "sha256:d3d7eb5c9a7f6df82ed3cfac9beb93882a5cbcb5b8b157b56cb2b3b276574ac1", size = 293954, upload-time = "2026-05-09T23:14:44.822Z" }, + { url = "https://files.pythonhosted.org/packages/7a/fe/e8988b2ae2108c6ef71bd4aa8d87fbe257976dd0810e826cd75f701c68b6/regex-2026.5.9-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:075160bf16658e16d35233300b8453aac25de4cbea808d22348b6979668e924d", size = 292405, upload-time = "2026-05-09T23:14:47.211Z" }, + { url = "https://files.pythonhosted.org/packages/79/34/d2b0937faa7859263f7f0a3c6b103a1296306be6952dc173d0154e9a2f49/regex-2026.5.9-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:45375819235558a4ff1c4971dc32881f022613abdb180128f5cb4768c1765a1c", size = 811855, upload-time = "2026-05-09T23:14:49.21Z" }, + { url = "https://files.pythonhosted.org/packages/80/fe/daf53a47457a8486db66c66c01ceb9c2303eecee3f87197f1e77eb1a736d/regex-2026.5.9-cp314-cp314t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:ead4b163ac30a29574510cd4b3e2e985ac5290c05fc7095557d6a5f403fc31b5", size = 871189, upload-time = "2026-05-09T23:14:51.555Z" }, + { url = "https://files.pythonhosted.org/packages/1c/75/058fc4470cbfbf57d800aff1a0022b929a3f9fa553ee10a0cdf2070eb31f/regex-2026.5.9-cp314-cp314t-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:8c6e4218fbdfbcd4f6c19efca40930d24a621bf4b48cb76bc6640543bd28ef20", size = 917485, upload-time = "2026-05-09T23:14:53.633Z" }, + { url = "https://files.pythonhosted.org/packages/88/e7/179cfda3a28bc843b5c6cfe7f79f23489c791ed95f151083803660878432/regex-2026.5.9-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:6351571c8a42b505eb555c0dc47d740d0fb66977dc142919eea6f4325b7c56a0", size = 816369, upload-time = "2026-05-09T23:14:56.198Z" }, + { url = "https://files.pythonhosted.org/packages/41/90/6f0cc422071688266d344fca8462d787cba0a2c144acb25721f9a61ec265/regex-2026.5.9-cp314-cp314t-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:002205cafd2a9e78c6290c7d1df277bf3277b3b7a30e0b4bb0dac2e2e3f7cb2d", size = 785869, upload-time = "2026-05-09T23:14:58.602Z" }, + { url = "https://files.pythonhosted.org/packages/02/67/a31f1760f09c27b251ef39e9beb541f462cf977381d067faa764c2c0e393/regex-2026.5.9-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:8abd33fef90b2a9efac5557d6033ca82d1195ed3a15fea5af15ba7b463c6a63b", size = 801427, upload-time = "2026-05-09T23:15:00.642Z" }, + { url = "https://files.pythonhosted.org/packages/e3/c4/1a80654597b6bc1e1ea0494824c31200e8a956abe290afae9b19a166a148/regex-2026.5.9-cp314-cp314t-musllinux_1_2_ppc64le.whl", hash = "sha256:31037c82eccb44b7ea2e9e221d7c01429430e989a1f4b91ea5a855f6017b509a", size = 866482, upload-time = "2026-05-09T23:15:03.384Z" }, + { url = "https://files.pythonhosted.org/packages/d1/11/960724e06482c08466ff5611e242e86f80062949cdf6b4b9cc317b9dd93d/regex-2026.5.9-cp314-cp314t-musllinux_1_2_riscv64.whl", hash = "sha256:5604dfd046dc37eca90250fc3be938b076c8059fa772ac0ed6f499b0f0fb0415", size = 773022, upload-time = "2026-05-09T23:15:05.625Z" }, + { url = "https://files.pythonhosted.org/packages/50/a8/a9979c3e7918280e93159ebcab5ef1a65116dd4f3bd6091be0eae4a126e8/regex-2026.5.9-cp314-cp314t-musllinux_1_2_s390x.whl", hash = "sha256:0e1b1b4e496afbb24f4a62aba855ee4f88f25578927697b340702e48c9ee6bc2", size = 856642, upload-time = "2026-05-09T23:15:07.966Z" }, + { url = "https://files.pythonhosted.org/packages/fe/d4/a9b732f2f0072c0ab12227483abb24fffcb9f73f8a2b203df0a6d0434735/regex-2026.5.9-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:be3372b9df6ddecff6486d37e19095a7b4973137caf5512407a89f4455361f41", size = 803552, upload-time = "2026-05-09T23:15:10.215Z" }, + { url = "https://files.pythonhosted.org/packages/d5/fe/1b3113817447a1d4155e4ac76d2e072f42c0bcba2f43fa8a0e756ea2cd91/regex-2026.5.9-cp314-cp314t-win32.whl", hash = "sha256:3ddd90103f9e5c471c49c7852ecc1fe27c7e45eb99e977aefe7caa4e779f4f58", size = 275746, upload-time = "2026-05-09T23:15:12.609Z" }, + { url = "https://files.pythonhosted.org/packages/92/73/93d42045302636c91f2e5ef588b65b84b01428f28ec77de256b1dfdfbe5c/regex-2026.5.9-cp314-cp314t-win_amd64.whl", hash = "sha256:ca518ed29c46eecba6010b15f1b9a479314d2de409536e71b6a13aa04e3b8a77", size = 285685, upload-time = "2026-05-09T23:15:15.086Z" }, + { url = "https://files.pythonhosted.org/packages/da/80/35b4c33c804a165a7f55289afda3ea9e3eb6d15800341a2d66455c0f1f30/regex-2026.5.9-cp314-cp314t-win_arm64.whl", hash = "sha256:5e41809d2683fcde7d5a8c87a6567ba1fb1ce0de9f31bff578de00a4b2d76daa", size = 275713, upload-time = "2026-05-09T23:15:16.98Z" }, +] + +[[package]] +name = "rich" +version = "15.0.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "markdown-it-py" }, + { name = "pygments" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/c0/8f/0722ca900cc807c13a6a0c696dacf35430f72e0ec571c4275d2371fca3e9/rich-15.0.0.tar.gz", hash = "sha256:edd07a4824c6b40189fb7ac9bc4c52536e9780fbbfbddf6f1e2502c31b068c36", size = 230680, upload-time = "2026-04-12T08:24:00.75Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/82/3b/64d4899d73f91ba49a8c18a8ff3f0ea8f1c1d75481760df8c68ef5235bf5/rich-15.0.0-py3-none-any.whl", hash = "sha256:33bd4ef74232fb73fe9279a257718407f169c09b78a87ad3d296f548e27de0bb", size = 310654, upload-time = "2026-04-12T08:24:02.83Z" }, +] + +[[package]] +name = "safetensors" +version = "0.8.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/45/06/f955dbbb1859e3bd23c8ac6141af5106e7ad5fedec4a3a6e3d60f94b7001/safetensors-0.8.0.tar.gz", hash = "sha256:fabaf3e0f18a6618d9b36560682562157f77c2b71fcffc7b432be2baed9d753d", size = 325846, upload-time = "2026-06-09T07:52:25.563Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/39/a0/f718cda65b05407d228f97602cf60dca269c979867aa5beb25410de26cd3/safetensors-0.8.0-cp310-abi3-macosx_10_12_x86_64.whl", hash = "sha256:c554f85858e05226d3c2828e32395e677434685d6d94594a41643361c5e837f0", size = 473568, upload-time = "2026-06-09T07:52:18.829Z" }, + { url = "https://files.pythonhosted.org/packages/f5/b1/fa7c600e7dceae12e9606c7578cbc9ff1e1ed55844883ee5c92205e86226/safetensors-0.8.0-cp310-abi3-macosx_11_0_arm64.whl", hash = "sha256:c80201d22cbf405b80647a60ada77bba06c8fba2da2743ba1e89cdcc39a81f25", size = 484562, upload-time = "2026-06-09T07:52:17.518Z" }, + { url = "https://files.pythonhosted.org/packages/09/7d/65a7de0af421317bb36a067241e4235fff194eed60b961ed6d3f59a3fc60/safetensors-0.8.0-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:7a46e5ff292c356d6991e60942ba7f79817682d3a2cef0702136448cb9c4d235", size = 502844, upload-time = "2026-06-09T07:52:07.624Z" }, + { url = "https://files.pythonhosted.org/packages/91/4f/3175c9d75634e0e0dda0082794193521035edd7c70a6f212bf33ca06ddf4/safetensors-0.8.0-cp310-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:4124502b78f03534117c848f87a39b8f31e577b15eff423bf8bfb95f2a8c30d0", size = 511823, upload-time = "2026-06-09T07:52:09.565Z" }, + { url = "https://files.pythonhosted.org/packages/20/87/846c289e7aa2299eff406335717cf43ce8777194ece8aad75772e0411615/safetensors-0.8.0-cp310-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:7bc0a787ba8a35be368ee3574edfa2b1ad389eebd0a72e482ae275490e3f6c98", size = 633461, upload-time = "2026-06-09T07:52:11.128Z" }, + { url = "https://files.pythonhosted.org/packages/76/22/8d64d9df2c45d5ded401df889d0ad90882804ca172d79ec4f0df8f727fe0/safetensors-0.8.0-cp310-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:040070828e36dc8e122178bbbd5830ff9e97920affb84cbe0f46442497bed358", size = 545148, upload-time = "2026-06-09T07:52:13.603Z" }, + { url = "https://files.pythonhosted.org/packages/28/50/f203ff3a3ddfe19308efc83c5a3a29ed02bf786732ec35e68bf9162f3365/safetensors-0.8.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:fd6f3f93c9a0a7cc2788ee63fb763353d4bd2e89b0751bc78fcf7dda00bea774", size = 516040, upload-time = "2026-06-09T07:52:16.29Z" }, + { url = "https://files.pythonhosted.org/packages/46/fb/cdaed17ceb2948784fd9c36b6fd3e951b608547cea81a48e8ee6f8cfdfcb/safetensors-0.8.0-cp310-abi3-manylinux_2_31_riscv64.whl", hash = "sha256:fcdd41ec4628fee5799f807c73c353629130fbd942aa23d83c623dd6c9d52d78", size = 513832, upload-time = "2026-06-09T07:52:12.37Z" }, + { url = "https://files.pythonhosted.org/packages/0d/49/1e15de264dcc3b77943d2d0c56a95809956883b1c2d6d585c792523f180b/safetensors-0.8.0-cp310-abi3-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:8e9f537aa183a38ace122d27303dcd986b26bd2a7591f9181d7f0c396f4677ca", size = 559930, upload-time = "2026-06-09T07:52:14.743Z" }, + { url = "https://files.pythonhosted.org/packages/2a/43/bf38443278eab4b1be1fce2931e2b012ad9cb7df52ada751d0aab8f7659a/safetensors-0.8.0-cp310-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:87eec7ffed2b809f05a398a8becb7d013f19f7837cd15d9748580d6cf30dbaf4", size = 678670, upload-time = "2026-06-09T07:52:20.032Z" }, + { url = "https://files.pythonhosted.org/packages/72/e3/68cd3fa5b48488e84add63e04cb12f3bc28ae4638c06d4508c6e88823d0e/safetensors-0.8.0-cp310-abi3-musllinux_1_2_armv7l.whl", hash = "sha256:4a95ae2b05d7726d751da4ebf626a2ca782b706e101bd894c95bc2450b1cffcc", size = 786679, upload-time = "2026-06-09T07:52:21.322Z" }, + { url = "https://files.pythonhosted.org/packages/29/4b/1c19c509d56e01f4fbb3d0a2e597450f6cc04d1d56cf52defb0a62dfd715/safetensors-0.8.0-cp310-abi3-musllinux_1_2_i686.whl", hash = "sha256:3ae091f16662658bdc019a4ff6cb4c085bb7d725eb5978b183ffd265863b6d2d", size = 765683, upload-time = "2026-06-09T07:52:22.594Z" }, + { url = "https://files.pythonhosted.org/packages/27/43/41c1621732edd934d868a00d1b891584c892a7b62a9aab82ea5a0a5623ee/safetensors-0.8.0-cp310-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:8e080062fcde23be189565e1c3305d16751a218ecf9412c8601e64204eb6f846", size = 722361, upload-time = "2026-06-09T07:52:23.924Z" }, + { url = "https://files.pythonhosted.org/packages/8e/3f/73ccf82579412b4a71c4ca673f10b5f1f888d7cf5af7fe24f27d30307be4/safetensors-0.8.0-cp310-abi3-win32.whl", hash = "sha256:2ddf52eac562eda224f99acfa7889d02968c1fd59a5b011ae7d8137c37e9c02d", size = 342401, upload-time = "2026-06-09T07:52:28.895Z" }, + { url = "https://files.pythonhosted.org/packages/1b/6d/3fba214c1e5e0f69991677ec3bc17023f0421776975e1de0c682dca475e2/safetensors-0.8.0-cp310-abi3-win_amd64.whl", hash = "sha256:096ec1a98435df7beb08853bb5aa9081a84f23d0adc67ed1a0a10550f608373f", size = 355540, upload-time = "2026-06-09T07:52:27.832Z" }, + { url = "https://files.pythonhosted.org/packages/8d/fc/7eedc3510d97878876e32774eebbeb61c43f148a96e915c84229a3e967aa/safetensors-0.8.0-cp310-abi3-win_arm64.whl", hash = "sha256:f7838e5135a406ad3e02efdcb8cf2e5397d368b0154537c4fec682dbc544d452", size = 340500, upload-time = "2026-06-09T07:52:26.745Z" }, +] + +[[package]] +name = "scikit-learn" +version = "1.9.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "joblib" }, + { name = "narwhals" }, + { name = "numpy" }, + { name = "scipy" }, + { name = "threadpoolctl" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/fa/6f/37092bdb25f712817231799fc5674d8e704066a8a70c1d2d40517e18b4ab/scikit_learn-1.9.0.tar.gz", hash = "sha256:8833266989d3a5110178a9fae30783675460724d0e1efb13b14901d2c660c557", size = 7750767, upload-time = "2026-06-02T11:54:32.706Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/ac/20/75f915ff375d6249e6550ac740fdbbd66159a068fd3af1400ff62036b07a/scikit_learn-1.9.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:2bd41b0d201bc81575531b96b713d3eb5e5f50fb0b82101ff0f92294fdc236ac", size = 8741122, upload-time = "2026-06-02T11:53:24.08Z" }, + { url = "https://files.pythonhosted.org/packages/cc/d5/2b5148f2279196775e1db2aeb85d14b70ac80e7e32b3b28e7ebeafb0901d/scikit_learn-1.9.0-cp312-cp312-macosx_12_0_arm64.whl", hash = "sha256:5be45aa4a42a68a533913a6ed736cf309de2226411c79ef8d609a5456f1939b1", size = 8261512, upload-time = "2026-06-02T11:53:27.183Z" }, + { url = "https://files.pythonhosted.org/packages/a0/ee/5adbc77656b71f9456a2f5a7a9fdb4bcf9207a6b962889f1c2f9323afa4e/scikit_learn-1.9.0-cp312-cp312-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:5e50ed4da51974e86e940690e9a3d82e729b62b5a49f7c9bac534d515d39d86f", size = 8837603, upload-time = "2026-06-02T11:53:30.328Z" }, + { url = "https://files.pythonhosted.org/packages/6c/c2/63fdda36c56437eeb44aaf9493c8bcd62ce230ab1598924fc626ffbfa943/scikit_learn-1.9.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:056c92bb67ad4c28463c2f2653d9701449201e7e7a9e94e321be0f71c4fef2b8", size = 9132097, upload-time = "2026-06-02T11:53:33.456Z" }, + { url = "https://files.pythonhosted.org/packages/83/a4/c8e67227c680e2259c8864ae72ff48b06e16a6f51253a22167aa02a8aa4e/scikit_learn-1.9.0-cp312-cp312-win_amd64.whl", hash = "sha256:4306775fad04cc4b472a1b15af1ae9cede1540fbfcc17fbce3767cd8dc7ae283", size = 8211173, upload-time = "2026-06-02T11:53:36.602Z" }, + { url = "https://files.pythonhosted.org/packages/cf/fd/3c0863792e98e67e9184aa4029288a175935eb65443afcd30d4f143450cf/scikit_learn-1.9.0-cp312-cp312-win_arm64.whl", hash = "sha256:26e22435f63bcdcf396b574273f29f13dd531f5ea035801f5be10ba1540a4e60", size = 7867451, upload-time = "2026-06-02T11:53:39.075Z" }, + { url = "https://files.pythonhosted.org/packages/3c/01/cf3310626b6d48d3e9be69a1223f9180360b5e6edb045f50fade723ce494/scikit_learn-1.9.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:80746d63bd4b6eaca54d36fe5feaf4d28bb38dc6f9470f81c7cad7c40155f119", size = 8705188, upload-time = "2026-06-02T11:53:41.964Z" }, + { url = "https://files.pythonhosted.org/packages/3e/04/5acd7ae280c5f93b6ac5ef6cdec14eef4c8d1cd91d85b3292989c94d96b1/scikit_learn-1.9.0-cp313-cp313-macosx_12_0_arm64.whl", hash = "sha256:5b934c45c252844a91d69fda3a34cff5e7307e1db10d77cb10a3980312c74713", size = 8228299, upload-time = "2026-06-02T11:53:44.817Z" }, + { url = "https://files.pythonhosted.org/packages/0c/39/ffe829a5b8ecb40a518724a997794657fdc354ada5e8fe8e64d998c0bac9/scikit_learn-1.9.0-cp313-cp313-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:38c3dcb9a1ffb85505ec53d54c7b4aea0cff70050425a7760c2af661ac85df05", size = 8789690, upload-time = "2026-06-02T11:53:47.461Z" }, + { url = "https://files.pythonhosted.org/packages/1f/88/8dab5de10c638c083772a6be83a3d8106ced492f74a928c8693638e5bb50/scikit_learn-1.9.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:da76d09304a4706db7cc1e3ebaa3b6b98a67365cc11d2996c4f1e58ba47df714", size = 9087723, upload-time = "2026-06-02T11:53:50.702Z" }, + { url = "https://files.pythonhosted.org/packages/20/3f/7917ca72464038f6240ec70c29f94862d08a34a74291ae4d4ec5eb8186a0/scikit_learn-1.9.0-cp313-cp313-win_amd64.whl", hash = "sha256:5808d98f15c6bf6d9d96d2348c1997392a5888ce7097e664105f930c4bca1277", size = 8184330, upload-time = "2026-06-02T11:53:53.396Z" }, + { url = "https://files.pythonhosted.org/packages/78/c7/15739eb2f61fda3c54639e9942414e5a19ad8a8d1f5a3266afad7cb7df80/scikit_learn-1.9.0-cp313-cp313-win_arm64.whl", hash = "sha256:d77f54c017633791bc0225a43e2f8d03745fdcfe4880268fcc4df15f505dec2e", size = 7840653, upload-time = "2026-06-02T11:53:56.035Z" }, + { url = "https://files.pythonhosted.org/packages/f4/7d/c9a35cf59b20a86fec24d306f1547b78dec194b08d367ce2a3e4854169d9/scikit_learn-1.9.0-cp314-cp314-macosx_10_15_x86_64.whl", hash = "sha256:9656acd4e93f74e0b66c8a36c88830a99252dfa900044d36bc2212ae89a47162", size = 8713289, upload-time = "2026-06-02T11:53:58.788Z" }, + { url = "https://files.pythonhosted.org/packages/3c/a7/552a7821597c632b907f7bfe8f36f9f572777af8ef8a48353041cf8e091a/scikit_learn-1.9.0-cp314-cp314-macosx_12_0_arm64.whl", hash = "sha256:24360002ae845e7866522b0a5bbf690802e7bc388cac8663502e78aa98598aa2", size = 8245141, upload-time = "2026-06-02T11:54:01.694Z" }, + { url = "https://files.pythonhosted.org/packages/7d/79/f4a0c4fe9711154cddabf913471153af79056382ddc612cfe5ee0ff4b72e/scikit_learn-1.9.0-cp314-cp314-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:5162ad10a418c8a282dde04c9aa06965de3e9a65f33c1440c0ae69bb1a09d913", size = 8847671, upload-time = "2026-06-02T11:54:04.448Z" }, + { url = "https://files.pythonhosted.org/packages/f0/af/4d72d9e475ac83719160c662619e4bf7b95c19507cd582e7d0167a3c3dae/scikit_learn-1.9.0-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:1fea2cc5677ab49d6f5bade978c866da44957b712d92e9635e8b4f723013c3cb", size = 9118104, upload-time = "2026-06-02T11:54:07.205Z" }, + { url = "https://files.pythonhosted.org/packages/a2/d5/6a58eea2cb9abbb9b3f2bb8b2cfb3243d1152d69f442d256c7af71304769/scikit_learn-1.9.0-cp314-cp314-win_amd64.whl", hash = "sha256:64fa347efc1c839c487433e40c5144d38c336e8a2b59c81aa8660373945c2673", size = 8290674, upload-time = "2026-06-02T11:54:10.087Z" }, + { url = "https://files.pythonhosted.org/packages/65/5b/d4c879cf358f1187141cf90ced473f087183489090244f50c124a2ee478b/scikit_learn-1.9.0-cp314-cp314-win_arm64.whl", hash = "sha256:1b944b6db288f6b926e3650026ddafb988929de95d11fc2cc5fa117773c9ba42", size = 7978807, upload-time = "2026-06-02T11:54:12.769Z" }, + { url = "https://files.pythonhosted.org/packages/8a/43/bfae3121ec67ae09150d453c442c7c1cc166e9aefe056e6ab3b7728a5cfc/scikit_learn-1.9.0-cp314-cp314t-macosx_10_15_x86_64.whl", hash = "sha256:4ccacf04ca5f4b492158a5f28afe0ace43f81b2571e4b9a66d34848b46128949", size = 9031941, upload-time = "2026-06-02T11:54:15.436Z" }, + { url = "https://files.pythonhosted.org/packages/75/b0/20a4546eb17f3b25d3c66df15810411c14ed5065bcfab50b53c96fb627b2/scikit_learn-1.9.0-cp314-cp314t-macosx_12_0_arm64.whl", hash = "sha256:ee1a8db2c18c08e34c7412d4b10be1cac214cd4ea7dc9715a6a327eb49a37c96", size = 8613528, upload-time = "2026-06-02T11:54:18.842Z" }, + { url = "https://files.pythonhosted.org/packages/18/3c/e440e039bb82cd19004edaaad00acbde0fb9b461083c3ecf37941c557312/scikit_learn-1.9.0-cp314-cp314t-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:147e9329ef0e39f75d4cffa02b2aa48d827832684926cd5210d9a2cb5c57246b", size = 8855050, upload-time = "2026-06-02T11:54:21.699Z" }, + { url = "https://files.pythonhosted.org/packages/43/26/b341b8dab5998da6270a3a42c2152c578501354d36f944b5856757035ef8/scikit_learn-1.9.0-cp314-cp314t-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:5bad8f8b9950321b54c965fdcbac6c6c55e79e16646b49977bcf3668d3870a1a", size = 9097190, upload-time = "2026-06-02T11:54:24.454Z" }, + { url = "https://files.pythonhosted.org/packages/fb/de/b650b4d69b84468cfa2e28a3ff7b8103743029e6446ce1a97fe060ef688c/scikit_learn-1.9.0-cp314-cp314t-win_amd64.whl", hash = "sha256:78fc56eafd4edb9575d2d8950d1dd152061abb573341a1cb7e099fc40f6c6666", size = 8963204, upload-time = "2026-06-02T11:54:27.428Z" }, + { url = "https://files.pythonhosted.org/packages/ee/f3/ff83d76d7418112e5a61326443cdda87be3545dd8d6599c95b2481a4419e/scikit_learn-1.9.0-cp314-cp314t-win_arm64.whl", hash = "sha256:051075bda8b7aab87b1906ab3d4740a1e1224a19d7b3781a576736edc94e76aa", size = 8222661, upload-time = "2026-06-02T11:54:30.192Z" }, +] + +[[package]] +name = "scipy" +version = "1.17.1" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "numpy" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/7a/97/5a3609c4f8d58b039179648e62dd220f89864f56f7357f5d4f45c29eb2cc/scipy-1.17.1.tar.gz", hash = "sha256:95d8e012d8cb8816c226aef832200b1d45109ed4464303e997c5b13122b297c0", size = 30573822, upload-time = "2026-02-23T00:26:24.851Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/35/48/b992b488d6f299dbe3f11a20b24d3dda3d46f1a635ede1c46b5b17a7b163/scipy-1.17.1-cp312-cp312-macosx_10_14_x86_64.whl", hash = "sha256:35c3a56d2ef83efc372eaec584314bd0ef2e2f0d2adb21c55e6ad5b344c0dcb8", size = 31610954, upload-time = "2026-02-23T00:17:49.855Z" }, + { url = "https://files.pythonhosted.org/packages/b2/02/cf107b01494c19dc100f1d0b7ac3cc08666e96ba2d64db7626066cee895e/scipy-1.17.1-cp312-cp312-macosx_12_0_arm64.whl", hash = "sha256:fcb310ddb270a06114bb64bbe53c94926b943f5b7f0842194d585c65eb4edd76", size = 28172662, upload-time = "2026-02-23T00:18:01.64Z" }, + { url = "https://files.pythonhosted.org/packages/cf/a9/599c28631bad314d219cf9ffd40e985b24d603fc8a2f4ccc5ae8419a535b/scipy-1.17.1-cp312-cp312-macosx_14_0_arm64.whl", hash = "sha256:cc90d2e9c7e5c7f1a482c9875007c095c3194b1cfedca3c2f3291cdc2bc7c086", size = 20344366, upload-time = "2026-02-23T00:18:12.015Z" }, + { url = "https://files.pythonhosted.org/packages/35/f5/906eda513271c8deb5af284e5ef0206d17a96239af79f9fa0aebfe0e36b4/scipy-1.17.1-cp312-cp312-macosx_14_0_x86_64.whl", hash = "sha256:c80be5ede8f3f8eded4eff73cc99a25c388ce98e555b17d31da05287015ffa5b", size = 22704017, upload-time = "2026-02-23T00:18:21.502Z" }, + { url = "https://files.pythonhosted.org/packages/da/34/16f10e3042d2f1d6b66e0428308ab52224b6a23049cb2f5c1756f713815f/scipy-1.17.1-cp312-cp312-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:e19ebea31758fac5893a2ac360fedd00116cbb7628e650842a6691ba7ca28a21", size = 32927842, upload-time = "2026-02-23T00:18:35.367Z" }, + { url = "https://files.pythonhosted.org/packages/01/8e/1e35281b8ab6d5d72ebe9911edcdffa3f36b04ed9d51dec6dd140396e220/scipy-1.17.1-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:02ae3b274fde71c5e92ac4d54bc06c42d80e399fec704383dcd99b301df37458", size = 35235890, upload-time = "2026-02-23T00:18:49.188Z" }, + { url = "https://files.pythonhosted.org/packages/c5/5c/9d7f4c88bea6e0d5a4f1bc0506a53a00e9fcb198de372bfe4d3652cef482/scipy-1.17.1-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:8a604bae87c6195d8b1045eddece0514d041604b14f2727bbc2b3020172045eb", size = 35003557, upload-time = "2026-02-23T00:18:54.74Z" }, + { url = "https://files.pythonhosted.org/packages/65/94/7698add8f276dbab7a9de9fb6b0e02fc13ee61d51c7c3f85ac28b65e1239/scipy-1.17.1-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:f590cd684941912d10becc07325a3eeb77886fe981415660d9265c4c418d0bea", size = 37625856, upload-time = "2026-02-23T00:19:00.307Z" }, + { url = "https://files.pythonhosted.org/packages/a2/84/dc08d77fbf3d87d3ee27f6a0c6dcce1de5829a64f2eae85a0ecc1f0daa73/scipy-1.17.1-cp312-cp312-win_amd64.whl", hash = "sha256:41b71f4a3a4cab9d366cd9065b288efc4d4f3c0b37a91a8e0947fb5bd7f31d87", size = 36549682, upload-time = "2026-02-23T00:19:07.67Z" }, + { url = "https://files.pythonhosted.org/packages/bc/98/fe9ae9ffb3b54b62559f52dedaebe204b408db8109a8c66fdd04869e6424/scipy-1.17.1-cp312-cp312-win_arm64.whl", hash = "sha256:f4115102802df98b2b0db3cce5cb9b92572633a1197c77b7553e5203f284a5b3", size = 24547340, upload-time = "2026-02-23T00:19:12.024Z" }, + { url = "https://files.pythonhosted.org/packages/76/27/07ee1b57b65e92645f219b37148a7e7928b82e2b5dbeccecb4dff7c64f0b/scipy-1.17.1-cp313-cp313-macosx_10_14_x86_64.whl", hash = "sha256:5e3c5c011904115f88a39308379c17f91546f77c1667cea98739fe0fccea804c", size = 31590199, upload-time = "2026-02-23T00:19:17.192Z" }, + { url = "https://files.pythonhosted.org/packages/ec/ae/db19f8ab842e9b724bf5dbb7db29302a91f1e55bc4d04b1025d6d605a2c5/scipy-1.17.1-cp313-cp313-macosx_12_0_arm64.whl", hash = "sha256:6fac755ca3d2c3edcb22f479fceaa241704111414831ddd3bc6056e18516892f", size = 28154001, upload-time = "2026-02-23T00:19:22.241Z" }, + { url = "https://files.pythonhosted.org/packages/5b/58/3ce96251560107b381cbd6e8413c483bbb1228a6b919fa8652b0d4090e7f/scipy-1.17.1-cp313-cp313-macosx_14_0_arm64.whl", hash = "sha256:7ff200bf9d24f2e4d5dc6ee8c3ac64d739d3a89e2326ba68aaf6c4a2b838fd7d", size = 20325719, upload-time = "2026-02-23T00:19:26.329Z" }, + { url = "https://files.pythonhosted.org/packages/b2/83/15087d945e0e4d48ce2377498abf5ad171ae013232ae31d06f336e64c999/scipy-1.17.1-cp313-cp313-macosx_14_0_x86_64.whl", hash = "sha256:4b400bdc6f79fa02a4d86640310dde87a21fba0c979efff5248908c6f15fad1b", size = 22683595, upload-time = "2026-02-23T00:19:30.304Z" }, + { url = "https://files.pythonhosted.org/packages/b4/e0/e58fbde4a1a594c8be8114eb4aac1a55bcd6587047efc18a61eb1f5c0d30/scipy-1.17.1-cp313-cp313-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:2b64ca7d4aee0102a97f3ba22124052b4bd2152522355073580bf4845e2550b6", size = 32896429, upload-time = "2026-02-23T00:19:35.536Z" }, + { url = "https://files.pythonhosted.org/packages/f5/5f/f17563f28ff03c7b6799c50d01d5d856a1d55f2676f537ca8d28c7f627cd/scipy-1.17.1-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:581b2264fc0aa555f3f435a5944da7504ea3a065d7029ad60e7c3d1ae09c5464", size = 35203952, upload-time = "2026-02-23T00:19:42.259Z" }, + { url = "https://files.pythonhosted.org/packages/8d/a5/9afd17de24f657fdfe4df9a3f1ea049b39aef7c06000c13db1530d81ccca/scipy-1.17.1-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:beeda3d4ae615106d7094f7e7cef6218392e4465cc95d25f900bebabfded0950", size = 34979063, upload-time = "2026-02-23T00:19:47.547Z" }, + { url = "https://files.pythonhosted.org/packages/8b/13/88b1d2384b424bf7c924f2038c1c409f8d88bb2a8d49d097861dd64a57b2/scipy-1.17.1-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:6609bc224e9568f65064cfa72edc0f24ee6655b47575954ec6339534b2798369", size = 37598449, upload-time = "2026-02-23T00:19:53.238Z" }, + { url = "https://files.pythonhosted.org/packages/35/e5/d6d0e51fc888f692a35134336866341c08655d92614f492c6860dc45bb2c/scipy-1.17.1-cp313-cp313-win_amd64.whl", hash = "sha256:37425bc9175607b0268f493d79a292c39f9d001a357bebb6b88fdfaff13f6448", size = 36510943, upload-time = "2026-02-23T00:20:50.89Z" }, + { url = "https://files.pythonhosted.org/packages/2a/fd/3be73c564e2a01e690e19cc618811540ba5354c67c8680dce3281123fb79/scipy-1.17.1-cp313-cp313-win_arm64.whl", hash = "sha256:5cf36e801231b6a2059bf354720274b7558746f3b1a4efb43fcf557ccd484a87", size = 24545621, upload-time = "2026-02-23T00:20:55.871Z" }, + { url = "https://files.pythonhosted.org/packages/6f/6b/17787db8b8114933a66f9dcc479a8272e4b4da75fe03b0c282f7b0ade8cd/scipy-1.17.1-cp313-cp313t-macosx_10_14_x86_64.whl", hash = "sha256:d59c30000a16d8edc7e64152e30220bfbd724c9bbb08368c054e24c651314f0a", size = 31936708, upload-time = "2026-02-23T00:19:58.694Z" }, + { url = "https://files.pythonhosted.org/packages/38/2e/524405c2b6392765ab1e2b722a41d5da33dc5c7b7278184a8ad29b6cb206/scipy-1.17.1-cp313-cp313t-macosx_12_0_arm64.whl", hash = "sha256:010f4333c96c9bb1a4516269e33cb5917b08ef2166d5556ca2fd9f082a9e6ea0", size = 28570135, upload-time = "2026-02-23T00:20:03.934Z" }, + { url = "https://files.pythonhosted.org/packages/fd/c3/5bd7199f4ea8556c0c8e39f04ccb014ac37d1468e6cfa6a95c6b3562b76e/scipy-1.17.1-cp313-cp313t-macosx_14_0_arm64.whl", hash = "sha256:2ceb2d3e01c5f1d83c4189737a42d9cb2fc38a6eeed225e7515eef71ad301dce", size = 20741977, upload-time = "2026-02-23T00:20:07.935Z" }, + { url = "https://files.pythonhosted.org/packages/d9/b8/8ccd9b766ad14c78386599708eb745f6b44f08400a5fd0ade7cf89b6fc93/scipy-1.17.1-cp313-cp313t-macosx_14_0_x86_64.whl", hash = "sha256:844e165636711ef41f80b4103ed234181646b98a53c8f05da12ca5ca289134f6", size = 23029601, upload-time = "2026-02-23T00:20:12.161Z" }, + { url = "https://files.pythonhosted.org/packages/6d/a0/3cb6f4d2fb3e17428ad2880333cac878909ad1a89f678527b5328b93c1d4/scipy-1.17.1-cp313-cp313t-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:158dd96d2207e21c966063e1635b1063cd7787b627b6f07305315dd73d9c679e", size = 33019667, upload-time = "2026-02-23T00:20:17.208Z" }, + { url = "https://files.pythonhosted.org/packages/f3/c3/2d834a5ac7bf3a0c806ad1508efc02dda3c8c61472a56132d7894c312dea/scipy-1.17.1-cp313-cp313t-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:74cbb80d93260fe2ffa334efa24cb8f2f0f622a9b9febf8b483c0b865bfb3475", size = 35264159, upload-time = "2026-02-23T00:20:23.087Z" }, + { url = "https://files.pythonhosted.org/packages/4d/77/d3ed4becfdbd217c52062fafe35a72388d1bd82c2d0ba5ca19d6fcc93e11/scipy-1.17.1-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:dbc12c9f3d185f5c737d801da555fb74b3dcfa1a50b66a1a93e09190f41fab50", size = 35102771, upload-time = "2026-02-23T00:20:28.636Z" }, + { url = "https://files.pythonhosted.org/packages/bd/12/d19da97efde68ca1ee5538bb261d5d2c062f0c055575128f11a2730e3ac1/scipy-1.17.1-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:94055a11dfebe37c656e70317e1996dc197e1a15bbcc351bcdd4610e128fe1ca", size = 37665910, upload-time = "2026-02-23T00:20:34.743Z" }, + { url = "https://files.pythonhosted.org/packages/06/1c/1172a88d507a4baaf72c5a09bb6c018fe2ae0ab622e5830b703a46cc9e44/scipy-1.17.1-cp313-cp313t-win_amd64.whl", hash = "sha256:e30bdeaa5deed6bc27b4cc490823cd0347d7dae09119b8803ae576ea0ce52e4c", size = 36562980, upload-time = "2026-02-23T00:20:40.575Z" }, + { url = "https://files.pythonhosted.org/packages/70/b0/eb757336e5a76dfa7911f63252e3b7d1de00935d7705cf772db5b45ec238/scipy-1.17.1-cp313-cp313t-win_arm64.whl", hash = "sha256:a720477885a9d2411f94a93d16f9d89bad0f28ca23c3f8daa521e2dcc3f44d49", size = 24856543, upload-time = "2026-02-23T00:20:45.313Z" }, + { url = "https://files.pythonhosted.org/packages/cf/83/333afb452af6f0fd70414dc04f898647ee1423979ce02efa75c3b0f2c28e/scipy-1.17.1-cp314-cp314-macosx_10_14_x86_64.whl", hash = "sha256:a48a72c77a310327f6a3a920092fa2b8fd03d7deaa60f093038f22d98e096717", size = 31584510, upload-time = "2026-02-23T00:21:01.015Z" }, + { url = "https://files.pythonhosted.org/packages/ed/a6/d05a85fd51daeb2e4ea71d102f15b34fedca8e931af02594193ae4fd25f7/scipy-1.17.1-cp314-cp314-macosx_12_0_arm64.whl", hash = "sha256:45abad819184f07240d8a696117a7aacd39787af9e0b719d00285549ed19a1e9", size = 28170131, upload-time = "2026-02-23T00:21:05.888Z" }, + { url = "https://files.pythonhosted.org/packages/db/7b/8624a203326675d7746a254083a187398090a179335b2e4a20e2ddc46e83/scipy-1.17.1-cp314-cp314-macosx_14_0_arm64.whl", hash = "sha256:3fd1fcdab3ea951b610dc4cef356d416d5802991e7e32b5254828d342f7b7e0b", size = 20342032, upload-time = "2026-02-23T00:21:09.904Z" }, + { url = "https://files.pythonhosted.org/packages/c9/35/2c342897c00775d688d8ff3987aced3426858fd89d5a0e26e020b660b301/scipy-1.17.1-cp314-cp314-macosx_14_0_x86_64.whl", hash = "sha256:7bdf2da170b67fdf10bca777614b1c7d96ae3ca5794fd9587dce41eb2966e866", size = 22678766, upload-time = "2026-02-23T00:21:14.313Z" }, + { url = "https://files.pythonhosted.org/packages/ef/f2/7cdb8eb308a1a6ae1e19f945913c82c23c0c442a462a46480ce487fdc0ac/scipy-1.17.1-cp314-cp314-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:adb2642e060a6549c343603a3851ba76ef0b74cc8c079a9a58121c7ec9fe2350", size = 32957007, upload-time = "2026-02-23T00:21:19.663Z" }, + { url = "https://files.pythonhosted.org/packages/0b/2e/7eea398450457ecb54e18e9d10110993fa65561c4f3add5e8eccd2b9cd41/scipy-1.17.1-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:eee2cfda04c00a857206a4330f0c5e3e56535494e30ca445eb19ec624ae75118", size = 35221333, upload-time = "2026-02-23T00:21:25.278Z" }, + { url = "https://files.pythonhosted.org/packages/d9/77/5b8509d03b77f093a0d52e606d3c4f79e8b06d1d38c441dacb1e26cacf46/scipy-1.17.1-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:d2650c1fb97e184d12d8ba010493ee7b322864f7d3d00d3f9bb97d9c21de4068", size = 35042066, upload-time = "2026-02-23T00:21:31.358Z" }, + { url = "https://files.pythonhosted.org/packages/f9/df/18f80fb99df40b4070328d5ae5c596f2f00fffb50167e31439e932f29e7d/scipy-1.17.1-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:08b900519463543aa604a06bec02461558a6e1cef8fdbb8098f77a48a83c8118", size = 37612763, upload-time = "2026-02-23T00:21:37.247Z" }, + { url = "https://files.pythonhosted.org/packages/4b/39/f0e8ea762a764a9dc52aa7dabcfad51a354819de1f0d4652b6a1122424d6/scipy-1.17.1-cp314-cp314-win_amd64.whl", hash = "sha256:3877ac408e14da24a6196de0ddcace62092bfc12a83823e92e49e40747e52c19", size = 37290984, upload-time = "2026-02-23T00:22:35.023Z" }, + { url = "https://files.pythonhosted.org/packages/7c/56/fe201e3b0f93d1a8bcf75d3379affd228a63d7e2d80ab45467a74b494947/scipy-1.17.1-cp314-cp314-win_arm64.whl", hash = "sha256:f8885db0bc2bffa59d5c1b72fad7a6a92d3e80e7257f967dd81abb553a90d293", size = 25192877, upload-time = "2026-02-23T00:22:39.798Z" }, + { url = "https://files.pythonhosted.org/packages/96/ad/f8c414e121f82e02d76f310f16db9899c4fcde36710329502a6b2a3c0392/scipy-1.17.1-cp314-cp314t-macosx_10_14_x86_64.whl", hash = "sha256:1cc682cea2ae55524432f3cdff9e9a3be743d52a7443d0cba9017c23c87ae2f6", size = 31949750, upload-time = "2026-02-23T00:21:42.289Z" }, + { url = "https://files.pythonhosted.org/packages/7c/b0/c741e8865d61b67c81e255f4f0a832846c064e426636cd7de84e74d209be/scipy-1.17.1-cp314-cp314t-macosx_12_0_arm64.whl", hash = "sha256:2040ad4d1795a0ae89bfc7e8429677f365d45aa9fd5e4587cf1ea737f927b4a1", size = 28585858, upload-time = "2026-02-23T00:21:47.706Z" }, + { url = "https://files.pythonhosted.org/packages/ed/1b/3985219c6177866628fa7c2595bfd23f193ceebbe472c98a08824b9466ff/scipy-1.17.1-cp314-cp314t-macosx_14_0_arm64.whl", hash = "sha256:131f5aaea57602008f9822e2115029b55d4b5f7c070287699fe45c661d051e39", size = 20757723, upload-time = "2026-02-23T00:21:52.039Z" }, + { url = "https://files.pythonhosted.org/packages/c0/19/2a04aa25050d656d6f7b9e7b685cc83d6957fb101665bfd9369ca6534563/scipy-1.17.1-cp314-cp314t-macosx_14_0_x86_64.whl", hash = "sha256:9cdc1a2fcfd5c52cfb3045feb399f7b3ce822abdde3a193a6b9a60b3cb5854ca", size = 23043098, upload-time = "2026-02-23T00:21:56.185Z" }, + { url = "https://files.pythonhosted.org/packages/86/f1/3383beb9b5d0dbddd030335bf8a8b32d4317185efe495374f134d8be6cce/scipy-1.17.1-cp314-cp314t-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:6e3dcd57ab780c741fde8dc68619de988b966db759a3c3152e8e9142c26295ad", size = 33030397, upload-time = "2026-02-23T00:22:01.404Z" }, + { url = "https://files.pythonhosted.org/packages/41/68/8f21e8a65a5a03f25a79165ec9d2b28c00e66dc80546cf5eb803aeeff35b/scipy-1.17.1-cp314-cp314t-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:a9956e4d4f4a301ebf6cde39850333a6b6110799d470dbbb1e25326ac447f52a", size = 35281163, upload-time = "2026-02-23T00:22:07.024Z" }, + { url = "https://files.pythonhosted.org/packages/84/8d/c8a5e19479554007a5632ed7529e665c315ae7492b4f946b0deb39870e39/scipy-1.17.1-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:a4328d245944d09fd639771de275701ccadf5f781ba0ff092ad141e017eccda4", size = 35116291, upload-time = "2026-02-23T00:22:12.585Z" }, + { url = "https://files.pythonhosted.org/packages/52/52/e57eceff0e342a1f50e274264ed47497b59e6a4e3118808ee58ddda7b74a/scipy-1.17.1-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:a77cbd07b940d326d39a1d1b37817e2ee4d79cb30e7338f3d0cddffae70fcaa2", size = 37682317, upload-time = "2026-02-23T00:22:18.513Z" }, + { url = "https://files.pythonhosted.org/packages/11/2f/b29eafe4a3fbc3d6de9662b36e028d5f039e72d345e05c250e121a230dd4/scipy-1.17.1-cp314-cp314t-win_amd64.whl", hash = "sha256:eb092099205ef62cd1782b006658db09e2fed75bffcae7cc0d44052d8aa0f484", size = 37345327, upload-time = "2026-02-23T00:22:24.442Z" }, + { url = "https://files.pythonhosted.org/packages/07/39/338d9219c4e87f3e708f18857ecd24d22a0c3094752393319553096b98af/scipy-1.17.1-cp314-cp314t-win_arm64.whl", hash = "sha256:200e1050faffacc162be6a486a984a0497866ec54149a01270adc8a59b7c7d21", size = 25489165, upload-time = "2026-02-23T00:22:29.563Z" }, +] + +[[package]] +name = "sentence-transformers" +version = "5.5.1" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "huggingface-hub" }, + { name = "numpy" }, + { name = "scikit-learn" }, + { name = "scipy" }, + { name = "torch", version = "2.12.0", source = { registry = "https://download.pytorch.org/whl/cpu" }, marker = "sys_platform == 'darwin'" }, + { name = "torch", version = "2.12.0+cpu", source = { registry = "https://download.pytorch.org/whl/cpu" }, marker = "sys_platform != 'darwin'" }, + { name = "tqdm" }, + { name = "transformers" }, + { name = "typing-extensions" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/cf/d4/7ef93157485e978c016f49da05363c1e4e7237beb5343b64b5631101f0f1/sentence_transformers-5.5.1.tar.gz", hash = "sha256:02b7740dfc60bdbbcb6061625f5d97a5c1a4e2d3baac5f9391b912bb5eae2290", size = 445161, upload-time = "2026-05-20T07:37:44.465Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/bf/03/ee99a6b030e7a2e056547729f8a4709dd93e13d9c6f07590f74c395c4017/sentence_transformers-5.5.1-py3-none-any.whl", hash = "sha256:4fe11d433badc5282d32f7fc08bc714216b7a5aca426f9df77a45a554756deb7", size = 588887, upload-time = "2026-05-20T07:37:43.004Z" }, +] + [[package]] name = "service" version = "0.1.0" @@ -606,7 +1137,10 @@ dependencies = [ { name = "pytest" }, { name = "python-multipart" }, { name = "pyyaml" }, + { name = "sentence-transformers" }, { name = "sqlalchemy" }, + { name = "torch", version = "2.12.0", source = { registry = "https://download.pytorch.org/whl/cpu" }, marker = "sys_platform == 'darwin'" }, + { name = "torch", version = "2.12.0+cpu", source = { registry = "https://download.pytorch.org/whl/cpu" }, marker = "sys_platform != 'darwin'" }, { name = "uvicorn" }, ] @@ -617,17 +1151,37 @@ requires-dist = [ { name = "elasticsearch", specifier = "~=9.4.0" }, { name = "fastapi", specifier = "~=0.115.0" }, { name = "httpx", specifier = "~=0.27.0" }, - { name = "openai", specifier = ">=2.41.0" }, + { name = "openai", specifier = "~=2.41.0" }, { name = "pydantic", specifier = "~=2.7.1" }, { name = "pydantic-settings", specifier = "~=2.2.1" }, { name = "pyjwt", specifier = "~=2.8.0" }, { name = "pytest", specifier = "~=8.1.0" }, { name = "python-multipart", specifier = "~=0.0.19" }, { name = "pyyaml", specifier = "~=6.0.1" }, + { name = "sentence-transformers", specifier = "~=5.5.1" }, { name = "sqlalchemy", specifier = "~=2.0.0" }, + { name = "torch", index = "https://download.pytorch.org/whl/cpu" }, { name = "uvicorn", specifier = "~=0.29.0" }, ] +[[package]] +name = "setuptools" +version = "81.0.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/0d/1c/73e719955c59b8e424d015ab450f51c0af856ae46ea2da83eba51cc88de1/setuptools-81.0.0.tar.gz", hash = "sha256:487b53915f52501f0a79ccfd0c02c165ffe06631443a886740b91af4b7a5845a", size = 1198299, upload-time = "2026-02-06T21:10:39.601Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/e1/e3/c164c88b2e5ce7b24d667b9bd83589cf4f3520d97cad01534cd3c4f55fdb/setuptools-81.0.0-py3-none-any.whl", hash = "sha256:fdd925d5c5d9f62e4b74b30d6dd7828ce236fd6ed998a08d81de62ce5a6310d6", size = 1062021, upload-time = "2026-02-06T21:10:37.175Z" }, +] + +[[package]] +name = "shellingham" +version = "1.5.4" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/58/15/8b3609fd3830ef7b27b655beb4b4e9c62313a4e8da8c676e142cc210d58e/shellingham-1.5.4.tar.gz", hash = "sha256:8dbca0739d487e5bd35ab3ca4b36e11c4078f3a234bfce294b0a0291363404de", size = 10310, upload-time = "2023-10-24T04:13:40.426Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/e0/f9/0595336914c5619e5f28a1fb793285925a8cd4b432c9da0a987836c7f822/shellingham-1.5.4-py2.py3-none-any.whl", hash = "sha256:7ecfff8f2fd72616f7481040475a65b2bf8af90a56c89140852d1120324e8686", size = 9755, upload-time = "2023-10-24T04:13:38.866Z" }, +] + [[package]] name = "six" version = "1.17.0" @@ -699,6 +1253,118 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/8b/0c/9d30a4ebeb6db2b25a841afbb80f6ef9a854fc3b41be131d249a977b4959/starlette-0.46.2-py3-none-any.whl", hash = "sha256:595633ce89f8ffa71a015caed34a5b2dc1c0cdb3f0f1fbd1e69339cf2abeec35", size = 72037, upload-time = "2025-04-13T13:56:16.21Z" }, ] +[[package]] +name = "sympy" +version = "1.14.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "mpmath" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/83/d3/803453b36afefb7c2bb238361cd4ae6125a569b4db67cd9e79846ba2d68c/sympy-1.14.0.tar.gz", hash = "sha256:d3d3fe8df1e5a0b42f0e7bdf50541697dbe7d23746e894990c030e2b05e72517", size = 7793921, upload-time = "2025-04-27T18:05:01.611Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/a2/09/77d55d46fd61b4a135c444fc97158ef34a095e5681d0a6c10b75bf356191/sympy-1.14.0-py3-none-any.whl", hash = "sha256:e091cc3e99d2141a0ba2847328f5479b05d94a6635cb96148ccb3f34671bd8f5", size = 6299353, upload-time = "2025-04-27T18:04:59.103Z" }, +] + +[[package]] +name = "threadpoolctl" +version = "3.6.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/b7/4d/08c89e34946fce2aec4fbb45c9016efd5f4d7f24af8e5d93296e935631d8/threadpoolctl-3.6.0.tar.gz", hash = "sha256:8ab8b4aa3491d812b623328249fab5302a68d2d71745c8a4c719a2fcaba9f44e", size = 21274, upload-time = "2025-03-13T13:49:23.031Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/32/d5/f9a850d79b0851d1d4ef6456097579a9005b31fea68726a4ae5f2d82ddd9/threadpoolctl-3.6.0-py3-none-any.whl", hash = "sha256:43a0b8fd5a2928500110039e43a5eed8480b918967083ea48dc3ab9f13c4a7fb", size = 18638, upload-time = "2025-03-13T13:49:21.846Z" }, +] + +[[package]] +name = "tokenizers" +version = "0.22.2" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "huggingface-hub" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/73/6f/f80cfef4a312e1fb34baf7d85c72d4411afde10978d4657f8cdd811d3ccc/tokenizers-0.22.2.tar.gz", hash = "sha256:473b83b915e547aa366d1eee11806deaf419e17be16310ac0a14077f1e28f917", size = 372115, upload-time = "2026-01-05T10:45:15.988Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/92/97/5dbfabf04c7e348e655e907ed27913e03db0923abb5dfdd120d7b25630e1/tokenizers-0.22.2-cp39-abi3-macosx_10_12_x86_64.whl", hash = "sha256:544dd704ae7238755d790de45ba8da072e9af3eea688f698b137915ae959281c", size = 3100275, upload-time = "2026-01-05T10:41:02.158Z" }, + { url = "https://files.pythonhosted.org/packages/2e/47/174dca0502ef88b28f1c9e06b73ce33500eedfac7a7692108aec220464e7/tokenizers-0.22.2-cp39-abi3-macosx_11_0_arm64.whl", hash = "sha256:1e418a55456beedca4621dbab65a318981467a2b188e982a23e117f115ce5001", size = 2981472, upload-time = "2026-01-05T10:41:00.276Z" }, + { url = "https://files.pythonhosted.org/packages/d6/84/7990e799f1309a8b87af6b948f31edaa12a3ed22d11b352eaf4f4b2e5753/tokenizers-0.22.2-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2249487018adec45d6e3554c71d46eb39fa8ea67156c640f7513eb26f318cec7", size = 3290736, upload-time = "2026-01-05T10:40:32.165Z" }, + { url = "https://files.pythonhosted.org/packages/78/59/09d0d9ba94dcd5f4f1368d4858d24546b4bdc0231c2354aa31d6199f0399/tokenizers-0.22.2-cp39-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:25b85325d0815e86e0bac263506dd114578953b7b53d7de09a6485e4a160a7dd", size = 3168835, upload-time = "2026-01-05T10:40:38.847Z" }, + { url = "https://files.pythonhosted.org/packages/47/50/b3ebb4243e7160bda8d34b731e54dd8ab8b133e50775872e7a434e524c28/tokenizers-0.22.2-cp39-abi3-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:bfb88f22a209ff7b40a576d5324bf8286b519d7358663db21d6246fb17eea2d5", size = 3521673, upload-time = "2026-01-05T10:40:56.614Z" }, + { url = "https://files.pythonhosted.org/packages/e0/fa/89f4cb9e08df770b57adb96f8cbb7e22695a4cb6c2bd5f0c4f0ebcf33b66/tokenizers-0.22.2-cp39-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:1c774b1276f71e1ef716e5486f21e76333464f47bece56bbd554485982a9e03e", size = 3724818, upload-time = "2026-01-05T10:40:44.507Z" }, + { url = "https://files.pythonhosted.org/packages/64/04/ca2363f0bfbe3b3d36e95bf67e56a4c88c8e3362b658e616d1ac185d47f2/tokenizers-0.22.2-cp39-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:df6c4265b289083bf710dff49bc51ef252f9d5be33a45ee2bed151114a56207b", size = 3379195, upload-time = "2026-01-05T10:40:51.139Z" }, + { url = "https://files.pythonhosted.org/packages/2e/76/932be4b50ef6ccedf9d3c6639b056a967a86258c6d9200643f01269211ca/tokenizers-0.22.2-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:369cc9fc8cc10cb24143873a0d95438bb8ee257bb80c71989e3ee290e8d72c67", size = 3274982, upload-time = "2026-01-05T10:40:58.331Z" }, + { url = "https://files.pythonhosted.org/packages/1d/28/5f9f5a4cc211b69e89420980e483831bcc29dade307955cc9dc858a40f01/tokenizers-0.22.2-cp39-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:29c30b83d8dcd061078b05ae0cb94d3c710555fbb44861139f9f83dcca3dc3e4", size = 9478245, upload-time = "2026-01-05T10:41:04.053Z" }, + { url = "https://files.pythonhosted.org/packages/6c/fb/66e2da4704d6aadebf8cb39f1d6d1957df667ab24cff2326b77cda0dcb85/tokenizers-0.22.2-cp39-abi3-musllinux_1_2_armv7l.whl", hash = "sha256:37ae80a28c1d3265bb1f22464c856bd23c02a05bb211e56d0c5301a435be6c1a", size = 9560069, upload-time = "2026-01-05T10:45:10.673Z" }, + { url = "https://files.pythonhosted.org/packages/16/04/fed398b05caa87ce9b1a1bb5166645e38196081b225059a6edaff6440fac/tokenizers-0.22.2-cp39-abi3-musllinux_1_2_i686.whl", hash = "sha256:791135ee325f2336f498590eb2f11dc5c295232f288e75c99a36c5dbce63088a", size = 9899263, upload-time = "2026-01-05T10:45:12.559Z" }, + { url = "https://files.pythonhosted.org/packages/05/a1/d62dfe7376beaaf1394917e0f8e93ee5f67fea8fcf4107501db35996586b/tokenizers-0.22.2-cp39-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:38337540fbbddff8e999d59970f3c6f35a82de10053206a7562f1ea02d046fa5", size = 10033429, upload-time = "2026-01-05T10:45:14.333Z" }, + { url = "https://files.pythonhosted.org/packages/fd/18/a545c4ea42af3df6effd7d13d250ba77a0a86fb20393143bbb9a92e434d4/tokenizers-0.22.2-cp39-abi3-win32.whl", hash = "sha256:a6bf3f88c554a2b653af81f3204491c818ae2ac6fbc09e76ef4773351292bc92", size = 2502363, upload-time = "2026-01-05T10:45:20.593Z" }, + { url = "https://files.pythonhosted.org/packages/65/71/0670843133a43d43070abeb1949abfdef12a86d490bea9cd9e18e37c5ff7/tokenizers-0.22.2-cp39-abi3-win_amd64.whl", hash = "sha256:c9ea31edff2968b44a88f97d784c2f16dc0729b8b143ed004699ebca91f05c48", size = 2747786, upload-time = "2026-01-05T10:45:18.411Z" }, + { url = "https://files.pythonhosted.org/packages/72/f4/0de46cfa12cdcbcd464cc59fde36912af405696f687e53a091fb432f694c/tokenizers-0.22.2-cp39-abi3-win_arm64.whl", hash = "sha256:9ce725d22864a1e965217204946f830c37876eee3b2ba6fc6255e8e903d5fcbc", size = 2612133, upload-time = "2026-01-05T10:45:17.232Z" }, +] + +[[package]] +name = "torch" +version = "2.12.0" +source = { registry = "https://download.pytorch.org/whl/cpu" } +resolution-markers = [ + "sys_platform == 'darwin'", +] +dependencies = [ + { name = "filelock", marker = "sys_platform == 'darwin'" }, + { name = "fsspec", marker = "sys_platform == 'darwin'" }, + { name = "jinja2", marker = "sys_platform == 'darwin'" }, + { name = "networkx", marker = "sys_platform == 'darwin'" }, + { name = "setuptools", marker = "sys_platform == 'darwin'" }, + { name = "sympy", marker = "sys_platform == 'darwin'" }, + { name = "typing-extensions", marker = "sys_platform == 'darwin'" }, +] +wheels = [ + { url = "https://download-r2.pytorch.org/whl/cpu/torch-2.12.0-cp312-cp312-macosx_14_0_arm64.whl", hash = "sha256:b41339df93d491435e790ff8bcbae1c0ce777175889bfd1281d119862793e6a2", upload-time = "2026-05-12T16:20:12Z" }, + { url = "https://download-r2.pytorch.org/whl/cpu/torch-2.12.0-cp313-cp313-macosx_14_0_arm64.whl", hash = "sha256:90dd587a5f61bfe1307148b581e2084fc5bc4a06e2b90a20e9a36b81087ff16b", upload-time = "2026-05-12T16:20:17Z" }, + { url = "https://download-r2.pytorch.org/whl/cpu/torch-2.12.0-cp313-cp313t-macosx_14_0_arm64.whl", hash = "sha256:10ee1448a9f304d3b987eb4656f664ba6e4d7b410ca7a5a7c642199777a2cf88", upload-time = "2026-05-12T16:20:21Z" }, + { url = "https://download-r2.pytorch.org/whl/cpu/torch-2.12.0-cp314-cp314-macosx_14_0_arm64.whl", hash = "sha256:f7dfae4a519197dfa050e98d8e36378a0fb5899625a875c2b54445005a2e404e", upload-time = "2026-05-12T16:20:26Z" }, + { url = "https://download-r2.pytorch.org/whl/cpu/torch-2.12.0-cp314-cp314t-macosx_14_0_arm64.whl", hash = "sha256:b4556715c8572758625d62b6e0ae3b1f76c440221913a6fb5e100f321fb4fb02", upload-time = "2026-05-12T16:20:31Z" }, +] + +[[package]] +name = "torch" +version = "2.12.0+cpu" +source = { registry = "https://download.pytorch.org/whl/cpu" } +resolution-markers = [ + "sys_platform != 'darwin'", +] +dependencies = [ + { name = "filelock", marker = "sys_platform != 'darwin'" }, + { name = "fsspec", marker = "sys_platform != 'darwin'" }, + { name = "jinja2", marker = "sys_platform != 'darwin'" }, + { name = "networkx", marker = "sys_platform != 'darwin'" }, + { name = "setuptools", marker = "sys_platform != 'darwin'" }, + { name = "sympy", marker = "sys_platform != 'darwin'" }, + { name = "typing-extensions", marker = "sys_platform != 'darwin'" }, +] +wheels = [ + { url = "https://download-r2.pytorch.org/whl/cpu/torch-2.12.0%2Bcpu-cp312-cp312-linux_s390x.whl", hash = "sha256:b9d0e8eed0af9321ffb12b75f4aca371b071254f12cf75875d5a8e7cc8f52b51", upload-time = "2026-05-12T23:16:33Z" }, + { url = "https://download-r2.pytorch.org/whl/cpu/torch-2.12.0%2Bcpu-cp312-cp312-manylinux_2_28_aarch64.whl", hash = "sha256:ce2ddb880b0813fcc91a737f08fdd973a8115a74c64ccb34e9c09a7964b4d448", upload-time = "2026-05-12T23:16:40Z" }, + { url = "https://download-r2.pytorch.org/whl/cpu/torch-2.12.0%2Bcpu-cp312-cp312-manylinux_2_28_x86_64.whl", hash = "sha256:5e3dc83725581fa38b7b2e45c58692e30b2a3cde19191af54b675ffcac3840a6", upload-time = "2026-05-12T23:16:48Z" }, + { url = "https://download-r2.pytorch.org/whl/cpu/torch-2.12.0%2Bcpu-cp312-cp312-win_amd64.whl", hash = "sha256:70ead47f538417323a230c0e743e5cbb6d91f11bd8339abf8c05c9d02f8409bc", upload-time = "2026-05-12T23:16:56Z" }, + { url = "https://download-r2.pytorch.org/whl/cpu/torch-2.12.0%2Bcpu-cp312-cp312-win_arm64.whl", hash = "sha256:5a3b24f429d126a08acafd5cfe8b719409618ad57c49bf4f20df4f8cd32cd682", upload-time = "2026-05-12T23:17:00Z" }, + { url = "https://download-r2.pytorch.org/whl/cpu/torch-2.12.0%2Bcpu-cp313-cp313-linux_s390x.whl", hash = "sha256:5e0da19e1c3bfdc9b92638c552579eac678354485d61fc8921b0461fd6c40449", upload-time = "2026-05-12T23:17:05Z" }, + { url = "https://download-r2.pytorch.org/whl/cpu/torch-2.12.0%2Bcpu-cp313-cp313-manylinux_2_28_aarch64.whl", hash = "sha256:68b7ddd4db4603a03e106e74c7098c8d8c8943d33c1e5ada009ca4cd885759c3", upload-time = "2026-05-12T23:17:12Z" }, + { url = "https://download-r2.pytorch.org/whl/cpu/torch-2.12.0%2Bcpu-cp313-cp313-manylinux_2_28_x86_64.whl", hash = "sha256:ada78018bdfa30d1c766596cd32d910dbf5b03424cd859231b6d2a00533de922", upload-time = "2026-05-12T23:17:20Z" }, + { url = "https://download-r2.pytorch.org/whl/cpu/torch-2.12.0%2Bcpu-cp313-cp313-win_amd64.whl", hash = "sha256:59bc266826e683899d49ee0af9829f3eafd0a16e15b5db9dc591c8d955003b66", upload-time = "2026-05-12T23:17:27Z" }, + { url = "https://download-r2.pytorch.org/whl/cpu/torch-2.12.0%2Bcpu-cp313-cp313-win_arm64.whl", hash = "sha256:97a5160abf3ca9d59a2cd7b4b4de89d9dfe290d36a1ac720262a55fbcee10b6c", upload-time = "2026-05-12T23:17:31Z" }, + { url = "https://download-r2.pytorch.org/whl/cpu/torch-2.12.0%2Bcpu-cp313-cp313t-linux_s390x.whl", hash = "sha256:32b9b7a0974cd6149cb98def0a28a49d92d7c14a384273d5539da9624239e950", upload-time = "2026-05-12T23:17:36Z" }, + { url = "https://download-r2.pytorch.org/whl/cpu/torch-2.12.0%2Bcpu-cp313-cp313t-manylinux_2_28_aarch64.whl", hash = "sha256:93ed8dc52c113580daf6124982b3232629045dccc5cd83a8f5ed478f7bac7340", upload-time = "2026-05-12T23:17:43Z" }, + { url = "https://download-r2.pytorch.org/whl/cpu/torch-2.12.0%2Bcpu-cp313-cp313t-manylinux_2_28_x86_64.whl", hash = "sha256:6a1c86abd4ed15a0736cf2663ad69642ae5d1288c99e30346070e6241018a0a9", upload-time = "2026-05-12T23:17:54Z" }, + { url = "https://download-r2.pytorch.org/whl/cpu/torch-2.12.0%2Bcpu-cp313-cp313t-win_amd64.whl", hash = "sha256:768dce4b7b3353795f667d1cb0dd7dfba06f570cd39539576097335e05bb71fe", upload-time = "2026-05-12T23:18:02Z" }, + { url = "https://download-r2.pytorch.org/whl/cpu/torch-2.12.0%2Bcpu-cp314-cp314-linux_s390x.whl", hash = "sha256:ee1f329acfd0c2a1ccaa3393bcaf9857ea58759549bb2d67e271a6eab42382b3", upload-time = "2026-05-12T23:18:08Z" }, + { url = "https://download-r2.pytorch.org/whl/cpu/torch-2.12.0%2Bcpu-cp314-cp314-manylinux_2_28_aarch64.whl", hash = "sha256:797c066367792c92eb97cafba7fd0caa8d7455e6078a4ee880630077378dc372", upload-time = "2026-05-12T23:18:15Z" }, + { url = "https://download-r2.pytorch.org/whl/cpu/torch-2.12.0%2Bcpu-cp314-cp314-manylinux_2_28_x86_64.whl", hash = "sha256:a8f419ce3f25388d36e67153ec63b3a1b17059c49f5a7759a7e91ac4843660d3", upload-time = "2026-05-12T23:18:22Z" }, + { url = "https://download-r2.pytorch.org/whl/cpu/torch-2.12.0%2Bcpu-cp314-cp314-win_amd64.whl", hash = "sha256:1dd196c43e74e7b3b526ff434e7efbdef3f3792a2efbecfc983d7dce501840d2", upload-time = "2026-05-12T23:18:30Z" }, + { url = "https://download-r2.pytorch.org/whl/cpu/torch-2.12.0%2Bcpu-cp314-cp314t-linux_s390x.whl", hash = "sha256:d0d2080cb13c94ebc0c884d237e404490743d0f40192c8a180abf3b6b6f334cf", upload-time = "2026-05-12T23:18:35Z" }, + { url = "https://download-r2.pytorch.org/whl/cpu/torch-2.12.0%2Bcpu-cp314-cp314t-manylinux_2_28_aarch64.whl", hash = "sha256:f7bc15972acad257723775237cdd120024cca844b8bc64701822fa596bcb7e14", upload-time = "2026-05-12T23:18:42Z" }, + { url = "https://download-r2.pytorch.org/whl/cpu/torch-2.12.0%2Bcpu-cp314-cp314t-manylinux_2_28_x86_64.whl", hash = "sha256:4d79f961250d1763487ecbc90af019a80009f9e87cadc5366b3ec4ba5671fea6", upload-time = "2026-05-12T23:18:50Z" }, + { url = "https://download-r2.pytorch.org/whl/cpu/torch-2.12.0%2Bcpu-cp314-cp314t-win_amd64.whl", hash = "sha256:46b8f4c41ac36bb5d5b47f5437b3de5541b313275e59c1d2aefd3bef32b0f531", upload-time = "2026-05-12T23:18:58Z" }, +] + [[package]] name = "tqdm" version = "4.67.3" @@ -711,6 +1377,41 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/16/e1/3079a9ff9b8e11b846c6ac5c8b5bfb7ff225eee721825310c91b3b50304f/tqdm-4.67.3-py3-none-any.whl", hash = "sha256:ee1e4c0e59148062281c49d80b25b67771a127c85fc9676d3be5f243206826bf", size = 78374, upload-time = "2026-02-03T17:35:50.982Z" }, ] +[[package]] +name = "transformers" +version = "5.11.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "huggingface-hub" }, + { name = "numpy" }, + { name = "packaging" }, + { name = "pyyaml" }, + { name = "regex" }, + { name = "safetensors" }, + { name = "tokenizers" }, + { name = "tqdm" }, + { name = "typer" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/7d/4a/2ee05f9a06bb2dd34cac951548553738a826762fb7adfa7ce256daeaeac8/transformers-5.11.0.tar.gz", hash = "sha256:1dbecade5b8a09bdf3e9e8fdfc9d312cb9eccf5a201080dc894b373f0f3eb5f4", size = 8874363, upload-time = "2026-06-10T16:31:52.441Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/9b/40/30fdefda9b8aff8d36054dbb37d8e1464cc1130c29623403c3c2147bdee1/transformers-5.11.0-py3-none-any.whl", hash = "sha256:06d0a34eab529955f8e704b530663c7d6bd6f9c7a9e47a05cddb4a44e7b6566b", size = 11094597, upload-time = "2026-06-10T16:31:49.08Z" }, +] + +[[package]] +name = "typer" +version = "0.25.1" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "annotated-doc" }, + { name = "click" }, + { name = "rich" }, + { name = "shellingham" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/e4/51/9aed62104cea109b820bbd6c14245af756112017d309da813ef107d42e7e/typer-0.25.1.tar.gz", hash = "sha256:9616eb8853a09ffeabab1698952f33c6f29ffdbceb4eaeecf571880e8d7664cc", size = 122276, upload-time = "2026-04-30T19:32:16.964Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/3f/f9/2b3ff4e56e5fa7debfaf9eb135d0da96f3e9a1d5b27222223c7296336e5f/typer-0.25.1-py3-none-any.whl", hash = "sha256:75caa44ed46a03fb2dab8808753ffacdbfea88495e74c85a28c5eefcf5f39c89", size = 58409, upload-time = "2026-04-30T19:32:18.271Z" }, +] + [[package]] name = "typing-extensions" version = "4.15.0" diff --git a/ude_person.http b/ude_person.http index 0eef0048..e41036ba 100644 --- a/ude_person.http +++ b/ude_person.http @@ -6,12 +6,648 @@ Content-Type: application/json "query": { "query_string": { "default_field": "name", - "query": "Tobias Janelt" + "query": "Marcus Handte" } } } +### +GET https://inse.nes.uni-due.de/elastic/projects_dfg_all/_search +Authorization: ApiKey bG1NSWc1NEJPZ3FnTGZCZXRSSEg6VnJXRFd5SnpSTTNWc1VPT01FMEhMZw== +Content-Type: application/json + +### +GET https://inse.nes.uni-due.de/elastic/projects_dfg_all/_search +Authorization: ApiKey bG1NSWc1NEJPZ3FnTGZCZXRSSEg6VnJXRFd5SnpSTTNWc1VPT01FMEhMZw== +Content-Type: application/json + +{ + "size": 10, + "from": 0, + "_source": [ + "id", + "link", + "title", + "funding_start", + "funding_end", + "Fachliche Zuordnung" + ], + "query": { + "bool": { + "must": [ + { + "bool": { + "should": [ + { + "bool": { + "must": [ + { + "multi_match": { + "query": "Kurt", + "fields": [ + "Antragsteller", + "Antragstellerin", + "Antragstellerinnen", + "Antragstellerinnen / Antragsteller", + "Beteiligte Person", + "Beteiligte Personen", + "Co-Sprecher", + "Co-Sprecherinnen / Co-Sprecher", + "Ehemalige Antragsteller", + "Ehemalige Antragstellerin", + "Ehemalige Antragstellerinnen", + "Ehemalige Antragstellerinnen / Ehemalige Antragsteller", + "Ehemaliger Antragsteller", + "Gastgeber", + "Gastgeberin", + "Gastgeberinnen", + "Gastgeberinnen / Gastgeber", + "Kooperationspartner", + "Kooperationspartnerin", + "Kooperationspartnerinnen", + "Kooperationspartnerinnen / Kooperationspartner", + "Leiter", + "Leiterin", + "Leiterinnen", + "Leiterinnen / Leiter", + "Mitantragsteller", + "Mitantragstellerin", + "Mitantragstellerinnen", + "Mitantragstellerinnen / Mitantragsteller", + "Mitverantwortlich", + "Mitverantwortlich(e)", + "Mitverantwortliche", + "Sprecher", + "Sprecher (IGK-Partner)", + "Sprecherin", + "Sprecherin (IGK-Partner)", + "Sprecherinnen", + "Sprecherinnen (IGK-Partner) / Sprecher (IGK-Partner)", + "Sprecherinnen / Sprecher", + "Teilprojektleiter", + "Teilprojektleiterin", + "Teilprojektleiterinnen", + "Teilprojektleiterinnen / Teilprojektleiter", + "ausländ. Mitantragstellerin", + "ausländ. Mitantragstellerinnen", + "ausländ. Mitantragstellerinnen / ausländische Mitantragsteller", + "ausländische Mitantragsteller", + "ausländischer Mitantragsteller", + "beteiligte Wissenschaftler", + "beteiligte Wissenschaftlerin", + "beteiligte Wissenschaftlerinnen", + "beteiligte Wissenschaftlerinnen / beteiligte Wissenschaftler", + "beteiligter Wissenschaftler", + "person_creater_name", + "stellvertr. Sprecher", + "stellvertr. Sprecherin", + "stellvertr. Sprecherinnen / stellvertr. Sprecher" + ] + } + }, + { + "multi_match": { + "query": "Rothermel", + "fields": [ + "Antragsteller", + "Antragstellerin", + "Antragstellerinnen", + "Antragstellerinnen / Antragsteller", + "Beteiligte Person", + "Beteiligte Personen", + "Co-Sprecher", + "Co-Sprecherinnen / Co-Sprecher", + "Ehemalige Antragsteller", + "Ehemalige Antragstellerin", + "Ehemalige Antragstellerinnen", + "Ehemalige Antragstellerinnen / Ehemalige Antragsteller", + "Ehemaliger Antragsteller", + "Gastgeber", + "Gastgeberin", + "Gastgeberinnen", + "Gastgeberinnen / Gastgeber", + "Kooperationspartner", + "Kooperationspartnerin", + "Kooperationspartnerinnen", + "Kooperationspartnerinnen / Kooperationspartner", + "Leiter", + "Leiterin", + "Leiterinnen", + "Leiterinnen / Leiter", + "Mitantragsteller", + "Mitantragstellerin", + "Mitantragstellerinnen", + "Mitantragstellerinnen / Mitantragsteller", + "Mitverantwortlich", + "Mitverantwortlich(e)", + "Mitverantwortliche", + "Sprecher", + "Sprecher (IGK-Partner)", + "Sprecherin", + "Sprecherin (IGK-Partner)", + "Sprecherinnen", + "Sprecherinnen (IGK-Partner) / Sprecher (IGK-Partner)", + "Sprecherinnen / Sprecher", + "Teilprojektleiter", + "Teilprojektleiterin", + "Teilprojektleiterinnen", + "Teilprojektleiterinnen / Teilprojektleiter", + "ausländ. Mitantragstellerin", + "ausländ. Mitantragstellerinnen", + "ausländ. Mitantragstellerinnen / ausländische Mitantragsteller", + "ausländische Mitantragsteller", + "ausländischer Mitantragsteller", + "beteiligte Wissenschaftler", + "beteiligte Wissenschaftlerin", + "beteiligte Wissenschaftlerinnen", + "beteiligte Wissenschaftlerinnen / beteiligte Wissenschaftler", + "beteiligter Wissenschaftler", + "person_creater_name", + "stellvertr. Sprecher", + "stellvertr. Sprecherin", + "stellvertr. Sprecherinnen / stellvertr. Sprecher" + ] + } + } + ] + } + } + ], + "minimum_should_match": 1 + } + } + ], + "filter": [ + { + "script": { + "script": { + "lang": "painless", + "source": "def fields = ['Antragsteller.keyword', 'Antragstellerin.keyword', 'Antragstellerinnen.keyword', 'Antragstellerinnen / Antragsteller.keyword', 'Beteiligte Person.keyword', 'Beteiligte Personen.keyword', 'Co-Sprecher.keyword', 'Co-Sprecherinnen / Co-Sprecher.keyword', 'Ehemalige Antragsteller.keyword', 'Ehemalige Antragstellerin.keyword', 'Ehemalige Antragstellerinnen.keyword', 'Ehemalige Antragstellerinnen / Ehemalige Antragsteller.keyword', 'Ehemaliger Antragsteller.keyword', 'Gastgeber.keyword', 'Gastgeberin.keyword', 'Gastgeberinnen.keyword', 'Gastgeberinnen / Gastgeber.keyword', 'Kooperationspartner.keyword', 'Kooperationspartnerin.keyword', 'Kooperationspartnerinnen.keyword', 'Kooperationspartnerinnen / Kooperationspartner.keyword', 'Leiter.keyword', 'Leiterin.keyword', 'Leiterinnen.keyword', 'Leiterinnen / Leiter.keyword', 'Mitantragsteller.keyword', 'Mitantragstellerin.keyword', 'Mitantragstellerinnen.keyword', 'Mitantragstellerinnen / Mitantragsteller.keyword', 'Mitverantwortlich.keyword', 'Mitverantwortlich(e).keyword', 'Mitverantwortliche.keyword', 'Sprecher.keyword', 'Sprecher (IGK-Partner).keyword', 'Sprecherin.keyword', 'Sprecherin (IGK-Partner).keyword', 'Sprecherinnen.keyword', 'Sprecherinnen (IGK-Partner) / Sprecher (IGK-Partner).keyword', 'Sprecherinnen / Sprecher.keyword', 'Teilprojektleiter.keyword', 'Teilprojektleiterin.keyword', 'Teilprojektleiterinnen.keyword', 'Teilprojektleiterinnen / Teilprojektleiter.keyword', 'ausländ. Mitantragstellerin.keyword', 'ausländ. Mitantragstellerinnen.keyword', 'ausländ. Mitantragstellerinnen / ausländische Mitantragsteller.keyword', 'ausländische Mitantragsteller.keyword', 'ausländischer Mitantragsteller.keyword', 'beteiligte Wissenschaftler.keyword', 'beteiligte Wissenschaftlerin.keyword', 'beteiligte Wissenschaftlerinnen.keyword', 'beteiligte Wissenschaftlerinnen / beteiligte Wissenschaftler.keyword', 'beteiligter Wissenschaftler.keyword', 'person_creater_name.keyword', 'stellvertr. Sprecher.keyword', 'stellvertr. Sprecherin.keyword', 'stellvertr. Sprecherinnen / stellvertr. Sprecher.keyword']; for (field in fields) { if (doc.containsKey(field) && !doc[field].empty) { for (value in doc[field]) { if (value.contains(';')) { def splitValues = value.splitOnToken(';'); for (singlePersonRaw in splitValues) { def singlePerson = singlePersonRaw.toLowerCase(); if ((singlePerson.contains('kurt') && singlePerson.contains('rothermel'))) { return true; } } } else { def singlePerson = value.toLowerCase(); if ((singlePerson.contains('kurt') && singlePerson.contains('rothermel'))) { return true; } } } } } return false;" + } + } + } + ] + } + }, + "script_fields": { + "all_found_names": { + "script": { + "lang": "painless", + "source": "def names = new HashSet(); def fields = ['Antragsteller.keyword', 'Antragstellerin.keyword', 'Antragstellerinnen.keyword', 'Antragstellerinnen / Antragsteller.keyword', 'Beteiligte Person.keyword', 'Beteiligte Personen.keyword', 'Co-Sprecher.keyword', 'Co-Sprecherinnen / Co-Sprecher.keyword', 'Ehemalige Antragsteller.keyword', 'Ehemalige Antragstellerin.keyword', 'Ehemalige Antragstellerinnen.keyword', 'Ehemalige Antragstellerinnen / Ehemalige Antragsteller.keyword', 'Ehemaliger Antragsteller.keyword', 'Gastgeber.keyword', 'Gastgeberin.keyword', 'Gastgeberinnen.keyword', 'Gastgeberinnen / Gastgeber.keyword', 'Kooperationspartner.keyword', 'Kooperationspartnerin.keyword', 'Kooperationspartnerinnen.keyword', 'Kooperationspartnerinnen / Kooperationspartner.keyword', 'Leiter.keyword', 'Leiterin.keyword', 'Leiterinnen.keyword', 'Leiterinnen / Leiter.keyword', 'Mitantragsteller.keyword', 'Mitantragstellerin.keyword', 'Mitantragstellerinnen.keyword', 'Mitantragstellerinnen / Mitantragsteller.keyword', 'Mitverantwortlich.keyword', 'Mitverantwortlich(e).keyword', 'Mitverantwortliche.keyword', 'Sprecher.keyword', 'Sprecher (IGK-Partner).keyword', 'Sprecherin.keyword', 'Sprecherin (IGK-Partner).keyword', 'Sprecherinnen.keyword', 'Sprecherinnen (IGK-Partner) / Sprecher (IGK-Partner).keyword', 'Sprecherinnen / Sprecher.keyword', 'Teilprojektleiter.keyword', 'Teilprojektleiterin.keyword', 'Teilprojektleiterinnen.keyword', 'Teilprojektleiterinnen / Teilprojektleiter.keyword', 'ausländ. Mitantragstellerin.keyword', 'ausländ. Mitantragstellerinnen.keyword', 'ausländ. Mitantragstellerinnen / ausländische Mitantragsteller.keyword', 'ausländische Mitantragsteller.keyword', 'ausländischer Mitantragsteller.keyword', 'beteiligte Wissenschaftler.keyword', 'beteiligte Wissenschaftlerin.keyword', 'beteiligte Wissenschaftlerinnen.keyword', 'beteiligte Wissenschaftlerinnen / beteiligte Wissenschaftler.keyword', 'beteiligter Wissenschaftler.keyword', 'person_creater_name.keyword', 'stellvertr. Sprecher.keyword', 'stellvertr. Sprecherin.keyword', 'stellvertr. Sprecherinnen / stellvertr. Sprecher.keyword']; for (field in fields) { if (doc.containsKey(field) && !doc[field].empty) { for (value in doc[field]) { if (value.contains(';')) { def splitNames = value.splitOnToken(';'); for (sn in splitNames) { names.add(sn.trim()); } } else { names.add(value.trim()); } } } } return new ArrayList(names);" + } + } + }, + "sort": [{ "id.keyword": { "order": "asc" } }] +} + + + + + + +### +GET https://inse.nes.uni-due.de/elastic/projects_dfg_all/_search +Authorization: ApiKey bG1NSWc1NEJPZ3FnTGZCZXRSSEg6VnJXRFd5SnpSTTNWc1VPT01FMEhMZw== +Content-Type: application/json + +{ + "_source": [ + "id", + "link", + "title", + "funding_start", + "funding_end", + "Fachliche Zuordnung" + ], + "query": { + "bool": { + "must": [ + { + "bool": { + "minimum_should_match": 1, + "should": [ + { + "bool": { + "must": [ + { "multi_match": { "query": "Marcus", "fields": ["Antragsteller", "Beteiligte Person"] } }, + { "multi_match": { "query": "Roth", "fields": ["Antragsteller", "Beteiligte Person"] } } + ] + } + } + ] + } + } + ], + "filter": [ + { + "script": { + "script": { + "lang": "painless", + "source": "def felder = ['Antragsteller.keyword', 'Antragstellerin.keyword', 'Beteiligte Person.keyword', 'person_creater_name.keyword']; for (feld in felder) { if (doc.containsKey(feld) && !doc[feld].empty) { for (wert in doc[feld]) { def nameImFeld = wert.toLowerCase(); if (nameImFeld.contains('marcus') && (nameImFeld.contains('roth'))) { return true; } } } } return false;" + } + } + } + ] + } + }, + "script_fields": { + "alle_gefundenen_namen": { + "script": { + "lang": "painless", + "source": "def namen = new HashSet(); def felder = ['Antragsteller.keyword', 'Antragstellerin.keyword', 'Beteiligte Person.keyword', 'person_creater_name.keyword']; for (feld in felder) { if (doc.containsKey(feld) && !doc[feld].empty) { for (wert in doc[feld]) { namen.add(wert); } } } return new ArrayList(namen);" + } + } + } +} + +# { +# "query": { +# "bool": { +# "minimum_should_match": 1, +# "should": [ +# { +# "multi_match": { +# "query": "Marcus Roth", +# "type": "cross_fields", +# "operator": "and", +# "fields": [ +# "Antragsteller", +# "Antragstellerin", +# "Antragstellerinnen", +# "Antragstellerinnen / Antragsteller", +# "Beteiligte Person", +# "Beteiligte Personen", +# "Co-Sprecher", +# "Co-Sprecherinnen / Co-Sprecher", +# "Ehemalige Antragsteller", +# "Ehemalige Antragstellerin", +# "Ehemalige Antragstellerinnen", +# "Ehemalige Antragstellerinnen / Ehemalige Antragsteller", +# "Ehemaliger Antragsteller", +# "Gastgeber", +# "Gastgeberin", +# "Gastgeberinnen", +# "Gastgeberinnen / Gastgeber", +# "Kooperationspartner", +# "Kooperationspartnerin", +# "Kooperationspartnerinnen", +# "Kooperationspartnerinnen / Kooperationspartner", +# "Leiter", +# "Leiterin", +# "Leiterinnen", +# "Leiterinnen / Leiter", +# "Mitantragsteller", +# "Mitantragstellerin", +# "Mitantragstellerinnen", +# "Mitantragstellerinnen / Mitantragsteller", +# "Mitverantwortlich", +# "Mitverantwortlich(e)", +# "Mitverantwortliche", +# "Sprecher", +# "Sprecher (IGK-Partner)", +# "Sprecherin", +# "Sprecherin (IGK-Partner)", +# "Sprecherinnen", +# "Sprecherinnen (IGK-Partner) / Sprecher (IGK-Partner)", +# "Sprecherinnen / Sprecher", +# "Teilprojektleiter", +# "Teilprojektleiterin", +# "Teilprojektleiterinnen", +# "Teilprojektleiterinnen / Teilprojektleiter", +# "ausländ. Mitantragstellerin", +# "ausländ. Mitantragstellerinnen", +# "ausländ. Mitantragstellerinnen / ausländische Mitantragsteller", +# "ausländische Mitantragsteller", +# "ausländischer Mitantragsteller", +# "beteiligte Wissenschaftler", +# "beteiligte Wissenschaftlerin", +# "beteiligte Wissenschaftlerinnen", +# "beteiligte Wissenschaftlerinnen / beteiligte Wissenschaftler", +# "beteiligter Wissenschaftler", +# "person_creater_name", +# "stellvertr. Sprecher", +# "stellvertr. Sprecherin", +# "stellvertr. Sprecherinnen / stellvertr. Sprecher" +# ] +# } +# } +# ] +# } +# } +# } + +### +GET https://inse.nes.uni-due.de/elastic/projects_dfg_all/_search +Authorization: ApiKey bG1NSWc1NEJPZ3FnTGZCZXRSSEg6VnJXRFd5SnpSTTNWc1VPT01FMEhMZw== +Content-Type: application/json + +{ + "size": 100, + "query": { + "multi_match": { + "query": "Universität Duisburg-Essen", + "type": "phrase", + "fields": [ + "person_creater_address" + ] + } + } +} + + +### +GET https://inse.nes.uni-due.de/elastic/projects_dfg_all/_search +Authorization: ApiKey bG1NSWc1NEJPZ3FnTGZCZXRSSEg6VnJXRFd5SnpSTTNWc1VPT01FMEhMZw== +Content-Type: application/json + +{ + "size": 100, + "query": { + "multi_match": { + "query": "Mathias Ulbricht", + "type": "phrase", + "fields": [ + "Antragsteller", + "Antragstellerin", + "Sprecher", + "Sprecherin", + "Leiter", + "Leiterin", + "beteiligte Wissenschaftlerinnen / beteiligte Wissenschaftler", + "Teilprojektleiter" + ] + } + } +} + +# { +# "size": 100, +# "query": { +# "multi_match": { +# "query": "Duisburg-Essen", +# "fields": [ +# "Antragstellende Institution", +# "Mitantragstellende Institution", +# "Beteiligte Institution" +# ] +# } +# } +# } + +# "aggs": { + +# "antragstellende": { + +# "terms": { + +# "field": "Antragstellende Institution.keyword", + +# "size": 100 + +# } + +# }, + +# "mitantragstellende": { + +# "terms": { + +# "field": "Mitantragstellende Institution.keyword", + +# "size": 100 + +# } + +# }, + +# "beteiligte": { + +# "terms": { + +# "field": "Beteiligte Institution.keyword", + +# "size": 100 + +# } + +# }, + +# "partner": { + +# "terms": { + +# "field": "Partnerorganisation.keyword", + +# "size": 100 + +# } + +# } + +# } + +# } + + +### +GET https://inse.nes.uni-due.de/elastic/projects_bund/_mapping +Authorization: ApiKey bG1NSWc1NEJPZ3FnTGZCZXRSSEg6VnJXRFd5SnpSTTNWc1VPT01FMEhMZw== +Content-Type: application/json + +### +GET https://inse.nes.uni-due.de/elastic/projects_bund/_search +Authorization: ApiKey bG1NSWc1NEJPZ3FnTGZCZXRSSEg6VnJXRFd5SnpSTTNWc1VPT01FMEhMZw== +Content-Type: application/json + +{ + + "size": 10, + "from": 1000, + "query": { + "match": { + "Zuwendungsempf\u00e4nger": { + "query": "Universit\u00e4t Duisburg-Essen", + "operator": "and" + } + } + }, + "sort": [ + { + "Thema.keyword": { + "order": "asc" + } + } + ] + +} + +#{'size': 10, 'from': 0, 'query': {'match': {'Zuwendungsempfänger': {'query': 'Universität Duisburg-Essen', 'operator': 'and'}}}, 'sort': [{'Thema': {'order': 'asc'}}]} + +# { +# "size": 1000, +# "query": { +# "match": { +# "Zuwendungsempfänger": { +# "query": "Universität Duisburg-Essen", +# "operator": "and" +# } +# } +# } +# } + +### +GET https://inse.nes.uni-due.de/elastic/projects_eu_all/_mapping +Authorization: ApiKey bG1NSWc1NEJPZ3FnTGZCZXRSSEg6VnJXRFd5SnpSTTNWc1VPT01FMEhMZw== +Content-Type: application/json + + +### +GET https://inse.nes.uni-due.de/elastic/projects_eu_all/_search +Authorization: ApiKey bG1NSWc1NEJPZ3FnTGZCZXRSSEg6VnJXRFd5SnpSTTNWc1VPT01FMEhMZw== +Content-Type: application/json + +{ + "size": 10, + "from": 0, + "query": { + "bool": { + "must": [ + { + "match_phrase_prefix": { + "title": { + "query": "A", + "max_expansions": 50 + } + } + }, + { + "nested": { + "path": "organization_nested", + "query": { + "bool": { + "should": [ + { "match": { "organization_nested.name": { "query": "university duisburg essen", "operator": "and" } } }, + { "match": { "organization_nested.name": { "query": "universitaet duisburg essen", "operator": "and" } } }, + { "match": { "organization_nested.name": { "query": "universität duisburg-essen", "operator": "and" } } }, + { "match": { "organization_nested.name": { "query": "universitat duisburg-essen", "operator": "and" } } } + ], + "minimum_should_match": 1 + } + } + } + } + ] + } + }, + "sort": [ + { + "title.keyword": { + "order": "asc" + } + } + ] +} + +# { +# "size": 10, +# "from": 0, +# "query": { +# "bool": { +# "must": [ +# { +# "match_phrase_prefix": { +# "title": { +# "query": "Cars", +# "max_expansions": 50 +# } +# } +# } +# ] +# } +# } +# } + + +### +GET https://inse.nes.uni-due.de/elastic/projects_eu_all/_search +Authorization: ApiKey bG1NSWc1NEJPZ3FnTGZCZXRSSEg6VnJXRFd5SnpSTTNWc1VPT01FMEhMZw== +Content-Type: application/json + +{ + + "size": 0, + + "query": { + + "nested": { + + "path": "organization_nested", + + "query": { + + "match": { + + "organization_nested.name": "Dortmund" + + } + + } + + } + + }, + + "aggs": { + + "organizations": { + + "nested": { + + "path": "organization_nested" + + }, + + "aggs": { + + "matching": { + + "filter": { + + "match": { + + "organization_nested.name": "Dortmund" + + } + + }, + + "aggs": { + + "names": { + + "terms": { + + "field": "organization_nested.name.keyword", + + "size": 100 + + } + + } + + } + + } + + } + + } + + } + +} + ### GET https://inse.nes.uni-due.de/elastic/ude_organization_content_august_2025/_search @@ -24,10 +660,107 @@ Content-Type: application/json ### +GET https://project.nes.uni-due.de/elastic/openalex-authors/_mapping +Authorization: ApiKey am1wWXBaMEJEVWJoZkE5MnBaUlk6TWlvbW1LRlMzNjdDUHgzYmVkUmI5UQ== +Content-Type: application/json + +### + GET https://project.nes.uni-due.de/elastic/openalex-authors/_search Authorization: ApiKey am1wWXBaMEJEVWJoZkE5MnBaUlk6TWlvbW1LRlMzNjdDUHgzYmVkUmI5UQ== Content-Type: application/json +{ + "_source": ["id", "display_name"], + "query": { + "term": { + "id": { + "value": "https://openalex.org/A5023430147" + } + } + }, + "size": 1 +} + +### + +GET https://project.nes.uni-due.de/elastic/openalex-authors/_search +Authorization: ApiKey am1wWXBaMEJEVWJoZkE5MnBaUlk6TWlvbW1LRlMzNjdDUHgzYmVkUmI5UQ== +Content-Type: application/json + + +### + +GET https://project.nes.uni-due.de/elastic/openalex-authors/_search +Authorization: ApiKey am1wWXBaMEJEVWJoZkE5MnBaUlk6TWlvbW1LRlMzNjdDUHgzYmVkUmI5UQ== +Content-Type: application/json + +{ + "_source": [ + "display_name", + "works_count" + ], + "size": 1000, + "query": { + "bool": { + "must": [ + { + "range": { + "works_count": { "gte": 10 } + } + }, + { + "nested": { + "path": "affiliations", + "query": { + "bool": { + "must": [ + { + "term": { + "affiliations.institution.id": "https://openalex.org/I62318514" + } + }, + { + "range": { + "affiliations.years": { "gte": 2025, "lte": 2026 } + } + }, + { + "script": { + "script": { + "source": "doc['affiliations.years'].length >= params.expected_length", + "params": { + "expected_length": 15 + } + } + } + } + ] + } + } + } + } + ] + } + }, + "sort": [ + { "works_count": { "order": "desc" } } + ] +} + +# { +# "query": { +# "nested": { +# "path": "last_known_institutions", +# "query": { +# "term": { +# "last_known_institutions.id": "https://openalex.org/I62318514" +# } +# } +# } +# } +# } + # { # "query": { @@ -36,9 +769,42 @@ Content-Type: application/json # "query": "Tobias Janelt" # } # } - # } +### + +GET https://project.nes.uni-due.de/elastic/openalex-awards/_mapping +Authorization: ApiKey am1wWXBaMEJEVWJoZkE5MnBaUlk6TWlvbW1LRlMzNjdDUHgzYmVkUmI5UQ== +Content-Type: application/json + +### + +GET https://project.nes.uni-due.de/elastic/openalex-authors/_mapping +Authorization: ApiKey am1wWXBaMEJEVWJoZkE5MnBaUlk6TWlvbW1LRlMzNjdDUHgzYmVkUmI5UQ== +Content-Type: application/json + +### + +GET https://project.nes.uni-due.de/elastic/openalex-awards/_search +Authorization: ApiKey am1wWXBaMEJEVWJoZkE5MnBaUlk6TWlvbW1LRlMzNjdDUHgzYmVkUmI5UQ== +Content-Type: application/json + +{ + "size": 1000, + "query": { + "bool": { + "must": [ + { + "prefix": { + "landing_page_url": "https://gepris.dfg.de/gepris/projekt/" + } + } + ] + } + } +} + + ### GET https://project.nes.uni-due.de/elastic/openalex-authors/_search diff --git a/webapp/build.gradle b/webapp/build.gradle index d6f8a0a4..d3f69e7e 100644 --- a/webapp/build.gradle +++ b/webapp/build.gradle @@ -39,7 +39,7 @@ task generateOpenApiClient(type: GenerateTask) { description = "Generates the API client using OpenAPI Generator" generatorName = "typescript-angular" - inputSpec = file("../service/build/openapi/inse-service.openapi.json").path + inputSpec = file("../service/build/openapi/inse-service.openapi.json").toURI().toString() outputDir = file("src/app/api").path } diff --git a/webapp/openapi.json b/webapp/openapi.json deleted file mode 100644 index a0e514dd..00000000 --- a/webapp/openapi.json +++ /dev/null @@ -1,182 +0,0 @@ -{ - "openapi": "3.1.0", - "info": { - "title": "Innovation Search Engine API", - "description": "API for the Innovation Search Engine (INSE) application.", - "version": "0.1.0" - }, - "servers": [ - { - "url": "http://localhost:8000", - "description": "Local development server" - } - ], - "paths": { - "/api/person/network/{raw_user_id}": { - "get": { - "tags": ["Person Network"], - "summary": "Get a person's collaboration network.", - "description": "Returns a person's collaboration network based on their works and co-authors.", - "operationId": "getCollaborationNetwork", - "parameters": [ - { - "name": "raw_user_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "description": "The raw user ID of the person.", - "title": "Raw User Id" - }, - "description": "The raw user ID of the person." - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CollaborationNetwork" - } - } - } - }, - "404": { "description": "Person not found" }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/HTTPValidationError" } - } - } - } - } - } - } - }, - "components": { - "schemas": { - "CollaborationNetwork": { - "properties": { - "raw_person_id": { - "type": "string", - "title": "Raw Person ID", - "description": "The raw person ID of the person whose collaboration network this is." - }, - "nodes": { - "items": { - "$ref": "#/components/schemas/CollaborationNetworkNode" - }, - "type": "array", - "title": "Collaboration Network Nodes", - "description": "The nodes in the collaboration network." - }, - "edges": { - "items": { - "$ref": "#/components/schemas/CollaborationNetworkEdge" - }, - "type": "array", - "title": "Collaboration Network Edges", - "description": "The edges in the collaboration network." - }, - "works": { - "items": { "$ref": "#/components/schemas/CollaborationWork" }, - "type": "array", - "title": "Collaboration Works", - "description": "The works that represent the collaborations in the collaboration network." - } - }, - "type": "object", - "required": ["raw_person_id", "nodes", "edges", "works"], - "title": "CollaborationNetwork" - }, - "CollaborationNetworkEdge": { - "properties": { - "raw_source_person_id": { - "type": "string", - "title": "Source Raw Person ID", - "description": "The raw person ID of the source person." - }, - "raw_target_person_id": { - "type": "string", - "title": "Target Raw Person ID", - "description": "The raw person ID of the target person." - }, - "raw_work_ids": { - "items": { "type": "string" }, - "type": "array", - "title": "Work IDs", - "description": "The list of work IDs that represent the collaborations between the two persons." - } - }, - "type": "object", - "required": [ - "raw_source_person_id", - "raw_target_person_id", - "raw_work_ids" - ], - "title": "CollaborationNetworkEdge" - }, - "CollaborationNetworkNode": { - "properties": { - "raw_person_id": { - "type": "string", - "title": "Raw Person ID", - "description": "The raw person ID of the person." - }, - "display_name": { - "type": "string", - "title": "Display Name", - "description": "The display name of the person." - } - }, - "type": "object", - "required": ["raw_person_id", "display_name"], - "title": "CollaborationNetworkNode" - }, - "CollaborationWork": { - "properties": { - "raw_work_id": { - "type": "string", - "title": "Raw Work ID", - "description": "The raw work ID of the work." - }, - "display_title": { - "type": "string", - "title": "Display Title", - "description": "The display title of the work." - } - }, - "type": "object", - "required": ["raw_work_id", "display_title"], - "title": "CollaborationWork" - }, - "HTTPValidationError": { - "properties": { - "detail": { - "items": { "$ref": "#/components/schemas/ValidationError" }, - "type": "array", - "title": "Detail" - } - }, - "type": "object", - "title": "HTTPValidationError" - }, - "ValidationError": { - "properties": { - "loc": { - "items": { "anyOf": [{ "type": "string" }, { "type": "integer" }] }, - "type": "array", - "title": "Location" - }, - "msg": { "type": "string", "title": "Message" }, - "type": { "type": "string", "title": "Error Type" } - }, - "type": "object", - "required": ["loc", "msg", "type"], - "title": "ValidationError" - } - } - } -} diff --git a/webapp/src/app/api/.openapi-generator/FILES b/webapp/src/app/api/.openapi-generator/FILES index 9779c964..8e08ac07 100644 --- a/webapp/src/app/api/.openapi-generator/FILES +++ b/webapp/src/app/api/.openapi-generator/FILES @@ -1,117 +1,122 @@ .gitignore +.openapi-generator-ignore README.md api.base.service.ts api.module.ts api/api.ts api/funding.service.ts -api/funding.serviceInterface.ts -api/inse-account-service.service.ts -api/inse-account-service.serviceInterface.ts -api/inse-service.service.ts -api/inse-service.serviceInterface.ts +api/iNSEAccountService.service.ts +api/iNSEService.service.ts api/institutions.service.ts -api/institutions.serviceInterface.ts api/items.service.ts -api/items.serviceInterface.ts -api/person-network.service.ts -api/person-network.serviceInterface.ts +api/personNetwork.service.ts api/persons.service.ts -api/persons.serviceInterface.ts +api/projects.service.ts api/topics.service.ts -api/topics.serviceInterface.ts api/works.service.ts -api/works.serviceInterface.ts configuration.ts encoder.ts git_push.sh index.ts -model/access-grant.ts -model/auth-account.ts -model/auth-scope.ts -model/author-affiliations-inner.ts -model/author-counts-by-year-inner.ts -model/author-ids.ts -model/author-network-node.ts -model/author-parsed-longest-name.ts -model/author-position-count.ts -model/author-summary-stats.ts +model/accessGrant.ts +model/authAccount.ts +model/authScope.ts model/author.ts -model/authors-filter-properties.ts -model/authors-list-response.ts +model/authorAffiliationsInner.ts +model/authorCountsByYearInner.ts +model/authorIds.ts +model/authorNetworkNode.ts +model/authorParsedLongestName.ts +model/authorPositionCount.ts +model/authorSummaryStats.ts +model/authorsFilterProperties.ts +model/authorsListResponse.ts model/authorship.ts -model/autocomplete-response-meta.ts -model/autocomplete-response-results-inner.ts -model/autocomplete-response.ts +model/autocompleteResponse.ts +model/autocompleteResponseMeta.ts +model/autocompleteResponseResultsInner.ts model/award.ts -model/collaboration-network-edge.ts -model/collaboration-network-node-type.ts -model/collaboration-network.ts -model/cost-usd.ts -model/custom-author.ts -model/custom-authors-list-response.ts -model/dehydrated-author.ts -model/dehydrated-funder.ts -model/dehydrated-institution.ts -model/dehydrated-source.ts -model/filter-information.ts -model/filter-properties.ts -model/funder-by-author.ts -model/funders-by-author-response.ts +model/bundProject.ts +model/bundProjectPage.ts +model/categoryNested.ts +model/collaborationNetwork.ts +model/collaborationNetworkEdge.ts +model/collaborationNetworkNodeType.ts +model/costUsd.ts +model/customAuthor.ts +model/customAuthorsListResponse.ts +model/dehydratedAuthor.ts +model/dehydratedFunder.ts +model/dehydratedInstitution.ts +model/dehydratedSource.ts +model/dfgProjectPage.ts +model/dfgProjectSummary.ts +model/displayCodeSplittedNested.ts +model/euProject.ts +model/euProjectPage.ts +model/filterInformation.ts +model/filterProperties.ts +model/funderByAuthor.ts +model/fundersByAuthorResponse.ts model/fwci.ts -model/group-by-result.ts -model/http-validation-error.ts -model/identity-grant.ts -model/institution-geo.ts -model/institution-ids.ts -model/institution-information.ts -model/institution-network-node.ts +model/groupByResult.ts +model/hTTPValidationError.ts +model/identityGrant.ts model/institution.ts -model/institutions-list-response.ts -model/item-create.ts -model/item-page.ts +model/institutionGeo.ts +model/institutionIds.ts +model/institutionInformation.ts +model/institutionNetworkNode.ts +model/institutionsListResponse.ts model/item.ts +model/itemCreate.ts +model/itemPage.ts +model/keywordNested.ts model/latitude.ts model/location.ts model/longitude.ts model/meta.ts -model/model2-yr-mean-citedness.ts +model/model2YrMeanCitedness.ts model/models.ts -model/open-access.ts -model/person-bio.ts -model/publication-ids-by-author-position.ts -model/publications-by-author-response.ts +model/openAccess.ts +model/organizationNested.ts +model/personBio.ts +model/programmeNested.ts +model/publicationDetailByFunder.ts +model/publicationIdsByAuthorPosition.ts +model/publicationsByAuthorResponse.ts model/score.ts -model/topic-count.ts -model/topic-domain.ts -model/topic-field.ts -model/topic-ids.ts -model/topic-subfield.ts model/topic.ts -model/topics-by-time.ts -model/topics-by-year.ts -model/topics-list-response.ts -model/validation-error-loc-inner.ts -model/validation-error.ts +model/topicCount.ts +model/topicDomain.ts +model/topicField.ts +model/topicIds.ts +model/topicSubfield.ts +model/topicsByTime.ts +model/topicsByYear.ts +model/topicsListResponse.ts +model/validationError.ts +model/validationErrorLocInner.ts model/value.ts -model/work-biblio.ts -model/work-citation-normalized-percentile.ts -model/work-cited-by-percentile-year.ts -model/work-counts-by-year-inner.ts -model/work-has-content.ts -model/work-ids.ts -model/work-keyword.ts -model/work-mesh-inner.ts -model/work-network-node.ts -model/work-page.ts -model/work-sustainable-development-goals-inner.ts -model/work-topic-domain.ts -model/work-topic-field.ts -model/work-topic-information.ts -model/work-topic-subfield.ts -model/work-topic.ts model/work.ts -model/works-filter-properties.ts -model/works-list-response.ts +model/workBiblio.ts +model/workCitationNormalizedPercentile.ts +model/workCitedByPercentileYear.ts +model/workCountsByYearInner.ts +model/workHasContent.ts +model/workIds.ts +model/workKeyword.ts +model/workMeshInner.ts +model/workNetworkNode.ts +model/workPage.ts +model/workSustainableDevelopmentGoalsInner.ts +model/workTopic.ts +model/workTopicDomain.ts +model/workTopicField.ts +model/workTopicInformation.ts +model/workTopicSubfield.ts +model/worksFilterProperties.ts +model/worksListResponse.ts param.ts provide-api.ts variables.ts diff --git a/webapp/src/app/api/api/api.ts b/webapp/src/app/api/api/api.ts index a51f46b8..559a00bc 100644 --- a/webapp/src/app/api/api/api.ts +++ b/webapp/src/app/api/api/api.ts @@ -1,30 +1,23 @@ export * from './funding.service'; import { FundingService } from './funding.service'; -export * from './funding.serviceInterface'; -export * from './inse-account-service.service'; -import { INSEAccountServiceService } from './inse-account-service.service'; -export * from './inse-account-service.serviceInterface'; -export * from './inse-service.service'; -import { INSEServiceService } from './inse-service.service'; -export * from './inse-service.serviceInterface'; +export * from './iNSEAccountService.service'; +import { INSEAccountServiceService } from './iNSEAccountService.service'; +export * from './iNSEService.service'; +import { INSEServiceService } from './iNSEService.service'; export * from './institutions.service'; import { InstitutionsService } from './institutions.service'; -export * from './institutions.serviceInterface'; export * from './items.service'; import { ItemsService } from './items.service'; -export * from './items.serviceInterface'; -export * from './person-network.service'; -import { PersonNetworkService } from './person-network.service'; -export * from './person-network.serviceInterface'; +export * from './personNetwork.service'; +import { PersonNetworkService } from './personNetwork.service'; export * from './persons.service'; import { PersonsService } from './persons.service'; -export * from './persons.serviceInterface'; +export * from './projects.service'; +import { ProjectsService } from './projects.service'; export * from './topics.service'; import { TopicsService } from './topics.service'; -export * from './topics.serviceInterface'; export * from './works.service'; import { WorksService } from './works.service'; -export * from './works.serviceInterface'; export const APIS = [ FundingService, INSEAccountServiceService, @@ -33,6 +26,7 @@ export const APIS = [ ItemsService, PersonNetworkService, PersonsService, + ProjectsService, TopicsService, WorksService, ]; diff --git a/webapp/src/app/api/api/funding.service.ts b/webapp/src/app/api/api/funding.service.ts index 340b881f..f1f0a1a7 100644 --- a/webapp/src/app/api/api/funding.service.ts +++ b/webapp/src/app/api/api/funding.service.ts @@ -23,25 +23,21 @@ import { CustomHttpParameterCodec } from '../encoder'; import { Observable } from 'rxjs'; // @ts-ignore -import { FundersByAuthorResponse } from '../model/funders-by-author-response'; +import { FundersByAuthorResponse } from '../model/fundersByAuthorResponse'; // @ts-ignore -import { HTTPValidationError } from '../model/http-validation-error'; +import { HTTPValidationError } from '../model/hTTPValidationError'; // @ts-ignore -import { PublicationsByAuthorResponse } from '../model/publications-by-author-response'; +import { PublicationsByAuthorResponse } from '../model/publicationsByAuthorResponse'; // @ts-ignore import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; import { Configuration } from '../configuration'; import { BaseService } from '../api.base.service'; -import { FundingServiceInterface } from './funding.serviceInterface'; @Injectable({ providedIn: 'root', }) -export class FundingService - extends BaseService - implements FundingServiceInterface -{ +export class FundingService extends BaseService { constructor( protected httpClient: HttpClient, @Optional() @Inject(BASE_PATH) basePath: string | string[], diff --git a/webapp/src/app/api/api/funding.serviceInterface.ts b/webapp/src/app/api/api/funding.serviceInterface.ts deleted file mode 100644 index 18504afd..00000000 --- a/webapp/src/app/api/api/funding.serviceInterface.ts +++ /dev/null @@ -1,49 +0,0 @@ -/** - * Innovation Search Engine API - * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -import { HttpHeaders } from '@angular/common/http'; - -import { Observable } from 'rxjs'; - -import { FundersByAuthorResponse } from '../model/models'; -import { HTTPValidationError } from '../model/models'; -import { PublicationsByAuthorResponse } from '../model/models'; - -import { Configuration } from '../configuration'; - -export interface FundingServiceInterface { - defaultHeaders: HttpHeaders; - configuration: Configuration; - - /** - * Get funding organizations by author. - * - * @endpoint get /api/inse-service/authors/{author_id}/funders - * @param authorId - */ - getFundersByAuthor( - authorId: string, - extraHttpRequestParams?: any, - ): Observable; - - /** - * Get funded publications by author. - * - * @endpoint get /api/inse-service/authors/{author_id}/publications - * @param authorId - * @param page - * @param pageSize - */ - getPublicationsByAuthor( - authorId: string, - page?: number, - pageSize?: number, - extraHttpRequestParams?: any, - ): Observable; -} diff --git a/webapp/src/app/api/api/inse-account-service.service.ts b/webapp/src/app/api/api/inse-account-service.service.ts deleted file mode 100644 index 4e455475..00000000 --- a/webapp/src/app/api/api/inse-account-service.service.ts +++ /dev/null @@ -1,347 +0,0 @@ -/** - * Innovation Search Engine API - * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -/* tslint:disable:no-unused-variable member-ordering */ - -import { Inject, Injectable, Optional } from '@angular/core'; -import { - HttpClient, - HttpHeaders, - HttpParams, - HttpResponse, - HttpEvent, - HttpParameterCodec, - HttpContext, -} from '@angular/common/http'; -import { CustomHttpParameterCodec } from '../encoder'; -import { Observable } from 'rxjs'; - -// @ts-ignore -import { AccessGrant } from '../model/access-grant'; -// @ts-ignore -import { HTTPValidationError } from '../model/http-validation-error'; -// @ts-ignore -import { IdentityGrant } from '../model/identity-grant'; - -// @ts-ignore -import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; -import { Configuration } from '../configuration'; -import { BaseService } from '../api.base.service'; -import { INSEAccountServiceServiceInterface } from './inse-account-service.serviceInterface'; - -@Injectable({ - providedIn: 'root', -}) -export class INSEAccountServiceService - extends BaseService - implements INSEAccountServiceServiceInterface -{ - constructor( - protected httpClient: HttpClient, - @Optional() @Inject(BASE_PATH) basePath: string | string[], - @Optional() configuration?: Configuration, - ) { - super(basePath, configuration); - } - - /** - * Get Access Grant - * @endpoint post /inse-account/auth/access - * @param secret - * @param account - * @param organization - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getAccessGrantInseAccountAuthAccessPost( - secret: string, - account: number, - organization: number, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public getAccessGrantInseAccountAuthAccessPost( - secret: string, - account: number, - organization: number, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getAccessGrantInseAccountAuthAccessPost( - secret: string, - account: number, - organization: number, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getAccessGrantInseAccountAuthAccessPost( - secret: string, - account: number, - organization: number, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - if (secret === null || secret === undefined) { - throw new Error( - 'Required parameter secret was null or undefined when calling getAccessGrantInseAccountAuthAccessPost.', - ); - } - if (account === null || account === undefined) { - throw new Error( - 'Required parameter account was null or undefined when calling getAccessGrantInseAccountAuthAccessPost.', - ); - } - if (organization === null || organization === undefined) { - throw new Error( - 'Required parameter organization was null or undefined when calling getAccessGrantInseAccountAuthAccessPost.', - ); - } - - let localVarHeaders = this.defaultHeaders; - - const localVarHttpHeaderAcceptSelected: string | undefined = - options?.httpHeaderAccept ?? - this.configuration.selectHeaderAccept(['application/json']); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Accept', - localVarHttpHeaderAcceptSelected, - ); - } - - const localVarHttpContext: HttpContext = - options?.context ?? new HttpContext(); - - const localVarTransferCache: boolean = options?.transferCache ?? true; - - // to determine the Content-Type header - const consumes: string[] = ['application/x-www-form-urlencoded']; - - const canConsumeForm = this.canConsumeForm(consumes); - - let localVarFormParams: { append(param: string, value: any): any }; - let localVarUseForm = false; - let localVarConvertFormParamsToString = false; - if (localVarUseForm) { - localVarFormParams = new FormData(); - } else { - localVarFormParams = new HttpParams({ encoder: this.encoder }); - } - - if (secret !== undefined) { - localVarFormParams = - (localVarFormParams.append('secret', secret) as any) || - localVarFormParams; - } - if (account !== undefined) { - localVarFormParams = - (localVarFormParams.append('account', account) as any) || - localVarFormParams; - } - if (organization !== undefined) { - localVarFormParams = - (localVarFormParams.append('organization', organization) as any) || - localVarFormParams; - } - - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if ( - this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) - ) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } - - let localVarPath = `/inse-account/auth/access`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request( - 'post', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - body: localVarConvertFormParamsToString - ? localVarFormParams.toString() - : localVarFormParams, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } - - /** - * Get Identity Grant - * @endpoint post /inse-account/auth/id - * @param username - * @param password - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getIdentityGrantInseAccountAuthIdPost( - username: string, - password: string, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public getIdentityGrantInseAccountAuthIdPost( - username: string, - password: string, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getIdentityGrantInseAccountAuthIdPost( - username: string, - password: string, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getIdentityGrantInseAccountAuthIdPost( - username: string, - password: string, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - if (username === null || username === undefined) { - throw new Error( - 'Required parameter username was null or undefined when calling getIdentityGrantInseAccountAuthIdPost.', - ); - } - if (password === null || password === undefined) { - throw new Error( - 'Required parameter password was null or undefined when calling getIdentityGrantInseAccountAuthIdPost.', - ); - } - - let localVarHeaders = this.defaultHeaders; - - const localVarHttpHeaderAcceptSelected: string | undefined = - options?.httpHeaderAccept ?? - this.configuration.selectHeaderAccept(['application/json']); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Accept', - localVarHttpHeaderAcceptSelected, - ); - } - - const localVarHttpContext: HttpContext = - options?.context ?? new HttpContext(); - - const localVarTransferCache: boolean = options?.transferCache ?? true; - - // to determine the Content-Type header - const consumes: string[] = ['application/x-www-form-urlencoded']; - - const canConsumeForm = this.canConsumeForm(consumes); - - let localVarFormParams: { append(param: string, value: any): any }; - let localVarUseForm = false; - let localVarConvertFormParamsToString = false; - if (localVarUseForm) { - localVarFormParams = new FormData(); - } else { - localVarFormParams = new HttpParams({ encoder: this.encoder }); - } - - if (username !== undefined) { - localVarFormParams = - (localVarFormParams.append('username', username) as any) || - localVarFormParams; - } - if (password !== undefined) { - localVarFormParams = - (localVarFormParams.append('password', password) as any) || - localVarFormParams; - } - - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if ( - this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) - ) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } - - let localVarPath = `/inse-account/auth/id`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request( - 'post', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - body: localVarConvertFormParamsToString - ? localVarFormParams.toString() - : localVarFormParams, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } -} diff --git a/webapp/src/app/api/api/inse-account-service.serviceInterface.ts b/webapp/src/app/api/api/inse-account-service.serviceInterface.ts deleted file mode 100644 index 4f3d6db7..00000000 --- a/webapp/src/app/api/api/inse-account-service.serviceInterface.ts +++ /dev/null @@ -1,51 +0,0 @@ -/** - * Innovation Search Engine API - * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -import { HttpHeaders } from '@angular/common/http'; - -import { Observable } from 'rxjs'; - -import { AccessGrant } from '../model/models'; -import { HTTPValidationError } from '../model/models'; -import { IdentityGrant } from '../model/models'; - -import { Configuration } from '../configuration'; - -export interface INSEAccountServiceServiceInterface { - defaultHeaders: HttpHeaders; - configuration: Configuration; - - /** - * Get Access Grant - * - * @endpoint post /inse-account/auth/access - * @param secret - * @param account - * @param organization - */ - getAccessGrantInseAccountAuthAccessPost( - secret: string, - account: number, - organization: number, - extraHttpRequestParams?: any, - ): Observable; - - /** - * Get Identity Grant - * - * @endpoint post /inse-account/auth/id - * @param username - * @param password - */ - getIdentityGrantInseAccountAuthIdPost( - username: string, - password: string, - extraHttpRequestParams?: any, - ): Observable; -} diff --git a/webapp/src/app/api/api/inse-service.service.ts b/webapp/src/app/api/api/inse-service.service.ts deleted file mode 100644 index 1ce8270c..00000000 --- a/webapp/src/app/api/api/inse-service.service.ts +++ /dev/null @@ -1,957 +0,0 @@ -/** - * Innovation Search Engine API - * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -/* tslint:disable:no-unused-variable member-ordering */ - -import { Inject, Injectable, Optional } from '@angular/core'; -import { - HttpClient, - HttpHeaders, - HttpParams, - HttpResponse, - HttpEvent, - HttpParameterCodec, - HttpContext, -} from '@angular/common/http'; -import { CustomHttpParameterCodec } from '../encoder'; -import { Observable } from 'rxjs'; - -// @ts-ignore -import { HTTPValidationError } from '../model/http-validation-error'; -// @ts-ignore -import { Item } from '../model/item'; -// @ts-ignore -import { ItemCreate } from '../model/item-create'; -// @ts-ignore -import { ItemPage } from '../model/item-page'; - -// @ts-ignore -import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; -import { Configuration } from '../configuration'; -import { BaseService } from '../api.base.service'; -import { INSEServiceServiceInterface } from './inse-service.serviceInterface'; - -@Injectable({ - providedIn: 'root', -}) -export class INSEServiceService - extends BaseService - implements INSEServiceServiceInterface -{ - constructor( - protected httpClient: HttpClient, - @Optional() @Inject(BASE_PATH) basePath: string | string[], - @Optional() configuration?: Configuration, - ) { - super(basePath, configuration); - } - - /** - * Adds a new item. - * @endpoint post /api/inse-service/items - * @param itemCreate - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public addItem( - itemCreate: ItemCreate, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public addItem( - itemCreate: ItemCreate, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public addItem( - itemCreate: ItemCreate, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public addItem( - itemCreate: ItemCreate, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - if (itemCreate === null || itemCreate === undefined) { - throw new Error( - 'Required parameter itemCreate was null or undefined when calling addItem.', - ); - } - - let localVarHeaders = this.defaultHeaders; - - // authentication (bearer) required - localVarHeaders = this.configuration.addCredentialToHeaders( - 'bearer', - 'Authorization', - localVarHeaders, - 'Bearer ', - ); - - const localVarHttpHeaderAcceptSelected: string | undefined = - options?.httpHeaderAccept ?? - this.configuration.selectHeaderAccept(['application/json']); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Accept', - localVarHttpHeaderAcceptSelected, - ); - } - - const localVarHttpContext: HttpContext = - options?.context ?? new HttpContext(); - - const localVarTransferCache: boolean = options?.transferCache ?? true; - - // to determine the Content-Type header - const consumes: string[] = ['application/json']; - const httpContentTypeSelected: string | undefined = - this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Content-Type', - httpContentTypeSelected, - ); - } - - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if ( - this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) - ) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } - - let localVarPath = `/api/inse-service/items`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request('post', `${basePath}${localVarPath}`, { - context: localVarHttpContext, - body: itemCreate, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }); - } - - /** - * Builds the topic hierarchy cache. - * @endpoint get /api/inse-service/topics/cache - * @param pageSize Page size for each search page. - * @param saveJson Persist cache JSON to data folder. - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public buildTopicCache( - pageSize?: number, - saveJson?: boolean, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public buildTopicCache( - pageSize?: number, - saveJson?: boolean, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public buildTopicCache( - pageSize?: number, - saveJson?: boolean, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public buildTopicCache( - pageSize?: number, - saveJson?: boolean, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - let localVarQueryParameters = new HttpParams({ encoder: this.encoder }); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - pageSize, - 'page_size', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - saveJson, - 'save_json', - ); - - let localVarHeaders = this.defaultHeaders; - - const localVarHttpHeaderAcceptSelected: string | undefined = - options?.httpHeaderAccept ?? - this.configuration.selectHeaderAccept(['application/json']); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Accept', - localVarHttpHeaderAcceptSelected, - ); - } - - const localVarHttpContext: HttpContext = - options?.context ?? new HttpContext(); - - const localVarTransferCache: boolean = options?.transferCache ?? true; - - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if ( - this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) - ) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } - - let localVarPath = `/api/inse-service/topics/cache`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request( - 'get', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - params: localVarQueryParameters, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } - - /** - * Counts topic hierarchy occurrences from cache. - * @endpoint get /api/inse-service/topics/count - * @param topic Topic names (repeat parameter). - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public countTopicHierarchy( - topic: Array, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public countTopicHierarchy( - topic: Array, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public countTopicHierarchy( - topic: Array, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public countTopicHierarchy( - topic: Array, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - if (topic === null || topic === undefined) { - throw new Error( - 'Required parameter topic was null or undefined when calling countTopicHierarchy.', - ); - } - - let localVarQueryParameters = new HttpParams({ encoder: this.encoder }); - if (topic) { - topic.forEach((element) => { - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - element, - 'topic', - ); - }); - } - - let localVarHeaders = this.defaultHeaders; - - const localVarHttpHeaderAcceptSelected: string | undefined = - options?.httpHeaderAccept ?? - this.configuration.selectHeaderAccept(['application/json']); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Accept', - localVarHttpHeaderAcceptSelected, - ); - } - - const localVarHttpContext: HttpContext = - options?.context ?? new HttpContext(); - - const localVarTransferCache: boolean = options?.transferCache ?? true; - - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if ( - this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) - ) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } - - let localVarPath = `/api/inse-service/topics/count`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request( - 'get', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - params: localVarQueryParameters, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } - - /** - * Deletes the item with the id. - * @endpoint delete /api/inse-service/items/{id} - * @param id The item id. - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public deleteItem( - id: number, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public deleteItem( - id: number, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public deleteItem( - id: number, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public deleteItem( - id: number, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - if (id === null || id === undefined) { - throw new Error( - 'Required parameter id was null or undefined when calling deleteItem.', - ); - } - - let localVarHeaders = this.defaultHeaders; - - // authentication (bearer) required - localVarHeaders = this.configuration.addCredentialToHeaders( - 'bearer', - 'Authorization', - localVarHeaders, - 'Bearer ', - ); - - const localVarHttpHeaderAcceptSelected: string | undefined = - options?.httpHeaderAccept ?? - this.configuration.selectHeaderAccept(['application/json']); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Accept', - localVarHttpHeaderAcceptSelected, - ); - } - - const localVarHttpContext: HttpContext = - options?.context ?? new HttpContext(); - - const localVarTransferCache: boolean = options?.transferCache ?? true; - - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if ( - this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) - ) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } - - let localVarPath = `/api/inse-service/items/${this.configuration.encodeParam({ name: 'id', value: id, in: 'path', style: 'simple', explode: false, dataType: 'number', dataFormat: undefined })}`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request( - 'delete', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } - - /** - * Returns the item with the id. - * @endpoint get /api/inse-service/items/{id} - * @param id The item id. - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getItem( - id: number, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public getItem( - id: number, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getItem( - id: number, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getItem( - id: number, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - if (id === null || id === undefined) { - throw new Error( - 'Required parameter id was null or undefined when calling getItem.', - ); - } - - let localVarHeaders = this.defaultHeaders; - - // authentication (bearer) required - localVarHeaders = this.configuration.addCredentialToHeaders( - 'bearer', - 'Authorization', - localVarHeaders, - 'Bearer ', - ); - - const localVarHttpHeaderAcceptSelected: string | undefined = - options?.httpHeaderAccept ?? - this.configuration.selectHeaderAccept(['application/json']); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Accept', - localVarHttpHeaderAcceptSelected, - ); - } - - const localVarHttpContext: HttpContext = - options?.context ?? new HttpContext(); - - const localVarTransferCache: boolean = options?.transferCache ?? true; - - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if ( - this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) - ) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } - - let localVarPath = `/api/inse-service/items/${this.configuration.encodeParam({ name: 'id', value: id, in: 'path', style: 'simple', explode: false, dataType: 'number', dataFormat: undefined })}`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request('get', `${basePath}${localVarPath}`, { - context: localVarHttpContext, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }); - } - - /** - * Returns a page of items. - * @endpoint get /api/inse-service/items - * @param pageOffset The page offset. - * @param pageSize The page size. - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getItems( - pageOffset?: number, - pageSize?: number, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public getItems( - pageOffset?: number, - pageSize?: number, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getItems( - pageOffset?: number, - pageSize?: number, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getItems( - pageOffset?: number, - pageSize?: number, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - let localVarQueryParameters = new HttpParams({ encoder: this.encoder }); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - pageOffset, - 'pageOffset', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - pageSize, - 'pageSize', - ); - - let localVarHeaders = this.defaultHeaders; - - // authentication (bearer) required - localVarHeaders = this.configuration.addCredentialToHeaders( - 'bearer', - 'Authorization', - localVarHeaders, - 'Bearer ', - ); - - const localVarHttpHeaderAcceptSelected: string | undefined = - options?.httpHeaderAccept ?? - this.configuration.selectHeaderAccept(['application/json']); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Accept', - localVarHttpHeaderAcceptSelected, - ); - } - - const localVarHttpContext: HttpContext = - options?.context ?? new HttpContext(); - - const localVarTransferCache: boolean = options?.transferCache ?? true; - - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if ( - this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) - ) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } - - let localVarPath = `/api/inse-service/items`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request( - 'get', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - params: localVarQueryParameters, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } - - /** - * Returns the nested topic hierarchy (Domains -> Fields -> Subfields -> Topics). - * @endpoint get /api/inse-service/topics/hierarchy - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getTopicHierarchy( - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public getTopicHierarchy( - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getTopicHierarchy( - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getTopicHierarchy( - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - let localVarHeaders = this.defaultHeaders; - - const localVarHttpHeaderAcceptSelected: string | undefined = - options?.httpHeaderAccept ?? - this.configuration.selectHeaderAccept(['application/json']); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Accept', - localVarHttpHeaderAcceptSelected, - ); - } - - const localVarHttpContext: HttpContext = - options?.context ?? new HttpContext(); - - const localVarTransferCache: boolean = options?.transferCache ?? true; - - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if ( - this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) - ) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } - - let localVarPath = `/api/inse-service/topics/hierarchy`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request( - 'get', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } - - /** - * Updates the item with the id. - * @endpoint put /api/inse-service/items/{id} - * @param id The item id. - * @param itemCreate - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public updateItem( - id: number, - itemCreate: ItemCreate, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public updateItem( - id: number, - itemCreate: ItemCreate, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public updateItem( - id: number, - itemCreate: ItemCreate, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public updateItem( - id: number, - itemCreate: ItemCreate, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - if (id === null || id === undefined) { - throw new Error( - 'Required parameter id was null or undefined when calling updateItem.', - ); - } - if (itemCreate === null || itemCreate === undefined) { - throw new Error( - 'Required parameter itemCreate was null or undefined when calling updateItem.', - ); - } - - let localVarHeaders = this.defaultHeaders; - - // authentication (bearer) required - localVarHeaders = this.configuration.addCredentialToHeaders( - 'bearer', - 'Authorization', - localVarHeaders, - 'Bearer ', - ); - - const localVarHttpHeaderAcceptSelected: string | undefined = - options?.httpHeaderAccept ?? - this.configuration.selectHeaderAccept(['application/json']); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Accept', - localVarHttpHeaderAcceptSelected, - ); - } - - const localVarHttpContext: HttpContext = - options?.context ?? new HttpContext(); - - const localVarTransferCache: boolean = options?.transferCache ?? true; - - // to determine the Content-Type header - const consumes: string[] = ['application/json']; - const httpContentTypeSelected: string | undefined = - this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Content-Type', - httpContentTypeSelected, - ); - } - - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if ( - this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) - ) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } - - let localVarPath = `/api/inse-service/items/${this.configuration.encodeParam({ name: 'id', value: id, in: 'path', style: 'simple', explode: false, dataType: 'number', dataFormat: undefined })}`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request('put', `${basePath}${localVarPath}`, { - context: localVarHttpContext, - body: itemCreate, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }); - } -} diff --git a/webapp/src/app/api/api/inse-service.serviceInterface.ts b/webapp/src/app/api/api/inse-service.serviceInterface.ts deleted file mode 100644 index 97898ea0..00000000 --- a/webapp/src/app/api/api/inse-service.serviceInterface.ts +++ /dev/null @@ -1,108 +0,0 @@ -/** - * Innovation Search Engine API - * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -import { HttpHeaders } from '@angular/common/http'; - -import { Observable } from 'rxjs'; - -import { HTTPValidationError } from '../model/models'; -import { Item } from '../model/models'; -import { ItemCreate } from '../model/models'; -import { ItemPage } from '../model/models'; - -import { Configuration } from '../configuration'; - -export interface INSEServiceServiceInterface { - defaultHeaders: HttpHeaders; - configuration: Configuration; - - /** - * Adds a new item. - * - * @endpoint post /api/inse-service/items - * @param itemCreate - */ - addItem( - itemCreate: ItemCreate, - extraHttpRequestParams?: any, - ): Observable; - - /** - * Builds the topic hierarchy cache. - * - * @endpoint get /api/inse-service/topics/cache - * @param pageSize Page size for each search page. - * @param saveJson Persist cache JSON to data folder. - */ - buildTopicCache( - pageSize?: number, - saveJson?: boolean, - extraHttpRequestParams?: any, - ): Observable; - - /** - * Counts topic hierarchy occurrences from cache. - * - * @endpoint get /api/inse-service/topics/count - * @param topic Topic names (repeat parameter). - */ - countTopicHierarchy( - topic: Array, - extraHttpRequestParams?: any, - ): Observable; - - /** - * Deletes the item with the id. - * - * @endpoint delete /api/inse-service/items/{id} - * @param id The item id. - */ - deleteItem(id: number, extraHttpRequestParams?: any): Observable; - - /** - * Returns the item with the id. - * - * @endpoint get /api/inse-service/items/{id} - * @param id The item id. - */ - getItem(id: number, extraHttpRequestParams?: any): Observable; - - /** - * Returns a page of items. - * - * @endpoint get /api/inse-service/items - * @param pageOffset The page offset. - * @param pageSize The page size. - */ - getItems( - pageOffset?: number, - pageSize?: number, - extraHttpRequestParams?: any, - ): Observable; - - /** - * Returns the nested topic hierarchy (Domains -> Fields -> Subfields -> Topics). - * - * @endpoint get /api/inse-service/topics/hierarchy - */ - getTopicHierarchy(extraHttpRequestParams?: any): Observable; - - /** - * Updates the item with the id. - * - * @endpoint put /api/inse-service/items/{id} - * @param id The item id. - * @param itemCreate - */ - updateItem( - id: number, - itemCreate: ItemCreate, - extraHttpRequestParams?: any, - ): Observable; -} diff --git a/webapp/src/app/api/api/institutions.service.ts b/webapp/src/app/api/api/institutions.service.ts index 2700f021..e365240f 100644 --- a/webapp/src/app/api/api/institutions.service.ts +++ b/webapp/src/app/api/api/institutions.service.ts @@ -23,25 +23,23 @@ import { CustomHttpParameterCodec } from '../encoder'; import { Observable } from 'rxjs'; // @ts-ignore -import { AutocompleteResponse } from '../model/autocomplete-response'; +import { AutocompleteResponse } from '../model/autocompleteResponse'; // @ts-ignore -import { HTTPValidationError } from '../model/http-validation-error'; +import { HTTPValidationError } from '../model/hTTPValidationError'; // @ts-ignore -import { InstitutionsListResponse } from '../model/institutions-list-response'; +import { Institution } from '../model/institution'; +// @ts-ignore +import { InstitutionsListResponse } from '../model/institutionsListResponse'; // @ts-ignore import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; import { Configuration } from '../configuration'; import { BaseService } from '../api.base.service'; -import { InstitutionsServiceInterface } from './institutions.serviceInterface'; @Injectable({ providedIn: 'root', }) -export class InstitutionsService - extends BaseService - implements InstitutionsServiceInterface -{ +export class InstitutionsService extends BaseService { constructor( protected httpClient: HttpClient, @Optional() @Inject(BASE_PATH) basePath: string | string[], @@ -190,6 +188,109 @@ export class InstitutionsService ); } + /** + * Returns a single institution by ID. + * Returns a single institution by its OpenAlex ID. + * @endpoint get /api/institutions/{id} + * @param id + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getInstitutionById( + id: string, + observe?: 'body', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable; + public getInstitutionById( + id: string, + observe?: 'response', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable>; + public getInstitutionById( + id: string, + observe?: 'events', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable>; + public getInstitutionById( + id: string, + observe: any = 'body', + reportProgress: boolean = false, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable { + if (id === null || id === undefined) { + throw new Error( + 'Required parameter id was null or undefined when calling getInstitutionById.', + ); + } + + let localVarHeaders = this.defaultHeaders; + + const localVarHttpHeaderAcceptSelected: string | undefined = + options?.httpHeaderAccept ?? + this.configuration.selectHeaderAccept(['application/json']); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set( + 'Accept', + localVarHttpHeaderAcceptSelected, + ); + } + + const localVarHttpContext: HttpContext = + options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if ( + this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) + ) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/api/institutions/${this.configuration.encodeParam({ name: 'id', value: id, in: 'path', style: 'simple', explode: false, dataType: 'string', dataFormat: undefined })}`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request( + 'get', + `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined + ? { transferCache: localVarTransferCache } + : {}), + reportProgress: reportProgress, + }, + ); + } + /** * Returns a list of OpenAlex institutions. * @endpoint get /api/institutions diff --git a/webapp/src/app/api/api/institutions.serviceInterface.ts b/webapp/src/app/api/api/institutions.serviceInterface.ts deleted file mode 100644 index bfb7f511..00000000 --- a/webapp/src/app/api/api/institutions.serviceInterface.ts +++ /dev/null @@ -1,67 +0,0 @@ -/** - * Innovation Search Engine API - * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -import { HttpHeaders } from '@angular/common/http'; - -import { Observable } from 'rxjs'; - -import { AutocompleteResponse } from '../model/models'; -import { HTTPValidationError } from '../model/models'; -import { InstitutionsListResponse } from '../model/models'; - -import { Configuration } from '../configuration'; - -export interface InstitutionsServiceInterface { - defaultHeaders: HttpHeaders; - configuration: Configuration; - - /** - * Returns institution options for autocomplete inputs. - * - * @endpoint get /api/institutions/autocomplete - * @param query Institution search text, for example \'Duisburg Essen\'. - * @param countryCode Optional ISO country code filter. - * @param type Optional institution type filter. - * @param limit Maximum number of autocomplete options. - */ - autocompleteInstitutions( - query: string, - countryCode?: string, - type?: string, - limit?: number, - extraHttpRequestParams?: any, - ): Observable; - - /** - * Returns a list of OpenAlex institutions. - * - * @endpoint get /api/institutions - * @param search Full-text search, for example \'Duisburg Essen\'. - * @param filter OpenAlex filter, for example \'country_code:DE,type:education\'. - * @param sort Sort field, for example \'works_count:desc\'. - * @param groupBy OpenAlex group_by field, for example \'country_code\'. - * @param perPage Results per page. - * @param page Page number. Use cursor for deep pagination. - * @param cursor Cursor pagination token. Use \'*\' to start. - * @param sample Random sample size. Cannot be combined with sort or page. - * @param select Comma-separated fields to return. - */ - listInstitutions( - search?: string, - filter?: string, - sort?: string, - groupBy?: string, - perPage?: number, - page?: number, - cursor?: string, - sample?: number, - select?: string, - extraHttpRequestParams?: any, - ): Observable; -} diff --git a/webapp/src/app/api/api/items.service.ts b/webapp/src/app/api/api/items.service.ts index 969303a5..bc3c2293 100644 --- a/webapp/src/app/api/api/items.service.ts +++ b/webapp/src/app/api/api/items.service.ts @@ -23,24 +23,23 @@ import { CustomHttpParameterCodec } from '../encoder'; import { Observable } from 'rxjs'; // @ts-ignore -import { HTTPValidationError } from '../model/http-validation-error'; +import { HTTPValidationError } from '../model/hTTPValidationError'; // @ts-ignore import { Item } from '../model/item'; // @ts-ignore -import { ItemCreate } from '../model/item-create'; +import { ItemCreate } from '../model/itemCreate'; // @ts-ignore -import { ItemPage } from '../model/item-page'; +import { ItemPage } from '../model/itemPage'; // @ts-ignore import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; import { Configuration } from '../configuration'; import { BaseService } from '../api.base.service'; -import { ItemsServiceInterface } from './items.serviceInterface'; @Injectable({ providedIn: 'root', }) -export class ItemsService extends BaseService implements ItemsServiceInterface { +export class ItemsService extends BaseService { constructor( protected httpClient: HttpClient, @Optional() @Inject(BASE_PATH) basePath: string | string[], diff --git a/webapp/src/app/api/api/items.serviceInterface.ts b/webapp/src/app/api/api/items.serviceInterface.ts deleted file mode 100644 index 89cbb34c..00000000 --- a/webapp/src/app/api/api/items.serviceInterface.ts +++ /dev/null @@ -1,77 +0,0 @@ -/** - * Innovation Search Engine API - * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -import { HttpHeaders } from '@angular/common/http'; - -import { Observable } from 'rxjs'; - -import { HTTPValidationError } from '../model/models'; -import { Item } from '../model/models'; -import { ItemCreate } from '../model/models'; -import { ItemPage } from '../model/models'; - -import { Configuration } from '../configuration'; - -export interface ItemsServiceInterface { - defaultHeaders: HttpHeaders; - configuration: Configuration; - - /** - * Adds a new item. - * - * @endpoint post /api/inse-service/items - * @param itemCreate - */ - addItem( - itemCreate: ItemCreate, - extraHttpRequestParams?: any, - ): Observable; - - /** - * Deletes the item with the id. - * - * @endpoint delete /api/inse-service/items/{id} - * @param id The item id. - */ - deleteItem(id: number, extraHttpRequestParams?: any): Observable; - - /** - * Returns the item with the id. - * - * @endpoint get /api/inse-service/items/{id} - * @param id The item id. - */ - getItem(id: number, extraHttpRequestParams?: any): Observable; - - /** - * Returns a page of items. - * - * @endpoint get /api/inse-service/items - * @param pageOffset The page offset. - * @param pageSize The page size. - */ - getItems( - pageOffset?: number, - pageSize?: number, - extraHttpRequestParams?: any, - ): Observable; - - /** - * Updates the item with the id. - * - * @endpoint put /api/inse-service/items/{id} - * @param id The item id. - * @param itemCreate - */ - updateItem( - id: number, - itemCreate: ItemCreate, - extraHttpRequestParams?: any, - ): Observable; -} diff --git a/webapp/src/app/api/api/person-network.service.ts b/webapp/src/app/api/api/person-network.service.ts deleted file mode 100644 index 2dc1c55e..00000000 --- a/webapp/src/app/api/api/person-network.service.ts +++ /dev/null @@ -1,172 +0,0 @@ -/** - * Innovation Search Engine API - * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -/* tslint:disable:no-unused-variable member-ordering */ - -import { Inject, Injectable, Optional } from '@angular/core'; -import { - HttpClient, - HttpHeaders, - HttpParams, - HttpResponse, - HttpEvent, - HttpParameterCodec, - HttpContext, -} from '@angular/common/http'; -import { CustomHttpParameterCodec } from '../encoder'; -import { Observable } from 'rxjs'; - -// @ts-ignore -import { CollaborationNetwork } from '../model/collaboration-network'; -// @ts-ignore -import { FilterProperties } from '../model/filter-properties'; -// @ts-ignore -import { HTTPValidationError } from '../model/http-validation-error'; - -// @ts-ignore -import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; -import { Configuration } from '../configuration'; -import { BaseService } from '../api.base.service'; -import { PersonNetworkServiceInterface } from './person-network.serviceInterface'; - -@Injectable({ - providedIn: 'root', -}) -export class PersonNetworkService - extends BaseService - implements PersonNetworkServiceInterface -{ - constructor( - protected httpClient: HttpClient, - @Optional() @Inject(BASE_PATH) basePath: string | string[], - @Optional() configuration?: Configuration, - ) { - super(basePath, configuration); - } - - /** - * Get a person\'s collaboration network. - * Returns a person\'s collaboration network based on their works and co-authors. - * @endpoint post /api/person/network/{raw_user_id} - * @param rawUserId The raw user ID of the person. - * @param filterProperties - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getCollaborationNetwork( - rawUserId: string, - filterProperties?: FilterProperties, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public getCollaborationNetwork( - rawUserId: string, - filterProperties?: FilterProperties, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getCollaborationNetwork( - rawUserId: string, - filterProperties?: FilterProperties, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getCollaborationNetwork( - rawUserId: string, - filterProperties?: FilterProperties, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - if (rawUserId === null || rawUserId === undefined) { - throw new Error( - 'Required parameter rawUserId was null or undefined when calling getCollaborationNetwork.', - ); - } - - let localVarHeaders = this.defaultHeaders; - - const localVarHttpHeaderAcceptSelected: string | undefined = - options?.httpHeaderAccept ?? - this.configuration.selectHeaderAccept(['application/json']); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Accept', - localVarHttpHeaderAcceptSelected, - ); - } - - const localVarHttpContext: HttpContext = - options?.context ?? new HttpContext(); - - const localVarTransferCache: boolean = options?.transferCache ?? true; - - // to determine the Content-Type header - const consumes: string[] = ['application/json']; - const httpContentTypeSelected: string | undefined = - this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Content-Type', - httpContentTypeSelected, - ); - } - - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if ( - this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) - ) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } - - let localVarPath = `/api/person/network/${this.configuration.encodeParam({ name: 'rawUserId', value: rawUserId, in: 'path', style: 'simple', explode: false, dataType: 'string', dataFormat: undefined })}`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request( - 'post', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - body: filterProperties, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } -} diff --git a/webapp/src/app/api/api/person-network.serviceInterface.ts b/webapp/src/app/api/api/person-network.serviceInterface.ts deleted file mode 100644 index 1a3b6479..00000000 --- a/webapp/src/app/api/api/person-network.serviceInterface.ts +++ /dev/null @@ -1,36 +0,0 @@ -/** - * Innovation Search Engine API - * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -import { HttpHeaders } from '@angular/common/http'; - -import { Observable } from 'rxjs'; - -import { CollaborationNetwork } from '../model/models'; -import { FilterProperties } from '../model/models'; -import { HTTPValidationError } from '../model/models'; - -import { Configuration } from '../configuration'; - -export interface PersonNetworkServiceInterface { - defaultHeaders: HttpHeaders; - configuration: Configuration; - - /** - * Get a person\'s collaboration network. - * Returns a person\'s collaboration network based on their works and co-authors. - * @endpoint post /api/person/network/{raw_user_id} - * @param rawUserId The raw user ID of the person. - * @param filterProperties - */ - getCollaborationNetwork( - rawUserId: string, - filterProperties?: FilterProperties, - extraHttpRequestParams?: any, - ): Observable; -} diff --git a/webapp/src/app/api/api/persons.service.ts b/webapp/src/app/api/api/persons.service.ts index 141555ce..4c6206a2 100644 --- a/webapp/src/app/api/api/persons.service.ts +++ b/webapp/src/app/api/api/persons.service.ts @@ -23,27 +23,23 @@ import { CustomHttpParameterCodec } from '../encoder'; import { Observable } from 'rxjs'; // @ts-ignore -import { AuthorsListResponse } from '../model/authors-list-response'; +import { AuthorsListResponse } from '../model/authorsListResponse'; // @ts-ignore -import { CustomAuthorsListResponse } from '../model/custom-authors-list-response'; +import { CustomAuthorsListResponse } from '../model/customAuthorsListResponse'; // @ts-ignore -import { HTTPValidationError } from '../model/http-validation-error'; +import { HTTPValidationError } from '../model/hTTPValidationError'; // @ts-ignore -import { PersonBio } from '../model/person-bio'; +import { PersonBio } from '../model/personBio'; // @ts-ignore import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; import { Configuration } from '../configuration'; import { BaseService } from '../api.base.service'; -import { PersonsServiceInterface } from './persons.serviceInterface'; @Injectable({ providedIn: 'root', }) -export class PersonsService - extends BaseService - implements PersonsServiceInterface -{ +export class PersonsService extends BaseService { constructor( protected httpClient: HttpClient, @Optional() @Inject(BASE_PATH) basePath: string | string[], diff --git a/webapp/src/app/api/api/persons.serviceInterface.ts b/webapp/src/app/api/api/persons.serviceInterface.ts deleted file mode 100644 index 19c4be40..00000000 --- a/webapp/src/app/api/api/persons.serviceInterface.ts +++ /dev/null @@ -1,234 +0,0 @@ -/** - * Innovation Search Engine API - * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -import { HttpHeaders } from '@angular/common/http'; - -import { Observable } from 'rxjs'; - -import { AuthorsListResponse } from '../model/models'; -import { CustomAuthorsListResponse } from '../model/models'; -import { HTTPValidationError } from '../model/models'; -import { PersonBio } from '../model/models'; - -import { Configuration } from '../configuration'; - -export interface PersonsServiceInterface { - defaultHeaders: HttpHeaders; - configuration: Configuration; - - /** - * Generates a bio for a person by author ID. - * - * @endpoint get /api/inse-service/persons/bio - * @param authorId OpenAlex author ID (e.g., A5093075883) - * @param include Comma-separated list to include tags - */ - generatePersonBio( - authorId: string, - include?: string, - extraHttpRequestParams?: any, - ): Observable; - - /** - * Searches for person by ID. - * - * @endpoint get /api/inse-service/person/{id} - * @param id OpenAlex author ID - * @param include Which data do we require? include tags: topics_full, topic_share, summary_stats, ids, last_known_institutions, ... - */ - getPersonByID( - id: string, - include: string, - extraHttpRequestParams?: any, - ): Observable; - - /** - * Searches for person by ID. - * - * @endpoint get /api/inse-service/person/{id} - * @param id OpenAlex author ID - * @param include Which data do we require? include tags: topics_full, topic_share, summary_stats, ids, last_known_institutions, ... - */ - getPersonByID_1( - id: string, - include: string, - extraHttpRequestParams?: any, - ): Observable; - - /** - * Searches for persons by ID or name. - * - * @endpoint get /api/inse-service/persons/search - * @param authorId OpenAlex author ID (e.g., A5093075883) - * @param query Search query (e.g., Arman AND Arzani) - * @param include Comma-separated include tags: topics_full, topic_share, summary_stats, ids, last_known_institutions, sources, counts_by_year, works_api_url, dates, cited_by_count_boost - */ - searchPersons( - authorId?: string, - query?: string, - include?: string, - extraHttpRequestParams?: any, - ): Observable; - - /** - * Searches for person by name. - * - * @endpoint get /api/inse-service/persons/autocomplete - * @param authorName Authors name (e.g., Arman Arzani) - * @param include Which data do we require? include tags: topics_full, topic_share, summary_stats, ids, last_known_institutions, ... - */ - searchPersonsAutocomplete( - authorName: string, - include: string, - extraHttpRequestParams?: any, - ): Observable; - - /** - * Searches for person by name. - * - * @endpoint get /api/inse-service/persons/autocomplete - * @param authorName Authors name (e.g., Arman Arzani) - * @param include Which data do we require? include tags: topics_full, topic_share, summary_stats, ids, last_known_institutions, ... - */ - searchPersonsAutocomplete_2( - authorName: string, - include: string, - extraHttpRequestParams?: any, - ): Observable; - - /** - * Searches for persons by institution name. - * - * @endpoint get /api/inse-service/persons/searchByInstitution - * @param institutionName Institution name (e.g., MIT, Oxford University) - * @param include Which data do we require? include tags: topics_full, topic_share, summary_stats, ids, last_known_institutions, ... - * @param limit Limit of search page results - * @param pageOffset Offset of the result page - */ - searchPersonsByInstitution( - institutionName: string, - include: string, - limit?: number, - pageOffset?: number, - extraHttpRequestParams?: any, - ): Observable; - - /** - * Searches for persons by institution name. - * - * @endpoint get /api/inse-service/persons/searchByInstitution - * @param institutionName Institution name (e.g., MIT, Oxford University) - * @param include Which data do we require? include tags: topics_full, topic_share, summary_stats, ids, last_known_institutions, ... - * @param limit Limit of search page results - * @param pageOffset Offset of the result page - */ - searchPersonsByInstitution_3( - institutionName: string, - include: string, - limit?: number, - pageOffset?: number, - extraHttpRequestParams?: any, - ): Observable; - - /** - * Searches for person by name. - * - * @endpoint get /api/inse-service/persons/searchByName - * @param authorName Authors name (e.g., Arman Arzani) - * @param include Which data do we require? include tags: topics_full, topic_share, summary_stats, ids, last_known_institutions, ... - * @param limit Limit of search page results - * @param pageOffset Offset of the result page - */ - searchPersonsByName( - authorName: string, - include: string, - limit?: number, - pageOffset?: number, - extraHttpRequestParams?: any, - ): Observable; - - /** - * Searches for person by name. - * - * @endpoint get /api/inse-service/persons/searchByName - * @param authorName Authors name (e.g., Arman Arzani) - * @param include Which data do we require? include tags: topics_full, topic_share, summary_stats, ids, last_known_institutions, ... - * @param limit Limit of search page results - * @param pageOffset Offset of the result page - */ - searchPersonsByName_4( - authorName: string, - include: string, - limit?: number, - pageOffset?: number, - extraHttpRequestParams?: any, - ): Observable; - - /** - * Searches for persons with advanced filters (Topic & Institution) and pagination. - * - * @endpoint get /api/inse-service/persons/search-list - * @param query Search query (e.g., Arman AND Arzani) - * @param institutionName Filter by institution name - * @param sortBy Value to sort by - * @param sortOrder asc or desc? - * @param topic Filter by topic display names - * @param page Page number (1-indexed) - * @param pageSize Results per page - * @param include Comma-separated include tags - * @param strict Strict institution search by target year - * @param filterMode Filter mode: \'in\' or \'from\' - * @param filterYear Filter year - */ - searchPersonsList( - query?: string, - institutionName?: string, - sortBy?: string, - sortOrder?: string, - topic?: Array, - page?: number, - pageSize?: number, - include?: string, - strict?: boolean, - filterMode?: string, - filterYear?: number, - extraHttpRequestParams?: any, - ): Observable; - - /** - * Searches for persons with advanced filters (Topic & Institution) and pagination. - * - * @endpoint get /api/inse-service/persons/search-list - * @param query Search query (e.g., Arman AND Arzani) - * @param institutionName Filter by institution name - * @param sortBy Value to sort by - * @param sortOrder asc or desc? - * @param topic Filter by topic display names - * @param page Page number (1-indexed) - * @param pageSize Results per page - * @param include Comma-separated include tags - * @param strict Strict institution search by target year - * @param filterMode Filter mode: \'in\' or \'from\' - * @param filterYear Filter year - */ - searchPersonsList_5( - query?: string, - institutionName?: string, - sortBy?: string, - sortOrder?: string, - topic?: Array, - page?: number, - pageSize?: number, - include?: string, - strict?: boolean, - filterMode?: string, - filterYear?: number, - extraHttpRequestParams?: any, - ): Observable; -} diff --git a/webapp/src/app/api/api/projects.service.ts b/webapp/src/app/api/api/projects.service.ts new file mode 100644 index 00000000..b08a911f --- /dev/null +++ b/webapp/src/app/api/api/projects.service.ts @@ -0,0 +1,533 @@ +/** + * Innovation Search Engine API + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/* tslint:disable:no-unused-variable member-ordering */ + +import { Inject, Injectable, Optional } from '@angular/core'; +import { + HttpClient, + HttpHeaders, + HttpParams, + HttpResponse, + HttpEvent, + HttpParameterCodec, + HttpContext, +} from '@angular/common/http'; +import { CustomHttpParameterCodec } from '../encoder'; +import { Observable } from 'rxjs'; + +// @ts-ignore +import { BundProjectPage } from '../model/bundProjectPage'; +// @ts-ignore +import { DfgProjectPage } from '../model/dfgProjectPage'; +// @ts-ignore +import { EuProjectPage } from '../model/euProjectPage'; +// @ts-ignore +import { HTTPValidationError } from '../model/hTTPValidationError'; + +// @ts-ignore +import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; +import { Configuration } from '../configuration'; +import { BaseService } from '../api.base.service'; + +@Injectable({ + providedIn: 'root', +}) +export class ProjectsService extends BaseService { + constructor( + protected httpClient: HttpClient, + @Optional() @Inject(BASE_PATH) basePath: string | string[], + @Optional() configuration?: Configuration, + ) { + super(basePath, configuration); + } + + /** + * Get bund projects. + * Returns a page of bund projects based on the provided pagination parameters and optional institution filter. + * @endpoint get /api/projects/institution/bund/search + * @param institutionId The institution ID to filter by. + * @param topic The topic to filter by. + * @param page The page number. + * @param size The page size. + * @param sortBy The field to sort by. + * @param sortDirection The sort direction (asc or desc). + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getBundProjects( + institutionId: string, + topic?: string, + page?: number, + size?: number, + sortBy?: string, + sortDirection?: string, + observe?: 'body', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable; + public getBundProjects( + institutionId: string, + topic?: string, + page?: number, + size?: number, + sortBy?: string, + sortDirection?: string, + observe?: 'response', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable>; + public getBundProjects( + institutionId: string, + topic?: string, + page?: number, + size?: number, + sortBy?: string, + sortDirection?: string, + observe?: 'events', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable>; + public getBundProjects( + institutionId: string, + topic?: string, + page?: number, + size?: number, + sortBy?: string, + sortDirection?: string, + observe: any = 'body', + reportProgress: boolean = false, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable { + if (institutionId === null || institutionId === undefined) { + throw new Error( + 'Required parameter institutionId was null or undefined when calling getBundProjects.', + ); + } + + let localVarQueryParameters = new HttpParams({ encoder: this.encoder }); + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + institutionId, + 'institution_id', + ); + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + topic, + 'topic', + ); + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + page, + 'page', + ); + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + size, + 'size', + ); + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + sortBy, + 'sort_by', + ); + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + sortDirection, + 'sort_direction', + ); + + let localVarHeaders = this.defaultHeaders; + + const localVarHttpHeaderAcceptSelected: string | undefined = + options?.httpHeaderAccept ?? + this.configuration.selectHeaderAccept(['application/json']); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set( + 'Accept', + localVarHttpHeaderAcceptSelected, + ); + } + + const localVarHttpContext: HttpContext = + options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if ( + this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) + ) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/api/projects/institution/bund/search`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request( + 'get', + `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + params: localVarQueryParameters, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined + ? { transferCache: localVarTransferCache } + : {}), + reportProgress: reportProgress, + }, + ); + } + + /** + * Get DFG projects. + * Returns a page of DFG projects based on the provided pagination parameters and optional institution filter. + * @endpoint get /api/projects/person/dfg/search + * @param authorId The author ID to filter by. + * @param topic The topic to filter by. + * @param page The page number. + * @param size The page size. + * @param sortBy The field to sort by. + * @param sortDirection The sort direction (asc or desc). + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getDfgProjects( + authorId: string, + topic?: string, + page?: number, + size?: number, + sortBy?: string, + sortDirection?: string, + observe?: 'body', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable; + public getDfgProjects( + authorId: string, + topic?: string, + page?: number, + size?: number, + sortBy?: string, + sortDirection?: string, + observe?: 'response', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable>; + public getDfgProjects( + authorId: string, + topic?: string, + page?: number, + size?: number, + sortBy?: string, + sortDirection?: string, + observe?: 'events', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable>; + public getDfgProjects( + authorId: string, + topic?: string, + page?: number, + size?: number, + sortBy?: string, + sortDirection?: string, + observe: any = 'body', + reportProgress: boolean = false, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable { + if (authorId === null || authorId === undefined) { + throw new Error( + 'Required parameter authorId was null or undefined when calling getDfgProjects.', + ); + } + + let localVarQueryParameters = new HttpParams({ encoder: this.encoder }); + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + authorId, + 'author_id', + ); + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + topic, + 'topic', + ); + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + page, + 'page', + ); + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + size, + 'size', + ); + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + sortBy, + 'sort_by', + ); + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + sortDirection, + 'sort_direction', + ); + + let localVarHeaders = this.defaultHeaders; + + const localVarHttpHeaderAcceptSelected: string | undefined = + options?.httpHeaderAccept ?? + this.configuration.selectHeaderAccept(['application/json']); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set( + 'Accept', + localVarHttpHeaderAcceptSelected, + ); + } + + const localVarHttpContext: HttpContext = + options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if ( + this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) + ) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/api/projects/person/dfg/search`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request( + 'get', + `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + params: localVarQueryParameters, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined + ? { transferCache: localVarTransferCache } + : {}), + reportProgress: reportProgress, + }, + ); + } + + /** + * Get EU projects. + * Returns a page of EU projects based on the provided pagination parameters and optional institution filter. + * @endpoint get /api/projects/institution/eu/search + * @param institutionId The institution ID to filter by. + * @param topic The topic to filter by. + * @param page The page number. + * @param size The page size. + * @param sortBy The field to sort by. + * @param sortDirection The sort direction (asc or desc). + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getEuProjects( + institutionId: string, + topic?: string, + page?: number, + size?: number, + sortBy?: string, + sortDirection?: string, + observe?: 'body', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable; + public getEuProjects( + institutionId: string, + topic?: string, + page?: number, + size?: number, + sortBy?: string, + sortDirection?: string, + observe?: 'response', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable>; + public getEuProjects( + institutionId: string, + topic?: string, + page?: number, + size?: number, + sortBy?: string, + sortDirection?: string, + observe?: 'events', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable>; + public getEuProjects( + institutionId: string, + topic?: string, + page?: number, + size?: number, + sortBy?: string, + sortDirection?: string, + observe: any = 'body', + reportProgress: boolean = false, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable { + if (institutionId === null || institutionId === undefined) { + throw new Error( + 'Required parameter institutionId was null or undefined when calling getEuProjects.', + ); + } + + let localVarQueryParameters = new HttpParams({ encoder: this.encoder }); + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + institutionId, + 'institution_id', + ); + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + topic, + 'topic', + ); + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + page, + 'page', + ); + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + size, + 'size', + ); + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + sortBy, + 'sort_by', + ); + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + sortDirection, + 'sort_direction', + ); + + let localVarHeaders = this.defaultHeaders; + + const localVarHttpHeaderAcceptSelected: string | undefined = + options?.httpHeaderAccept ?? + this.configuration.selectHeaderAccept(['application/json']); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set( + 'Accept', + localVarHttpHeaderAcceptSelected, + ); + } + + const localVarHttpContext: HttpContext = + options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if ( + this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) + ) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/api/projects/institution/eu/search`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request( + 'get', + `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + params: localVarQueryParameters, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined + ? { transferCache: localVarTransferCache } + : {}), + reportProgress: reportProgress, + }, + ); + } +} diff --git a/webapp/src/app/api/api/topics.service.ts b/webapp/src/app/api/api/topics.service.ts index 9eb7c66d..88d63fef 100644 --- a/webapp/src/app/api/api/topics.service.ts +++ b/webapp/src/app/api/api/topics.service.ts @@ -23,25 +23,21 @@ import { CustomHttpParameterCodec } from '../encoder'; import { Observable } from 'rxjs'; // @ts-ignore -import { AutocompleteResponse } from '../model/autocomplete-response'; +import { AutocompleteResponse } from '../model/autocompleteResponse'; // @ts-ignore -import { HTTPValidationError } from '../model/http-validation-error'; +import { HTTPValidationError } from '../model/hTTPValidationError'; // @ts-ignore -import { TopicsListResponse } from '../model/topics-list-response'; +import { TopicsListResponse } from '../model/topicsListResponse'; // @ts-ignore import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; import { Configuration } from '../configuration'; import { BaseService } from '../api.base.service'; -import { TopicsServiceInterface } from './topics.serviceInterface'; @Injectable({ providedIn: 'root', }) -export class TopicsService - extends BaseService - implements TopicsServiceInterface -{ +export class TopicsService extends BaseService { constructor( protected httpClient: HttpClient, @Optional() @Inject(BASE_PATH) basePath: string | string[], @@ -702,4 +698,124 @@ export class TopicsService }, ); } + + /** + * Semantic / vector search for topics using a keyword/sentence. + * @endpoint get /api/topics/vector-search + * @param query Word or sentence to search by similarity. + * @param limit Maximum number of topics to return. + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public vectorSearchTopics( + query: string, + limit?: number, + observe?: 'body', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable; + public vectorSearchTopics( + query: string, + limit?: number, + observe?: 'response', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable>; + public vectorSearchTopics( + query: string, + limit?: number, + observe?: 'events', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable>; + public vectorSearchTopics( + query: string, + limit?: number, + observe: any = 'body', + reportProgress: boolean = false, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable { + if (query === null || query === undefined) { + throw new Error( + 'Required parameter query was null or undefined when calling vectorSearchTopics.', + ); + } + + let localVarQueryParameters = new HttpParams({ encoder: this.encoder }); + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + query, + 'query', + ); + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + limit, + 'limit', + ); + + let localVarHeaders = this.defaultHeaders; + + const localVarHttpHeaderAcceptSelected: string | undefined = + options?.httpHeaderAccept ?? + this.configuration.selectHeaderAccept(['application/json']); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set( + 'Accept', + localVarHttpHeaderAcceptSelected, + ); + } + + const localVarHttpContext: HttpContext = + options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if ( + this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) + ) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/api/topics/vector-search`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request( + 'get', + `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + params: localVarQueryParameters, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined + ? { transferCache: localVarTransferCache } + : {}), + reportProgress: reportProgress, + }, + ); + } } diff --git a/webapp/src/app/api/api/topics.serviceInterface.ts b/webapp/src/app/api/api/topics.serviceInterface.ts deleted file mode 100644 index 43bdd05d..00000000 --- a/webapp/src/app/api/api/topics.serviceInterface.ts +++ /dev/null @@ -1,100 +0,0 @@ -/** - * Innovation Search Engine API - * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -import { HttpHeaders } from '@angular/common/http'; - -import { Observable } from 'rxjs'; - -import { AutocompleteResponse } from '../model/models'; -import { HTTPValidationError } from '../model/models'; -import { TopicsListResponse } from '../model/models'; - -import { Configuration } from '../configuration'; - -export interface TopicsServiceInterface { - defaultHeaders: HttpHeaders; - configuration: Configuration; - - /** - * Returns topic options for autocomplete inputs. - * - * @endpoint get /api/topics/autocomplete - * @param query Topic search text, for example \'machine learning\'. - * @param domainId Optional OpenAlex domain id filter. - * @param fieldId Optional OpenAlex field id filter. - * @param subfieldId Optional OpenAlex subfield id filter. - * @param limit Maximum number of autocomplete options. - */ - autocompleteTopics( - query: string, - domainId?: string, - fieldId?: string, - subfieldId?: string, - limit?: number, - extraHttpRequestParams?: any, - ): Observable; - - /** - * Builds the topic hierarchy cache. - * - * @endpoint get /api/inse-service/topics/cache - * @param pageSize Page size for each search page. - * @param saveJson Persist cache JSON to data folder. - */ - buildTopicCache( - pageSize?: number, - saveJson?: boolean, - extraHttpRequestParams?: any, - ): Observable; - - /** - * Counts topic hierarchy occurrences from cache. - * - * @endpoint get /api/inse-service/topics/count - * @param topic Topic names (repeat parameter). - */ - countTopicHierarchy( - topic: Array, - extraHttpRequestParams?: any, - ): Observable; - - /** - * Returns the nested topic hierarchy (Domains -> Fields -> Subfields -> Topics). - * - * @endpoint get /api/inse-service/topics/hierarchy - */ - getTopicHierarchy(extraHttpRequestParams?: any): Observable; - - /** - * Returns a list of OpenAlex topics. - * - * @endpoint get /api/topics - * @param search Full-text search, for example \'machine learning\'. - * @param filter OpenAlex filter, for example \'domain.id:1,works_count:>1000\'. - * @param sort Sort field, for example \'works_count:desc\'. - * @param groupBy OpenAlex group_by field, for example \'domain.id\'. - * @param perPage Results per page. - * @param page Page number. Use cursor for deep pagination. - * @param cursor Cursor pagination token. Use \'*\' to start. - * @param sample Random sample size. Cannot be combined with sort or page. - * @param select Comma-separated fields to return. - */ - listTopics( - search?: string, - filter?: string, - sort?: string, - groupBy?: string, - perPage?: number, - page?: number, - cursor?: string, - sample?: number, - select?: string, - extraHttpRequestParams?: any, - ): Observable; -} diff --git a/webapp/src/app/api/api/works.service.ts b/webapp/src/app/api/api/works.service.ts index 3806a5e6..20d855a3 100644 --- a/webapp/src/app/api/api/works.service.ts +++ b/webapp/src/app/api/api/works.service.ts @@ -23,28 +23,27 @@ import { CustomHttpParameterCodec } from '../encoder'; import { Observable } from 'rxjs'; // @ts-ignore -import { HTTPValidationError } from '../model/http-validation-error'; +import { HTTPValidationError } from '../model/hTTPValidationError'; // @ts-ignore -import { TopicCount } from '../model/topic-count'; +import { TopicCount } from '../model/topicCount'; // @ts-ignore -import { TopicsByTime } from '../model/topics-by-time'; +import { TopicsByTime } from '../model/topicsByTime'; // @ts-ignore import { Work } from '../model/work'; // @ts-ignore -import { WorkPage } from '../model/work-page'; +import { WorkPage } from '../model/workPage'; // @ts-ignore -import { WorksListResponse } from '../model/works-list-response'; +import { WorksListResponse } from '../model/worksListResponse'; // @ts-ignore import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; import { Configuration } from '../configuration'; import { BaseService } from '../api.base.service'; -import { WorksServiceInterface } from './works.serviceInterface'; @Injectable({ providedIn: 'root', }) -export class WorksService extends BaseService implements WorksServiceInterface { +export class WorksService extends BaseService { constructor( protected httpClient: HttpClient, @Optional() @Inject(BASE_PATH) basePath: string | string[], diff --git a/webapp/src/app/api/api/works.serviceInterface.ts b/webapp/src/app/api/api/works.serviceInterface.ts deleted file mode 100644 index 718c6192..00000000 --- a/webapp/src/app/api/api/works.serviceInterface.ts +++ /dev/null @@ -1,98 +0,0 @@ -/** - * Innovation Search Engine API - * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -import { HttpHeaders } from '@angular/common/http'; - -import { Observable } from 'rxjs'; - -import { HTTPValidationError } from '../model/models'; -import { TopicCount } from '../model/models'; -import { TopicsByTime } from '../model/models'; -import { Work } from '../model/models'; -import { WorkPage } from '../model/models'; -import { WorksListResponse } from '../model/models'; - -import { Configuration } from '../configuration'; - -export interface WorksServiceInterface { - defaultHeaders: HttpHeaders; - configuration: Configuration; - - /** - * Returns all works for an author. - * - * @endpoint get /api/works/{author_id}/all - * @param authorId The author id, for example A5023888391. - */ - getAllAuthorWorks( - authorId: string, - extraHttpRequestParams?: any, - ): Observable; - - /** - * Returns a page of works for an author. - * - * @endpoint get /api/works/{author_id} - * @param authorId The author id, for example A5023888391. - * @param page The page number. - * @param size The page size. - * @param publicationYear Filter by publication year. Can be repeated. - * @param type Filter by publication type. Can be repeated. - * @param language Filter by language code. Can be repeated. - * @param institutionId Filter by OpenAlex institution id. Can be repeated. - * @param topicId Filter by OpenAlex topic id. Can be repeated. - */ - getAuthorWorks( - authorId: string, - page?: number, - size?: number, - publicationYear?: Array, - type?: Array, - language?: Array, - institutionId?: Array, - topicId?: Array, - extraHttpRequestParams?: any, - ): Observable; - - /** - * Returns work counts per primary topic for an author. - * - * @endpoint get /api/works/{author_id}/primary-topic-counts - * @param authorId The author id, for example A5023888391. - */ - getPrimaryTopicCountsByAuthor( - authorId: string, - extraHttpRequestParams?: any, - ): Observable>; - - /** - * Returns topics grouped by publication year for an author. - * - * @endpoint get /api/works/{author_id}/topics-by-time - * @param authorId The author id, for example A5023888391. - * @param maxTopicsPerYear The maximum number of topics per year. - * @param targetPublications Target number of publications used for the timeline. Complete years are always included. - * @param includeAll If true, all publications are used for the timeline. - */ - getTopicsByTimeByAuthor( - authorId: string, - maxTopicsPerYear?: number, - targetPublications?: number, - includeAll?: boolean, - extraHttpRequestParams?: any, - ): Observable; - - /** - * Returns one publication. - * - * @endpoint get /api/works/detail/{work_id} - * @param workId The OpenAlex work id, for example W2741809807. - */ - getWork(workId: string, extraHttpRequestParams?: any): Observable; -} diff --git a/webapp/src/app/api/model/access-grant.ts b/webapp/src/app/api/model/access-grant.ts deleted file mode 100644 index a7a6381c..00000000 --- a/webapp/src/app/api/model/access-grant.ts +++ /dev/null @@ -1,18 +0,0 @@ -/** - * Innovation Search Engine API - * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -import { AuthScope } from './auth-scope'; - -export interface AccessGrant { - token_type: string; - access_token: string; - expires_in: number; - scope: AuthScope; - refresh_token: string; -} diff --git a/webapp/src/app/api/model/auth-scope.ts b/webapp/src/app/api/model/auth-scope.ts deleted file mode 100644 index ed52c93d..00000000 --- a/webapp/src/app/api/model/auth-scope.ts +++ /dev/null @@ -1,17 +0,0 @@ -/** - * Innovation Search Engine API - * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -import { AuthAccount } from './auth-account'; - -export interface AuthScope { - t: string; - a: AuthAccount; - d?: number | null; - r?: Array; -} diff --git a/webapp/src/app/api/model/author-affiliations-inner.ts b/webapp/src/app/api/model/author-affiliations-inner.ts deleted file mode 100644 index d13f78c9..00000000 --- a/webapp/src/app/api/model/author-affiliations-inner.ts +++ /dev/null @@ -1,18 +0,0 @@ -/** - * Innovation Search Engine API - * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -import { DehydratedInstitution } from './dehydrated-institution'; - -/** - * AuthorAffiliationsInner - */ -export interface AuthorAffiliationsInner { - institution?: DehydratedInstitution | null; - years?: Array | null; -} diff --git a/webapp/src/app/api/model/author-counts-by-year-inner.ts b/webapp/src/app/api/model/author-counts-by-year-inner.ts deleted file mode 100644 index 1fac5b45..00000000 --- a/webapp/src/app/api/model/author-counts-by-year-inner.ts +++ /dev/null @@ -1,18 +0,0 @@ -/** - * Innovation Search Engine API - * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/** - * AuthorCountsByYearInner - */ -export interface AuthorCountsByYearInner { - year?: number | null; - works_count?: number | null; - cited_by_count?: number | null; -} diff --git a/webapp/src/app/api/model/author-ids.ts b/webapp/src/app/api/model/author-ids.ts deleted file mode 100644 index 0b079d33..00000000 --- a/webapp/src/app/api/model/author-ids.ts +++ /dev/null @@ -1,18 +0,0 @@ -/** - * Innovation Search Engine API - * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/** - * External identifiers: - */ -export interface AuthorIds { - openalex?: string | null; - orcid?: string | null; - scopus?: string | null; -} diff --git a/webapp/src/app/api/model/author-network-node.ts b/webapp/src/app/api/model/author-network-node.ts deleted file mode 100644 index 2e684c1c..00000000 --- a/webapp/src/app/api/model/author-network-node.ts +++ /dev/null @@ -1,26 +0,0 @@ -/** - * Innovation Search Engine API - * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -import { CollaborationNetworkNodeType } from './collaboration-network-node-type'; - -export interface AuthorNetworkNode { - /** - * The raw ID of the node. For an author node, this is the raw person ID. For an institution node, this is the raw institution ID. For a work node, this is the raw work ID. - */ - raw_id: string; - /** - * The display name of the node. - */ - display_name: string; - /** - * The category of the node, either \'author\', \'institution\', or \'work\'. - */ - category: CollaborationNetworkNodeType; -} -export namespace AuthorNetworkNode {} diff --git a/webapp/src/app/api/model/author-parsed-longest-name.ts b/webapp/src/app/api/model/author-parsed-longest-name.ts deleted file mode 100644 index f08df27d..00000000 --- a/webapp/src/app/api/model/author-parsed-longest-name.ts +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Innovation Search Engine API - * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/** - * The longest name parsed into its component parts. - */ -export interface AuthorParsedLongestName { - first?: string | null; - middle?: string | null; - last?: string | null; - suffix?: string | null; - nickname?: string | null; -} diff --git a/webapp/src/app/api/model/author-position-count.ts b/webapp/src/app/api/model/author-position-count.ts deleted file mode 100644 index 989d2c18..00000000 --- a/webapp/src/app/api/model/author-position-count.ts +++ /dev/null @@ -1,16 +0,0 @@ -/** - * Innovation Search Engine API - * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -export interface AuthorPositionCount { - first?: number; - middle?: number; - last?: number; - unknown?: number; -} diff --git a/webapp/src/app/api/model/author-summary-stats.ts b/webapp/src/app/api/model/author-summary-stats.ts deleted file mode 100644 index ede015ad..00000000 --- a/webapp/src/app/api/model/author-summary-stats.ts +++ /dev/null @@ -1,19 +0,0 @@ -/** - * Innovation Search Engine API - * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -import { Model2YrMeanCitedness } from './model2-yr-mean-citedness'; - -/** - * Citation metrics: - */ -export interface AuthorSummaryStats { - '2yr_mean_citedness'?: Model2YrMeanCitedness | null; - h_index?: number | null; - i10_index?: number | null; -} diff --git a/webapp/src/app/api/model/author.ts b/webapp/src/app/api/model/author.ts index a9199cd9..0a050590 100644 --- a/webapp/src/app/api/model/author.ts +++ b/webapp/src/app/api/model/author.ts @@ -7,13 +7,13 @@ * https://openapi-generator.tech * Do not edit the class manually. */ -import { AuthorAffiliationsInner } from './author-affiliations-inner'; -import { AuthorParsedLongestName } from './author-parsed-longest-name'; -import { DehydratedInstitution } from './dehydrated-institution'; -import { AuthorCountsByYearInner } from './author-counts-by-year-inner'; -import { AuthorIds } from './author-ids'; -import { AuthorSummaryStats } from './author-summary-stats'; -import { WorkTopic } from './work-topic'; +import { AuthorAffiliationsInner } from './authorAffiliationsInner'; +import { AuthorParsedLongestName } from './authorParsedLongestName'; +import { DehydratedInstitution } from './dehydratedInstitution'; +import { AuthorCountsByYearInner } from './authorCountsByYearInner'; +import { AuthorIds } from './authorIds'; +import { AuthorSummaryStats } from './authorSummaryStats'; +import { WorkTopic } from './workTopic'; /** * A person who creates scholarly works diff --git a/webapp/src/app/api/model/authors-filter-properties.ts b/webapp/src/app/api/model/authors-filter-properties.ts deleted file mode 100644 index 50795f2a..00000000 --- a/webapp/src/app/api/model/authors-filter-properties.ts +++ /dev/null @@ -1,24 +0,0 @@ -/** - * Innovation Search Engine API - * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -export interface AuthorsFilterProperties { - /** - * The list of raw institution IDs to include in the collaboration network. If empty, all institutions will be included. - */ - allowed_institutions?: Array; - /** - * The minimum number of collaborations required for an author to be included in the collaboration network. - */ - min_collaborations?: number; - /** - * The maximum number of collaborations allowed for an author to be included in the collaboration network. - */ - max_collaborations?: number; -} diff --git a/webapp/src/app/api/model/authors-list-response.ts b/webapp/src/app/api/model/authors-list-response.ts deleted file mode 100644 index 228618c7..00000000 --- a/webapp/src/app/api/model/authors-list-response.ts +++ /dev/null @@ -1,21 +0,0 @@ -/** - * Innovation Search Engine API - * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -import { Meta } from './meta'; -import { Author } from './author'; -import { GroupByResult } from './group-by-result'; - -/** - * AuthorsListResponse - */ -export interface AuthorsListResponse { - meta?: Meta | null; - results?: Array | null; - group_by?: Array | null; -} diff --git a/webapp/src/app/api/model/authorship.ts b/webapp/src/app/api/model/authorship.ts index 224c6007..f1b9d48e 100644 --- a/webapp/src/app/api/model/authorship.ts +++ b/webapp/src/app/api/model/authorship.ts @@ -7,8 +7,8 @@ * https://openapi-generator.tech * Do not edit the class manually. */ -import { DehydratedInstitution } from './dehydrated-institution'; -import { DehydratedAuthor } from './dehydrated-author'; +import { DehydratedInstitution } from './dehydratedInstitution'; +import { DehydratedAuthor } from './dehydratedAuthor'; /** * Author and their affiliation for a work diff --git a/webapp/src/app/api/model/autocomplete-response-meta.ts b/webapp/src/app/api/model/autocomplete-response-meta.ts deleted file mode 100644 index 5bf94a57..00000000 --- a/webapp/src/app/api/model/autocomplete-response-meta.ts +++ /dev/null @@ -1,17 +0,0 @@ -/** - * Innovation Search Engine API - * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/** - * AutocompleteResponseMeta - */ -export interface AutocompleteResponseMeta { - count?: number | null; - db_response_time_ms?: number | null; -} diff --git a/webapp/src/app/api/model/autocomplete-response-results-inner.ts b/webapp/src/app/api/model/autocomplete-response-results-inner.ts deleted file mode 100644 index 0fa956b7..00000000 --- a/webapp/src/app/api/model/autocomplete-response-results-inner.ts +++ /dev/null @@ -1,22 +0,0 @@ -/** - * Innovation Search Engine API - * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/** - * AutocompleteResponseResultsInner - */ -export interface AutocompleteResponseResultsInner { - id?: string | null; - display_name?: string | null; - hint?: string | null; - cited_by_count?: number | null; - works_count?: number | null; - entity_type?: string | null; - external_id?: string | null; -} diff --git a/webapp/src/app/api/model/autocomplete-response.ts b/webapp/src/app/api/model/autocomplete-response.ts deleted file mode 100644 index b4e91a1d..00000000 --- a/webapp/src/app/api/model/autocomplete-response.ts +++ /dev/null @@ -1,19 +0,0 @@ -/** - * Innovation Search Engine API - * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -import { AutocompleteResponseMeta } from './autocomplete-response-meta'; -import { AutocompleteResponseResultsInner } from './autocomplete-response-results-inner'; - -/** - * AutocompleteResponse - */ -export interface AutocompleteResponse { - meta?: AutocompleteResponseMeta | null; - results?: Array | null; -} diff --git a/webapp/src/app/api/model/bundProject.ts b/webapp/src/app/api/model/bundProject.ts new file mode 100644 index 00000000..9f291399 --- /dev/null +++ b/webapp/src/app/api/model/bundProject.ts @@ -0,0 +1,40 @@ +/** + * Innovation Search Engine API + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +export interface BundProject { + funding_code?: string | null; + department?: string | null; + department_fullname?: string | null; + referat?: string | null; + project_sponsor?: string | null; + project_sponsor_fullname?: string | null; + work_unit?: string | null; + recipient?: string | null; + municipal_code?: string | null; + municipality?: string | null; + place?: string | null; + state?: string | null; + country?: string | null; + implementing_agency?: string | null; + topic?: string | null; + performance_plan_system?: string | null; + performance_plan_system_text?: string | null; + funding_start?: string | null; + funding_end?: string | null; + grant_amount?: number | null; + funding_profile?: string | null; + joint_project?: string | null; + funding_type?: string | null; + publication_date?: string | null; + unix_timestamp?: number | null; + date?: string | null; + new?: boolean | null; + duration?: string | null; +} diff --git a/webapp/src/app/api/model/bundProjectPage.ts b/webapp/src/app/api/model/bundProjectPage.ts new file mode 100644 index 00000000..6c38e7a6 --- /dev/null +++ b/webapp/src/app/api/model/bundProjectPage.ts @@ -0,0 +1,29 @@ +/** + * Innovation Search Engine API + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +import { BundProject } from './bundProject'; + +export interface BundProjectPage { + /** + * The current page number. + */ + page?: number; + /** + * The requested page size. + */ + size?: number; + /** + * The total number of items. + */ + total?: number; + /** + * The bund projects on this page. + */ + elements?: Array; +} diff --git a/webapp/src/app/api/model/categoryNested.ts b/webapp/src/app/api/model/categoryNested.ts new file mode 100644 index 00000000..2e92a624 --- /dev/null +++ b/webapp/src/app/api/model/categoryNested.ts @@ -0,0 +1,24 @@ +/** + * Innovation Search Engine API + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +import { DisplayCodeSplittedNested } from './displayCodeSplittedNested'; + +export interface CategoryNested { + category?: string | null; + code?: string | null; + display_code?: string | null; + /** + * A tokenized hierarchy breakdown of the display code represented as an array of strings. + */ + display_code_splitted?: Array; + /** + * Granular, nested breakdowns of the split parts of the display code. + */ + display_code_splitted_nested?: Array; +} diff --git a/webapp/src/app/api/model/collaboration-network-edge.ts b/webapp/src/app/api/model/collaboration-network-edge.ts deleted file mode 100644 index baffb178..00000000 --- a/webapp/src/app/api/model/collaboration-network-edge.ts +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Innovation Search Engine API - * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -export interface CollaborationNetworkEdge { - /** - * The raw ID of the source node. - */ - raw_source_id: string; - /** - * The raw ID of the target node. - */ - raw_target_id: string; -} diff --git a/webapp/src/app/api/model/collaboration-network-node-type.ts b/webapp/src/app/api/model/collaboration-network-node-type.ts deleted file mode 100644 index 20d462bd..00000000 --- a/webapp/src/app/api/model/collaboration-network-node-type.ts +++ /dev/null @@ -1,17 +0,0 @@ -/** - * Innovation Search Engine API - * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -export const CollaborationNetworkNodeType = { - author: 'author', - institution: 'institution', - work: 'work', -} as const; -export type CollaborationNetworkNodeType = - (typeof CollaborationNetworkNodeType)[keyof typeof CollaborationNetworkNodeType]; diff --git a/webapp/src/app/api/model/collaboration-network.ts b/webapp/src/app/api/model/collaboration-network.ts deleted file mode 100644 index c923277d..00000000 --- a/webapp/src/app/api/model/collaboration-network.ts +++ /dev/null @@ -1,41 +0,0 @@ -/** - * Innovation Search Engine API - * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -import { FilterInformation } from './filter-information'; -import { WorkNetworkNode } from './work-network-node'; -import { CollaborationNetworkEdge } from './collaboration-network-edge'; -import { InstitutionNetworkNode } from './institution-network-node'; -import { AuthorNetworkNode } from './author-network-node'; - -export interface CollaborationNetwork { - /** - * The raw person ID of the person whose collaboration network this is. - */ - raw_person_id: string; - /** - * The work nodes in the collaboration network. - */ - work_nodes: Array; - /** - * The author nodes in the collaboration network. - */ - author_nodes: Array; - /** - * The institution nodes in the collaboration network. - */ - institution_nodes: Array; - /** - * The collaboration edges in the collaboration network. A collaboration edge represents a collaboration between two nodes. A -> W and A -> I - */ - collaboration_edges: Array; - /** - * The filter information for the collaboration network, including the minimum and maximum publication years of the works in the collaboration network. - */ - filter_information: FilterInformation; -} diff --git a/webapp/src/app/api/model/cost-usd.ts b/webapp/src/app/api/model/cost-usd.ts deleted file mode 100644 index 494cb094..00000000 --- a/webapp/src/app/api/model/cost-usd.ts +++ /dev/null @@ -1,14 +0,0 @@ -/** - * Innovation Search Engine API - * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/** - * Cost of this request in USD - */ -export interface CostUsd {} diff --git a/webapp/src/app/api/model/custom-author.ts b/webapp/src/app/api/model/custom-author.ts deleted file mode 100644 index d4a837ad..00000000 --- a/webapp/src/app/api/model/custom-author.ts +++ /dev/null @@ -1,37 +0,0 @@ -/** - * Innovation Search Engine API - * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -import { AuthorAffiliationsInner } from './author-affiliations-inner'; -import { AuthorParsedLongestName } from './author-parsed-longest-name'; -import { DehydratedInstitution } from './dehydrated-institution'; -import { AuthorCountsByYearInner } from './author-counts-by-year-inner'; -import { AuthorIds } from './author-ids'; -import { AuthorSummaryStats } from './author-summary-stats'; -import { WorkTopic } from './work-topic'; - -export interface CustomAuthor { - id?: string | null; - orcid?: string | null; - display_name?: string | null; - display_name_alternatives?: Array | null; - longest_name?: string | null; - parsed_longest_name?: AuthorParsedLongestName | null; - works_count?: number | null; - cited_by_count?: number | null; - summary_stats?: AuthorSummaryStats | null; - affiliations?: Array | null; - last_known_institutions?: Array | null; - topics?: Array | null; - counts_by_year?: Array | null; - ids?: AuthorIds | null; - works_api_url?: string | null; - created_date?: string | null; - updated_date?: string | null; - relevance_rating?: string | null; -} diff --git a/webapp/src/app/api/model/custom-authors-list-response.ts b/webapp/src/app/api/model/custom-authors-list-response.ts deleted file mode 100644 index 72cb2f9d..00000000 --- a/webapp/src/app/api/model/custom-authors-list-response.ts +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Innovation Search Engine API - * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -import { Meta } from './meta'; -import { CustomAuthor } from './custom-author'; -import { Author } from './author'; -import { GroupByResult } from './group-by-result'; - -export interface CustomAuthorsListResponse { - meta?: Meta | null; - results?: Array | null; - group_by?: Array | null; - placeholder?: CustomAuthor | null; -} diff --git a/webapp/src/app/api/model/dehydrated-author.ts b/webapp/src/app/api/model/dehydrated-author.ts deleted file mode 100644 index 350718ef..00000000 --- a/webapp/src/app/api/model/dehydrated-author.ts +++ /dev/null @@ -1,18 +0,0 @@ -/** - * Innovation Search Engine API - * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/** - * [Dehydrated Author](/api-reference/authors#the-dehydratedauthor-object) — reduced-field version used in nested contexts - */ -export interface DehydratedAuthor { - id?: string | null; - display_name?: string | null; - orcid?: string | null; -} diff --git a/webapp/src/app/api/model/dehydrated-funder.ts b/webapp/src/app/api/model/dehydrated-funder.ts deleted file mode 100644 index c4231c13..00000000 --- a/webapp/src/app/api/model/dehydrated-funder.ts +++ /dev/null @@ -1,18 +0,0 @@ -/** - * Innovation Search Engine API - * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/** - * [Dehydrated Funder](/api-reference/funders) — reduced-field version used in nested contexts - */ -export interface DehydratedFunder { - id?: string | null; - display_name?: string | null; - ror?: string | null; -} diff --git a/webapp/src/app/api/model/dehydrated-institution.ts b/webapp/src/app/api/model/dehydrated-institution.ts deleted file mode 100644 index 956fc03e..00000000 --- a/webapp/src/app/api/model/dehydrated-institution.ts +++ /dev/null @@ -1,21 +0,0 @@ -/** - * Innovation Search Engine API - * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/** - * [Dehydrated Institution](/api-reference/institutions#the-dehydratedinstitution-object) — reduced-field version used in nested contexts - */ -export interface DehydratedInstitution { - id?: string | null; - display_name?: string | null; - ror?: string | null; - country_code?: string | null; - type?: string | null; - lineage?: Array | null; -} diff --git a/webapp/src/app/api/model/dehydrated-source.ts b/webapp/src/app/api/model/dehydrated-source.ts deleted file mode 100644 index b672b5dd..00000000 --- a/webapp/src/app/api/model/dehydrated-source.ts +++ /dev/null @@ -1,26 +0,0 @@ -/** - * Innovation Search Engine API - * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/** - * [Dehydrated Source](/api-reference/sources#the-dehydratedsource-object) — reduced-field version used in nested contexts - */ -export interface DehydratedSource { - id?: string | null; - display_name?: string | null; - issn_l?: string | null; - issn?: Array | null; - is_oa?: boolean | null; - is_in_doaj?: boolean | null; - is_core?: boolean | null; - host_organization?: string | null; - host_organization_name?: string | null; - host_organization_lineage?: Array | null; - type?: string | null; -} diff --git a/webapp/src/app/api/model/dfgProjectPage.ts b/webapp/src/app/api/model/dfgProjectPage.ts new file mode 100644 index 00000000..a05d81d2 --- /dev/null +++ b/webapp/src/app/api/model/dfgProjectPage.ts @@ -0,0 +1,29 @@ +/** + * Innovation Search Engine API + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +import { DfgProjectSummary } from './dfgProjectSummary'; + +export interface DfgProjectPage { + /** + * The current page number. + */ + page?: number; + /** + * The requested page size. + */ + size?: number; + /** + * The total number of items. + */ + total?: number; + /** + * The DFG projects on this page. + */ + elements?: Array; +} diff --git a/webapp/src/app/api/model/dfgProjectSummary.ts b/webapp/src/app/api/model/dfgProjectSummary.ts new file mode 100644 index 00000000..10c05a08 --- /dev/null +++ b/webapp/src/app/api/model/dfgProjectSummary.ts @@ -0,0 +1,25 @@ +/** + * Innovation Search Engine API + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +export interface DfgProjectSummary { + /** + * The unique identifier of the DFG project. + */ + id: string; + link?: string | null; + title?: string | null; + professional_classification?: string | null; + funding_start?: string | null; + funding_end?: string | null; + /** + * The names of the researchers involved in the DFG project. + */ + names?: Array; +} diff --git a/webapp/src/app/api/model/auth-account.ts b/webapp/src/app/api/model/displayCodeSplittedNested.ts similarity index 71% rename from webapp/src/app/api/model/auth-account.ts rename to webapp/src/app/api/model/displayCodeSplittedNested.ts index 179a3e67..8d7317dc 100644 --- a/webapp/src/app/api/model/auth-account.ts +++ b/webapp/src/app/api/model/displayCodeSplittedNested.ts @@ -8,8 +8,6 @@ * Do not edit the class manually. */ -export interface AuthAccount { - i: number; - l: string; - o: number; +export interface DisplayCodeSplittedNested { + single_display_code?: string | null; } diff --git a/webapp/src/app/api/model/euProject.ts b/webapp/src/app/api/model/euProject.ts new file mode 100644 index 00000000..66469d1f --- /dev/null +++ b/webapp/src/app/api/model/euProject.ts @@ -0,0 +1,49 @@ +/** + * Innovation Search Engine API + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +import { ProgrammeNested } from './programmeNested'; +import { KeywordNested } from './keywordNested'; +import { OrganizationNested } from './organizationNested'; +import { CategoryNested } from './categoryNested'; + +export interface EuProject { + acronym?: string | null; + /** + * Structured lists of classification categories and taxonomy mappings assigned to the project. + */ + categories_nested?: Array; + doc_number?: string | null; + doi?: string | null; + ec_max_contribution?: string | null; + end_date?: string | null; + funding_end?: string | null; + funding_start?: string | null; + id?: string | null; + keywords?: string | null; + /** + * Strictly tokenized and isolated keywords nested for targeted search engine aggregations. + */ + keywords_nested?: Array; + link?: string | null; + objective?: string | null; + /** + * The full roster of academic, public, or private organizations participating in the project consortium. + */ + organization_nested?: Array; + /** + * The nested historical line of EU funding frameworks and structural grants supporting this project. + */ + programme_nested?: Array; + source?: string | null; + start_date?: string | null; + status?: string | null; + teaser?: string | null; + title?: string | null; + total_cost?: string | null; +} diff --git a/webapp/src/app/api/model/item-page.ts b/webapp/src/app/api/model/euProjectPage.ts similarity index 54% rename from webapp/src/app/api/model/item-page.ts rename to webapp/src/app/api/model/euProjectPage.ts index 53a7140a..276e0b06 100644 --- a/webapp/src/app/api/model/item-page.ts +++ b/webapp/src/app/api/model/euProjectPage.ts @@ -7,23 +7,23 @@ * https://openapi-generator.tech * Do not edit the class manually. */ -import { Item } from './item'; +import { EuProject } from './euProject'; -export interface ItemPage { +export interface EuProjectPage { /** - * The elements of the page. + * The current page number. */ - elements?: Array; + page?: number; /** - * The page offset in elements. + * The requested page size. */ - offset?: number; + size?: number; /** - * The total number of elements. + * The total number of items. */ total?: number; /** - * The page size in elements. + * The EU projects on this page. */ - size?: number; + elements?: Array; } diff --git a/webapp/src/app/api/model/filter-information.ts b/webapp/src/app/api/model/filter-information.ts deleted file mode 100644 index 47c0ca27..00000000 --- a/webapp/src/app/api/model/filter-information.ts +++ /dev/null @@ -1,30 +0,0 @@ -/** - * Innovation Search Engine API - * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -import { InstitutionInformation } from './institution-information'; -import { WorkTopicInformation } from './work-topic-information'; - -export interface FilterInformation { - /** - * The minimum publication year of the works in the collaboration network. - */ - min_possible_year: number; - /** - * The maximum publication year of the works in the collaboration network. - */ - max_possible_year: number; - /** - * The list of institutions associated with the works in the collaboration network. - */ - institutions: Array; - /** - * The list of topics associated with the works in the collaboration network. - */ - topics: Array; -} diff --git a/webapp/src/app/api/model/filter-properties.ts b/webapp/src/app/api/model/filter-properties.ts deleted file mode 100644 index 6b901b2e..00000000 --- a/webapp/src/app/api/model/filter-properties.ts +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Innovation Search Engine API - * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -import { WorksFilterProperties } from './works-filter-properties'; -import { AuthorsFilterProperties } from './authors-filter-properties'; - -export interface FilterProperties { - /** - * The type of filter to apply when generating the collaboration network. Can be either \'works\' or \'authors\'. If \'works\', the filter properties in the \'works_filter_properties\' field will be used. If \'authors\', the filter properties in the \'authors_filter_properties\' field will be used. - */ - filter_by?: string; - works_filter_properties: WorksFilterProperties | null; - authors_filter_properties: AuthorsFilterProperties | null; -} diff --git a/webapp/src/app/api/model/funder-by-author.ts b/webapp/src/app/api/model/funder-by-author.ts deleted file mode 100644 index 50dc9bb9..00000000 --- a/webapp/src/app/api/model/funder-by-author.ts +++ /dev/null @@ -1,21 +0,0 @@ -/** - * Innovation Search Engine API - * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -import { PublicationIdsByAuthorPosition } from './publication-ids-by-author-position'; -import { AuthorPositionCount } from './author-position-count'; - -export interface FunderByAuthor { - funder_id?: string | null; - funder_name?: string | null; - publication_count: number; - author_position_count: AuthorPositionCount; - publication_ids: PublicationIdsByAuthorPosition; - publication_urls?: { [key: string]: string }; - publication_titles?: { [key: string]: string }; -} diff --git a/webapp/src/app/api/model/funderByAuthor.ts b/webapp/src/app/api/model/funderByAuthor.ts index 4fde5d86..c62110e7 100644 --- a/webapp/src/app/api/model/funderByAuthor.ts +++ b/webapp/src/app/api/model/funderByAuthor.ts @@ -9,6 +9,7 @@ */ import { PublicationIdsByAuthorPosition } from './publicationIdsByAuthorPosition'; import { AuthorPositionCount } from './authorPositionCount'; +import { PublicationDetailByFunder } from './publicationDetailByFunder'; export interface FunderByAuthor { funder_id?: string | null; @@ -18,4 +19,5 @@ export interface FunderByAuthor { publication_ids: PublicationIdsByAuthorPosition; publication_urls?: { [key: string]: string }; publication_titles?: { [key: string]: string }; + publication_details?: { [key: string]: PublicationDetailByFunder }; } diff --git a/webapp/src/app/api/model/funders-by-author-response.ts b/webapp/src/app/api/model/funders-by-author-response.ts deleted file mode 100644 index 44d0ffbc..00000000 --- a/webapp/src/app/api/model/funders-by-author-response.ts +++ /dev/null @@ -1,17 +0,0 @@ -/** - * Innovation Search Engine API - * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -import { FunderByAuthor } from './funder-by-author'; - -export interface FundersByAuthorResponse { - author_id: string; - author_name?: string | null; - funder_count: number; - funders: Array; -} diff --git a/webapp/src/app/api/model/group-by-result.ts b/webapp/src/app/api/model/group-by-result.ts deleted file mode 100644 index 98580663..00000000 --- a/webapp/src/app/api/model/group-by-result.ts +++ /dev/null @@ -1,18 +0,0 @@ -/** - * Innovation Search Engine API - * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/** - * GroupByResult - */ -export interface GroupByResult { - key?: string | null; - key_display_name?: string | null; - count?: number | null; -} diff --git a/webapp/src/app/api/model/http-validation-error.ts b/webapp/src/app/api/model/http-validation-error.ts deleted file mode 100644 index c7691bc7..00000000 --- a/webapp/src/app/api/model/http-validation-error.ts +++ /dev/null @@ -1,14 +0,0 @@ -/** - * Innovation Search Engine API - * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -import { ValidationError } from './validation-error'; - -export interface HTTPValidationError { - detail?: Array; -} diff --git a/webapp/src/app/api/model/identity-grant.ts b/webapp/src/app/api/model/identity-grant.ts deleted file mode 100644 index 264feeb0..00000000 --- a/webapp/src/app/api/model/identity-grant.ts +++ /dev/null @@ -1,17 +0,0 @@ -/** - * Innovation Search Engine API - * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -import { AuthScope } from './auth-scope'; - -export interface IdentityGrant { - token_type: string; - access_token: string; - expires_in: number; - scope: AuthScope; -} diff --git a/webapp/src/app/api/model/institution-geo.ts b/webapp/src/app/api/model/institution-geo.ts deleted file mode 100644 index b438d37c..00000000 --- a/webapp/src/app/api/model/institution-geo.ts +++ /dev/null @@ -1,24 +0,0 @@ -/** - * Innovation Search Engine API - * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -import { Latitude } from './latitude'; -import { Longitude } from './longitude'; - -/** - * Location information: - */ -export interface InstitutionGeo { - city?: string | null; - geonames_city_id?: string | null; - region?: string | null; - country_code?: string | null; - country?: string | null; - latitude?: Latitude | null; - longitude?: Longitude | null; -} diff --git a/webapp/src/app/api/model/institution-ids.ts b/webapp/src/app/api/model/institution-ids.ts deleted file mode 100644 index fd952098..00000000 --- a/webapp/src/app/api/model/institution-ids.ts +++ /dev/null @@ -1,21 +0,0 @@ -/** - * Innovation Search Engine API - * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/** - * External identifiers: - */ -export interface InstitutionIds { - openalex?: string | null; - ror?: string | null; - mag?: number | null; - grid?: string | null; - wikipedia?: string | null; - wikidata?: string | null; -} diff --git a/webapp/src/app/api/model/institution-information.ts b/webapp/src/app/api/model/institution-information.ts deleted file mode 100644 index 9e12986d..00000000 --- a/webapp/src/app/api/model/institution-information.ts +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Innovation Search Engine API - * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -export interface InstitutionInformation { - /** - * The raw institution ID of the institution. - */ - raw_id: string; - /** - * The display name of the institution. - */ - display_name: string; -} diff --git a/webapp/src/app/api/model/institution-network-node.ts b/webapp/src/app/api/model/institution-network-node.ts deleted file mode 100644 index 981be8cf..00000000 --- a/webapp/src/app/api/model/institution-network-node.ts +++ /dev/null @@ -1,26 +0,0 @@ -/** - * Innovation Search Engine API - * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -import { CollaborationNetworkNodeType } from './collaboration-network-node-type'; - -export interface InstitutionNetworkNode { - /** - * The raw ID of the node. For an author node, this is the raw person ID. For an institution node, this is the raw institution ID. For a work node, this is the raw work ID. - */ - raw_id: string; - /** - * The display name of the node. - */ - display_name: string; - /** - * The category of the node, either \'author\', \'institution\', or \'work\'. - */ - category: CollaborationNetworkNodeType; -} -export namespace InstitutionNetworkNode {} diff --git a/webapp/src/app/api/model/institution.ts b/webapp/src/app/api/model/institution.ts index 8a86878a..c099fc57 100644 --- a/webapp/src/app/api/model/institution.ts +++ b/webapp/src/app/api/model/institution.ts @@ -7,10 +7,10 @@ * https://openapi-generator.tech * Do not edit the class manually. */ -import { InstitutionIds } from './institution-ids'; -import { AuthorCountsByYearInner } from './author-counts-by-year-inner'; -import { AuthorSummaryStats } from './author-summary-stats'; -import { InstitutionGeo } from './institution-geo'; +import { InstitutionIds } from './institutionIds'; +import { AuthorCountsByYearInner } from './authorCountsByYearInner'; +import { AuthorSummaryStats } from './authorSummaryStats'; +import { InstitutionGeo } from './institutionGeo'; /** * A university, research organization, or other affiliation diff --git a/webapp/src/app/api/model/institutions-list-response.ts b/webapp/src/app/api/model/institutions-list-response.ts deleted file mode 100644 index 15487606..00000000 --- a/webapp/src/app/api/model/institutions-list-response.ts +++ /dev/null @@ -1,21 +0,0 @@ -/** - * Innovation Search Engine API - * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -import { Meta } from './meta'; -import { Institution } from './institution'; -import { GroupByResult } from './group-by-result'; - -/** - * InstitutionsListResponse - */ -export interface InstitutionsListResponse { - meta?: Meta | null; - results?: Array | null; - group_by?: Array | null; -} diff --git a/webapp/src/app/api/model/item-create.ts b/webapp/src/app/api/model/item-create.ts deleted file mode 100644 index 36920a12..00000000 --- a/webapp/src/app/api/model/item-create.ts +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Innovation Search Engine API - * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -export interface ItemCreate { - /** - * The name of the item. - */ - name: string; - /** - * The description of the item. - */ - description: string; -} diff --git a/webapp/src/app/api/model/model2-yr-mean-citedness.ts b/webapp/src/app/api/model/keywordNested.ts similarity index 77% rename from webapp/src/app/api/model/model2-yr-mean-citedness.ts rename to webapp/src/app/api/model/keywordNested.ts index d9c3d9df..f52bb734 100644 --- a/webapp/src/app/api/model/model2-yr-mean-citedness.ts +++ b/webapp/src/app/api/model/keywordNested.ts @@ -8,4 +8,6 @@ * Do not edit the class manually. */ -export interface Model2YrMeanCitedness {} +export interface KeywordNested { + keyword?: string | null; +} diff --git a/webapp/src/app/api/model/location.ts b/webapp/src/app/api/model/location.ts index ba587ef2..f92e2ffb 100644 --- a/webapp/src/app/api/model/location.ts +++ b/webapp/src/app/api/model/location.ts @@ -7,7 +7,7 @@ * https://openapi-generator.tech * Do not edit the class manually. */ -import { DehydratedSource } from './dehydrated-source'; +import { DehydratedSource } from './dehydratedSource'; /** * Where a work is hosted diff --git a/webapp/src/app/api/model/meta.ts b/webapp/src/app/api/model/meta.ts index 0457bafa..f9f56443 100644 --- a/webapp/src/app/api/model/meta.ts +++ b/webapp/src/app/api/model/meta.ts @@ -7,7 +7,7 @@ * https://openapi-generator.tech * Do not edit the class manually. */ -import { CostUsd } from './cost-usd'; +import { CostUsd } from './costUsd'; /** * Metadata about the query results diff --git a/webapp/src/app/api/model/models.ts b/webapp/src/app/api/model/models.ts index cd44ec17..8caaecfd 100644 --- a/webapp/src/app/api/model/models.ts +++ b/webapp/src/app/api/model/models.ts @@ -1,86 +1,98 @@ -export * from './access-grant'; -export * from './auth-account'; -export * from './auth-scope'; +export * from './accessGrant'; +export * from './authAccount'; +export * from './authScope'; export * from './author'; -export * from './author-affiliations-inner'; -export * from './author-counts-by-year-inner'; -export * from './author-ids'; -export * from './author-network-node'; -export * from './author-parsed-longest-name'; -export * from './author-position-count'; -export * from './author-summary-stats'; -export * from './authors-filter-properties'; -export * from './authors-list-response'; +export * from './authorAffiliationsInner'; +export * from './authorCountsByYearInner'; +export * from './authorIds'; +export * from './authorNetworkNode'; +export * from './authorParsedLongestName'; +export * from './authorPositionCount'; +export * from './authorSummaryStats'; +export * from './authorsFilterProperties'; +export * from './authorsListResponse'; export * from './authorship'; -export * from './autocomplete-response'; -export * from './autocomplete-response-meta'; -export * from './autocomplete-response-results-inner'; +export * from './autocompleteResponse'; +export * from './autocompleteResponseMeta'; +export * from './autocompleteResponseResultsInner'; export * from './award'; -export * from './collaboration-network'; -export * from './collaboration-network-edge'; -export * from './collaboration-network-node-type'; -export * from './cost-usd'; -export * from './custom-author'; -export * from './custom-authors-list-response'; -export * from './dehydrated-author'; -export * from './dehydrated-funder'; -export * from './dehydrated-institution'; -export * from './dehydrated-source'; -export * from './filter-information'; -export * from './filter-properties'; -export * from './funder-by-author'; -export * from './funders-by-author-response'; +export * from './bundProject'; +export * from './bundProjectPage'; +export * from './categoryNested'; +export * from './collaborationNetwork'; +export * from './collaborationNetworkEdge'; +export * from './collaborationNetworkNodeType'; +export * from './costUsd'; +export * from './customAuthor'; +export * from './customAuthorsListResponse'; +export * from './dehydratedAuthor'; +export * from './dehydratedFunder'; +export * from './dehydratedInstitution'; +export * from './dehydratedSource'; +export * from './dfgProjectPage'; +export * from './dfgProjectSummary'; +export * from './displayCodeSplittedNested'; +export * from './euProject'; +export * from './euProjectPage'; +export * from './filterInformation'; +export * from './filterProperties'; +export * from './funderByAuthor'; +export * from './fundersByAuthorResponse'; export * from './fwci'; -export * from './group-by-result'; -export * from './http-validation-error'; -export * from './identity-grant'; +export * from './groupByResult'; +export * from './hTTPValidationError'; +export * from './identityGrant'; export * from './institution'; -export * from './institution-geo'; -export * from './institution-ids'; -export * from './institution-information'; -export * from './institution-network-node'; -export * from './institutions-list-response'; +export * from './institutionGeo'; +export * from './institutionIds'; +export * from './institutionInformation'; +export * from './institutionNetworkNode'; +export * from './institutionsListResponse'; export * from './item'; -export * from './item-create'; -export * from './item-page'; +export * from './itemCreate'; +export * from './itemPage'; +export * from './keywordNested'; export * from './latitude'; export * from './location'; export * from './longitude'; export * from './meta'; -export * from './model2-yr-mean-citedness'; -export * from './open-access'; -export * from './person-bio'; -export * from './publication-ids-by-author-position'; -export * from './publications-by-author-response'; +export * from './model2YrMeanCitedness'; +export * from './openAccess'; +export * from './organizationNested'; +export * from './personBio'; +export * from './programmeNested'; +export * from './publicationDetailByFunder'; +export * from './publicationIdsByAuthorPosition'; +export * from './publicationsByAuthorResponse'; export * from './score'; export * from './topic'; -export * from './topic-count'; -export * from './topic-domain'; -export * from './topic-field'; -export * from './topic-ids'; -export * from './topic-subfield'; -export * from './topics-by-time'; -export * from './topics-by-year'; -export * from './topics-list-response'; -export * from './validation-error'; -export * from './validation-error-loc-inner'; +export * from './topicCount'; +export * from './topicDomain'; +export * from './topicField'; +export * from './topicIds'; +export * from './topicSubfield'; +export * from './topicsByTime'; +export * from './topicsByYear'; +export * from './topicsListResponse'; +export * from './validationError'; +export * from './validationErrorLocInner'; export * from './value'; export * from './work'; -export * from './work-biblio'; -export * from './work-citation-normalized-percentile'; -export * from './work-cited-by-percentile-year'; -export * from './work-counts-by-year-inner'; -export * from './work-has-content'; -export * from './work-ids'; -export * from './work-keyword'; -export * from './work-mesh-inner'; -export * from './work-network-node'; -export * from './work-page'; -export * from './work-sustainable-development-goals-inner'; -export * from './work-topic'; -export * from './work-topic-domain'; -export * from './work-topic-field'; -export * from './work-topic-information'; -export * from './work-topic-subfield'; -export * from './works-filter-properties'; -export * from './works-list-response'; +export * from './workBiblio'; +export * from './workCitationNormalizedPercentile'; +export * from './workCitedByPercentileYear'; +export * from './workCountsByYearInner'; +export * from './workHasContent'; +export * from './workIds'; +export * from './workKeyword'; +export * from './workMeshInner'; +export * from './workNetworkNode'; +export * from './workPage'; +export * from './workSustainableDevelopmentGoalsInner'; +export * from './workTopic'; +export * from './workTopicDomain'; +export * from './workTopicField'; +export * from './workTopicInformation'; +export * from './workTopicSubfield'; +export * from './worksFilterProperties'; +export * from './worksListResponse'; diff --git a/webapp/src/app/api/model/open-access.ts b/webapp/src/app/api/model/open-access.ts deleted file mode 100644 index 40d7b1d0..00000000 --- a/webapp/src/app/api/model/open-access.ts +++ /dev/null @@ -1,19 +0,0 @@ -/** - * Innovation Search Engine API - * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/** - * Open access information - */ -export interface OpenAccess { - is_oa?: boolean | null; - oa_status?: string | null; - oa_url?: string | null; - any_repository_has_fulltext?: boolean | null; -} diff --git a/webapp/src/app/api/model/topic-field.ts b/webapp/src/app/api/model/organizationNested.ts similarity index 53% rename from webapp/src/app/api/model/topic-field.ts rename to webapp/src/app/api/model/organizationNested.ts index cd7d08c8..8c948d35 100644 --- a/webapp/src/app/api/model/topic-field.ts +++ b/webapp/src/app/api/model/organizationNested.ts @@ -8,10 +8,11 @@ * Do not edit the class manually. */ -/** - * The field (second level) containing this topic: - */ -export interface TopicField { +export interface OrganizationNested { + ec_contribution?: string | null; id?: string | null; - display_name?: string | null; + name?: string | null; + net_ec_contribution?: string | null; + total_cost?: string | null; + organization_type?: string | null; } diff --git a/webapp/src/app/api/model/person-bio.ts b/webapp/src/app/api/model/person-bio.ts deleted file mode 100644 index b060c9a9..00000000 --- a/webapp/src/app/api/model/person-bio.ts +++ /dev/null @@ -1,16 +0,0 @@ -/** - * Innovation Search Engine API - * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -export interface PersonBio { - /** - * The generated biography. - */ - bio: string; -} diff --git a/webapp/src/app/api/model/work-topic-field.ts b/webapp/src/app/api/model/programmeNested.ts similarity index 66% rename from webapp/src/app/api/model/work-topic-field.ts rename to webapp/src/app/api/model/programmeNested.ts index 432b993e..98710fdb 100644 --- a/webapp/src/app/api/model/work-topic-field.ts +++ b/webapp/src/app/api/model/programmeNested.ts @@ -8,10 +8,8 @@ * Do not edit the class manually. */ -/** - * The parent [field](/api-reference/fields) - */ -export interface WorkTopicField { +export interface ProgrammeNested { + code?: string | null; id?: string | null; - display_name?: string | null; + programme?: string | null; } diff --git a/webapp/src/app/api/model/publication-ids-by-author-position.ts b/webapp/src/app/api/model/publication-ids-by-author-position.ts deleted file mode 100644 index d549f8ed..00000000 --- a/webapp/src/app/api/model/publication-ids-by-author-position.ts +++ /dev/null @@ -1,16 +0,0 @@ -/** - * Innovation Search Engine API - * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -export interface PublicationIdsByAuthorPosition { - first?: Array; - middle?: Array; - last?: Array; - unknown?: Array; -} diff --git a/webapp/src/app/api/model/publicationDetailByFunder.ts b/webapp/src/app/api/model/publicationDetailByFunder.ts new file mode 100644 index 00000000..0fd6b7c5 --- /dev/null +++ b/webapp/src/app/api/model/publicationDetailByFunder.ts @@ -0,0 +1,43 @@ +/** + * Innovation Search Engine API + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +export interface PublicationDetailByFunder { + id: string; + title: string; + abstract?: string | null; + doi?: string | null; + publication_year?: number | null; + publication_date?: string | null; + publication_type?: string | null; + language?: string | null; + publication_url?: string | null; + pdf_url?: string | null; + source_name?: string | null; + source_type?: string | null; + is_open_access?: boolean | null; + open_access_status?: string | null; + has_fulltext?: boolean | null; + license?: string | null; + cited_by_count?: number | null; + is_retracted?: boolean | null; + primary_topic?: string | null; + topic_field?: string | null; + topic_subfield?: string | null; + topic_domain?: string | null; + author_position?: string | null; + authors?: Array; + funder_names?: Array; + institutions?: Array; + countries?: Array; + topics?: Array; + keywords?: Array; + grant_labels?: Array; + counts_by_year?: Array; +} diff --git a/webapp/src/app/api/model/publications-by-author-response.ts b/webapp/src/app/api/model/publications-by-author-response.ts deleted file mode 100644 index 35333880..00000000 --- a/webapp/src/app/api/model/publications-by-author-response.ts +++ /dev/null @@ -1,19 +0,0 @@ -/** - * Innovation Search Engine API - * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -export interface PublicationsByAuthorResponse { - author_id: string; - page: number; - page_size: number; - total_works: number; - total: number; - results_count: number; - results: Array; -} diff --git a/webapp/src/app/api/model/topic-count.ts b/webapp/src/app/api/model/topic-count.ts deleted file mode 100644 index 559242d9..00000000 --- a/webapp/src/app/api/model/topic-count.ts +++ /dev/null @@ -1,22 +0,0 @@ -/** - * Innovation Search Engine API - * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -export interface TopicCount { - id?: string | null; - /** - * The topic display name. - */ - name: string; - /** - * The number of occurrences. - */ - count?: number; - description?: string | null; -} diff --git a/webapp/src/app/api/model/topic-domain.ts b/webapp/src/app/api/model/topic-domain.ts deleted file mode 100644 index 573bef0d..00000000 --- a/webapp/src/app/api/model/topic-domain.ts +++ /dev/null @@ -1,17 +0,0 @@ -/** - * Innovation Search Engine API - * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/** - * The domain (highest level) containing this topic: - */ -export interface TopicDomain { - id?: string | null; - display_name?: string | null; -} diff --git a/webapp/src/app/api/model/topic-ids.ts b/webapp/src/app/api/model/topic-ids.ts deleted file mode 100644 index 22ca3343..00000000 --- a/webapp/src/app/api/model/topic-ids.ts +++ /dev/null @@ -1,17 +0,0 @@ -/** - * Innovation Search Engine API - * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/** - * External identifiers: - */ -export interface TopicIds { - openalex?: string | null; - wikipedia?: string | null; -} diff --git a/webapp/src/app/api/model/topic-subfield.ts b/webapp/src/app/api/model/topic-subfield.ts deleted file mode 100644 index 79f3c9c7..00000000 --- a/webapp/src/app/api/model/topic-subfield.ts +++ /dev/null @@ -1,17 +0,0 @@ -/** - * Innovation Search Engine API - * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/** - * The subfield (third level) containing this topic: - */ -export interface TopicSubfield { - id?: string | null; - display_name?: string | null; -} diff --git a/webapp/src/app/api/model/topic.ts b/webapp/src/app/api/model/topic.ts index 36f66189..eaac16f6 100644 --- a/webapp/src/app/api/model/topic.ts +++ b/webapp/src/app/api/model/topic.ts @@ -7,10 +7,10 @@ * https://openapi-generator.tech * Do not edit the class manually. */ -import { TopicDomain } from './topic-domain'; -import { TopicIds } from './topic-ids'; -import { TopicSubfield } from './topic-subfield'; -import { TopicField } from './topic-field'; +import { TopicDomain } from './topicDomain'; +import { TopicIds } from './topicIds'; +import { TopicSubfield } from './topicSubfield'; +import { TopicField } from './topicField'; /** * A research topic automatically assigned to works diff --git a/webapp/src/app/api/model/topics-by-time.ts b/webapp/src/app/api/model/topics-by-time.ts deleted file mode 100644 index 377ac395..00000000 --- a/webapp/src/app/api/model/topics-by-time.ts +++ /dev/null @@ -1,33 +0,0 @@ -/** - * Innovation Search Engine API - * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -import { TopicsByYear } from './topicsByYear'; - -export interface TopicsByTime { - /** - * Topics grouped by year. - */ - elements?: Array; - /** - * The number of years. - */ - total?: number; - /** - * True if the timeline contains only a limited subset of the author's publications. - */ - is_limited?: boolean; - /** - * The number of publications used to build the timeline. - */ - used_publications?: number; - /** - * The total number of publications found for this author. - */ - total_publications?: number; -} diff --git a/webapp/src/app/api/model/topics-by-year.ts b/webapp/src/app/api/model/topics-by-year.ts deleted file mode 100644 index 8aaafbf6..00000000 --- a/webapp/src/app/api/model/topics-by-year.ts +++ /dev/null @@ -1,29 +0,0 @@ -/** - * Innovation Search Engine API - * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -import { TopicCount } from './topic-count'; - -export interface TopicsByYear { - /** - * The publication year. - */ - year: number; - /** - * The number of works in this year. - */ - publication_count?: number; - /** - * The topics in this year. - */ - topics?: Array; - /** - * The primary topics in this year. - */ - primary_topics?: Array; -} diff --git a/webapp/src/app/api/model/topics-list-response.ts b/webapp/src/app/api/model/topics-list-response.ts deleted file mode 100644 index 54285ca1..00000000 --- a/webapp/src/app/api/model/topics-list-response.ts +++ /dev/null @@ -1,21 +0,0 @@ -/** - * Innovation Search Engine API - * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -import { Meta } from './meta'; -import { GroupByResult } from './group-by-result'; -import { Topic } from './topic'; - -/** - * TopicsListResponse - */ -export interface TopicsListResponse { - meta?: Meta | null; - results?: Array | null; - group_by?: Array | null; -} diff --git a/webapp/src/app/api/model/topicsByTime.ts b/webapp/src/app/api/model/topicsByTime.ts index 3242d9fc..007dc43d 100644 --- a/webapp/src/app/api/model/topicsByTime.ts +++ b/webapp/src/app/api/model/topicsByTime.ts @@ -7,7 +7,7 @@ * https://openapi-generator.tech * Do not edit the class manually. */ -import { TopicsByYear } from './topics-by-year'; +import { TopicsByYear } from './topicsByYear'; export interface TopicsByTime { /** @@ -19,7 +19,7 @@ export interface TopicsByTime { */ total?: number; /** - * True if the timeline contains only a limited subset of the author's publications. + * True if the timeline contains only a limited subset of the author\'s publications. */ is_limited?: boolean; /** diff --git a/webapp/src/app/api/model/validation-error-loc-inner.ts b/webapp/src/app/api/model/validation-error-loc-inner.ts deleted file mode 100644 index 3c1ffa29..00000000 --- a/webapp/src/app/api/model/validation-error-loc-inner.ts +++ /dev/null @@ -1,11 +0,0 @@ -/** - * Innovation Search Engine API - * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -export interface ValidationErrorLocInner {} diff --git a/webapp/src/app/api/model/validation-error.ts b/webapp/src/app/api/model/validation-error.ts deleted file mode 100644 index 87fed83b..00000000 --- a/webapp/src/app/api/model/validation-error.ts +++ /dev/null @@ -1,16 +0,0 @@ -/** - * Innovation Search Engine API - * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -import { ValidationErrorLocInner } from './validation-error-loc-inner'; - -export interface ValidationError { - loc: Array; - msg: string; - type: string; -} diff --git a/webapp/src/app/api/model/work-biblio.ts b/webapp/src/app/api/model/work-biblio.ts deleted file mode 100644 index 65c0a34b..00000000 --- a/webapp/src/app/api/model/work-biblio.ts +++ /dev/null @@ -1,19 +0,0 @@ -/** - * Innovation Search Engine API - * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/** - * Bibliographic info: `volume`, `issue`, `first_page`, `last_page`. - */ -export interface WorkBiblio { - volume?: string | null; - issue?: string | null; - first_page?: string | null; - last_page?: string | null; -} diff --git a/webapp/src/app/api/model/work-citation-normalized-percentile.ts b/webapp/src/app/api/model/work-citation-normalized-percentile.ts deleted file mode 100644 index 4a2bc6d4..00000000 --- a/webapp/src/app/api/model/work-citation-normalized-percentile.ts +++ /dev/null @@ -1,19 +0,0 @@ -/** - * Innovation Search Engine API - * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -import { Value } from './value'; - -/** - * Percentile of citation count normalized by work type, year, and subfield. Includes `value`, `is_in_top_1_percent`, `is_in_top_10_percent`. - */ -export interface WorkCitationNormalizedPercentile { - value?: Value | null; - is_in_top_1_percent?: boolean | null; - is_in_top_10_percent?: boolean | null; -} diff --git a/webapp/src/app/api/model/work-cited-by-percentile-year.ts b/webapp/src/app/api/model/work-cited-by-percentile-year.ts deleted file mode 100644 index 7bcd3c85..00000000 --- a/webapp/src/app/api/model/work-cited-by-percentile-year.ts +++ /dev/null @@ -1,17 +0,0 @@ -/** - * Innovation Search Engine API - * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/** - * Percentile rank compared to other works published in the same year. Contains `min` and `max`. - */ -export interface WorkCitedByPercentileYear { - min?: number | null; - max?: number | null; -} diff --git a/webapp/src/app/api/model/work-counts-by-year-inner.ts b/webapp/src/app/api/model/work-counts-by-year-inner.ts deleted file mode 100644 index 496a11db..00000000 --- a/webapp/src/app/api/model/work-counts-by-year-inner.ts +++ /dev/null @@ -1,17 +0,0 @@ -/** - * Innovation Search Engine API - * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/** - * WorkCountsByYearInner - */ -export interface WorkCountsByYearInner { - year?: number | null; - cited_by_count?: number | null; -} diff --git a/webapp/src/app/api/model/work-has-content.ts b/webapp/src/app/api/model/work-has-content.ts deleted file mode 100644 index 76871238..00000000 --- a/webapp/src/app/api/model/work-has-content.ts +++ /dev/null @@ -1,17 +0,0 @@ -/** - * Innovation Search Engine API - * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/** - * Information about downloadable full-text content: - */ -export interface WorkHasContent { - pdf?: boolean | null; - grobid_xml?: boolean | null; -} diff --git a/webapp/src/app/api/model/work-ids.ts b/webapp/src/app/api/model/work-ids.ts deleted file mode 100644 index fe562e40..00000000 --- a/webapp/src/app/api/model/work-ids.ts +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Innovation Search Engine API - * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/** - * External identifiers: `openalex`, `doi`, `mag`, `pmid`, `pmcid`. - */ -export interface WorkIds { - openalex?: string | null; - doi?: string | null; - mag?: number | null; - pmid?: string | null; - pmcid?: string | null; -} diff --git a/webapp/src/app/api/model/work-keyword.ts b/webapp/src/app/api/model/work-keyword.ts deleted file mode 100644 index 7270db25..00000000 --- a/webapp/src/app/api/model/work-keyword.ts +++ /dev/null @@ -1,19 +0,0 @@ -/** - * Innovation Search Engine API - * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -import { Score } from './score'; - -/** - * WorkKeyword - */ -export interface WorkKeyword { - id?: string | null; - display_name?: string | null; - score?: Score | null; -} diff --git a/webapp/src/app/api/model/work-mesh-inner.ts b/webapp/src/app/api/model/work-mesh-inner.ts deleted file mode 100644 index 36a0c569..00000000 --- a/webapp/src/app/api/model/work-mesh-inner.ts +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Innovation Search Engine API - * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/** - * WorkMeshInner - */ -export interface WorkMeshInner { - descriptor_ui?: string | null; - descriptor_name?: string | null; - qualifier_ui?: string | null; - qualifier_name?: string | null; - is_major_topic?: boolean | null; -} diff --git a/webapp/src/app/api/model/work-network-node.ts b/webapp/src/app/api/model/work-network-node.ts deleted file mode 100644 index 0bedef21..00000000 --- a/webapp/src/app/api/model/work-network-node.ts +++ /dev/null @@ -1,29 +0,0 @@ -/** - * Innovation Search Engine API - * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -import { WorkTopicInformation } from './work-topic-information'; -import { CollaborationNetworkNodeType } from './collaboration-network-node-type'; - -export interface WorkNetworkNode { - /** - * The raw ID of the node. For an author node, this is the raw person ID. For an institution node, this is the raw institution ID. For a work node, this is the raw work ID. - */ - raw_id: string; - /** - * The display name of the node. - */ - display_name: string; - /** - * The category of the node, either \'author\', \'institution\', or \'work\'. - */ - category: CollaborationNetworkNodeType; - publication_year: number | null; - work_topics_information: Set | null; -} -export namespace WorkNetworkNode {} diff --git a/webapp/src/app/api/model/work-page.ts b/webapp/src/app/api/model/work-page.ts deleted file mode 100644 index 285d2065..00000000 --- a/webapp/src/app/api/model/work-page.ts +++ /dev/null @@ -1,33 +0,0 @@ -/** - * Innovation Search Engine API - * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -import { Work } from './work'; - -export interface WorkPage { - /** - * Total number of works matching the query - */ - total: number; - /** - * List of works on the current page - */ - elements: Array; - /** - * Offset of the current page - */ - offset: number; - /** - * Size of the current page - */ - size: number; - /** - * Indicates if the current page is the last page - */ - last_page: boolean; -} diff --git a/webapp/src/app/api/model/work-sustainable-development-goals-inner.ts b/webapp/src/app/api/model/work-sustainable-development-goals-inner.ts deleted file mode 100644 index 8bc67292..00000000 --- a/webapp/src/app/api/model/work-sustainable-development-goals-inner.ts +++ /dev/null @@ -1,19 +0,0 @@ -/** - * Innovation Search Engine API - * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -import { Score } from './score'; - -/** - * WorkSustainableDevelopmentGoalsInner - */ -export interface WorkSustainableDevelopmentGoalsInner { - id?: string | null; - display_name?: string | null; - score?: Score | null; -} diff --git a/webapp/src/app/api/model/work-topic-domain.ts b/webapp/src/app/api/model/work-topic-domain.ts deleted file mode 100644 index 13b227df..00000000 --- a/webapp/src/app/api/model/work-topic-domain.ts +++ /dev/null @@ -1,17 +0,0 @@ -/** - * Innovation Search Engine API - * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/** - * The parent [domain](/api-reference/domains) - */ -export interface WorkTopicDomain { - id?: string | null; - display_name?: string | null; -} diff --git a/webapp/src/app/api/model/work-topic-information.ts b/webapp/src/app/api/model/work-topic-information.ts deleted file mode 100644 index 5dbbfc78..00000000 --- a/webapp/src/app/api/model/work-topic-information.ts +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Innovation Search Engine API - * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -export interface WorkTopicInformation { - /** - * The ID of the topic. - */ - raw_topic_id: string; - /** - * The name of the topic. - */ - display_name: string; -} diff --git a/webapp/src/app/api/model/work-topic-subfield.ts b/webapp/src/app/api/model/work-topic-subfield.ts deleted file mode 100644 index 49c1155b..00000000 --- a/webapp/src/app/api/model/work-topic-subfield.ts +++ /dev/null @@ -1,17 +0,0 @@ -/** - * Innovation Search Engine API - * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/** - * The parent [subfield](/api-reference/subfields) - */ -export interface WorkTopicSubfield { - id?: string | null; - display_name?: string | null; -} diff --git a/webapp/src/app/api/model/work-topic.ts b/webapp/src/app/api/model/work-topic.ts deleted file mode 100644 index 73bb7ad9..00000000 --- a/webapp/src/app/api/model/work-topic.ts +++ /dev/null @@ -1,25 +0,0 @@ -/** - * Innovation Search Engine API - * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -import { Score } from './score'; -import { WorkTopicDomain } from './work-topic-domain'; -import { WorkTopicSubfield } from './work-topic-subfield'; -import { WorkTopicField } from './work-topic-field'; - -/** - * WorkTopic - */ -export interface WorkTopic { - id?: string | null; - display_name?: string | null; - score?: Score | null; - subfield?: WorkTopicSubfield | null; - field?: WorkTopicField | null; - domain?: WorkTopicDomain | null; -} diff --git a/webapp/src/app/api/model/work.ts b/webapp/src/app/api/model/work.ts index 746cc648..6c6ae99b 100644 --- a/webapp/src/app/api/model/work.ts +++ b/webapp/src/app/api/model/work.ts @@ -7,22 +7,22 @@ * https://openapi-generator.tech * Do not edit the class manually. */ -import { DehydratedFunder } from './dehydrated-funder'; +import { DehydratedFunder } from './dehydratedFunder'; import { Authorship } from './authorship'; -import { OpenAccess } from './open-access'; -import { WorkIds } from './work-ids'; -import { WorkSustainableDevelopmentGoalsInner } from './work-sustainable-development-goals-inner'; -import { WorkTopic } from './work-topic'; -import { WorkCountsByYearInner } from './work-counts-by-year-inner'; -import { WorkKeyword } from './work-keyword'; -import { WorkCitationNormalizedPercentile } from './work-citation-normalized-percentile'; +import { OpenAccess } from './openAccess'; +import { WorkIds } from './workIds'; +import { WorkSustainableDevelopmentGoalsInner } from './workSustainableDevelopmentGoalsInner'; +import { WorkTopic } from './workTopic'; +import { WorkCountsByYearInner } from './workCountsByYearInner'; +import { WorkKeyword } from './workKeyword'; +import { WorkCitationNormalizedPercentile } from './workCitationNormalizedPercentile'; import { Award } from './award'; import { Fwci } from './fwci'; -import { WorkMeshInner } from './work-mesh-inner'; -import { WorkCitedByPercentileYear } from './work-cited-by-percentile-year'; -import { WorkHasContent } from './work-has-content'; +import { WorkMeshInner } from './workMeshInner'; +import { WorkCitedByPercentileYear } from './workCitedByPercentileYear'; +import { WorkHasContent } from './workHasContent'; import { Location } from './location'; -import { WorkBiblio } from './work-biblio'; +import { WorkBiblio } from './workBiblio'; /** * A scholarly document (article, book, dataset, thesis, etc.) diff --git a/webapp/src/app/api/model/works-filter-properties.ts b/webapp/src/app/api/model/works-filter-properties.ts deleted file mode 100644 index fd25fd26..00000000 --- a/webapp/src/app/api/model/works-filter-properties.ts +++ /dev/null @@ -1,32 +0,0 @@ -/** - * Innovation Search Engine API - * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -export interface WorksFilterProperties { - /** - * The start publication year for the works to include in the collaboration network. - */ - start_year?: number; - /** - * The end publication year for the works to include in the collaboration network. - */ - end_year?: number; - /** - * The list of raw topic IDs to include in the collaboration network. If empty, all topics will be included. - */ - allowed_topics?: Array; - /** - * The minimum number of contributors required for a work to be included in the collaboration network. - */ - min_contributors?: number; - /** - * The maximum number of contributors allowed for a work to be included in the collaboration network. - */ - max_contributors?: number; -} diff --git a/webapp/src/app/api/model/works-list-response.ts b/webapp/src/app/api/model/works-list-response.ts deleted file mode 100644 index 6c711607..00000000 --- a/webapp/src/app/api/model/works-list-response.ts +++ /dev/null @@ -1,21 +0,0 @@ -/** - * Innovation Search Engine API - * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -import { Meta } from './meta'; -import { Work } from './work'; -import { GroupByResult } from './group-by-result'; - -/** - * WorksListResponse - */ -export interface WorksListResponse { - meta?: Meta | null; - results?: Array | null; - group_by?: Array | null; -} diff --git a/webapp/src/app/app.config.ts b/webapp/src/app/app.config.ts index 7aaeef9e..fe2175b6 100644 --- a/webapp/src/app/app.config.ts +++ b/webapp/src/app/app.config.ts @@ -1,9 +1,19 @@ -import { ApplicationConfig, LOCALE_ID } from '@angular/core'; -import { provideRouter } from '@angular/router'; +import { ApplicationConfig, inject, LOCALE_ID } from '@angular/core'; +import { + NavigationError, + provideRouter, + Router, + withComponentInputBinding, + withNavigationErrorHandler, +} from '@angular/router'; import { routes } from './app.routes'; import { provideAnimationsAsync } from '@angular/platform-browser/animations/async'; -import { provideHttpClient, withInterceptors } from '@angular/common/http'; +import { + HttpErrorResponse, + provideHttpClient, + withInterceptors, +} from '@angular/common/http'; import locale from '@angular/common/locales/de'; import { registerLocaleData } from '@angular/common'; import { authenticationInterceptor } from './shared/interceptors/authentication.interceptor'; @@ -11,6 +21,7 @@ import { MAT_FORM_FIELD_DEFAULT_OPTIONS } from '@angular/material/form-field'; import { MatPaginatorIntl } from '@angular/material/paginator'; import { PaginatorIntl } from './shared/utils/paginatorIntl'; import { provideEchartsCore } from 'ngx-echarts'; +import { ErrorService } from './shared/services/error.service'; registerLocaleData(locale); @@ -22,7 +33,42 @@ export const appConfig: ApplicationConfig = { useValue: { appearance: 'outline' }, }, { provide: MatPaginatorIntl, useClass: PaginatorIntl }, - provideRouter(routes), + provideRouter( + routes, + withComponentInputBinding(), + withNavigationErrorHandler((navigationError: NavigationError) => { + const router = inject(Router); + const errorService = inject(ErrorService); + + if ( + router.url.includes('/error') || + router.currentNavigation()?.extractedUrl.toString().includes('/error') + ) { + console.error( + 'Kritischer Fehler beim Laden der Fehlerseite selbst:', + navigationError, + ); + return; + } + + const error = navigationError.error; + let errorMessage: string = 'Unbekannter Fehler'; + if (error instanceof HttpErrorResponse) { + errorMessage = error.error?.message || 'Unbekannter HTTP-Fehler'; + } + + errorService.setError({ + statusCode: error.status || 500, + title: 'Daten-Fehler', + message: 'Die Daten für diese Ansicht konnten nicht geladen werden.', + errorDetails: errorMessage, + }); + + setTimeout(() => { + router.navigate(['/error'], { replaceUrl: true }); + }); + }), + ), provideHttpClient(withInterceptors([authenticationInterceptor])), // provideApi('/inse-service'), provideAnimationsAsync(), diff --git a/webapp/src/app/app.routes.ts b/webapp/src/app/app.routes.ts index def295c4..c6c2707c 100644 --- a/webapp/src/app/app.routes.ts +++ b/webapp/src/app/app.routes.ts @@ -4,6 +4,10 @@ import { collaborationNetworkResolver } from './resolvers/collaboration-network. import { personListResolver } from './resolvers/person-list.resolver'; import { personBioResolver } from './resolvers/person-bio.resolver'; import { personResolver } from './resolvers/person.resolver'; +import { institutionResolver } from './resolvers/institution.resolver'; +import { bundProjectsResolver } from './resolvers/bund-projects.resolver'; +import { euProjectsResolver } from './resolvers/eu-projects.resolver'; +import { dfgProjectsResolver } from './resolvers/dfg-projects.resolver'; export const routes: Routes = [ { @@ -101,6 +105,30 @@ export const routes: Routes = [ (mod) => mod.PersonOverviewComponent, ), }, + { + path: 'projects', + loadComponent: () => + import('./modules/person-projects/person-projects.component').then( + (mod) => mod.PersonProjectsComponent, + ), + resolve: { + dfgProjectPage: dfgProjectsResolver, + }, + runGuardsAndResolvers: (from, to) => { + const keys = ['page', 'size', 'sort_by', 'sort_direction', 'search']; + + return keys.some( + (key) => from.queryParamMap.get(key) !== to.queryParamMap.get(key), + ); + }, + }, + { + path: 'publications', + loadComponent: () => + import('./modules/person-publications/person-publications.component').then( + (mod) => mod.PersonPublicationsComponent, + ), + }, { path: 'network', loadComponent: () => @@ -110,7 +138,7 @@ export const routes: Routes = [ resolve: { collaborationNetwork: collaborationNetworkResolver, }, - runGuardsAndResolvers: (to, from) => { + runGuardsAndResolvers: (from, to) => { // No need to re-run for different table view or search term const keys = [ 'filter_by', @@ -125,17 +153,11 @@ export const routes: Routes = [ ]; return keys.some( - (key) => to.queryParamMap.get(key) !== from.queryParamMap.get(key), + (key) => from.queryParamMap.get(key) !== to.queryParamMap.get(key), ); }, }, - { - path: 'publications', - loadComponent: () => - import('./modules/person-publications/person-publications.component').then( - (mod) => mod.PersonPublicationsComponent, - ), - }, + { path: 'funding', loadComponent: () => @@ -153,15 +175,74 @@ export const routes: Routes = [ ], }, { - path: 'institution/:id', + path: 'institution/:institutionId', canActivate: [userGuard], loadComponent: () => import('./modules/institution/institution.component').then( (mod) => mod.InstitutionComponent, ), + resolve: { + institution: institutionResolver, + }, + children: [ + { + path: '', + pathMatch: 'full', + redirectTo: 'overview', + }, + { + path: 'overview', + loadComponent: () => + import('./modules/institution-overview/institution-overview.component').then( + (mod) => mod.InstitutionOverviewComponent, + ), + }, + { + path: 'projects', + loadComponent: () => { + return import('./modules/institution-projects/institution-projects.component').then( + (mod) => mod.InstitutionProjectsComponent, + ); + }, + resolve: { + bundProjectPage: bundProjectsResolver, + euProjectPage: euProjectsResolver, + }, + runGuardsAndResolvers: (from, to) => { + const keys = ['page', 'size', 'sort_by', 'sort_direction', 'search']; + + return keys.some( + (key) => from.queryParamMap.get(key) !== to.queryParamMap.get(key), + ); + }, + }, + ], + runGuardsAndResolvers: (from, to) => { + const keys = ['page', 'size', 'sort_by', 'sort_direction']; + + return keys.some( + (key) => from.queryParamMap.get(key) !== to.queryParamMap.get(key), + ); + }, + }, + { + path: 'error', + loadComponent: () => + import('./modules/error-page/error-page.component').then( + (mod) => mod.ErrorPageComponent, + ), }, { path: '**', - redirectTo: 'login', + loadComponent: () => + import('./modules/error-page/error-page.component').then( + (mod) => mod.ErrorPageComponent, + ), + data: { + routeStatusCode: 404, + routeTitle: 'Seite nicht gefunden', + routeMessage: + 'Die gesuchte Seite existiert leider nicht oder wurde verschoben.', + }, }, ]; diff --git a/webapp/src/app/directives/debounce.directive.ts b/webapp/src/app/directives/debounce.directive.ts new file mode 100644 index 00000000..46da5300 --- /dev/null +++ b/webapp/src/app/directives/debounce.directive.ts @@ -0,0 +1,48 @@ +import { + Directive, + effect, + ElementRef, + inject, + input, + model, + numberAttribute, +} from '@angular/core'; + +@Directive({ + selector: 'input[debounceTime]', + standalone: true, + host: { + '(input)': 'handleInput($event)', + }, +}) +export class DebounceDirective { + private readonly el = inject(ElementRef); + #debounceTimer?: ReturnType; + + readonly debounceTime = input(0, { transform: numberAttribute }); + readonly debouncedValue = model(''); + + constructor() { + effect(() => { + const outerValue = this.debouncedValue(); + if (this.el.nativeElement.value !== outerValue) { + this.el.nativeElement.value = outerValue; + } + }); + } + + handleInput(event: Event): void { + const value = (event.target as HTMLInputElement).value; + + clearTimeout(this.#debounceTimer); + + if (!value || !this.debounceTime()) { + this.debouncedValue.set(value); + return; + } + + this.#debounceTimer = setTimeout(() => { + this.debouncedValue.set(value); + }, this.debounceTime()); + } +} diff --git a/webapp/src/app/modules/error-page/error-page.component.html b/webapp/src/app/modules/error-page/error-page.component.html new file mode 100644 index 00000000..126ea4fb --- /dev/null +++ b/webapp/src/app/modules/error-page/error-page.component.html @@ -0,0 +1,37 @@ +
+ + +
+ warning +
+ + Fehler {{ statusCode() }} +

{{ title() }}

+

{{ message() }}

+ + + + @if (errorDetails()) { + + + + ERWEITERTE DIAGNOSE + + + +
{{ errorDetails() }}
+
+ } +
+
+
diff --git a/webapp/src/app/modules/error-page/error-page.component.scss b/webapp/src/app/modules/error-page/error-page.component.scss new file mode 100644 index 00000000..b7c2bee1 --- /dev/null +++ b/webapp/src/app/modules/error-page/error-page.component.scss @@ -0,0 +1,87 @@ +.error-container { + min-height: 90vh; + background-color: none !important; + display: flex; + align-items: center; + justify-content: center; + padding: 1.5rem; + box-sizing: border-box; +} + +.error-card { + max-width: 450px; + width: 100%; + box-shadow: + 0 4px 6px -1px rgb(0 0 0 / 0.05), + 0 2px 4px -2px rgb(0 0 0 / 0.05) !important; +} + +.error-content { + display: flex; + flex-direction: column; + align-items: center; + text-align: center; +} + +.error-icon { + height: 36px !important; + width: 36px !important; + font-size: 36px !important; +} + +.status-code { + font-size: 0.75rem; + font-weight: 600; + letter-spacing: 0.05em; + color: #94a3b8; + text-transform: uppercase; +} + +.error-title { + margin: 0.5rem 0 1rem 0; + font-size: 1.75rem; + font-weight: 700; + color: #1e293b; + letter-spacing: -0.025em; + line-height: 1.2; +} + +.error-message { + margin: 0 0 2rem 0; + font-size: 1rem; + color: #475569; + line-height: 1.6; +} + +.back-button { + margin-bottom: 1rem; + display: flex; + align-items: center; + gap: 0.5rem; +} + +.diagnostics-panel { + width: 100%; + background: transparent !important; +} + +.diagnostics-title { + font-size: 0.75rem !important; + font-weight: 600; + color: #94a3b8; + letter-spacing: 0.05em; +} + +.diagnostics-code { + margin-top: 0.5rem; + padding: 1rem; + background-color: #0f172a; + border-radius: 8px; + font-size: 0.75rem; + color: #34d399; + overflow-x: auto; + font-family: monospace; + text-align: left; + white-space: pre-wrap; + max-height: 160px; +} diff --git a/webapp/src/app/modules/error-page/error-page.component.ts b/webapp/src/app/modules/error-page/error-page.component.ts new file mode 100644 index 00000000..26acf5ee --- /dev/null +++ b/webapp/src/app/modules/error-page/error-page.component.ts @@ -0,0 +1,58 @@ +import { Location } from '@angular/common'; +import { Component, input, OnInit, signal, inject } from '@angular/core'; +import { MatButtonModule } from '@angular/material/button'; +import { MatCardModule } from '@angular/material/card'; +import { MatExpansionModule } from '@angular/material/expansion'; +import { MatIconModule } from '@angular/material/icon'; +import { ErrorService } from '../../shared/services/error.service'; + +@Component({ + selector: 'app-error-page', + standalone: true, + imports: [MatButtonModule, MatCardModule, MatIconModule, MatExpansionModule], + templateUrl: './error-page.component.html', + styleUrl: './error-page.component.scss', +}) +export class ErrorPageComponent implements OnInit { + routeStatusCode = input(500); + routeTitle = input('Da ist was schiefgelaufen'); + routeMessage = input( + 'Ein unerwarteter Fehler ist aufgetreten. Bitte versuchen Sie es später erneut.', + ); + routeErrorDetails = input(undefined); + + statusCode = signal(500); + title = signal(''); + message = signal(''); + errorDetails = signal(undefined); + + isDetailsOpen = signal(false); + + private readonly location = inject(Location); + private readonly errorService = inject(ErrorService); + + ngOnInit() { + const savedError = this.errorService.getError(); + + if (savedError) { + this.statusCode.set(savedError.statusCode); + this.title.set(savedError.title); + this.message.set(savedError.message); + this.errorDetails.set(savedError.errorDetails); + this.errorService.clearError(); // Speicher aufräumen + } else { + this.statusCode.set(this.routeStatusCode()); + this.title.set(this.routeTitle()); + this.message.set(this.routeMessage()); + this.errorDetails.set(this.routeErrorDetails()); + } + } + + toggleDetails() { + this.isDetailsOpen.update((isOpen) => !isOpen); + } + + goBack() { + this.location.back(); + } +} diff --git a/webapp/src/app/modules/institution-overview/institution-overview.component.html b/webapp/src/app/modules/institution-overview/institution-overview.component.html new file mode 100644 index 00000000..486e08e8 --- /dev/null +++ b/webapp/src/app/modules/institution-overview/institution-overview.component.html @@ -0,0 +1 @@ +

institution-overview works!

diff --git a/webapp/src/app/modules/institution-overview/institution-overview.component.scss b/webapp/src/app/modules/institution-overview/institution-overview.component.scss new file mode 100644 index 00000000..e69de29b diff --git a/webapp/src/app/modules/institution-overview/institution-overview.component.spec.ts b/webapp/src/app/modules/institution-overview/institution-overview.component.spec.ts new file mode 100644 index 00000000..2926265e --- /dev/null +++ b/webapp/src/app/modules/institution-overview/institution-overview.component.spec.ts @@ -0,0 +1,22 @@ +import { ComponentFixture, TestBed } from '@angular/core/testing'; + +import { InstitutionOverviewComponent } from './institution-overview.component'; + +describe('InstitutionOverviewComponent', () => { + let component: InstitutionOverviewComponent; + let fixture: ComponentFixture; + + beforeEach(async () => { + await TestBed.configureTestingModule({ + imports: [InstitutionOverviewComponent], + }).compileComponents(); + + fixture = TestBed.createComponent(InstitutionOverviewComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/webapp/src/app/modules/institution-overview/institution-overview.component.ts b/webapp/src/app/modules/institution-overview/institution-overview.component.ts new file mode 100644 index 00000000..13b18fa4 --- /dev/null +++ b/webapp/src/app/modules/institution-overview/institution-overview.component.ts @@ -0,0 +1,9 @@ +import { Component } from '@angular/core'; + +@Component({ + selector: 'app-institution-overview', + imports: [], + templateUrl: './institution-overview.component.html', + styleUrl: './institution-overview.component.scss', +}) +export class InstitutionOverviewComponent {} diff --git a/webapp/src/app/modules/institution-projects/institution-projects.component.html b/webapp/src/app/modules/institution-projects/institution-projects.component.html new file mode 100644 index 00000000..77736b04 --- /dev/null +++ b/webapp/src/app/modules/institution-projects/institution-projects.component.html @@ -0,0 +1,56 @@ +
+

Projekte

+ + + + + Suche nach Themen + + search + + + + + + + + + + + + + +
+ + + {{ row.funding_start | date: 'dd.MM.yyyy' }} + + + {{ row.funding_end | date: 'dd.MM.yyyy' }} + + + {{ row.grant_amount | currency: 'EUR' : 'symbol' : '1.0-0' : 'de' }} + diff --git a/webapp/src/app/modules/institution-projects/institution-projects.component.scss b/webapp/src/app/modules/institution-projects/institution-projects.component.scss new file mode 100644 index 00000000..c8534b0d --- /dev/null +++ b/webapp/src/app/modules/institution-projects/institution-projects.component.scss @@ -0,0 +1,8 @@ +.content { + padding: 16px; +} + +mat-card, +mat-paginator { + background-color: var(--sg-background); +} diff --git a/webapp/src/app/modules/institution-projects/institution-projects.component.ts b/webapp/src/app/modules/institution-projects/institution-projects.component.ts new file mode 100644 index 00000000..b5218f2a --- /dev/null +++ b/webapp/src/app/modules/institution-projects/institution-projects.component.ts @@ -0,0 +1,300 @@ +import { + Component, + computed, + effect, + input, + OnInit, + signal, + TemplateRef, + viewChild, +} from '@angular/core'; +import { ActivatedRoute, Router } from '@angular/router'; +import { + BundProject, + BundProjectPage, + EuProject, + EuProjectPage, +} from '../../api'; +import { MatCardModule } from '@angular/material/card'; +import { MatFormFieldModule } from '@angular/material/form-field'; +import { MatTabChangeEvent, MatTabsModule } from '@angular/material/tabs'; +import { MatPaginatorModule, PageEvent } from '@angular/material/paginator'; +import { FormsModule } from '@angular/forms'; +import { MatInputModule } from '@angular/material/input'; +import { + GenericColumn, + DataTableComponent, +} from '../../shared/ui/data-table/data-table.component'; +import { CurrencyPipe, DatePipe } from '@angular/common'; +import { takeUntilDestroyed, toSignal } from '@angular/core/rxjs-interop'; +import { Sort, SortDirection } from '@angular/material/sort'; +import { DebounceDirective } from '../../directives/debounce.directive'; +import { MatIconModule } from '@angular/material/icon'; +import { MatButtonModule } from '@angular/material/button'; + +type BundProjectRow = { + topic: string; + funding_start: Date; + funding_end: Date; + grant_amount: number; + department: string; +}; + +type EuProjectRow = { + topic: string; + funding_start: Date; + funding_end: Date; + grant_amount: number; +}; + +@Component({ + selector: 'app-institution-projects', + imports: [ + MatCardModule, + MatFormFieldModule, + MatTabsModule, + MatPaginatorModule, + FormsModule, + MatInputModule, + DataTableComponent, + DatePipe, + CurrencyPipe, + DebounceDirective, + MatIconModule, + MatButtonModule, + ], + templateUrl: './institution-projects.component.html', + styleUrl: './institution-projects.component.scss', +}) +export class InstitutionProjectsComponent implements OnInit { + fundingStartTmp = viewChild.required>('fundingStartTmp'); + fundingEndTmp = viewChild.required>('fundingEndTmp'); + grantAmountTmp = viewChild.required>('grantAmountTmp'); + + euProjectPage = input.required(); + euProjectColumns: GenericColumn[] = []; + euProjectData: EuProjectRow[] = []; + + bundProjectPage = input.required(); + bundProjectColumns: GenericColumn[] = []; + bundProjectData: BundProjectRow[] = []; + + urlSortKey = signal(''); + urlSortDirection = signal(''); + urlSearchTerm = signal(''); + + constructor( + private readonly activatedRoute: ActivatedRoute, + private readonly router: Router, + ) { + this.activatedRoute.queryParams + .pipe(takeUntilDestroyed()) + .subscribe((params) => { + this.urlSortKey.set(params['sort_by'] ?? ''); + this.urlSortDirection.set( + (params['sort_direction'] as SortDirection) ?? '', + ); + this.urlSearchTerm.set(params['search'] ?? ''); + }); + + effect(() => { + const euPage = this.euProjectPage(); + if (euPage) { + this.euProjectData = euPage.elements + ? euPage.elements.map(this.transformEuRow.bind(this)) + : []; + } + }); + effect(() => { + const bundPage = this.bundProjectPage(); + if (bundPage) { + this.bundProjectData = bundPage.elements + ? bundPage.elements.map(this.transformBundRow.bind(this)) + : []; + } + }); + + effect(() => { + const searchTerm = this.urlSearchTerm(); + if (searchTerm) { + this.router.navigate([], { + queryParams: { search: searchTerm }, + queryParamsHandling: 'merge', + }); + } + }); + } + + readonly queryParams = toSignal(this.activatedRoute.queryParamMap, { + initialValue: null, + }); + + readonly displayedProjects = computed(() => { + return this.queryParams()?.get('project_tab') ?? 'eu'; + }); + + readonly page = computed(() => { + const pageParam = this.queryParams()?.get('page'); + const page = pageParam ? Number.parseInt(pageParam, 10) : 0; + return Number.isNaN(page) ? 0 : page; + }); + + readonly selectedPage = computed(() => { + if (this.displayedProjects() === 'eu') { + return this.euProjectPage(); + } else { + return this.bundProjectPage(); + } + }); + + readonly pageTotal = computed(() => { + return this.selectedPage()?.total ?? 0; + }); + + readonly pageSize = computed(() => { + return this.selectedPage()?.size ?? 10; + }); + + readonly pageIndex = computed(() => { + return this.selectedPage()?.page ?? 0; + }); + + ngOnInit(): void { + this.euProjectColumns = [ + { + id: 'topic', + header: 'Thema', + type: 'accessor', + accessorKey: 'topic', + }, + { + id: 'funding_start', + header: 'Förderbeginn', + type: 'accessor', + accessorKey: 'funding_start', + cellTemplate: this.fundingStartTmp(), + }, + { + id: 'funding_end', + header: 'Förderende', + type: 'accessor', + accessorKey: 'funding_end', + cellTemplate: this.fundingEndTmp(), + }, + { + id: 'grant_amount', + header: 'Fördersumme', + type: 'accessor', + accessorKey: 'grant_amount', + cellTemplate: this.grantAmountTmp(), + }, + ]; + this.bundProjectColumns = [ + { + id: 'topic', + header: 'Thema', + type: 'accessor', + accessorKey: 'topic', + }, + { + id: 'funding_start', + header: 'Förderbeginn', + type: 'accessor', + accessorKey: 'funding_start', + cellTemplate: this.fundingStartTmp(), + }, + { + id: 'funding_end', + header: 'Fördersende', + type: 'accessor', + accessorKey: 'funding_end', + cellTemplate: this.fundingEndTmp(), + }, + { + id: 'grant_amount', + header: 'Fördersumme', + type: 'accessor', + accessorKey: 'grant_amount', + cellTemplate: this.grantAmountTmp(), + }, + { + id: 'department', + header: 'Abteilung', + type: 'accessor', + accessorKey: 'department', + }, + ]; + } + + transformEuRow(project: EuProject): EuProjectRow { + return { + topic: project.title || '', + funding_start: project.start_date + ? new Date(project.start_date) + : new Date(0), + funding_end: project.end_date ? new Date(project.end_date) : new Date(0), + grant_amount: Number(project.total_cost) || 0, + }; + } + + transformBundRow(project: BundProject): BundProjectRow { + return { + topic: project.topic || '', + funding_start: project.funding_start + ? new Date(project.funding_start) + : new Date(0), + funding_end: project.funding_end + ? new Date(project.funding_end) + : new Date(0), + grant_amount: project.grant_amount || 0, + department: project.department_fullname || '', + }; + } + + readonly tabIndex = computed(() => { + switch (this.displayedProjects()) { + case 'eu': + return 0; + case 'bund': + return 1; + default: + return 0; + } + }); + + selectedTabChange(event: MatTabChangeEvent): void { + const tab = ['eu', 'bund'][event.index]; + this.router.navigate([], { + queryParams: { project_tab: tab, page: 1, size: 10 }, + queryParamsHandling: 'merge', + }); + } + + handlePageChange(event: PageEvent): void { + this.router.navigate([], { + queryParams: { page: event.pageIndex, size: event.pageSize }, + queryParamsHandling: 'merge', + }); + } + + handleSortChange(event: Sort): void { + this.router.navigate([], { + queryParams: { sort_by: event.active, sort_direction: event.direction }, + queryParamsHandling: 'merge', + }); + } + + handleSearchTermChange(newTerm: string): void { + this.router.navigate([], { + queryParams: { search: newTerm }, + queryParamsHandling: 'merge', + }); + } + + clearSearchTerm(): void { + this.router.navigate([], { + queryParams: { search: null }, + queryParamsHandling: 'merge', + }); + } +} diff --git a/webapp/src/app/modules/institution/institution.component.html b/webapp/src/app/modules/institution/institution.component.html index 06cbe4a2..2024c855 100644 --- a/webapp/src/app/modules/institution/institution.component.html +++ b/webapp/src/app/modules/institution/institution.component.html @@ -1 +1,28 @@ -

institution works!

+
+

{{ institution.display_name }}

+ + +

{{ institution.homepage_url }}

+

{{ institution.display_name_alternatives }}

+

And many more useful details...

+
+
+ + +
+ + + diff --git a/webapp/src/app/modules/institution/institution.component.scss b/webapp/src/app/modules/institution/institution.component.scss index e69de29b..2521fee5 100644 --- a/webapp/src/app/modules/institution/institution.component.scss +++ b/webapp/src/app/modules/institution/institution.component.scss @@ -0,0 +1,6 @@ +.content { + padding: 16px; + display: flex; + flex-direction: column; + gap: 16px; +} diff --git a/webapp/src/app/modules/institution/institution.component.ts b/webapp/src/app/modules/institution/institution.component.ts index 2e11507e..acd4b205 100644 --- a/webapp/src/app/modules/institution/institution.component.ts +++ b/webapp/src/app/modules/institution/institution.component.ts @@ -1,9 +1,51 @@ -import { Component } from '@angular/core'; +import { Component, OnInit } from '@angular/core'; +import { + ActivatedRoute, + RouterLink, + RouterOutlet, + RouterLinkActive, +} from '@angular/router'; +import { Institution } from '../../api'; +import { MatCardModule } from '@angular/material/card'; +import { MatTabsModule } from '@angular/material/tabs'; @Component({ selector: 'app-institution', - imports: [], + imports: [ + MatCardModule, + MatTabsModule, + RouterLink, + RouterOutlet, + RouterLinkActive, + ], templateUrl: './institution.component.html', styleUrl: './institution.component.scss', }) -export class InstitutionComponent {} +export class InstitutionComponent implements OnInit { + institution!: Institution; + + links = [ + { label: 'Übersicht', path: 'overview', disabled: false }, + { + label: 'Projekte', + path: 'projects', + disabled: false, + queryParams: { + project_tab: 'bund', + page: 1, + size: 10, + search: '', + sort_by: 'topic', + sort_direction: 'asc', + }, + }, + ]; + + constructor(private readonly activatedRoute: ActivatedRoute) {} + + ngOnInit(): void { + this.activatedRoute.data.subscribe(({ institution }) => { + this.institution = institution; + }); + } +} diff --git a/webapp/src/app/modules/person-card/person-card.component.html b/webapp/src/app/modules/person-card/person-card.component.html index 3826bb26..303bd906 100644 --- a/webapp/src/app/modules/person-card/person-card.component.html +++ b/webapp/src/app/modules/person-card/person-card.component.html @@ -34,6 +34,9 @@ Publikationen: {{ person.works_count }} · Zitationen: {{ person.cited_by_count }}

+

+ h_index: {{ person.summary_stats?.h_index }} +

diff --git a/webapp/src/app/modules/person-list/person-list.component.html b/webapp/src/app/modules/person-list/person-list.component.html index f2348b2b..1e05127c 100644 --- a/webapp/src/app/modules/person-list/person-list.component.html +++ b/webapp/src/app/modules/person-list/person-list.component.html @@ -60,8 +60,9 @@ + - + + + } @else { + Themen + } + - @if (!loadingWordCloud) { -
-
-

Forschungsthemen

- @if (wordCloudOptions && sliderMax > 5) { -
- {{ topN }} Themen -
-
- -
-
- } -
- @if (wordCloudOptions) { +
+ @if (loadingWordCloud) { +
Forschungsthemen werden geladen ...
+ } @else if (wordCloudOptions) {
Keine Forschungsthemen gefunden.

}
- } + diff --git a/webapp/src/app/modules/person-overview/person-overview.component.scss b/webapp/src/app/modules/person-overview/person-overview.component.scss index 4e70b0e9..7b40485a 100644 --- a/webapp/src/app/modules/person-overview/person-overview.component.scss +++ b/webapp/src/app/modules/person-overview/person-overview.component.scss @@ -5,37 +5,12 @@ box-sizing: border-box; } -.word-cloud-card { - margin-top: 1.5rem; - padding: 24px 28px; - border: 1px solid #d7e4ff; - border-radius: 16px; - background: #ffffff; - box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04); - box-sizing: border-box; -} - -.word-cloud-header { - display: flex; - align-items: center; - justify-content: space-between; - gap: 1.5rem; - margin-bottom: 0.75rem; -} - -.word-cloud-title { - margin: 0; - font-family: 'Montserrat', 'Open Sans', Arial, sans-serif; - font-size: 20px; - font-weight: 700; - color: var(--sg-text); -} - .word-cloud-slider-wrapper { display: flex; align-items: center; + justify-content: center; gap: 0.75rem; - flex-shrink: 0; + min-height: 86px; } .slider-label { @@ -115,15 +90,24 @@ } } +.word-cloud-view { + min-height: 420px; +} + .word-cloud-chart { width: 100%; - height: 400px; + height: 420px; cursor: pointer; } +.word-cloud-state, .word-cloud-empty { - margin: 2rem 0 0.5rem; - text-align: center; + margin: 0; + min-height: 420px; + display: flex; + align-items: center; + justify-content: center; color: var(--sg-text-muted); font-size: 14px; + text-align: center; } diff --git a/webapp/src/app/modules/person-overview/person-overview.component.ts b/webapp/src/app/modules/person-overview/person-overview.component.ts index d6963b71..5291c82a 100644 --- a/webapp/src/app/modules/person-overview/person-overview.component.ts +++ b/webapp/src/app/modules/person-overview/person-overview.component.ts @@ -489,7 +489,11 @@ export class PersonOverviewComponent implements OnInit { } private parseTimelineViewMode(value: string | null): TimelineViewMode { - return value === 'compact' ? 'compact' : 'years'; + if (value === 'compact' || value === 'wordcloud') { + return value; + } + + return 'years'; } private parseOptionalYear(value: string | null): number | undefined { diff --git a/webapp/src/app/modules/person-projects/person-projects.component.html b/webapp/src/app/modules/person-projects/person-projects.component.html new file mode 100644 index 00000000..b1f8bb43 --- /dev/null +++ b/webapp/src/app/modules/person-projects/person-projects.component.html @@ -0,0 +1,64 @@ +
+
+
Projekte
+

Übersicht der durchgeführten Projekte.

+
+ + + + Suche nach Titel + + search + + + + + + + + + + +
+ + + + open_in_new + + + + + {{ element.funding_end == '2999' ? 'laufend' : element.funding_end }} + + + +
+
    + @for ( + name of element.names.sort((a, b) => a.localeCompare(b)); + track $index + ) { +
  • + {{ name }} +
  • + } +
+
+
diff --git a/webapp/src/app/modules/person-projects/person-projects.component.scss b/webapp/src/app/modules/person-projects/person-projects.component.scss new file mode 100644 index 00000000..9bd15288 --- /dev/null +++ b/webapp/src/app/modules/person-projects/person-projects.component.scss @@ -0,0 +1,13 @@ +.person-projects { + padding: 2rem; +} + +.description-container { + display: flex; + flex-direction: column; +} + +mat-card, +mat-paginator { + background-color: var(--sg-background); +} diff --git a/webapp/src/app/modules/person-projects/person-projects.component.ts b/webapp/src/app/modules/person-projects/person-projects.component.ts new file mode 100644 index 00000000..660576e3 --- /dev/null +++ b/webapp/src/app/modules/person-projects/person-projects.component.ts @@ -0,0 +1,162 @@ +import { + Component, + computed, + effect, + input, + OnInit, + signal, + TemplateRef, + viewChild, +} from '@angular/core'; +import { DfgProjectPage, DfgProjectSummary } from '../../api'; +import { + DataTableComponent, + GenericColumn, +} from '../../shared/ui/data-table/data-table.component'; +import { MatIconModule } from '@angular/material/icon'; +import { MatButtonModule } from '@angular/material/button'; +import { MatCardModule } from '@angular/material/card'; +import { MatTabsModule } from '@angular/material/tabs'; +import { MatFormFieldModule } from '@angular/material/form-field'; +import { MatInputModule } from '@angular/material/input'; +import { DebounceDirective } from '../../directives/debounce.directive'; +import { ActivatedRoute, Router } from '@angular/router'; +import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; +import { MatPaginatorModule, PageEvent } from '@angular/material/paginator'; +import { Sort, SortDirection } from '@angular/material/sort'; + +@Component({ + selector: 'app-person-projects', + imports: [ + DataTableComponent, + MatIconModule, + MatButtonModule, + MatCardModule, + MatTabsModule, + MatFormFieldModule, + MatInputModule, + DebounceDirective, + MatPaginatorModule, + ], + templateUrl: './person-projects.component.html', + styleUrl: './person-projects.component.scss', +}) +export class PersonProjectsComponent implements OnInit { + dfgProjectPage = input.required(); + dfgProjectColumns: GenericColumn[] = []; + dfgProjectData: DfgProjectSummary[] = []; + + dfgProjectFundingEndTmp = viewChild.required>( + 'dfgProjectFundingEndTmp', + ); + dfgProjectActionsTmp = viewChild.required>( + 'dfgProjectActionsTmp', + ); + dfgProjectDetailRowTmp = viewChild.required>( + 'dfgProjectDetailRowTmp', + ); + + urlSearchTerm = signal(''); + urlSortKey = signal(''); + urlSortDirection = signal(''); + + readonly pageTotal = computed(() => { + return this.dfgProjectPage()?.total ?? 0; + }); + + readonly pageSize = computed(() => { + return this.dfgProjectPage()?.size ?? 10; + }); + + readonly pageIndex = computed(() => { + return this.dfgProjectPage()?.page ?? 0; + }); + + constructor( + private readonly router: Router, + private readonly activatedRoute: ActivatedRoute, + ) { + this.activatedRoute.queryParamMap + .pipe(takeUntilDestroyed()) + .subscribe((params) => { + this.urlSearchTerm.set(params.get('search') || ''); + }); + + effect(() => { + console.log( + 'PersonProjectsComponent: dfgProjectPage changed', + this.dfgProjectPage(), + ); + this.dfgProjectData = this.dfgProjectPage().elements || []; + }); + + effect(() => { + const searchTerm = this.urlSearchTerm(); + if (searchTerm) { + this.router.navigate([], { + queryParams: { search: searchTerm }, + queryParamsHandling: 'merge', + }); + } + }); + } + + ngOnInit(): void { + this.dfgProjectColumns = [ + { id: 'title', header: 'Titel', type: 'accessor', accessorKey: 'title' }, + { + id: 'funding_start', + header: 'Förderbeginn', + type: 'accessor', + accessorKey: 'funding_start', + }, + { + id: 'funding_end', + header: 'Förderende', + type: 'accessor', + accessorKey: 'funding_end', + cellTemplate: this.dfgProjectFundingEndTmp(), + }, + { + id: 'professional_classification', + header: 'Fachliche Zuordnung', + type: 'accessor', + accessorKey: 'professional_classification', + }, + { + id: 'actions', + header: '', + type: 'display', + cellTemplate: this.dfgProjectActionsTmp(), + }, + ]; + } + + handleSearchTermChange(newTerm: string): void { + this.router.navigate([], { + queryParams: { search: newTerm }, + queryParamsHandling: 'merge', + }); + } + + clearSearchTerm(): void { + this.router.navigate([], { + queryParams: { search: null }, + queryParamsHandling: 'merge', + }); + } + + handlePageChange(event: PageEvent): void { + this.router.navigate([], { + queryParams: { page: event.pageIndex, size: event.pageSize }, + queryParamsHandling: 'merge', + }); + } + + handleSortChange(event: Sort): void { + this.router.navigate([], { + queryParams: { sort_by: event.active, sort_direction: event.direction }, + queryParamsHandling: 'merge', + }); + } +} diff --git a/webapp/src/app/modules/person/person.component.html b/webapp/src/app/modules/person/person.component.html index ad1e8518..a0b50703 100644 --- a/webapp/src/app/modules/person/person.component.html +++ b/webapp/src/app/modules/person/person.component.html @@ -23,6 +23,11 @@ {{ citedByCount() }} Zitationen } + + @if (h_index() !== null) { + h_index: {{ h_index() }} + } + }
@@ -69,6 +74,7 @@ this.person()?.works_count ?? null); readonly citedByCount = computed(() => this.person()?.cited_by_count ?? null); + readonly h_index = computed( + () => this.person()?.summary_stats?.h_index ?? null, + ); readonly orcid = computed(() => { const rawOrcid = this.getId('orcid'); if (!rawOrcid) { @@ -171,7 +170,18 @@ export class PersonComponent { ); links = [ { label: 'Übersicht', path: 'overview', disabled: false }, - { label: 'Projekte', path: 'projects', disabled: true }, + { + label: 'Projekte', + path: 'projects', + queryParams: { + page: 0, + size: 10, + sort_by: 'title', + sort_direction: 'asc', + search: '', + }, + disabled: false, + }, { label: 'Publikationen', path: 'publications', disabled: false }, { label: 'Netzwerk', path: 'network', disabled: false }, { label: 'Gründungen', path: 'foundings', disabled: true }, diff --git a/webapp/src/app/modules/topic-hierarchy/topic-hierarchy.component.ts b/webapp/src/app/modules/topic-hierarchy/topic-hierarchy.component.ts index 8bead083..eb9468e3 100644 --- a/webapp/src/app/modules/topic-hierarchy/topic-hierarchy.component.ts +++ b/webapp/src/app/modules/topic-hierarchy/topic-hierarchy.component.ts @@ -11,6 +11,13 @@ import { MatCheckboxModule } from '@angular/material/checkbox'; import { MatIconModule } from '@angular/material/icon'; import { MatProgressSpinnerModule } from '@angular/material/progress-spinner'; import { TopicsService } from '../../api/api/topics.service'; +import { Subject, of } from 'rxjs'; +import { + debounceTime, + distinctUntilChanged, + switchMap, + catchError, +} from 'rxjs/operators'; export interface TopicItem { id: string; @@ -79,7 +86,54 @@ export class TopicHierarchyComponent implements OnInit { expandedFields = new Set(); expandedSubfields = new Set(); - constructor(private topicsService: TopicsService) {} + private readonly searchSubject = new Subject(); + + constructor(private topicsService: TopicsService) { + this.searchSubject + .pipe( + debounceTime(300), + distinctUntilChanged(), + switchMap((query) => { + if (!query) { + this.filteredFlatTopics = []; + return of({ results: [] }); + } + this.loading.set(true); + return this.topicsService.vectorSearchTopics(query, 50).pipe( + catchError((err) => { + console.error('Error in semantic topic search:', err); + // Fallback to local filtering + const q = query.toLowerCase(); + this.filteredFlatTopics = this.flatTopics.filter( + (t) => + t.name.toLowerCase().includes(q) || + t.path.toLowerCase().includes(q), + ); + return of({ results: [] }); + }), + ); + }), + ) + .subscribe((response) => { + this.loading.set(false); + if (response && response.results) { + this.filteredFlatTopics = response.results.map((topic) => { + const parts = []; + if (topic.domain?.display_name) + parts.push(topic.domain.display_name); + if (topic.field?.display_name) parts.push(topic.field.display_name); + if (topic.subfield?.display_name) + parts.push(topic.subfield.display_name); + return { + id: topic.id || '', + name: topic.display_name || '', + path: + parts.length > 0 ? parts.join(' > ') : topic.description || '', + }; + }); + } + }); + } ngOnInit(): void { this.topicsService.getTopicHierarchy().subscribe({ @@ -121,12 +175,7 @@ export class TopicHierarchyComponent implements OnInit { this.filteredFlatTopics = []; return; } - const query = this.searchQuery.toLowerCase(); - this.filteredFlatTopics = this.flatTopics.filter( - (t) => - t.name.toLowerCase().includes(query) || - t.path.toLowerCase().includes(query), - ); + this.searchSubject.next(this.searchQuery); } toggleTopic(name: string): void { diff --git a/webapp/src/app/resolvers/bund-projects.resolver.ts b/webapp/src/app/resolvers/bund-projects.resolver.ts new file mode 100644 index 00000000..88025139 --- /dev/null +++ b/webapp/src/app/resolvers/bund-projects.resolver.ts @@ -0,0 +1,30 @@ +import { ResolveFn } from '@angular/router'; +import { BundProjectPage, ProjectsService } from '../api'; +import { inject } from '@angular/core'; + +export const bundProjectsResolver: ResolveFn = ( + route, + state, +) => { + console.log('bundProjectsResolver called with route:', route); + const page = route.queryParamMap.get('page') ?? '1'; + const size = route.queryParamMap.get('size') ?? '10'; + let institutionId = route.paramMap.get('institutionId'); + if (!institutionId) { + institutionId = route.parent?.paramMap.get('institutionId') ?? null; + } + + const sortBy = route.queryParamMap.get('sort_by') ?? 'topic'; + const sortDirection = route.queryParamMap.get('sort_direction') ?? 'asc'; + + const search = route.queryParamMap.get('search'); + + return inject(ProjectsService).getBundProjects( + institutionId || '', + search || undefined, + Number(page), + Number(size), + sortBy, + sortDirection, + ); +}; diff --git a/webapp/src/app/resolvers/dfg-projects.resolver.ts b/webapp/src/app/resolvers/dfg-projects.resolver.ts new file mode 100644 index 00000000..f5414f57 --- /dev/null +++ b/webapp/src/app/resolvers/dfg-projects.resolver.ts @@ -0,0 +1,28 @@ +import { inject } from '@angular/core'; +import { ResolveFn } from '@angular/router'; +import { DfgProjectPage, ProjectsService } from '../api'; + +export const dfgProjectsResolver: ResolveFn = ( + route, + state, +) => { + const page = route.queryParamMap.get('page') ?? '0'; + const size = route.queryParamMap.get('size') ?? '10'; + const rawAuthorId = route.parent?.params['id']; + if (!rawAuthorId) { + throw new Error('Author ID is required to resolve collaboration network'); + } + + const searchTerm = route.queryParamMap.get('search'); + const sortBy = route.queryParamMap.get('sort_by') || 'title'; + const sortDirection = route.queryParamMap.get('sort_direction') || 'asc'; + + return inject(ProjectsService).getDfgProjects( + rawAuthorId, + searchTerm ?? undefined, + Number(page), + Number(size), + sortBy, + sortDirection, + ); +}; diff --git a/webapp/src/app/resolvers/eu-projects.resolver.ts b/webapp/src/app/resolvers/eu-projects.resolver.ts new file mode 100644 index 00000000..5ca019aa --- /dev/null +++ b/webapp/src/app/resolvers/eu-projects.resolver.ts @@ -0,0 +1,25 @@ +import { ResolveFn } from '@angular/router'; +import { EuProjectPage, ProjectsService } from '../api'; +import { inject } from '@angular/core'; + +export const euProjectsResolver: ResolveFn = (route, state) => { + const page = route.queryParamMap.get('page') ?? '1'; + const size = route.queryParamMap.get('size') ?? '10'; + let institutionId = route.paramMap.get('institutionId'); + if (!institutionId) { + institutionId = route.parent?.paramMap.get('institutionId') ?? null; + } + + const sortBy = route.queryParamMap.get('sort_by') ?? 'topic'; + const sortDirection = route.queryParamMap.get('sort_direction') ?? 'asc'; + const search = route.queryParamMap.get('search'); + + return inject(ProjectsService).getEuProjects( + institutionId || '', + search || undefined, + Number(page), + Number(size), + sortBy, + sortDirection, + ); +}; diff --git a/webapp/src/app/resolvers/institution.resolver.ts b/webapp/src/app/resolvers/institution.resolver.ts new file mode 100644 index 00000000..716fa075 --- /dev/null +++ b/webapp/src/app/resolvers/institution.resolver.ts @@ -0,0 +1,14 @@ +import { ResolveFn } from '@angular/router'; +import { Institution, InstitutionsService } from '../api'; +import { inject } from '@angular/core'; + +export const institutionResolver: ResolveFn = (route, state) => { + const institutionId = route.paramMap.get('institutionId'); + if (!institutionId) { + throw new Error( + 'Institution ID is required to resolve institution details', + ); + } + + return inject(InstitutionsService).getInstitutionById(institutionId); +}; diff --git a/webapp/src/app/resolvers/person-list.resolver.ts b/webapp/src/app/resolvers/person-list.resolver.ts index 793e225d..8e4b824c 100644 --- a/webapp/src/app/resolvers/person-list.resolver.ts +++ b/webapp/src/app/resolvers/person-list.resolver.ts @@ -12,7 +12,7 @@ export const personListResolver: ResolveFn = ( return [val]; }; const defaultIncludes = - 'display_name,works_count,cited_by_count,topics,orcid,relevance_rating,last_known_institutions,affiliations'; + 'display_name,works_count,cited_by_count,summary_stats,topics,orcid,relevance_rating,last_known_institutions,affiliations'; const params = route.queryParamMap; const query = params.get('query') || undefined; @@ -26,8 +26,8 @@ export const personListResolver: ResolveFn = ( : 10; const institutionName = params.get('institutionName') || undefined; - const sortBy= params.get('sortBy') || undefined; - const sortOrder= params.get('sortOrder') || undefined; + const sortBy = params.get('sortBy') || undefined; + const sortOrder = params.get('sortOrder') || undefined; const topicsParam = params.getAll('topic'); diff --git a/webapp/src/app/shared/services/error.service.ts b/webapp/src/app/shared/services/error.service.ts new file mode 100644 index 00000000..04eb0e40 --- /dev/null +++ b/webapp/src/app/shared/services/error.service.ts @@ -0,0 +1,27 @@ +import { Injectable, signal } from '@angular/core'; + +export interface ErrorState { + statusCode: number; + title: string; + message: string; + errorDetails?: string; +} + +@Injectable({ + providedIn: 'root', +}) +export class ErrorService { + private readonly errorSignal = signal(null); + + setError(error: ErrorState): void { + this.errorSignal.set(error); + } + + clearError(): void { + this.errorSignal.set(null); + } + + getError(): ErrorState | null { + return this.errorSignal(); + } +} diff --git a/webapp/src/app/shared/services/resolver-state.service.ts b/webapp/src/app/shared/services/resolver-state.service.ts index d992ae74..f6eb2052 100644 --- a/webapp/src/app/shared/services/resolver-state.service.ts +++ b/webapp/src/app/shared/services/resolver-state.service.ts @@ -43,7 +43,6 @@ export class ResolverStateService { isResolvingInside(path: string) { const from = this.previousUrl(); const to = this.resolvingUrl(); - console.log(from, to, to?.startsWith(path) && from?.startsWith(path)); if (to?.startsWith(path) && from?.startsWith(path)) return true; return false; } diff --git a/webapp/src/app/shared/ui/app-menu/app-menu.component.html b/webapp/src/app/shared/ui/app-menu/app-menu.component.html index 8e136a31..942b7cbd 100644 --- a/webapp/src/app/shared/ui/app-menu/app-menu.component.html +++ b/webapp/src/app/shared/ui/app-menu/app-menu.component.html @@ -1,5 +1,5 @@