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: begin lua-side stdlib, implement combinators & validators. also, beginning of docs, and add build, test, and rustfmt to CI #5

Merged
merged 7 commits into from
Feb 11, 2022

Conversation

klardotsh
Copy link
Contributor

@klardotsh klardotsh commented Feb 11, 2022

Holy guacamole, this came out to many more lines of code than I expected...

Included here are:

  • the beginnings of seatrial's extremely light "standard library", or perhaps more accurately, utility belt, currently containing only a strongly-typed three-way ValidationResult enum, enabling user scripts to do custom validations on, say, response bodies (see updated seatrial.lua for usage example; manual pages are TODO)
  • some initial lua stdlib unit tests, also demoing how to unit test our lua FFI in general
  • with a few corner cases not implemented, the bulk of combinators and validators (certainly enough to start being useful; see attached screenshot for proof that, modulo a known issue examples/simpleish: 10th thread (random) times out reading response #2, the example pipeline now actually does what it says on the tin)
  • various messaging plumbing to start surfacing more "wtf is going on?" answers to the end user
  • begin documentation
  • move from a standalone clippy GH Action to an actions-rs/ set of actions that will build and test the application for both amd64 and aarch64 (arm64) Linux, and will check style against rustfmt (plus still run clippy). this should be enough CI to automate regression testing, now that I've started adding unit tests here and there. it also resolves all style guide questions going forward, now that the application has more than one author 😃

refs #1
screenshot-2022-02-11-02:42:26Z

@klardotsh klardotsh requested a review from pdpol February 11, 2022 02:49
@klardotsh klardotsh mentioned this pull request Feb 11, 2022
27 tasks
@klardotsh klardotsh force-pushed the josh/combinators-validators branch from 3e6f2c3 to 7fbcb4c Compare February 11, 2022 03:02
@klardotsh klardotsh changed the title feat: begin lua-side stdlib, implement combinators & validators. also, beginning of docs. feat: begin lua-side stdlib, implement combinators & validators. also, beginning of docs, and add build, test, and rustfmt to CI Feb 11, 2022
@klardotsh klardotsh force-pushed the josh/combinators-validators branch 3 times, most recently from 5b4f518 to 3cd0b80 Compare February 11, 2022 03:09
@klardotsh klardotsh force-pushed the josh/combinators-validators branch from 3cd0b80 to 9d0f2bf Compare February 11, 2022 03:22
@klardotsh klardotsh force-pushed the josh/combinators-validators branch from 316bd18 to 2156e70 Compare February 11, 2022 03:41
@klardotsh klardotsh force-pushed the josh/combinators-validators branch from acec95d to b031451 Compare February 11, 2022 04:14
@@ -10,6 +12,15 @@ function generate_30_day_range()
}
end

function was_valid_esoteric_format(arg)
Copy link
Contributor

Choose a reason for hiding this comment

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

Super nitty q - do you have strong opinions on was vs is prefix for boolean functions? I'm used to seeing is_ but as per usual my only real preference is to have a convention, regardless of what that convention is.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

huh, I suppose I never gave this thought, but since the data isn't dead yet (bring out yer dead.....), is is probably more appropriate, even though the request happened in the past by the time it gets to this function

@klardotsh klardotsh merged commit de206be into init Feb 11, 2022
@klardotsh klardotsh deleted the josh/combinators-validators branch February 11, 2022 20:52
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