Skip to content

Commit

Permalink
fix taxonomy rendering
Browse files Browse the repository at this point in the history
  • Loading branch information
MichalGawor committed Jun 12, 2024
1 parent 27d968e commit 2177f51
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion dogapi/dogapi/views_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,7 @@ def is_pid(request: Request) -> Response:
return ret


@extend_schema(parameters=[pid_queryparam],
@extend_schema(parameters=[],
description="Returns taxonomy of a MIME type according to Data Type Registry",
responses={
200: OpenApiTypes.OBJECT,
Expand Down
4 changes: 3 additions & 1 deletion dogui/dogui/templates/UI/_content.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@
<li>expand data type - returns MIME Data Type taxonomy from <a href="">Data Type Registry</a></li>
</ul>

OpenAPI docummentation available <a href="">here</a>
Swagger available <a href="https://infra.clarin.eu/apis/">here</a>
<br>
Raw openapi.json available <a href="https://alpha-dog.clarin.eu/api/openapi.json">here</a>
<br>
Source code for DOGlib available <a href="https://github.com/clarin-eric/DOGlib/">here</a>
<br>
Expand Down
5 changes: 2 additions & 3 deletions dogui/dogui/utils.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
class TaxonomyTree:
def __init__(self, taxonomy_dict: dict):
self.name = next(iter(taxonomy_dict.keys()))
print("NAME")
print(self.name)
taxonomy_dict = taxonomy_dict[self.name]
tree_root_pid: str = ""
print("TAXONOMY DICT")
print(taxonomy_dict)
for node_pid, taxonomy_node in taxonomy_dict.items():
print("NODE PID")
print(node_pid)
print("taxonomy_node")
print(taxonomy_node)
if taxonomy_node["name"] == self.name:
if not taxonomy_node["parents"]:
tree_root_pid = node_pid
break
self.node = TaxonomyNode(tree_root_pid, taxonomy_dict)
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ homepage = ""
repository = "https://github.com/clarin-eric/DOGapp/"

[tool.poetry.dependencies]
doglib = { url = "https://github.com/clarin-eric/DOGlib/releases/download/1.0.7-rc1/doglib-1.0.7rc1-py3-none-any.whl" }
doglib = { url = "https://github.com/clarin-eric/DOGlib/releases/download/1.0.7-rc2/doglib-1.0.7rc2-py3-none-any.whl" }
Django = '4.2.11'
django-cors-headers = '>=4.3.1'
django-debug-toolbar = '4.3.0'
Expand Down

0 comments on commit 2177f51

Please sign in to comment.