Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Mar 5, 2025
1 parent a2e9611 commit 0758488
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 15 deletions.
24 changes: 12 additions & 12 deletions tests/main_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ def assert_data_is_linked_in_graph():
"""
resultDict = SparqlClient().execute_sparql(query)
# make sure that the florida canal monitoring location is on the florida river mainstem
assert len(resultDict["monitoringLocation"]) > 0, (
"There were no linked monitoring locations for the Florida River Mainstem"
)
assert (
len(resultDict["monitoringLocation"]) > 0
), "There were no linked monitoring locations for the Florida River Mainstem"
assert (
"https://geoconnex.us/cdss/gages/FLOCANCO" in resultDict["monitoringLocation"]
)
Expand Down Expand Up @@ -100,9 +100,9 @@ def test_e2e():
"""

resultDict = SparqlClient().execute_sparql(objects_query)
assert "Florida River" in resultDict["o"], (
"The Florida River Mainstem was not found in the graph"
)
assert (
"Florida River" in resultDict["o"]
), "The Florida River Mainstem was not found in the graph"

assert harvest_job.execute_in_process(
instance=instance, partition_key="cdss_co_gages__0"
Expand Down Expand Up @@ -130,9 +130,9 @@ def test_e2e():
# urn:iow:orgs is nabu's way of serializing the s3 prefix 'orgs/'
NUM_ORG_GRAPHS = sum("urn:iow:orgs" in g for g in all_graphs["g"])
assert NUM_ORG_GRAPHS == 2
assert not any("DUMMY_PREFIX_TO_DROP" in g for g in all_graphs["g"]), (
"The dummy graph we inserted crawling was not dropped correctly"
)
assert not any(
"DUMMY_PREFIX_TO_DROP" in g for g in all_graphs["g"]
), "The dummy graph we inserted crawling was not dropped correctly"

# make sure that prov graphs were generated for the mainstem run
mainstem_prov_graphs = SparqlClient(repository="iowprov").execute_sparql("""
Expand All @@ -144,9 +144,9 @@ def test_e2e():
FILTER(CONTAINS(STR(?g), "urn:iow:prov:ref_mainstems_mainstems__0"))
}
""")
assert len(mainstem_prov_graphs["g"]) > 0, (
"prov graphs were not generated for the mainstem run"
)
assert (
len(mainstem_prov_graphs["g"]) > 0
), "prov graphs were not generated for the mainstem run"


def test_dynamic_partitions():
Expand Down
6 changes: 3 additions & 3 deletions userCode/lib/containers.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ def __init__(
self.name = "gleaner"
self.source = source

assert Path("/tmp/geoconnex/").exists(), (
"the /tmp/geoconnex directory does not exist. This must exist for us to share configs with the docker socket on the host"
)
assert Path(
"/tmp/geoconnex/"
).exists(), "the /tmp/geoconnex directory does not exist. This must exist for us to share configs with the docker socket on the host"

def run(self, args: list[str]):
if gleaner_log_level := os.environ.get("GLEANER_LOG_LEVEL"):
Expand Down

0 comments on commit 0758488

Please sign in to comment.