Skip to content

Commit

Permalink
fix: forcing parenthese from boolean condition
Browse files Browse the repository at this point in the history
  • Loading branch information
polomarcus committed Aug 27, 2024
1 parent cd0b1f2 commit d680208
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions quotaclimat/data_processing/mediatree/channel_program.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ def get_programs():
}
logging.info(f"Reading {json_file_path}")
df_programs = pd.read_json(json_file_path, lines=True, dtype=data_dtype)

logging.info(df_programs.dtypes)
logging.info(df_programs.head(1))
df_programs[['start', 'end']] = df_programs.apply(lambda x: pd.Series({
'start': format_hour_minute(x['start']),
'end': format_hour_minute(x['end'])
Expand Down Expand Up @@ -89,10 +90,10 @@ def get_matching_program_weekday(df_program: pd.DataFrame, start_time: pd.Timest
lambda x: compare_weekday(x, start_weekday)
)
logging.debug("weekday_mask done")
matching_rows = df_program[
matching_rows = df_program[
(df_program['channel_name'] == channel_name) &
df_program["weekday_mask"] == True
]
(df_program["weekday_mask"] == True)
]
logging.debug("matching_rows done")
matching_rows.drop(columns=['weekday_mask'], inplace=True)
matching_rows.drop(columns=['weekday'], inplace=True)
Expand Down

1 comment on commit d680208

@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.py21113237%44–48, 53–69, 73–76, 82, 85–126, 132–147, 151–152, 165–177, 181–187, 200–212, 215–219, 225, 261–262, 265–301, 304–306
   channel_program.py1405164%35–37, 48–50, 64, 102, 111, 149–190
   config.py15287%7, 16
   detect_keywords.py2141294%169–172, 216, 266–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.py11282%22–23
TOTAL122736270% 

Tests Skipped Failures Errors Time
87 0 💤 0 ❌ 0 🔥 1m 38s ⏱️

Please sign in to comment.