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

feat(examples): bare minimum "light switch" example #322

Merged
merged 1 commit into from
Apr 10, 2025

Conversation

zachwaite
Copy link
Contributor

This example application is a bare minimum example of the core functionality. Persistence is not enabled, nor is logging, nor any kind of user interface. It just starts, runs some commands, queries the final state and prints it.

It models a "light switch". You can "install" the switch, then turn it "off" or "on" using commands. You can issue a query to get the current state of a switch.

Copy link

codecov bot commented Mar 3, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 84.26%. Comparing base (2c91b45) to head (8ae5395).
Report is 18 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #322      +/-   ##
==========================================
- Coverage   84.89%   84.26%   -0.63%     
==========================================
  Files          15       14       -1     
  Lines        1225     1157      -68     
==========================================
- Hits         1040      975      -65     
+ Misses        185      182       -3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@ar3s3ru
Copy link
Collaborator

ar3s3ru commented Mar 3, 2025

Hi @zachwaite, thanks a lot for your PR! Neat idea 😄

As you may see I haven't been updating the crate in some time (life got in the way 😅) and I notice that there are some linting errors from clippy related to dependency versions.

I'll see if I can fix them in the next few days, and review the code properly.

Thank you again for your time and effort 🙏🏻

@zachwaite
Copy link
Contributor Author

@ar3s3ru No expectations from me about updates. I'm also willing to do more work on getting the checks to pass, but wasn't sure you were interested in contributions. Since it seems like you are, I'll take another pass.

The syn dependency is probably out of my wheelhouse and personally don't mind just writing out the boilerplate (4 trait impls IIRC) vs using the aggregate_root macro. Food for thought.

Thanks for replying to my PR!

@ar3s3ru
Copy link
Collaborator

ar3s3ru commented Mar 21, 2025

Hi @zachwaite, I seem to have fixed the issues in #323 -- would you mind rebasing the PR?

@zachwaite zachwaite force-pushed the feat/add-lightswitch-example branch from e4f2719 to 8e65ef1 Compare April 7, 2025 10:21
Copy link
Collaborator

@ar3s3ru ar3s3ru left a comment

Choose a reason for hiding this comment

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

Thanks again for the PR! Left a couple of small comments 📝

@zachwaite zachwaite force-pushed the feat/add-lightswitch-example branch from 8e65ef1 to 2992c1d Compare April 9, 2025 11:02
This example application is a bare minimum example of the core functionality.
Persistence is not enabled, nor is logging, nor any kind of user interface. It
just starts, runs some commands, queries the final state and prints it.

It models a "light switch". You can "install" the switch, then turn it "off" or
"on" using commands. You can issue a query to get the current state of a switch.
@zachwaite zachwaite force-pushed the feat/add-lightswitch-example branch from 2992c1d to 8ae5395 Compare April 10, 2025 11:16
@ar3s3ru ar3s3ru merged commit 21f9c58 into get-eventually:main Apr 10, 2025
10 of 12 checks passed
@ar3s3ru
Copy link
Collaborator

ar3s3ru commented Apr 10, 2025

Thank you for your contribution once again @zachwaite, may your light switches always work 💡

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.

2 participants