diff --git a/.env.template b/.env.template index adc70d7..e4306af 100644 --- a/.env.template +++ b/.env.template @@ -1 +1,2 @@ -TYPESENSE_API_KEY= \ No newline at end of file +TYPESENSE_API_KEY= +TYPESENSE_DATA_DIR= \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml index 0e3b29f..ee77709 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -4,9 +4,8 @@ services: typesense: image: typesense/typesense:27.1 container_name: typesense - environment: - - TYPESENSE_API_KEY=${TYPESENSE_API_KEY} - - TYPESENSE_DATA_DIR=/data + env_file: + - .env volumes: - typesense-data:/data ports: diff --git a/import_data/requirements.txt b/import_data/requirements.txt index f93e4de..20b26b1 100644 --- a/import_data/requirements.txt +++ b/import_data/requirements.txt @@ -1,7 +1,19 @@ +beautifulsoup4==4.12.3 +certifi==2024.8.30 +charset-normalizer==3.4.0 +idna==3.10 markdownify==0.11.6 +numpy==1.26.4 pandas==2.2.0 -requests==2.31.0 -xmltodict==0.13.0 -python_dotenv==1.0.1 pyarrow==17.0.0 +python-dateutil==2.9.0.post0 +python-dotenv==1.0.1 +pytz==2024.2 +requests==2.31.0 +six==1.16.0 +soupsieve==2.6 +tqdm==4.67.1 typesense==0.21.0 +tzdata==2024.2 +urllib3==2.2.3 +xmltodict==0.13.0 diff --git a/import_data/utils/get_ids.py b/import_data/utils/get_ids.py deleted file mode 100644 index b2c79e5..0000000 --- a/import_data/utils/get_ids.py +++ /dev/null @@ -1,16 +0,0 @@ -import pandas as pd -import requests - -import utils.config as config - -API_URL = config.API_URL - - -def get_idreseausocial(nom, endpoint=f"{API_URL}/reseauxsociaux/"): - reseaux_sociaux = pd.DataFrame(requests.get(endpoint).json()) - return list(reseaux_sociaux[reseaux_sociaux["nom"] == nom]["id"])[0] - - -def get_idtypedocument(nom, endpoint=f"{API_URL}/typedocuments/"): - type_documents = pd.DataFrame(requests.get(endpoint).json()) - return list(type_documents[type_documents["nom"] == nom]["id"])[0] diff --git a/ search_app_ui/streamlit_app.py b/search_app_ui/streamlit_app.py similarity index 100% rename from search_app_ui/streamlit_app.py rename to search_app_ui/streamlit_app.py