From f92dc1474f1365f1ed538da90c9663c0e5243edd Mon Sep 17 00:00:00 2001 From: Sean Freeman Date: Wed, 8 Nov 2023 10:57:05 -0600 Subject: [PATCH 1/4] update black configuration in check_formatting.yml --- .github/workflows/check_formatting.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/check_formatting.yml b/.github/workflows/check_formatting.yml index 0d89ad93..1bb62997 100644 --- a/.github/workflows/check_formatting.yml +++ b/.github/workflows/check_formatting.yml @@ -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 -t py37 -t py38 -t py39 -t py310 -t py311 -t py312 From 33b841dc92de585c27d7ec07ef8c002a0f21960b Mon Sep 17 00:00:00 2001 From: Sean Freeman Date: Wed, 8 Nov 2023 11:03:08 -0600 Subject: [PATCH 2/4] removing python 3.12 until it's fully supported by conda-forge --- .github/workflows/check_formatting.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/check_formatting.yml b/.github/workflows/check_formatting.yml index 1bb62997..941a78c1 100644 --- a/.github/workflows/check_formatting.yml +++ b/.github/workflows/check_formatting.yml @@ -19,4 +19,4 @@ jobs: shell: bash -l {0} run: mamba install --quiet --yes --file requirements.txt black && - black tobac --check --diff -t py37 -t py38 -t py39 -t py310 -t py311 -t py312 + black tobac --check --diff -t py37 -t py38 -t py39 -t py310 -t py311 From 1fc479a0405e344d756be207b7678caafe7335a4 Mon Sep 17 00:00:00 2001 From: Sean Freeman Date: Wed, 8 Nov 2023 16:06:32 -0600 Subject: [PATCH 3/4] add trailing comma to pass black --- tobac/analysis.py | 6 +++--- tobac/plotting.py | 28 ++++++++++++++-------------- tobac/tests/test_segmentation.py | 10 +++++----- 3 files changed, 22 insertions(+), 22 deletions(-) diff --git a/tobac/analysis.py b/tobac/analysis.py index 15e2545f..f286ff8e 100644 --- a/tobac/analysis.py +++ b/tobac/analysis.py @@ -47,7 +47,7 @@ def cell_statistics_all( width=10000, z_coord="model_level_number", dimensions=["x", "y"], - **kwargs + **kwargs, ): """ Parameters @@ -107,7 +107,7 @@ def cell_statistics_all( output_name=output_name, width=width, z_coord=z_coord, - **kwargs + **kwargs, ) @@ -122,7 +122,7 @@ def cell_statistics( width=10000, z_coord="model_level_number", dimensions=["x", "y"], - **kwargs + **kwargs, ): """ Parameters diff --git a/tobac/plotting.py b/tobac/plotting.py index ed9ce7df..d4e1d72e 100644 --- a/tobac/plotting.py +++ b/tobac/plotting.py @@ -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 @@ -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, @@ -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: @@ -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) @@ -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: @@ -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) @@ -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: @@ -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( @@ -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) @@ -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: @@ -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) @@ -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: @@ -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[ @@ -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. diff --git a/tobac/tests/test_segmentation.py b/tobac/tests/test_segmentation.py index fefcf757..82fadb73 100644 --- a/tobac/tests/test_segmentation.py +++ b/tobac/tests/test_segmentation.py @@ -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. @@ -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]) @@ -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]) From 1d510e11e1e679e861da8237b83419a50ca58743 Mon Sep 17 00:00:00 2001 From: Sean Freeman Date: Sun, 12 Nov 2023 19:31:10 -0600 Subject: [PATCH 4/4] Update .github/workflows/check_formatting.yml Co-authored-by: Julia Kukulies <44163060+JuliaKukulies@users.noreply.github.com> --- .github/workflows/check_formatting.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/check_formatting.yml b/.github/workflows/check_formatting.yml index 941a78c1..bfdc1542 100644 --- a/.github/workflows/check_formatting.yml +++ b/.github/workflows/check_formatting.yml @@ -19,4 +19,4 @@ jobs: shell: bash -l {0} run: mamba install --quiet --yes --file requirements.txt black && - black tobac --check --diff -t py37 -t py38 -t py39 -t py310 -t py311 + black tobac --check --diff