From 888e1b53c5b488015a3b1e7fe3147cdd9b6d10ba Mon Sep 17 00:00:00 2001 From: Walter Baccinelli Date: Fri, 2 Aug 2024 12:02:33 +0200 Subject: [PATCH 1/3] adjusted release workflow --- .github/workflows/release_github.yml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release_github.yml b/.github/workflows/release_github.yml index 3395ede..8891dc6 100644 --- a/.github/workflows/release_github.yml +++ b/.github/workflows/release_github.yml @@ -25,7 +25,7 @@ jobs: steps: - name: Fail if main branch was selected - if: ${{ github.ref_name }} == 'main' + if: ${{ github.ref_name == 'main' }} run: | echo "Cannot release from main branch, please select valid release branch." exit 1 @@ -34,6 +34,8 @@ jobs: uses: actions/checkout@v4 with: token: ${{ secrets.GH_PAT }} + ref: main + fetch-depth: 0 - name: Configure git run: | @@ -44,8 +46,8 @@ jobs: - name: Merge changes into main run: | git switch main - git merge ${{ github.ref_name }} --no-ff --no-commit - git merge --continue + git merge origin/${{ github.ref_name }} --no-ff --no-commit + git commit --no-edit - name: Bump version id: bump @@ -82,6 +84,7 @@ jobs: uses: actions/checkout@v4 with: token: ${{ secrets.GH_PAT }} + fetch-depth: 0 - name: Configure git run: | @@ -105,7 +108,7 @@ jobs: - name: Merge updates into develop run: | git switch develop - git merge origin/main + git merge --no-ff origin/main git push - name: Delete release branch other than main or develop From a3206863c47b58669a7ab1f9560cb0a7f2a24f0b Mon Sep 17 00:00:00 2001 From: Walter Baccinelli Date: Fri, 2 Aug 2024 13:19:11 +0200 Subject: [PATCH 2/3] linting --- eit_dash/utils/common.py | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/eit_dash/utils/common.py b/eit_dash/utils/common.py index 3ed9ac8..c025ec4 100644 --- a/eit_dash/utils/common.py +++ b/eit_dash/utils/common.py @@ -38,7 +38,10 @@ def create_filter_results_card(parameters: dict) -> dbc.Card: card_list = [ html.H4("Data filtered", className="card-title"), ] - card_list += [dbc.Row(f"{data}: {value}", style=styles.INFO_CARD) for data, value in parameters.items()] + card_list += [ + dbc.Row(f"{data}: {value}", style=styles.INFO_CARD) + for data, value in parameters.items() + ] return dbc.Card(dbc.CardBody(card_list), id=ids.FILTERING_SAVED_CARD) @@ -64,7 +67,10 @@ def create_info_card(dataset: Sequence, remove_button: bool = False) -> dbc.Card html.H4(dataset.label, className="card-title"), html.H6(dataset.eit_data["raw"].vendor, className="card-subtitle"), ] - card_list += [dbc.Row(f"{data}: {value}", style=styles.INFO_CARD) for data, value in info_data.items()] + card_list += [ + dbc.Row(f"{data}: {value}", style=styles.INFO_CARD) + for data, value in info_data.items() + ] if remove_button: card_list += [ dbc.Button( @@ -100,7 +106,10 @@ def create_selected_period_card( card_list = [ html.H4(period.label, className="card-title"), ] - card_list += [dbc.Row(f"{data}: {value}", style=styles.INFO_CARD) for data, value in info_data.items()] + card_list += [ + dbc.Row(f"{data}: {value}", style=styles.INFO_CARD) + for data, value in info_data.items() + ] if remove_button: card_list += [ dbc.Button( @@ -238,7 +247,7 @@ def mark_selected_periods( ) selected_signal = go.Scatter(**params).to_plotly_json() - if type(original_figure) == go.Figure: + if isinstance(original_figure, go.Figure): original_figure.add_trace(selected_signal) else: original_figure["data"].append(selected_signal) From c0a5b6fd8bf64f4892478aa9768955db50688ae6 Mon Sep 17 00:00:00 2001 From: Walter Baccinelli Date: Fri, 2 Aug 2024 15:20:23 +0200 Subject: [PATCH 3/3] linting again --- eit_dash/utils/common.py | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/eit_dash/utils/common.py b/eit_dash/utils/common.py index c025ec4..929b360 100644 --- a/eit_dash/utils/common.py +++ b/eit_dash/utils/common.py @@ -38,10 +38,7 @@ def create_filter_results_card(parameters: dict) -> dbc.Card: card_list = [ html.H4("Data filtered", className="card-title"), ] - card_list += [ - dbc.Row(f"{data}: {value}", style=styles.INFO_CARD) - for data, value in parameters.items() - ] + card_list += [dbc.Row(f"{data}: {value}", style=styles.INFO_CARD) for data, value in parameters.items()] return dbc.Card(dbc.CardBody(card_list), id=ids.FILTERING_SAVED_CARD) @@ -67,10 +64,7 @@ def create_info_card(dataset: Sequence, remove_button: bool = False) -> dbc.Card html.H4(dataset.label, className="card-title"), html.H6(dataset.eit_data["raw"].vendor, className="card-subtitle"), ] - card_list += [ - dbc.Row(f"{data}: {value}", style=styles.INFO_CARD) - for data, value in info_data.items() - ] + card_list += [dbc.Row(f"{data}: {value}", style=styles.INFO_CARD) for data, value in info_data.items()] if remove_button: card_list += [ dbc.Button( @@ -106,10 +100,7 @@ def create_selected_period_card( card_list = [ html.H4(period.label, className="card-title"), ] - card_list += [ - dbc.Row(f"{data}: {value}", style=styles.INFO_CARD) - for data, value in info_data.items() - ] + card_list += [dbc.Row(f"{data}: {value}", style=styles.INFO_CARD) for data, value in info_data.items()] if remove_button: card_list += [ dbc.Button(