Skip to content

Commit

Permalink
Reformat code with latest version of pyink. (#51)
Browse files Browse the repository at this point in the history
  • Loading branch information
alxmrs authored Mar 24, 2024
1 parent 84dd29c commit 36b0317
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 8 deletions.
6 changes: 4 additions & 2 deletions perf_tests/groupby_air.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,16 @@
c = Context()
c.create_table('air', df)

query = c.sql("""
query = c.sql(
"""
SELECT
"lat", "lon", SUM("air") as air_total
FROM
"air"
GROUP BY
"lat", "lon"
""")
"""
)

result = query.compute()

Expand Down
6 changes: 4 additions & 2 deletions perf_tests/groupby_air_full.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,16 @@
c = Context()
c.create_table('air', df)

query = c.sql("""
query = c.sql(
"""
SELECT
"lat", "lon", SUM("air") as air_total
FROM
"air"
GROUP BY
"lat", "lon"
""")
"""
)

result = query.compute()

Expand Down
12 changes: 8 additions & 4 deletions xarray_sql/sql_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,16 @@ def test_agg_small(self):
c = Context()
c.create_table('air', self.air_small)

query = c.sql("""
query = c.sql(
"""
SELECT
"lat", "lon", SUM("air") as air_total
FROM
"air"
GROUP BY
"lat", "lon"
""")
"""
)

result = query.compute()
self.assertIsNotNone(result)
Expand All @@ -40,14 +42,16 @@ def test_agg_regular(self):
c = Context()
c.create_table('air', self.air)

query = c.sql("""
query = c.sql(
"""
SELECT
"lat", "lon", AVG("air") as air_total
FROM
"air"
GROUP BY
"lat", "lon"
""")
"""
)

result = query.compute()
self.assertIsNotNone(result)
Expand Down

0 comments on commit 36b0317

Please sign in to comment.