Skip to content

Commit

Permalink
fix: default time for empty date
Browse files Browse the repository at this point in the history
  • Loading branch information
polomarcus committed Oct 3, 2024
1 parent 2a18df0 commit 20cd698
Show file tree
Hide file tree
Showing 6 changed files with 467 additions and 439 deletions.
32 changes: 32 additions & 0 deletions alembic/versions/30abfd828007_program_metadata.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
"""program metadata
Revision ID: 30abfd828007
Revises: 43103d5b49c9
Create Date: 2024-10-03 14:18:09.874225
"""
from typing import Sequence, Union

from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision: str = '30abfd828007'
down_revision: Union[str, None] = '43103d5b49c9'
branch_labels: Union[str, Sequence[str], None] = None
depends_on: Union[str, Sequence[str], None] = None


def upgrade() -> None:
# ### commands auto generated by Alembic - please adjust! ###
op.add_column('program_metadata', sa.Column('program_grid_start', sa.DateTime(), nullable=True))
op.add_column('program_metadata', sa.Column('program_grid_end', sa.DateTime(), nullable=True))
# ### end Alembic commands ###


def downgrade() -> None:
# ### commands auto generated by Alembic - please adjust! ###
op.drop_column('program_metadata', 'program_grid_end')
op.drop_column('program_metadata', 'program_grid_start')
# ### end Alembic commands ###
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,11 @@

def upgrade() -> None:
# ### commands auto generated by Alembic - please adjust! ###
op.add_column('channel_metadata', sa.Column('program_grid_start', sa.DateTime(), nullable=True))
op.add_column('channel_metadata', sa.Column('program_grid_end', sa.DateTime(), nullable=True))
pass
# ### end Alembic commands ###


def downgrade() -> None:
# ### commands auto generated by Alembic - please adjust! ###
op.drop_column('channel_metadata', 'program_grid_end')
op.drop_column('channel_metadata', 'program_grid_start')
pass
# ### end Alembic commands ###
2 changes: 1 addition & 1 deletion docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ poetry run alembic upgrade head


echo "update program metadata file"
python transform_program.py
poetry run python3 transform_program.py
if [[ $? -eq 0 ]]; then
echo "Command succeeded"
else
Expand Down
Loading

1 comment on commit 20cd698

@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.py1551094%126–133, 145–146, 211–212, 226–227
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.py21113337%44–48, 53–74, 78–81, 87, 90–132, 138–153, 158, 171–183, 187–193, 206–218, 221–225, 231, 266–267, 270–301, 304–306
   channel_program.py1655765%25–27, 38–40, 57–58, 61–63, 102–103, 112, 128, 179–220
   config.py15287%7, 16
   detect_keywords.py209896%220, 278–285
   update_pg_keywords.py674927%15–108, 132, 135, 142–157, 180–206, 213
   utils.py792568%29–53, 56, 65, 86–87, 117–120
quotaclimat/utils
   healthcheck_config.py291452%22–24, 27–38
   logger.py241154%22–24, 28–37
   sentry.py11282%22–23
TOTAL127837870% 

Tests Skipped Failures Errors Time
93 0 💤 0 ❌ 0 🔥 1m 45s ⏱️

Please sign in to comment.