Skip to content

Commit

Permalink
fix: test
Browse files Browse the repository at this point in the history
  • Loading branch information
polomarcus committed Jul 30, 2024
1 parent fec078b commit ba26eca
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion quotaclimat/data_processing/mediatree/detect_keywords.py
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,9 @@ def filter_and_tag_by_theme(df: pd.DataFrame) -> pd.DataFrame :
def add_primary_key(row):
logging.info(f"Adding primary key to save to PG and have idempotent results")
try:
return get_consistent_hash(str(row["start"].timestamp()) + row["channel_name"])
hash_id = get_consistent_hash(str(row["start"]) + row["channel_name"])
logging.debug(f"hash_id {hash_id}")
return hash_id

except (Exception) as error:
logging.error(f"{error} with df {row}")
Expand Down

1 comment on commit ba26eca

@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.py20812938%44–48, 53–69, 73–76, 82, 85–125, 131–146, 150–151, 164–176, 180–186, 199–210, 213–217, 223, 259–260, 263–297, 300–302
   channel_program.py1365162%30–32, 43–45, 59, 95, 104, 142–183
   config.py15287%7, 16
   detect_keywords.py2151394%169–172, 216, 266–274
   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
TOTAL122036070% 

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

Please sign in to comment.