Skip to content

Commit

Permalink
Update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jdddog committed May 2, 2023
1 parent 67ac836 commit 65e8bfb
Show file tree
Hide file tree
Showing 3 changed files with 108 additions and 574 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -209,19 +209,19 @@
},
{
"name": "landing_page_url",
"type": "BOOLEAN",
"type": "STRING",
"mode": "NULLABLE",
"description": "The landing page URL for this location."
},
{
"name": "license",
"type": "BOOLEAN",
"type": "STRING",
"mode": "NULLABLE",
"description": "The location's publishing license. This can be a Create Commons license such as cc0 or cc-by, a publisher-specific license, or null which means we are not able to determine a license for this location."
},
{
"name": "source",
"type": "BOOLEAN",
"type": "RECORD",
"mode": "NULLABLE",
"fields": [
{
Expand Down Expand Up @@ -283,13 +283,13 @@
},
{
"name": "pdf_url",
"type": "BOOLEAN",
"type": "STRING",
"mode": "NULLABLE",
"description": "A URL where you can find this location as a PDF."
},
{
"name": "version",
"type": "BOOLEAN",
"type": "STRING",
"mode": "NULLABLE",
"description": "The version of the work, based on the DRIVER Guidelines versioning scheme."
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ def current_entries(self):

@property
def has_merged_ids(self):
return len(self.current_merged_ids) >= 0
return len(self.current_merged_ids) >= 1

@property
def current_merged_ids(self):
Expand Down Expand Up @@ -317,7 +317,7 @@ def __init__(
PreviousDagRunSensor(
dag_id=self.dag_id,
external_task_id=external_task_id,
execution_delta=timedelta(days=1), # To match the @daily schedule_interval
execution_delta=timedelta(days=7), # To match the @weekly schedule_interval
)
)
self.add_setup_task(self.check_dependencies)
Expand Down Expand Up @@ -664,6 +664,7 @@ def bq_load_delete_tables(self, release: OpenAlexRelease, **kwargs):
"""Load the delete tables."""

for entity in release.entities:
current_merged_ids = entity.current_merged_ids
if entity.has_merged_ids:
logging.info(
f"bq_load_delete_tables: loading {entity.entity_name} delete table {entity.bq_delete_table_id}"
Expand Down
Loading

0 comments on commit 65e8bfb

Please sign in to comment.