Skip to content

Commit

Permalink
Merge branch 'main' into dependabot/npm_and_yarn/taxonomy-editor-fron…
Browse files Browse the repository at this point in the history
…tend/npm_and_yarn-8ea409b84b
  • Loading branch information
alexgarel committed Dec 20, 2024
2 parents 751685f + 42d69ba commit ccafd13
Show file tree
Hide file tree
Showing 5 changed files with 931 additions and 17,928 deletions.
12 changes: 11 additions & 1 deletion backend/editor/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,20 @@ def file_cleanup(filepath):
log.warn(f"Taxonomy file {filepath} not found for deletion")


SPLIT_WITH_SLASH = {
"food_ingredients",
"food_categories",
"beauty_categories",
"beauty_labels",
"product_categories",
"product_labels",
}


def taxonomy_path_in_repository(taxonomy_name):
"""Helper function to get the path of a taxonomy in the repository"""
path = taxonomy_name
# hacky for now until we restructure better
if path in ("food_ingredients", "food_categories"):
if path in SPLIT_WITH_SLASH:
path = path.replace("_", "/")
return f"taxonomies/{path}.txt"
2 changes: 2 additions & 0 deletions docker/dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@ services:
- ./taxonomy-editor-frontend/index.html:/opt/taxonomy-editor/index.html
- ./taxonomy-editor-frontend/tsconfig.js:/opt/taxonomy-editor/tsconfig.js
- ./taxonomy-editor-frontend/vite.config.ts:/opt/taxonomy-editor/vite.config.ts
- ./taxonomy-editor-frontend/package.json:/opt/taxonomy-editor/package.json
- ./taxonomy-editor-frontend/package-lock.json:/opt/taxonomy-editor/package-lock.json
- ./backend/openapi/openapi.json:/opt/backend/openapi/openapi.json
taxonomy_frontend:
image: taxonomy-editor/taxonomy_frontend:dev
Expand Down
Loading

0 comments on commit ccafd13

Please sign in to comment.