Skip to content

Commit

Permalink
Merge pull request #362 from freemansw1/update_black_integration
Browse files Browse the repository at this point in the history
Update black integration to say what is wrong and fix python versions
  • Loading branch information
freemansw1 authored Nov 20, 2023
2 parents d639db3 + 1d510e1 commit b5e7f3f
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 23 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/check_formatting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ jobs:
shell: bash -l {0}
run:
mamba install --quiet --yes --file requirements.txt black &&
black tobac --check
black tobac --check --diff
6 changes: 3 additions & 3 deletions tobac/analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def cell_statistics_all(
width=10000,
z_coord="model_level_number",
dimensions=["x", "y"],
**kwargs
**kwargs,
):
"""
Parameters
Expand Down Expand Up @@ -107,7 +107,7 @@ def cell_statistics_all(
output_name=output_name,
width=width,
z_coord=z_coord,
**kwargs
**kwargs,
)


Expand All @@ -122,7 +122,7 @@ def cell_statistics(
width=10000,
z_coord="model_level_number",
dimensions=["x", "y"],
**kwargs
**kwargs,
):
"""
Parameters
Expand Down
28 changes: 14 additions & 14 deletions tobac/plotting.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def plot_tracks_mask_field_loop(
margin_right=0.05,
margin_bottom=0.05,
margin_top=0.05,
**kwargs
**kwargs,
):
"""Plot field, feature positions and segments
onto individual maps for all timeframes and
Expand Down Expand Up @@ -133,7 +133,7 @@ def plot_tracks_mask_field_loop(
mask=mask_i,
features=features_i,
axes=ax1,
**kwargs
**kwargs,
)
fig1.subplots_adjust(
left=margin_left,
Expand Down Expand Up @@ -558,7 +558,7 @@ def plot_mask_cell_track_follow(
file_format=["png"],
figsize=(10 / 2.54, 10 / 2.54),
dpi=300,
**kwargs
**kwargs,
):
"""Make plots for all cells centred around cell and with one background field as filling and one background field as contrours
Input:
Expand Down Expand Up @@ -646,7 +646,7 @@ def plot_mask_cell_track_follow(
width=width,
axes=ax1,
title=title,
**kwargs
**kwargs,
)

out_dir = os.path.join(plotdir, name)
Expand Down Expand Up @@ -890,7 +890,7 @@ def plot_mask_cell_track_static(
file_format=["png"],
figsize=(10 / 2.54, 10 / 2.54),
dpi=300,
**kwargs
**kwargs,
):
"""Make plots for all cells with fixed frame including entire development of the cell and with one background field as filling and one background field as contrours
Input:
Expand Down Expand Up @@ -1009,7 +1009,7 @@ def plot_mask_cell_track_static(
ylim=[y_min / 1000, y_max / 1000],
axes=ax1,
title=title,
**kwargs
**kwargs,
)

out_dir = os.path.join(plotdir, name)
Expand Down Expand Up @@ -1259,7 +1259,7 @@ def plot_mask_cell_track_2D3Dstatic(
dpi=300,
ele=10,
azim=30,
**kwargs
**kwargs,
):
"""Make plots for all cells with fixed frame including entire development of the cell and with one background field as filling and one background field as contrours
Input:
Expand Down Expand Up @@ -1388,7 +1388,7 @@ def plot_mask_cell_track_2D3Dstatic(
ylim=[y_min / 1000, y_max / 1000],
axes=ax1[0],
title=title,
**kwargs
**kwargs,
)

ax1[1] = plot_mask_cell_individual_3Dstatic(
Expand All @@ -1405,7 +1405,7 @@ def plot_mask_cell_track_2D3Dstatic(
title=title,
ele=ele,
azim=azim,
**kwargs
**kwargs,
)

out_dir = os.path.join(plotdir, name)
Expand Down Expand Up @@ -1437,7 +1437,7 @@ def plot_mask_cell_track_3Dstatic(
file_format=["png"],
figsize=(10 / 2.54, 10 / 2.54),
dpi=300,
**kwargs
**kwargs,
):
"""Make plots for all cells with fixed frame including entire development of the cell and with one background field as filling and one background field as contrours
Input:
Expand Down Expand Up @@ -1562,7 +1562,7 @@ def plot_mask_cell_track_3Dstatic(
ylim=[y_min / 1000, y_max / 1000],
axes=ax1,
title=title,
**kwargs
**kwargs,
)

out_dir = os.path.join(plotdir, name)
Expand Down Expand Up @@ -1802,7 +1802,7 @@ def plot_mask_cell_track_static_timeseries(
file_format=["png"],
figsize=(20 / 2.54, 10 / 2.54),
dpi=300,
**kwargs
**kwargs,
):
"""Make plots for all cells with fixed frame including entire development of the cell and with one background field as filling and one background field as contrours
Input:
Expand Down Expand Up @@ -1923,7 +1923,7 @@ def plot_mask_cell_track_static_timeseries(
ylim=[y_min / 1000, y_max / 1000],
axes=ax1[0],
title=title,
**kwargs
**kwargs,
)

track_variable_past = track_variable_cell[
Expand Down Expand Up @@ -2144,7 +2144,7 @@ def plot_lifetime_histogram_bar(
density=False,
width_bar=1,
shift=0.5,
**kwargs
**kwargs,
):
"""Plot the liftetime histogram of the cells as bar plot.
Expand Down
10 changes: 5 additions & 5 deletions tobac/tests/test_segmentation.py
Original file line number Diff line number Diff line change
Expand Up @@ -794,7 +794,7 @@ def test_segmentation_timestep_3d_buddy_box(
out_seg_mask_shifted, out_df = seg.segmentation_timestep(
field_in=test_data_iris_shifted,
features_in=test_feature_ds_shifted,
**common_seg_opts
**common_seg_opts,
)

# Now, shift output back.
Expand Down Expand Up @@ -857,14 +857,14 @@ def test_add_markers_pbcs(
start_h1=feat_1_loc[1],
start_h2=feat_1_loc[2],
feature_num=1,
**common_feat_opts
**common_feat_opts,
)
test_feature_ds_2 = testing.generate_single_feature(
start_v=feat_2_loc[0],
start_h1=feat_2_loc[1],
start_h2=feat_2_loc[2],
feature_num=2,
**common_feat_opts
**common_feat_opts,
)
test_feature_ds = pd.concat([test_feature_ds_1, test_feature_ds_2])

Expand All @@ -887,14 +887,14 @@ def test_add_markers_pbcs(
start_h1=feat_1_loc[1] + shift_domain[1],
start_h2=feat_1_loc[2] + shift_domain[2],
feature_num=1,
**common_feat_opts
**common_feat_opts,
)
test_feature_ds_2 = testing.generate_single_feature(
start_v=feat_2_loc[0] + shift_domain[0],
start_h1=feat_2_loc[1] + shift_domain[1],
start_h2=feat_2_loc[2] + shift_domain[2],
feature_num=2,
**common_feat_opts
**common_feat_opts,
)
test_feature_ds_shifted = pd.concat([test_feature_ds_1, test_feature_ds_2])

Expand Down

0 comments on commit b5e7f3f

Please sign in to comment.