Skip to content

Commit

Permalink
60 prepare to merge dev to main (#65)
Browse files Browse the repository at this point in the history
* #60 Prepare to merge dev to main

Pulling missing materials endpoint over

* #60 Prepare to merge dev to main

pending materials endpoint included

* #60 Prepare to merge dev to main

Adding descendants endpoint

* #60 Prepare to merge dev to main

Adding stub analytics endpoint

* #60 Prepare to merge dev to main

Adding stub analytics endpoint

* #60 Prepare to merge dev to main

Adding stub analytics endpoint

* #60 Prepare to merge dev to main

Adding stub analytics endpoint

* #60 Prepare to merge dev to main

WIP: Adding search functionality

* #60 Prepare to merge dev to main

Adding search functionality

* #60 Prepare to merge dev to main

WIP: Adding material type functionality

* #60 Prepare to merge dev to main

Displaying only required metadata

* #60 Prepare to merge dev to main

WIP: Adding background tasks

* #60 Prepare to merge dev to main

WIP: Adding background tasks

* #60 Prepare to merge dev to main

Fixing required properties

* #60 Prepare to merge dev to main

WIP: Fixing issue with string execution

* #60 Prepare to merge dev to main

Correcting title property

* #60 Prepare to merge dev to main

WIP: Fixing str call bug

* #60 Prepare to merge dev to main

WIP: Fixing material search

* KBMBF-452: #60 Prepare to merge dev to main

WIP: Fixing material search

* KBMBF-452: #60 Prepare to merge dev to main

WIP: Fixing material search

#time 5m #comment Verbindung von Github und Jira für mehr Transparenz was wir wozu bei Tickets machen.

* KBMBF-452: Adding JIRA integration (#62)

* KBMBF-452: #60 Prepare to merge dev to main

WIP: Fixing material search

#time 5m #comment Verbindung von Github und Jira für mehr Transparenz was wir wozu bei Tickets machen.

* KBMBF-452: #60 Prepare to merge dev to main

WIP: Fixing material search

* KBMBF-452: #60 Prepare to merge dev to main

WIP: Fixing material search

#time 5m #comment Verbindung von Github und Jira für mehr Transparenz was wir wozu bei Tickets machen.

* KBMBF-452: #60 Prepare to merge dev to main

WIP: Fixing broken data structure

* KBMBF-452: #60 Prepare to merge dev to main

WIP: Fixing broken data structure

* KBMBF-452: #60 Prepare to merge dev to main

Fixing material search

* KBMBF-452: #60 Prepare to merge dev to main

Fixing material search

* KBMBF-452: #60 Prepare to merge dev to main

WIP: Enabling pipeline tests

* KBMBF-452: #60 Prepare to merge dev to main

WIP: Enabling pipeline tests

* KBMBF-452: #60 Prepare to merge dev to main

Refactoring

* KBMBF-452: #60 Prepare to merge dev to main

Adding collection validation

* KBMBF-452: #60 Prepare to merge dev to main

Adding unit test

* KBMBF-452: #60 Prepare to merge dev to main

Updating unit tests

* KBMBF-452: #60 Prepare to merge dev to main

Adding missing materials endpoint

* KBMBF-452: #60 Prepare to merge dev to main

WIP: Adding unit tests

* KBMBF-452: #60 Prepare to merge dev to main

WIP: Adding unit tests

* KBMBF-452: #60 Prepare to merge dev to main

Adding descriptions

* KBMBF-452: #60 Prepare to merge dev to main

Adding descriptions

Refactoring

* KBMBF-452: #60 Prepare to merge dev to main

Cleanup

* KBMBF-452: #60 Prepare to merge dev to main

Cleanup

* KBMBF-452: #60 Prepare to merge dev to main

Cleanup

* KBMBF-452: #60 Prepare to merge dev to main

Refactoring and removing duplicates

* KBMBF-452: #60 Prepare to merge dev to main

Cleanup

* KBMBF-452: #60 Prepare to merge dev to main

Cleanup

* KBMBF-452: #60 Prepare to merge dev to main

Cleanup

* KBMBF-452: #60 Prepare to merge dev to main

Cleanup

* KBMBF-452: #60 Prepare to merge dev to main

Cleanup

* KBMBF-452: #60 Prepare to merge dev to main

Fixing bug of wrong node_id parameter in score

* KBMBF-452: #60 Prepare to merge dev to main

Fixing bug of wrong node_id parameter in score
  • Loading branch information
RobertMeissner authored Jul 12, 2022
1 parent 4ebb0be commit 1d97001
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 10 deletions.
6 changes: 3 additions & 3 deletions src/app/api/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@
aggs_material_validation,
calc_scores,
calc_weighted_score,
collection_id_param,
field_names_used_for_score_calculation,
node_id_param,
search_score,
)
from app.core.config import API_DEBUG, BACKGROUND_TASK_TIME_INTERVAL
Expand Down Expand Up @@ -208,7 +208,7 @@ async def get_timestamps(
+ field_names_used_for_score_calculation(aggs_material_validation)}`.
""",
)
async def score(*, node_id: uuid.UUID = Depends(collection_id_param)):
async def score(*, node_id: uuid.UUID = Depends(node_id_param)):
collection_stats = search_score(
node_id=node_id, resource_type=ResourceType.COLLECTION
)
Expand Down Expand Up @@ -335,7 +335,7 @@ async def filter_materials_with_missing_attributes(
response_model=list[CollectionMaterialsCount],
status_code=HTTP_200_OK,
responses={HTTP_404_NOT_FOUND: {"description": "Collection not found"}},
tags=[_TAG_STATISTICS],
tags=[_TAG_COLLECTIONS],
description="""Returns the number of materials connected to all collections
below this 'node_id' as a flat list.""",
)
Expand Down
2 changes: 1 addition & 1 deletion src/app/api/score/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ class ScoreOutput(BaseModel):
"properties.cclom:general_description": "description",
"properties.cclom:general_keyword": "keywords",
"properties.ccm:taxonid": "taxon_id",
"properties.ccm:educationalcontext": "license",
"properties.ccm:educationalcontext": "edu_context",
"properties.ccm:commonlicense_key": "license",
"properties.ccm:objecttype": "object_type",
"properties.ccm:containsAdvertisement": "ads_qualifier",
Expand Down
8 changes: 3 additions & 5 deletions src/app/api/score/score.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,13 +80,11 @@ def search_score(node_id: uuid.UUID, resource_type: ResourceType) -> dict:
return score(response)


def collection_id_param(
def node_id_param(
*,
collection_id: uuid.UUID = Path(
..., examples=app.core.constants.COLLECTION_NAME_TO_ID
),
node_id: uuid.UUID = Path(..., examples=app.core.constants.COLLECTION_NAME_TO_ID),
) -> uuid.UUID:
return collection_id
return node_id


def field_names_used_for_score_calculation(properties: dict) -> list[str]:
Expand Down
2 changes: 1 addition & 1 deletion tests/test_stats.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ def _get_item(_, key):
"title": None,
"keywords": ["missing"],
"description": ["missing"],
"edu_context": None,
"edu_context": ["missing"],
}


Expand Down

0 comments on commit 1d97001

Please sign in to comment.