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

kaizen: prepare for v1.0.0 #167

Merged
merged 1 commit into from
Jan 17, 2023
Merged

kaizen: prepare for v1.0.0 #167

merged 1 commit into from
Jan 17, 2023

Conversation

timbray
Copy link
Owner

@timbray timbray commented Dec 31, 2022

fixes: #153

fixes: #144

fixes: #121

fixes: #81
Signed-off-by: Tim Bray tbray@textuality.com

Did more or less all the stuff listed in #153, mostly trivial cleanup, removed a lot of TODOs, pulled in pieces of two event-ruler unit tests (one found a bug!).

I will try in future to avoid this sort of grab-bag PR.

@codecov-commenter
Copy link

codecov-commenter commented Dec 31, 2022

Codecov Report

Base: 94.48% // Head: 95.93% // Increases project coverage by +1.44% 🎉

Coverage data is based on head (0b9ff15) compared to base (014af06).
Patch coverage: 97.43% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #167      +/-   ##
==========================================
+ Coverage   94.48%   95.93%   +1.44%     
==========================================
  Files          17       17              
  Lines        2068     2067       -1     
==========================================
+ Hits         1954     1983      +29     
+ Misses         80       60      -20     
+ Partials       34       24      -10     
Impacted Files Coverage Δ
anything_but.go 95.23% <ø> (ø)
field_matcher.go 100.00% <ø> (ø)
list_maker.go 100.00% <ø> (ø)
live_pattern_state.go 100.00% <ø> (ø)
segments_tree.go 100.00% <ø> (ø)
shell_style.go 86.00% <ø> (ø)
pattern.go 96.17% <90.90%> (+17.03%) ⬆️
core_matcher.go 95.94% <100.00%> (+0.14%) ⬆️
flatten_json.go 95.44% <100.00%> (+0.34%) ⬆️
pruner.go 97.98% <100.00%> (ø)
... and 3 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@timbray
Copy link
Owner Author

timbray commented Dec 31, 2022

Hmm, the unit tests were initially failing because of non-case-sensitive filesystem on MacOS (testData vs testdata) so I fixed that.

Now they're failing with error code 143, I think we're hitting actions/runner-images#6680

Blecch. Remove a couple of heavy tests I guess?

This makes sense because I added another pretty heavy benchmark from was-event-ruler.

@timbray
Copy link
Owner Author

timbray commented Dec 31, 2022

Hmm, could segregate the borrowed-from-ruler tests and run them as a separate CI task, or step in a task? Looking for go test arguments to exclude/include files.

@yosiat
Copy link
Collaborator

yosiat commented Jan 1, 2023

Hmm, could segregate the borrowed-from-ruler tests and run them as a separate CI task, or step in a task? Looking for go test arguments to exclude/include files.

Looks like go don't have a way to ignore a specific test, there are two options here (from what I see):

Regarding the ported benchmark tests, maybe we should convert them to go benchmarks? and then they will run as part of "Benchmarks" CI step?

yosiat
yosiat previously approved these changes Jan 1, 2023
citylots_bench_test.go Outdated Show resolved Hide resolved
flatten_json.go Show resolved Hide resolved
generic_machine_test.go Outdated Show resolved Hide resolved
@@ -18,6 +18,7 @@ options:
pat: 📖 Pattern Language
chore: 🧹 Chore
fix: 🐞 Fix
kaizen: 👩‍🎨 Improve
Copy link
Collaborator

Choose a reason for hiding this comment

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

Maybe we should introduce commitlint as CI action to make sure we are following this guideline.

Copy link
Owner Author

Choose a reason for hiding this comment

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

@embano1 what do you think?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Great idea!

cl2_test.go Outdated Show resolved Hide resolved
@timbray
Copy link
Owner Author

timbray commented Jan 1, 2023

Regarding the ported benchmark tests, maybe we should convert them to go benchmarks? and then they will run as part of "Benchmarks" CI step?

That's probably worth trying. Would it be possible to retain the existing printout, which I have arranged to compatible with aws/event-ruler, so that we can compare performance.

@@ -18,6 +18,7 @@ options:
pat: 📖 Pattern Language
chore: 🧹 Chore
fix: 🐞 Fix
kaizen: 👩‍🎨 Improve
Copy link
Collaborator

Choose a reason for hiding this comment

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

Great idea!

example_test.go Outdated
@@ -1,54 +0,0 @@
package quamina_test
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why is was this file deleted?

Copy link
Owner Author

Choose a reason for hiding this comment

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

