- 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
validate
ormatch
mode, then perform validation/matching by providing Statements at thePOST /statements
endpoint. - 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 Statement
toStatement Validation Failure
- Fix bug where the
:selected-patterns
keyword arg forcompile-profiles->fsms
did not work - Add
:validate-not-empty?
kwargs to compilation functions that aretrue
by default; these will result in::assert/no-templates
or::assert/no-patterns
exceptions 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-error
andutil.statement.subreg-iri
in favor ofstatement-error
andsubregistration-iri
, respectively (while keeping the values identical). - Add
pattern.failure
namespace and specs such as::failure/failure
andstate-info-meta-spec
for 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-template
functions - Change
template->validator
tocompile-templates->validators
- Accepts multiple templates; can filter using
:selected-templates
- Accepts multiple templates; can filter using
- Change
profile->validator
tocompile-profiles->validators
- Accepts multiple profiles; can filter using
:selected-profiles
and:selected-templates
- Accepts multiple profiles; can filter using
- Change
validate-statement-vs-profile
to justvalidate-statement
- Add multiple public validation helper functions that
validate-statement
calls - Rename kwargs:
:option
and:result
OCaml-isms to:filter
and: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
:rule
can now also be:prop
or:sref
to distinguish between different types of errors/failures better:vals
field in template error map is now always be a vector, even for Statement Ref errors- Change
:determining-property
and:prop-vals
to:det-prop
and:match-vals
, respectively - Change
:failure
to:sref-failure
- Move profile, template, and statement asserts and coercions to util namespaces.
- Move
profile->id-template-map
andstatement-batch->id-statement-map
convenience fns to the newtemplate.statement-ref
namespace. - Make
?statement-ref-opts
a non-optional (albeit nilable) arg fortemplate/create-template-predicate
andtemplate/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-next
to work with NFAs as well as DFAs. - Fix subregistration specs in
utils/statement
.
- Update
- Templates:
- Let
statement-ref/get-template-fn
andstatement-ref/get-statement-fn
specs to allow fornil
returns and fix arg generation. - Add missing
:every-val-present?
entry to::template/pred
spec. - Fix
validator-spec
,create-template-validator
andcreate-template-predicate
template specs.
- Let
- Persephone API
- Fix typo in
::persephone/validator-fn
and::persephone/predicate-fn
spec names. - Align specs for
validate-statement-errors
andvalidate-statement
(for:fn-type :errors
). - Add missing
::persephone/print?
spec formatch-statement
. - Fix bugs relating to the
::persephone/error
spec.
- Fix typo in
- FSMs/Patterns:
- Fix bug where the
:selected-profiles
kwarg forcompile-profiles->fsms
did not work.
- Print match failures (if
:print?
is true) even if it was not the first time that failure was encountered. - Add
:nfa-meta
key 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/cat
specs tos/tuple
specs.
- Expose
get-subregistration-id
function inutils.statement
namespace.
- Main idea: Completely overhaul the Pattern API.
- Remove the following functions:
profile->fsms
match-statement-vs-pattern
match-statement-vs-profile
match-statement-batch-vs-pattern
match-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
pattern
namespace:update-children
has been made private.pattern->fsm
has been made private.pattern-tree->fsm
has been renamed topattern-tree->dfa
.pattern-tree->nfa
has been added.read-visited-templates
has been added.
- Add new
util.profile
,util.statement
, andpattern.errors
namespaces. - Update
fsm/read-next
to:- dispatch on the
:type
field of the FSM. - accept and return a set of maps, instead of a single map.
- accept an optional
start-opts
map (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:states
map 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
gen
directory and gentest-specific runners - Remove the word "validate" from
pattern-validate
andtemplate-validate
- Move
fsm
andfsm-spec
topattern
directory - Move
errors
totemplate
directory - Separate template predicates into their own
predicate
namespace
- 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-nfa
as a standalone function. fsm/epsilon-closure
now uses transients internally.
- Removed pattern matching from
- Optimized Pathetic dep (see api-refactor).
- Added FSM specs and generative tests in the
gen
namespace. - Added DATASIM tests in the
gen
namespace to test API functions on statement streams. - Generative tests have their own aliases in
deps.edn
. - Modified
match-next-statement
to 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