Skip to content

Commit

Permalink
Merge branch 'main' into wikidata-properties
Browse files Browse the repository at this point in the history
  • Loading branch information
teolemon authored Jul 21, 2024
2 parents c36a0bc + d2292fa commit db4351b
Show file tree
Hide file tree
Showing 11 changed files with 1,172 additions and 1,060 deletions.
1 change: 1 addition & 0 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

COMPOSE_PATH_SEPARATOR=";"
COMPOSE_FILE="docker-compose.yml;docker/dev.yml"
RESTART_POLICY=no

# port expose for the API
API_EXPOSE="127.0.0.1:80"
Expand Down
38 changes: 22 additions & 16 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
@@ -1,27 +1,33 @@
github:
- .github/**/*

documentation:
- any: ['*.MD']
- changed-files:
- any-glob-to-any-file: '.github/**/*'

translations:
- i18n/**/*
- app/i18n.py
- changed-files:
- any-glob-to-any-file: 'i18n/**/*'
- any-glob-to-any-file: 'app/i18n.py'

tests:
- tests/**/*
- changed-files:
- any-glob-to-any-file: 'tests/**/*'

docker:
- docker/**/*
- Dockerfile
- docker-compose.yml
- changed-files:
- any-glob-to-any-file: 'docker/**/*'
- any-glob-to-any-file: 'Dockerfile'
- any-glob-to-any-file: 'docker-compose.yml'

api:
- app/knowledge_panels.py
- app/main.py
- app/off.py
- app/wikidata_utils.py
- app/settings.py
- changed-files:
- any-glob-to-any-file: 'app/knowledge_panels.py'
- any-glob-to-any-file: 'app/main.py'
- any-glob-to-any-file: 'app/off.py'
- any-glob-to-any-file: 'app/wikidata_utils.py'
- any-glob-to-any-file: 'app/settings.py'

models:
- app/models.py
- changed-files:
- any-glob-to-any-file: 'app/models.py'

documentation:
- any-glob-to-any-file: ['*.MD']
3 changes: 2 additions & 1 deletion .github/workflows/container-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ jobs:
echo "COMPOSE_HTTP_TIMEOUT=120" >> .env
# echo "COMPOSE_PROJECT_NAME=${{ matrix.env }}" >> .env
echo "COMPOSE_PATH_SEPARATOR=;" >> .env
echo "RESTART_POLICY=always" >> .env
echo "COMPOSE_FILE=docker-compose.yml;docker/prod.yml" >> .env
echo "TAG=sha-${{ github.sha }}" >> .env
Expand Down Expand Up @@ -201,7 +202,7 @@ jobs:
cd ${{ matrix.env }}
docker system prune -af
- uses: frankie567/[email protected].2
- uses: basos9/[email protected].3
if: ${{ always() }}
with:
apiHost: https://grafana.openfoodfacts.org
Expand Down
1 change: 1 addition & 0 deletions app/i18n.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
"""i18n handling
"""

import contextlib
import contextvars
import gettext
Expand Down
2 changes: 2 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ version: '3'
services:
facets-api:
image: ghcr.io/openfoodfacts/facets-knowledge-panels:${TAG:-dev}
# default to restart, use RESTART_POLICY=no in dev
restart: ${RESTART_POLICY:-always}
ports:
- "${API_EXPOSE}:80"
environment:
Expand Down
8 changes: 4 additions & 4 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
aiohttp==3.8.5
aiohttp==3.9.4
async-lru==2.0.4 # async lru_cache https://github.com/aio-libs/async-lru
asyncer==0.0.1
fastapi==0.101.0
jinja2==3.1.2
fastapi==0.109.1
jinja2==3.1.4
fastapi_utils==0.2.1
inflect==7.0.0
pycountry==22.3.5
Expand All @@ -15,7 +15,7 @@ openfoodfacts==0.1.5
prometheus-fastapi-instrumentator==6.1.0

# dev
black==22.6.0
black==24.3.0
pytest==7.4.0
pytest-mock==3.11.1
pytest-asyncio==0.21.1
Expand Down
Loading

0 comments on commit db4351b

Please sign in to comment.