There were no tests in it and nothing called it, dead code. Probably a leftover forgotten by one of us.

Copy link
Collaborator

@embano1 embano1 Jan 5, 2023

Choose a reason for hiding this comment

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

Ah, ok. Let me clarify: any file example_*_test.go in Go with functions prefixed with Example* inside serves as documentation examples rendered by Go doc, etc. See the current version for Quamina here: https://pkg.go.dev/github.com/timbray/quamina#example-New

You can even run this example in Go doc!

Besides serving as documentation, these are also tests including assertions (see // Output: pattern matched for event: "premium user" inside the file). If you run our tests, those will also run and fail if the example is not consistent with the code anymore - that's a great benefit of the Go test and documentation tooling :).

Please revert the deletion.

Copy link
Owner Author

Choose a reason for hiding this comment

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

Oh, OK, I learned something today.

PATTERNS.md Outdated Show resolved Hide resolved
PATTERNS.md Show resolved Hide resolved
PATTERNS.md Outdated Show resolved Hide resolved
PATTERNS.md Show resolved Hide resolved
PATTERNS.md Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
cl2_test.go Outdated Show resolved Hide resolved
PATTERNS.md Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
cl2_test.go Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
@timbray
Copy link
Owner Author

timbray commented Jan 10, 2023

Folks, would it be OK to push this now and then address the CI problems with unit test and benchmark? Or should we do that cleanup first?

@embano1
Copy link
Collaborator

embano1 commented Jan 10, 2023

Ok with me. Are you going to squash commits?

@timbray
Copy link
Owner Author

timbray commented Jan 10, 2023

Ok with me. Are you going to squash commits?

Do you mean squash this #167 together with the CI-fix code? I don't think so, this PR lines up nicely with issue #153 (and ended up addressing a few more). "Preparing for 1.0" doesn't necessarily mean "final step before 1.0." Also it's a big PR with lots of code improvements and I'd like to land it.

@embano1
Copy link
Collaborator

embano1 commented Jan 10, 2023

Do you mean squash this #167 together with the CI-fix code? I don't think so, this PR lines up nicely with issue #153 (and ended up addressing a few more). "Preparing for 1.0" doesn't necessarily mean "final step before 1.0." Also it's a big PR with lots of code improvements and I'd like to land it.

Nope, just asking whether you want to squash these 6 commits into one before merging :)

@timbray
Copy link
Owner Author

timbray commented Jan 10, 2023

D'oh, I thought commit --amend did that. One of these years I must really buckle down and understand git better.

What is your opinion? And if we decide to do this, is there a good HOWTO somewhere?

@embano1
Copy link
Collaborator

embano1 commented Jan 10, 2023

@timbray
Copy link
Owner Author

timbray commented Jan 13, 2023

@embano1 All squashed per your very helpful web page there. Out of touch with the base branch because you pushed one of the CI chores, I assume I should do Update branch with the rebase option?

@embano1
Copy link
Collaborator

embano1 commented Jan 14, 2023

@embano1 All squashed per your very helpful web page there. Out of touch with the base branch because you pushed one of the CI chores, I assume I should do Update branch with the rebase option?

Thx for the kind words!
Not sure what this UI feature does e.g., will it create a new commit? You can also do it via git (blog post has an answer too)

@embano1
Copy link
Collaborator

embano1 commented Jan 14, 2023

Ah, there's a rebase with force-push option in that button (not default).

image

That's basically what you'd do with git. So pick your destiny. One challenge going through the UI is that your local git might throw errors if you needed to update that branch later. If not, do it through the UI via rebase and then throw away your local branch.

@timbray
Copy link
Owner Author

timbray commented Jan 14, 2023

OK, I'm going to pull this on the weekend unless someone has a good reason not to.

@embano1
Copy link
Collaborator

embano1 commented Jan 15, 2023

OK, I'm going to pull this on the weekend unless someone has a good reason not to.

You mean squash-merging this PR or pulling the v1?

embano1
embano1 previously approved these changes Jan 16, 2023
Copy link
Collaborator

@embano1 embano1 left a comment

Choose a reason for hiding this comment

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

LGTM

fixes: #144

fixes: #121

fixes: #81
Signed-off-by: Tim Bray <tbray@textuality.com>
Copy link
Collaborator

@embano1 embano1 left a comment

Choose a reason for hiding this comment

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

LGTM

@timbray timbray merged commit 0b4fe1d into main Jan 17, 2023
@timbray timbray deleted the v1.0prep branch January 17, 2023 16:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants