Skip to content

Conversation

@MarcelRosier
Copy link
Collaborator

review after #121

@MarcelRosier MarcelRosier requested a review from neuronflow July 16, 2025 15:53
@MarcelRosier MarcelRosier self-assigned this Jul 16, 2025
Copilot AI review requested due to automatic review settings July 16, 2025 15:53
@MarcelRosier MarcelRosier linked an issue Jul 16, 2025 that may be closed by this pull request

This comment was marked as outdated.

@brainless-bot
Copy link
Contributor

brainless-bot bot commented Jul 17, 2025

🤖 Code Formatting Reminder

Hello there! 👋 It looks like the code in this pull request might benefit from some formatting improvements.
Fix the issues locally or use our auto format action by commenting /format on this PR!

Code style: black

@MarcelRosier
Copy link
Collaborator Author

/format

@brainless-bot
Copy link
Contributor

brainless-bot bot commented Jul 17, 2025

🤖 I will now format your code with black. Check the status here.

@neuronflow neuronflow requested a review from Copilot July 17, 2025 10:17
@neuronflow neuronflow enabled auto-merge July 17, 2025 10:17

This comment was marked as outdated.

@neuronflow neuronflow requested a review from Copilot July 17, 2025 11:05

This comment was marked as outdated.

@brainless-bot
Copy link
Contributor

brainless-bot bot commented Jul 17, 2025

🤖 Code Formatting Reminder

Hello there! 👋 It looks like the code in this pull request might benefit from some formatting improvements.
Fix the issues locally or use our auto format action by commenting /format on this PR!

Code style: black

@neuronflow
Copy link
Collaborator

/format

@brainless-bot
Copy link
Contributor

brainless-bot bot commented Jul 17, 2025

🤖 I will now format your code with black. Check the status here.

@neuronflow neuronflow requested a review from Copilot July 17, 2025 13:05
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR implements a citation reminder feature for the brainles-preprocessing package. The reminder displays a message encouraging users to cite the package when using it in their research, controlled by an environment variable with opt-out capability.

  • Adds a citation reminder decorator that displays a formatted message to users
  • Integrates the reminder into the BasePreprocessor initialization
  • Updates README with comprehensive citation information including BibTeX format

Reviewed Changes

Copilot reviewed 3 out of 4 changed files in this pull request and generated 3 comments.

File Description
brainles_preprocessing/utils/citation_reminder.py New module implementing the citation reminder decorator with environment variable control
brainles_preprocessing/preprocessor/preprocessor.py Applies the citation reminder decorator to BasePreprocessor.init method
README.md Adds citation section with paper reference and BibTeX entry

justify="center",
)
console.rule()
console.line()
Copy link

Copilot AI Jul 17, 2025

Choose a reason for hiding this comment

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

[nitpick] The console.line() call adds unnecessary whitespace. Consider removing it or making it conditional based on user preference, as it may clutter the output when the reminder is shown frequently.

Suggested change
console.line()
if os.environ.get("BRAINLES_PREPROCESSING_EXTRA_LINE", "false").lower() == "true":
console.line()

Copilot uses AI. Check for mistakes.
Comment on lines +23 to +26
if (
os.environ.get("BRAINLES_PREPROCESSING_CITATION_REMINDER", "true").lower()
== "true"
):
Copy link

Copilot AI Jul 17, 2025

Choose a reason for hiding this comment

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

The environment variable is checked on every function call. Consider caching this value at module level or checking it only once to avoid repeated environment variable lookups.

Suggested change
if (
os.environ.get("BRAINLES_PREPROCESSING_CITATION_REMINDER", "true").lower()
== "true"
):
if CITATION_REMINDER_ENABLED:

Copilot uses AI. Check for mistakes.
os.environ.get("BRAINLES_PREPROCESSING_CITATION_REMINDER", "true").lower()
== "true"
):
console = Console()
Copy link

Copilot AI Jul 17, 2025

Choose a reason for hiding this comment

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

Creating a new Console instance on every function call is inefficient. Consider creating a module-level Console instance to reuse across calls.

Suggested change
console = Console()

Copilot uses AI. Check for mistakes.
@neuronflow neuronflow merged commit 3ae06fc into main Jul 17, 2025
4 checks passed
@neuronflow neuronflow deleted the 138-feature-citation-reminder branch July 17, 2025 13:07
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.

[FEATURE] citation reminder

3 participants