Skip to content

Fix weekly release asset filenames#34

Merged
TongWu merged 40 commits intomainfrom
dev
Jul 29, 2025
Merged

Fix weekly release asset filenames#34
TongWu merged 40 commits intomainfrom
dev

Conversation

@TongWu
Copy link
Owner

@TongWu TongWu commented Jul 29, 2025

Merge #33

Summary by CodeRabbit

  • Chores
    • Updated dependency versions for several Python packages to ensure up-to-date libraries.
    • Improved the weekly report publishing workflow to better handle report file attachments and provide clearer logging if files are missing.

github-actions bot and others added 30 commits July 5, 2025 04:57
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jul 29, 2025

Important

Review skipped

Review was skipped due to path filters

⛔ Files ignored due to path filters (4)
  • MonthlyReport/2025-07/MonthlyReport-202507-29-1616.xlsx is excluded by !**/*.xlsx
  • MonthlyReport/2025-07/MonthlyReport-202507-29-1617.xlsx is excluded by !**/*.xlsx
  • WeeklyReport/2025-07-28/WeeklyReport_20250729_160749.csv is excluded by !**/*.csv
  • WeeklyReport/2025-07-28/WeeklyReport_20250729_160922.csv is excluded by !**/*.csv

CodeRabbit blocks several paths by default. You can override this behavior by explicitly including those paths in the path filters. For example, including **/dist/** will override the default block on the dist directory, by removing the pattern from both the lists.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Walkthrough

The changes update the GitHub Actions workflow to locate and handle the latest CSV-based weekly report, adjusting how release assets are attached and uploaded. Additionally, several Python dependencies in the requirements file are upgraded to newer versions, with no changes to public APIs or exported entities.

Changes

Cohort / File(s) Change Summary
GitHub Actions Workflow Update
.github/workflows/GenerateReport.yml
Modified the workflow to identify the latest CSV report, set environment variables accordingly, and adjust release asset upload logic.
Python Dependency Upgrades
src/requirements_full_list.txt
Upgraded versions of aiohappyeyeballs, aiohttp, aiosignal, and starlette packages.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Poem

A bunny hops through workflow fields,
CSV in paw, new versions yield.
Packages fresh, the code is spry,
Reports released—no need to try
To chase old bugs, they’ve hopped away—
Let’s nibble carrots and call it a day! 🥕

✨ Finishing Touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch dev

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai generate unit tests to generate unit tests for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@TongWu TongWu temporarily deployed to WT_WeeklyTriggerEnv July 29, 2025 08:08 — with GitHub Actions Inactive
@TongWu TongWu temporarily deployed to WT_WeeklyTriggerEnv July 29, 2025 08:08 — with GitHub Actions Inactive
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (2)
.github/workflows/GenerateReport.yml (2)

419-425: sort may not pick the latest report consistently

sort | tail -n 1 relies on filename lexicographical order.
If a patch version or accidental suffix slips in (e.g. WeeklyReport_20250701_v2.csv) the last entry is no longer the newest by date.

-latest_csv=$(find WeeklyReport -type f -name "WeeklyReport_*.csv" | sort | tail -n 1)
+# More robust: version-aware sort (or sort by mtime)
+latest_csv=$(find WeeklyReport -type f -name "WeeklyReport_*.csv" \
+             | sort -V \
+             | tail -n 1)

This keeps the “latest” logic stable even with mixed suffixes.


435-445: Environment-variable writes are fragile due to nested quoting

The current pattern:

echo "CSV_FILENAME=$(basename \"$latest_csv\")" >> $GITHUB_ENV

requires escaping inner quotes and will break if a path contains $, back-ticks, or newlines.

-echo "CSV_FILENAME=$(basename \"$latest_csv\")" >> $GITHUB_ENV
+printf 'CSV_FILENAME=%s\n' "$(basename "$latest_csv")" >>"$GITHUB_ENV"

Using printf avoids shell-word-splitting/escape headaches and is consistent with GitHub’s guidance. Apply the same change to the HTML/JSON blocks.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 9bcfbee and 1314bf4.

⛔ Files ignored due to path filters (4)
  • MonthlyReport/2025-07/MonthlyReport-202507-05-1257.xlsx is excluded by !**/*.xlsx
  • MonthlyReport/2025-07/MonthlyReport-202507-25-1633.xlsx is excluded by !**/*.xlsx
  • WeeklyReport/2025-06-30/WeeklyReport_20250705_124618.csv is excluded by !**/*.csv
  • WeeklyReport/2025-07-21/WeeklyReport_20250725_162335.csv is excluded by !**/*.csv
📒 Files selected for processing (2)
  • .github/workflows/GenerateReport.yml (2 hunks)
  • src/requirements_full_list.txt (2 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Generate Weekly Report
🔇 Additional comments (2)
src/requirements_full_list.txt (1)

5-7: Validate aio* transitive dependencies after bump

aiohttp==3.12.14 and friends drop support for older multidict/frozenlist versions and enforce Python ≥ 3.8. Make sure the resolver still lands on compatible versions (multidict>=6.0,<7.0, frozenlist>=1.4) across the full set – otherwise the workflow may break at install-time.
Consider running pip install -r … --dry-run or pipdeptree in CI to catch conflicts early.

.github/workflows/GenerateReport.yml (1)

491-497: Good incremental upload strategy

Conditionally uploading HTML/JSON only when present avoids hard-failing the release and keeps the first gh release create call idempotent. Nice improvement.

sseclient-py==1.8.0
stack-data==0.6.3
starlette==0.40.0
starlette==0.47.2
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Version conflict: fastapi 0.111.1 requires a newer Starlette

fastapi==0.111.1 pins starlette>=0.47.4,<0.48.0, but the list now freezes starlette==0.47.2 – below the minimum. pip will refuse to resolve or will back-rev FastAPI, defeating the upgrade.

- starlette==0.47.2
+ # Option A: bring Starlette up to the floor required by FastAPI
+ starlette==0.47.4
+ # Option B (less ideal): stick to FastAPI ≤0.111.0 that still accepts 0.47.2

Please bump Starlette (preferred) or downgrade FastAPI to avoid a hard failure during environment setup.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
starlette==0.47.2
# Option A: bring Starlette up to the floor required by FastAPI
starlette==0.47.4
# Option B (less ideal): stick to FastAPI ≤0.111.0 that still accepts 0.47.2
🤖 Prompt for AI Agents
In src/requirements_full_list.txt at line 524, the pinned version of starlette
is 0.47.2, which conflicts with fastapi 0.111.1 that requires
starlette>=0.47.4,<0.48.0. To fix this, update the starlette version to at least
0.47.4 but less than 0.48.0 to satisfy fastapi's dependency and avoid
installation errors.

@TongWu TongWu merged commit d0309ea into main Jul 29, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant