PR2: Add new preference and `AnnouncementChecker` class
Description
Adding the appropriate preferences for the date of the last seen announcement and updating the app.py class to update the preference of saving the last seen announcement date. Further, creating a class AnnouncementChecker in web.py to check and update the announcement date when a new one is published.
This is the second PR of the stack that solves the discussion #1492
Types of changes
- [ ] Bugfix
- [ ] New feature
- [ ] Refactor / Code style update (no logical changes)
- [ ] Build / CI changes
- [ ] Documentation Update
- [ ] Other (explain)
Does this address any currently open issues?
- #1563
Outside contributors checklist
- [ ] Review the guidelines for contributing to this repository
- [ ] Read and sign the CLA and add yourself to the authors list
- [ ] Make sure you are making a pull request against the develop branch (not main). Also you should start your branch off develop
- [ ] Add tests that prove your fix is effective or that your feature works
- [ ] Add necessary documentation (if appropriate)
Thank you for contributing to SLEAP!
:heart:
Summary by CodeRabbit
-
New Features
- Introduced an announcement system in the app to notify users of the latest changes and updates.
- Added a new section in the documentation for version 1.3.2 of SLEAP.
-
Documentation
- Updated the bulletin document to include a summary of the latest version.
-
Automation
- Implemented a workflow to automatically generate structured bulletin content in JSON format from markdown files.
-
User Preferences
- Added new user preferences to track the last seen announcement date and content.
Codecov Report
:x: Patch coverage is 82.97872% with 8 lines in your changes missing coverage. Please review.
:warning: Please upload report for BASE (shrivaths/changelog-announcement-1@0c9b54d). Learn more about missing BASE report.
| Files with missing lines | Patch % | Lines |
|---|---|---|
| sleap/gui/web.py | 80.00% | 8 Missing :warning: |
Additional details and impacted files
@@ Coverage Diff @@
## shrivaths/changelog-announcement-1 #1509 +/- ##
=====================================================================
Coverage ? 73.39%
=====================================================================
Files ? 134
Lines ? 24069
Branches ? 0
=====================================================================
Hits ? 17666
Misses ? 6403
Partials ? 0
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
:rocket: New features to boost your workflow:
- :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
Walkthrough
The update introduces a system to inform users about new announcements in the SLEAP application. A Python script now generates a JSON file from a markdown bulletin, which the app reads to display recent updates. The GUI tracks the last seen announcement, ensuring users stay informed without repetition. The workflow automation ensures the JSON is updated before website deployment.
Changes
| Files | Summary |
|---|---|
docs/bulletin.md |
Added a new section for SLEAP v1.3.2 including a description and links to previous versions. |
docs/.../make_bulletin_json.py |
Introduced a script to convert markdown bulletin to JSON format. |
sleap/gui/app.py, sleap/prefs.py |
Updated to check for new announcements, manage related preferences, and include announcement tracking. |
sleap/gui/web.py |
Added AnnouncementChecker class to handle announcement updates and related functionality. |
.github/workflows/website.yml |
Updated workflow to generate JSON bulletin before deployment. |
🐇 "In the code's burrow, a whisper arose, 'New tales to share!' the software proposes. With each update's sunbeam, our knowledge grows, As the bulletin's story, like a river, flows." 🌱
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
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>.Generate unit-tests for this file.
- Files and specific lines of code (under the "Files changed" tab): Tag
@coderabbitaiin a new review comment at the desired location with your query. Examples:@coderabbitai generate unit tests for this file.@coderabbitai modularize this function.
- PR comments: Tag
@coderabbitaiin 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 generate interesting stats about this repository from git and render them as a table.@coderabbitai show all the console.log statements in this repository.@coderabbitai read src/utils.ts and generate unit tests.@coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
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 as PR comments)
@coderabbitai pauseto pause the reviews on a PR.@coderabbitai resumeto resume the paused reviews.@coderabbitai reviewto trigger a review. This is useful when automatic reviews are disabled for the repository.@coderabbitai resolveresolve all the CodeRabbit review comments.@coderabbitai helpto get help.
Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
CodeRabbit Configration File (.coderabbit.yaml)
- You can programmatically configure CodeRabbit by adding a
.coderabbit.yamlfile to the root of your repository. - The JSON schema for the configuration file is available here.
- 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/coderabbit-overrides.v2.json
CodeRabbit Discord Community
Join our Discord Community to get help, request features, and share feedback.
CodeRabbit review skipped
By default, CodeRabbit only reviews PRs on the default branch. If you wish to have PRs reviewed on additional branches, you can configure that under the repository settings in the UI.