- Add Docker images for the CLI and server; see the Docker section for the CLI and server.
- Use bundled Java runtimes and modules instead of the local Java runtime (this is necessary for Docker implementation).
- Minor changes to CLI/server description text.
- Add CLI for Persephone as two commands that can be made using
make bundle; command options can be viewed using--help.validate: Performs Statement Template validation for a single Statementmatch: Performs Pattern matching for a Statement batch
- Add webserver that can be started in either
validateormatchmode, then perform validation/matching by providing Statements at thePOST /statementsendpoint. - Move Clojure and ClojureScript dependencies out of main deps into alias (extra) deps
- Added printing for pattern match errors (not just failures)
- Change Statement validation error message header and assert message from
Invalid StatementtoStatement Validation Failure - Fix bug where the
:selected-patternskeyword arg forcompile-profiles->fsmsdid not work - Add
:validate-not-empty?kwargs to compilation functions that aretrueby default; these will result in::assert/no-templatesor::assert/no-patternsexceptions being thrown if no Template validators or Pattern FSMs, respectively, are present after compilation.
- Update README and API function docstrings.
- Update GitHub CI and CD to remove deprecation warnings
- Deprecate
stmt-errorandutil.statement.subreg-iriin favor ofstatement-errorandsubregistration-iri, respectively (while keeping the values identical). - Add
pattern.failurenamespace and specs such as::failure/failureandstate-info-meta-specfor failure info/state info metadata. - Add docstrings to API specs.
- (Test-only) Add spec instrumentation fixture and apply it to API function tests.
- Implement Clojars deployment
- Update dependencies
- Main idea: Update the Template API in order to match the Pattern API updates
- Update Template API functions
- Remove
validate-statement-vs-templatefunctions - Change
template->validatortocompile-templates->validators- Accepts multiple templates; can filter using
:selected-templates
- Accepts multiple templates; can filter using
- Change
profile->validatortocompile-profiles->validators- Accepts multiple profiles; can filter using
:selected-profilesand:selected-templates
- Accepts multiple profiles; can filter using
- Change
validate-statement-vs-profileto justvalidate-statement- Add multiple public validation helper functions that
validate-statementcalls - Rename kwargs:
:optionand:resultOCaml-isms to:filterand:errors, respectively - Add
:all-valid?kwarg to specify that ALL templates have to match for the statement - Add
:short-circuit?kwarg to specify that only the first validation error should be returned
- Add multiple public validation helper functions that
- Remove
- Remove automatic JSON string to EDN coercion (note: affects Pattern API also)
- Apply Template ID clash check to
compile-patterns->fsms(note: affects Pattern API) - Update template validation result map
:rulecan now also be:propor:srefto distinguish between different types of errors/failures better:valsfield in template error map is now always be a vector, even for Statement Ref errors- Change
:determining-propertyand:prop-valsto:det-propand:match-vals, respectively - Change
:failureto:sref-failure
- Move profile, template, and statement asserts and coercions to util namespaces.
- Move
profile->id-template-mapandstatement-batch->id-statement-mapconvenience fns to the newtemplate.statement-refnamespace. - Make
?statement-ref-optsa non-optional (albeit nilable) arg fortemplate/create-template-predicateandtemplate/create-template-validator. - Spec fixes:
- FSMs/Patterns:
- Update
fsm-spec/valid-transition-src-states?such that source states only have to be a subset, not equals to, the total states. - Add
:meta?to spec forfsm/plus-nfa. - Correct instrumentation for
read-nextto work with NFAs as well as DFAs. - Fix subregistration specs in
utils/statement.
- Update
- Templates:
- Let
statement-ref/get-template-fnandstatement-ref/get-statement-fnspecs to allow fornilreturns and fix arg generation. - Add missing
:every-val-present?entry to::template/predspec. - Fix
validator-spec,create-template-validatorandcreate-template-predicatetemplate specs.
- Let
- Persephone API
- Fix typo in
::persephone/validator-fnand::persephone/predicate-fnspec names. - Align specs for
validate-statement-errorsandvalidate-statement(for:fn-type :errors). - Add missing
::persephone/print?spec formatch-statement. - Fix bugs relating to the
::persephone/errorspec.
- Fix typo in
- FSMs/Patterns:
- Fix bug where the
:selected-profileskwarg forcompile-profiles->fsmsdid not work.
- Print match failures (if
:print?is true) even if it was not the first time that failure was encountered. - Add
:nfa-metakey to the pattern FSMs map (in case meta is lost from:nfa).
- Make FSM compilation thread-safe by removing use of internal atoms.
- Update non-arg
s/catspecs tos/tuplespecs.
- Expose
get-subregistration-idfunction inutils.statementnamespace.
- Main idea: Completely overhaul the Pattern API.
- Remove the following functions:
profile->fsmsmatch-statement-vs-patternmatch-statement-vs-profilematch-statement-batch-vs-patternmatch-statement-batch-vs-profile
- Add the following functions (see README and docstrings for details on the new functions):
compile-profiles->fsms, which accepts a coll of Profiles and returns a nested map from Profile ID to Pattern ID to FSM map.match-statement, which accepts a compiled Profile coll, a state info map (which has been updated; see README for details), a Statement, and an optional:print?keyword arg.match-statement-batch, which is the same as above except it accepts a Statement coll.- Note that the above matching functions now return an
{:error ...}map instead of throwing an exception upon error.
- Change the following functions in the
patternnamespace:update-childrenhas been made private.pattern->fsmhas been made private.pattern-tree->fsmhas been renamed topattern-tree->dfa.pattern-tree->nfahas been added.read-visited-templateshas been added.
- Add new
util.profile,util.statement, andpattern.errorsnamespaces. - Update
fsm/read-nextto:- dispatch on the
:typefield of the FSM. - accept and return a set of maps, instead of a single map.
- accept an optional
start-optsmap (currently:record-visit?is the only accepted field).
- dispatch on the
- NFA construction functions now accept an optional
meta?argument; iftrue, the returned NFAs have a:statesmap in the metadata.
- Add Statement batch validation versus Patterns.
- Add support for sub-registrations.
- Add support for Statement Ref Templates.
- Further optimization of Statement validation.
- Redo directory and namespace organization:
- Remove
gendirectory and gentest-specific runners - Remove the word "validate" from
pattern-validateandtemplate-validate - Move
fsmandfsm-spectopatterndirectory - Move
errorstotemplatedirectory - Separate template predicates into their own
predicatenamespace
- Remove
- Fix incorrect Determining Properties logic.
- Minor changes/refactors to error messages.
- Updated deps to remove those that affected downstream usage:
- Removed jsonschema npm dependency.
- Removed jitpack Maven repo.
- Update persephone API function names and optional args to be in line with each other.
- Statement Templates are no longer compiled on each Statement read.
- Compiled JSONPaths are now stored in a stateful cache for quick access.
- Optimized validation function creation:
- Presence colls are now turned into sets during compilation.
- Removed use of spec and
explain-data.
- Optimized FSM creation:
- Removed pattern matching from
pattern-validation/pattern->fsm. - Removed
fsm/move-nfaas a standalone function. fsm/epsilon-closurenow uses transients internally.
- Removed pattern matching from
- Optimized Pathetic dep (see api-refactor).
- Added FSM specs and generative tests in the
gennamespace. - Added DATASIM tests in the
gennamespace to test API functions on statement streams. - Generative tests have their own aliases in
deps.edn. - Modified
match-next-statementto handle multiple Patterns and Pattern outputs.
- Add ClojureScript compatibility
- Update JSONPath dependencies to Java and JS-based libs
- Update finite state machine code
- Simplified internal representation to remove Ubergraph dependency
- NFA to DFA conversion added
- DFA minimization added
- Initial alpha version