Skip to content

Commit 8b22e29

Browse files
committed
chore: bump version to 1.1.2 and improve PR feedback
- Synchronized version across project files - Enabled real-time benchmark summary in PR comments - Cleaned up CI triggers and removed automated asset commits to comply with branch protection
1 parent 384d7ef commit 8b22e29

4 files changed

Lines changed: 23 additions & 71 deletions

File tree

.github/scripts/comment_pr.py

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -98,18 +98,16 @@ def main():
9898
repo = os.environ.get("GITHUB_REPOSITORY")
9999
run_id = os.environ.get("GITHUB_RUN_ID")
100100
test_dir = "test-results"
101-
image_dir = "generated-graphs"
102101

103102
test_table, tests, failures = parse_test_results(test_dir)
104-
image_gallery = generate_image_gallery(image_dir, repo, run_id)
105103

106104
benchmark_report = ""
107-
# Look for the benchmark report in the downloaded artifacts
108-
for root, _, filenames in os.walk(test_dir):
109-
if "filter_benchmark_report.md" in filenames:
110-
with open(os.path.join(root, "filter_benchmark_report.md"), "r") as f:
111-
benchmark_report = f.read()
112-
break
105+
# Read the benchmark report generated in the previous step of the workflow
106+
if os.path.exists("filter_benchmark_report.md"):
107+
with open("filter_benchmark_report.md", "r") as f:
108+
benchmark_report = f.read()
109+
# Wrap the report in a details block
110+
benchmark_report = f"### Technical Benchmark Summary\n\n<details>\n<summary>📊 View Benchmark Details</summary>\n\n{benchmark_report}\n\n</details>"
113111

114112
status_emoji = "🚀" if failures == 0 else "❌"
115113

@@ -120,8 +118,6 @@ def main():
120118
121119
{benchmark_report}
122120
123-
{image_gallery}
124-
125121
[View Full Artifacts](https://github.com/{repo}/actions/runs/{run_id})"""
126122

127123
with open("pr_comment_body.md", "w") as f:

.github/workflows/python-app.yml

Lines changed: 15 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -69,65 +69,6 @@ jobs:
6969
coverage.xml
7070
if: always()
7171

72-
assets:
73-
needs: tests
74-
runs-on: ubuntu-latest
75-
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
76-
permissions:
77-
contents: write
78-
steps:
79-
- uses: actions/checkout@v4
80-
with:
81-
fetch-depth: 0
82-
token: ${{ secrets.TOKEN_GH || github.token }}
83-
84-
- name: Set up Python 3.13
85-
uses: actions/setup-python@v5
86-
with:
87-
python-version: "3.13"
88-
cache: 'pip'
89-
90-
- name: Install dependencies
91-
run: |
92-
python -m pip install --upgrade pip
93-
pip install -r requirements.txt
94-
pip install -e .
95-
96-
- name: Regenerate all assets
97-
run: |
98-
python generate_graphs.py
99-
python scripts/benchmark_filters.py
100-
101-
- name: Commit and Push changes
102-
run: |
103-
git config --global user.name "github-actions[bot]"
104-
git config --global user.email "github-actions[bot]@users.noreply.github.com"
105-
106-
# Check for changes in assets
107-
git add .github/images/ filter_benchmark_report.md
108-
109-
if git diff --staged --quiet; then
110-
echo "No changes in assets detected."
111-
else
112-
echo "Changes detected, pushing updates..."
113-
114-
if [ "${{ github.event_name }}" == "pull_request" ]; then
115-
# Standard commit for PRs (no amend to avoid rebase hell)
116-
git commit -m "chore: update assets for PR [skip ci]"
117-
git push origin HEAD:${{ github.head_ref }}
118-
else
119-
# Clean amend for main branch
120-
# Append [skip ci] to the original message to prevent loops
121-
orig_msg=$(git log -1 --pretty=%B)
122-
if [[ "$orig_msg" != *"[skip ci]"* ]]; then
123-
git commit --amend -m "$orig_msg [skip ci]"
124-
else
125-
git commit --amend --no-edit
126-
fi
127-
git push origin ${{ github.ref_name }} --force
128-
fi
129-
fi
130-
13172
sonar:
13273
needs: tests
13374
runs-on: ubuntu-latest
@@ -156,6 +97,21 @@ jobs:
15697
issues: write
15798
steps:
15899
- uses: actions/checkout@v4
100+
101+
- name: Set up Python 3.13
102+
uses: actions/setup-python@v5
103+
with:
104+
python-version: "3.13"
105+
106+
- name: Install dependencies
107+
run: |
108+
python -m pip install --upgrade pip
109+
pip install -r requirements.txt
110+
pip install -e .
111+
112+
- name: Run technical benchmark
113+
run: python scripts/benchmark_filters.py
114+
159115
- name: Download Test Results
160116
uses: actions/download-artifact@v4
161117
with:

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
44

55
[project]
66
name = "PyOctaveBand"
7-
version = "1.1.1"
7+
version = "1.1.2"
88
authors = [
99
{ name="Jose Manuel Requena Plens", email="jmrplens@gmail.com" },
1010
]

src/pyoctaveband/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
# Use non-interactive backend for plots
2020
matplotlib.use("Agg")
2121

22-
__version__ = "1.1.0"
22+
__version__ = "1.1.2"
2323

2424
# Public methods
2525
__all__ = [

0 commit comments

Comments
 (0)