Skip to content

Commit

Permalink
fix: could not broadcast input array from shape (2,) into shape (1,)
Browse files Browse the repository at this point in the history
  • Loading branch information
polomarcus committed Aug 27, 2024
1 parent dc60067 commit c82e9a7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/deploy-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ jobs:
run: docker push ${{ secrets.CONTAINER_REGISTRY_ENDPOINT }}/ingest_to_db

- name: update scaleway job definition with version mediatree_import
uses: jawher/action-scw@v2.27.0
uses: jawher/action-scw@v2.32.1
env:
SCW_ACCESS_KEY: ${{ secrets.SCW_ACCESS_KEY }}
SCW_SECRET_KEY: ${{ secrets.SCW_SECRET_KEY }}
Expand Down
9 changes: 6 additions & 3 deletions quotaclimat/data_processing/mediatree/channel_program.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,14 @@ def get_programs():
"program_name":str,
"program_type":str
}
logging.debug(f"Reading {json_file_path}")
logging.info(f"Reading {json_file_path}")
df_programs = pd.read_json(json_file_path, lines=True, dtype=data_dtype)

df_programs['start'] = format_hour_minute(df_programs['start'])
df_programs['end'] = format_hour_minute(df_programs['end'])
df_programs[['start', 'end']] = df_programs.apply(lambda x: pd.Series({
'start': format_hour_minute(x['start']),
'end': format_hour_minute(x['end'])
}), axis=1)

except (Exception) as error:
logging.error("Could not read channel_program.json")
raise Exception
Expand Down

1 comment on commit c82e9a7

@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.py20913038%44–48, 53–69, 73–76, 82, 85–125, 131–146, 150–151, 164–176, 180–186, 199–211, 214–218, 224, 260–261, 264–299, 302–304
   channel_program.py1365162%34–36, 47–49, 63, 99, 108, 146–187
   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
TOTAL122136071% 

Tests Skipped Failures Errors Time
86 0 💤 0 ❌ 0 🔥 1m 35s ⏱️

Please sign in to comment.