Skip to content

Commit

Permalink
chores: update stop words + log
Browse files Browse the repository at this point in the history
  • Loading branch information
polomarcus committed Jul 5, 2024
1 parent c917ba7 commit 64693aa
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion quotaclimat/data_processing/mediatree/detect_keywords.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ def filter_keyword_with_same_timestamp(keywords_with_timestamp: List[dict])-> Li
final_result = len(keywords_with_timestamp)

if final_result < number_of_keywords:
logging.info(f"Filtering keywords {final_result} out of {number_of_keywords} | {keywords_with_timestamp} with final result")
logging.debug(f"Filtering keywords {final_result} out of {number_of_keywords} | {keywords_with_timestamp} with final result")

return keywords_with_timestamp

Expand Down
4 changes: 4 additions & 0 deletions quotaclimat/data_processing/mediatree/keyword/stop_words.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
,"installateur de panneaux solaires"
,"installateurs de panneaux solaires"
,"panneaux photovoltaïques garanti à vie"
,"on installe des panneaux photovoltaïques borne de recharge"
,"avec le leader du photovoltaïque"
,"en train d"
,"consigne de vote"
Expand Down Expand Up @@ -56,4 +57,7 @@
,"l' entreprise de julie fabrique des meubles en matériaux recyclés"
,"jardin miami fabriqué avec quatre-vingts pour cent de matériaux recyclés"
,"est à fond sur le tri sélectif"
,"transition énergétique baisse de lumière"
,"transition énergétique co"
,"transition énergétique nos lumières"
]
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def update_keywords(session: Session, batch_size: int = 50000, start_date : str
keywords_with_timestamp != new_keywords_with_timestamp or
theme != matching_themes
):
logging.debug(f"Difference detected for themes for ID {keyword_id} - {theme} - {matching_themes} \
logging.info(f"Difference detected for themes for ID {keyword_id} - {theme} - {matching_themes} \
\nnumber_of_keywords {number_of_keywords} - {new_number_of_keywords}\
\nkeywords_with_timestamp : {keywords_with_timestamp}\
\n new_nkeywords_with_timestamp : {new_keywords_with_timestamp}"
Expand Down

1 comment on commit 64693aa

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Coverage

Coverage Report
FileStmtsMissCoverMissing
postgres
   insert_data.py43784%36–38, 56–58, 63
   insert_existing_data_example.py19384%25–27
postgres/schemas
   models.py1471093%121–128, 140–141, 199–200, 214–215
quotaclimat/data_ingestion
   scrap_sitemap.py1341787%27–28, 33–34, 66–71, 95–97, 138–140, 202, 223–228
quotaclimat/data_ingestion/ingest_db
   ingest_sitemap_in_db.py553733%21–42, 45–58, 62–73
quotaclimat/data_ingestion/scrap_html
   scrap_description_article.py36392%19–20, 32
quotaclimat/data_processing/mediatree
   api_import.py20512838%43–47, 52–68, 72–75, 81, 84–122, 128–143, 147–148, 161–173, 177–183, 196–207, 210–214, 220, 255–256, 260, 264–298, 301–303
   channel_program.py1365162%30–32, 43–45, 59, 95, 104, 142–183
   config.py15287%7, 16
   detect_keywords.py213896%169–172, 216, 271–273
   update_pg_keywords.py543928%14–100, 125–129, 152–178, 184
   utils.py692268%27–51, 54, 63, 84–85
quotaclimat/utils
   healthcheck_config.py291452%22–24, 27–38
   logger.py241154%22–24, 28–37
   sentry.py10280%21–22
TOTAL121535471% 

Tests Skipped Failures Errors Time
83 0 💤 0 ❌ 0 🔥 1m 34s ⏱️

Please sign in to comment.