Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(components): Rename StoreMessage to MessageStore for Better Clarity #5009

Merged
merged 13 commits into from
Dec 19, 2024

Conversation

Vigtu
Copy link
Contributor

@Vigtu Vigtu commented Dec 2, 2024

Changes in Message Store Component:

Component Rename:

  1. StoreMessage -> MessageStore:
  • Renamed class from StoreMessageComponent to MessageStoreComponent
  • Updated display name to "Message Store"
  • Changed icon from "save" to "message-square-text"
  • Updated component name to "MessageStore"

Output Configuration:

  • Added hidden=True to stored_messages output

Import Updates:

  • Updated import in init.py:
    • store_message -> message_store
    • StoreMessageComponent -> MessageStoreComponent

File Rename:

  • store_message.py -> message_store.py

No Functional Changes:

  • Core functionality remains the same
  • Only naming and cosmetic changes applied
  • Component description maintained

@dosubot dosubot bot added the size:S This PR changes 10-29 lines, ignoring generated files. label Dec 2, 2024
@erichare
Copy link
Collaborator

erichare commented Dec 6, 2024

@Vigtu same for this one, if you don't mind fixing the merge conflict i'll do a review!

@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. and removed size:S This PR changes 10-29 lines, ignoring generated files. labels Dec 9, 2024
@dosubot dosubot bot added size:S This PR changes 10-29 lines, ignoring generated files. and removed size:L This PR changes 100-499 lines, ignoring generated files. labels Dec 9, 2024
Copy link

codspeed-hq bot commented Dec 9, 2024

CodSpeed Performance Report

Merging #5009 will degrade performances by 23.25%

Comparing Vigtu:store-message-component (1489ea0) with main (b692ef7)

Summary

⚡ 3 improvements
❌ 1 regressions
✅ 11 untouched benchmarks

⚠️ Please fix the performance issues or acknowledge them on CodSpeed.

Benchmarks breakdown

Benchmark main Vigtu:store-message-component Change
test_get_and_cache_all_types_dict 1,043.8 µs 844.8 µs +23.56%
test_successful_run_with_input_type_any 258.1 ms 163.1 ms +58.18%
test_successful_run_with_output_type_any 177.2 ms 230.9 ms -23.25%
test_successful_run_with_output_type_debug 249.9 ms 160.4 ms +55.85%

Copy link
Contributor

@ogabrielluiz ogabrielluiz left a comment

Choose a reason for hiding this comment

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

Hey @Vigtu

Thanks for the PR!

When changing componentes we shouldn't change the file name AND the name. You must keep one as it is for backwards compatibility.

You should be better off reverting the change to the name attribute.

Also, if you could add tests to this component like you can see in src/backend/tests/unit/components/../test_input_components.py it would be really good.

Thanks!

icon = "save"
name = "StoreMessage"
icon = "message-square-text"
name = "MessageStore"
Copy link
Contributor

Choose a reason for hiding this comment

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

This breaks backwards compatibility

Copy link
Collaborator

@erichare erichare left a comment

Choose a reason for hiding this comment

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

@ogabrielluiz are there any consequences you can see from this PR as it stands now? I want to defer to you on this one. I think the change makes sense, but wondering if there's anything i'm missing beyond what you pointed out already.

- Restore original filename to maintain system compatibility
- Ensure consistent file naming across codebase
@github-actions github-actions bot added the refactor Maintenance tasks and housekeeping label Dec 19, 2024
- Update Output display_name from "Stored Messages" to "Stored Message"
- Maintain consistency in singular/plural naming conventions
@github-actions github-actions bot added refactor Maintenance tasks and housekeeping and removed refactor Maintenance tasks and housekeeping labels Dec 19, 2024
@github-actions github-actions bot added refactor Maintenance tasks and housekeeping and removed refactor Maintenance tasks and housekeeping labels Dec 19, 2024
Copy link
Contributor

@ogabrielluiz ogabrielluiz left a comment

Choose a reason for hiding this comment

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

LGTM

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Dec 19, 2024
@github-actions github-actions bot added refactor Maintenance tasks and housekeeping and removed refactor Maintenance tasks and housekeeping labels Dec 19, 2024
- Updated import statement in __init__.py to reflect the new module name for MessageStoreComponent.
- This change improves clarity and consistency in the component naming convention.
@github-actions github-actions bot added refactor Maintenance tasks and housekeeping and removed refactor Maintenance tasks and housekeeping labels Dec 19, 2024
@ogabrielluiz ogabrielluiz added this pull request to the merge queue Dec 19, 2024
Merged via the queue into langflow-ai:main with commit 68deca4 Dec 19, 2024
33 of 34 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm This PR has been approved by a maintainer refactor Maintenance tasks and housekeeping size:S This PR changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants