Skip to content

Commit

Permalink
black updates
Browse files Browse the repository at this point in the history
  • Loading branch information
Sueda Ciftci committed Dec 19, 2024
1 parent af3a96a commit 137adf9
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Get data from the AQE network via the API
"""

import numpy as np
from sqlalchemy.schema import CreateSchema
from ..databases import DBWriter
Expand Down Expand Up @@ -83,9 +84,9 @@ def update_remote_tables(self):
]
self.commit_records(meta_points, on_conflict="overwrite")
for grid_cell, meta_point in zip(grid_cells, meta_points):
grid_cell[
"point_id"
] = meta_point.id # this will be None if the record was not inserted
grid_cell["point_id"] = (
meta_point.id
) # this will be None if the record was not inserted

# Commit the grid cell records to the database
grid_records = [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
"""Mixins for checking what data is available and what is missing in database tables"""

from .aqe_availability import AQEAvailabilityMixin
from .laqn_availability import LAQNAvailabilityMixin
from .breathe_availability import BreatheAvailabilityMixin
from .satellite_availability import SatelliteAvailabilityMixin
from .static_feature_availability import StaticFeatureAvailabilityMixin

__all__ = ["SatelliteAvailabilityMixin", "BreatheAvailabilityMixin", "StaticFeatureAvailabilityMixin"]
__all__ = [
"SatelliteAvailabilityMixin",
"BreatheAvailabilityMixin",
"StaticFeatureAvailabilityMixin",
]
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Inputs parser"""

import typer
from . import aqe_cli
from . import laqn_cli
Expand All @@ -14,4 +15,4 @@
app.add_typer(scoot_cli.app, name="scoot")

if __name__ == "__main__":
app()
app()
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
""" Common functions that are usually required for runnign experiments. """

import numpy as np
from tqdm import tqdm

def batch_predict(XS, prediction_fn=None, batch_size=1000, verbose=False, axis=0, ci=False):

def batch_predict(
XS, prediction_fn=None, batch_size=1000, verbose=False, axis=0, ci=False
):
# Ensure batch is less than the number of test points
if XS.shape[0] < batch_size:
batch_size = XS.shape[0]
Expand Down Expand Up @@ -44,7 +48,7 @@ def batch_predict(XS, prediction_fn=None, batch_size=1000, verbose=False, axis=0
ys_var_arr.append(y_var)

if verbose:
bar.update(1)
bar.update(1)

if ci:
y_median = np.concatenate(ys_median_arr, axis=axis)
Expand Down

0 comments on commit 137adf9

Please sign in to comment.