Skip to content

Commit

Permalink
Merge 395e242 into 96a60fd
Browse files Browse the repository at this point in the history
  • Loading branch information
marc-vdm committed Jan 25, 2024
2 parents 96a60fd + 395e242 commit 16ab10e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/comment-milestoned-issues.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,15 @@ jobs:
state: 'all',
});
// Loop through the issues and if the issue was closed, post a comment referring to the new release
// Loop through the issues and if the issue was closed and is not a PR,
// post a comment referring to the new release
for (const issue of issues.data) {
if (issue.state === 'closed') {
if (issue.state === 'closed' && !issue.pull_request) {
await github.rest.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: issue.number,
body: `> [!NOTE]\n> This issue has been implemented in the [new release of Activity Browser 🚀 (version ${milestone_title})](https://github.com/LCA-ActivityBrowser/activity-browser/releases/tag/${milestone_title}), you can get the new version by [updating Activity Browser](https://github.com/LCA-ActivityBrowser/activity-browser#updating-the-ab).\n> \n> Do you want to be notified of new releases of Activity Browser? [Subscribe](https://brightway.groups.io/g/AB-updates/join) to our [updates mailing list](https://brightway.groups.io/g/AB-updates/topics) ✉.\n\n🤖_beep boop! I'm a bot and this message was an automated action._\n_If updating does not make sense for this issue, just ignore this._`,
body: `> [!NOTE]\n> This issue has been implemented in the [new release of Activity Browser 🚀 (version ${milestone_title})](https://github.com/LCA-ActivityBrowser/activity-browser/releases/tag/${milestone_title}), you can get the new version by [updating Activity Browser](https://github.com/LCA-ActivityBrowser/activity-browser#updating-the-ab).\n> \n> Do you want to be notified of new releases of Activity Browser? [Subscribe](https://brightway.groups.io/g/AB-updates/join) to our [updates mailing list](https://brightway.groups.io/g/AB-updates/topics) ✉.\n\n🤖 _beep boop! I'm a bot and this message was an automated action._\n_If updating does not make sense for this issue, just ignore this._`,
});
}
}
6 changes: 3 additions & 3 deletions activity_browser/ui/figures.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,12 +134,12 @@ def plot(self, df: pd.DataFrame, invert_plot: bool= False):

# set different color palette depending on whether all values are positive or not
if dfp.min(axis=None) < 0 and dfp.max(axis=None) > 0: # has both negative AND positive values
sns.color_palette("vlag_r", as_cmap=True)
cmap = sns.color_palette("vlag_r", as_cmap=True)
else: # has only positive OR negative values
sns.color_palette("Blues", as_cmap=True)
cmap = sns.color_palette("Blues", as_cmap=True)

sns.heatmap(
prop, ax=self.ax, annot=dfp, linewidths=0.05,
prop, ax=self.ax, cmap=cmap, annot=dfp, linewidths=0.05,
annot_kws={"size": 11 if dfp.shape[1] <= 8 else 9,
"rotation": 0 if dfp.shape[1] <= 8 else 60},
cbar_kws={'format': '%.0f%%'}
Expand Down

0 comments on commit 16ab10e

Please sign in to comment.