Verified Commit 6ea70415 authored by 35V LG84's avatar 35V LG84

tep-1009: phase-2: mandatory journal format v2

Signed-off-by: 35V LG84's avatar35V LG84 <[email protected]>
parent 4483d5b0
Pipeline #54129972 passed with stage
in 6 minutes and 19 seconds
......@@ -11,8 +11,24 @@ Current published release is:
=== 0.30.0-SNAPSHOT
[WARNING]
.Phase 2 support for new Journal Format Version v2
====
[horizontal]
Transaction description:: must start with `'` -prefix
Transaction code:: can not contain `'` `(` `)` `[` `]` `{` `}` `<` `>` characters
Transaction metadata (uuid):: must start by ``#`` character with space
====
New features and changes in this release:
* New Journal Format Version v2 (phase 2), see:
** link:https://tackler.e257.fi/docs/journal/format/v2/[New Journal Format v2]
** link:https://tackler.e257.fi/docs/journal/format/v1/[Deprecated Journal Format v1]
** xref:./docs/tep/tep-1009.adoc[TEP-1009: Txn Header Syntax]
* CLI switch `input.storage` to change used storage type
......
/*
* Copyright 2016-2018 E257.FI
* Copyright 2016-2019 E257.FI
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
......
......@@ -281,7 +281,7 @@ class DirsuiteReportingTest extends DirSuiteLike {
class DirsuiteCompatibilityTest extends DirSuiteLike {
val basedir = Paths.get("tests")
runDirSuiteTestCases(basedir, Glob("compat/ok/*.exec")) { args: Array[String] =>
ignoreDirSuiteTestCases(basedir, Glob("compat/ok/*.exec")) { args: Array[String] =>
assertResult(TacklerCli.SUCCESS) {
TacklerCli.runReturnValue(args)
}
......
......@@ -33,22 +33,13 @@ date: DATE
code: sp '(' code_value ')';
/* TEP-1009: Phase-1 */
code_value: ~( ')' | NL)*;
/* TEP-1009: Phase-2 */
//code_value: ~( '\'' | '(' | ')' | '[' | ']' | '{' | '}' | '<' | '>' | NL)*;
code_value: ~( '\'' | '(' | ')' | '[' | ']' | '{' | '}' | '<' | '>' | NL)*;
/* TEP-1009: Phase-1 */
description: sp '\''? text;
/* TEP-1009: Phase-2 */
//description: sp '\'' text;
description: sp '\'' text;
text: ~(NL)*;
/* TEP-1009: Phase-1 */
txn_meta: indent (('#' sp) | (';' ':')) txn_meta_uuid NL;
/* TEP-1009: Phase-2 */
//txn_meta: indent '#' sp txn_meta_uuid NL;
txn_meta: indent '#' sp txn_meta_uuid NL;
txn_meta_uuid: UUID_NAME ':' sp UUID_VALUE opt_sp;
......
......@@ -26,7 +26,7 @@ class TacklerParserHeaderCodeTest extends FunSpec {
/**
* test: 242aa119-bc5e-4562-9f4a-5feb26d1fba6
*/
ignore("check invalid code constructs") {
it("check invalid code constructs") {
val perrStrings: List[(String, String, String)] = List(
(
"""
......
......@@ -26,7 +26,7 @@ class TacklerParserHeaderDescriptionTest extends FunSpec {
/**
* test: 03d3df34-e68a-4104-b8ab-be06d36bf189
*/
ignore("check invalid description constructs") {
it("check invalid description constructs") {
val perrStrings: List[(String, String, String)] = List(
(
"""
......
......@@ -178,7 +178,7 @@ class TacklerParserHeaderTimestampTest extends FunSpec {
/**
* test: 294a4d37-2911-4c0f-9024-0c79bf3c99ba
*/
ignore("check invalid timestamp constructs with format v2") {
it("check invalid timestamp constructs with format v2") {
val perrStrings: List[(String, String, String)] = List(
(
"""
......
......@@ -83,7 +83,17 @@ class TacklerParserMetadataTest extends FunSpec {
"on line: 3",
"""at input 'uuid'"""
),
(
"""
|2017-01-01
| ;:uuid: 688fca6a-86e2-4c9d-82a0-1384a386167f
| a 1
| e 1
|
|""".stripMargin,
"on line: 3",
"""at input ';'"""
),
)
val count = perrStrings.map(perrStr => {
val ex = intercept[TacklerParseException]({
......@@ -95,7 +105,7 @@ class TacklerParserMetadataTest extends FunSpec {
1
}).foldLeft(0)(_ + _)
assert(count === 5)
assert(count === 6)
}
/**
......
......@@ -3,6 +3,7 @@
Tackler Enhancement Proposals (TEP) are used to
do high level plans for new features and changes to Tackler.
=== Implemented TEPs
* xref:./tep-1000.adoc[TEP-1000: Equity]
......@@ -13,16 +14,19 @@ do high level plans for new features and changes to Tackler.
* xref:./tep-1006.adoc[TEP-1006: CFG settings for report output scale]
* xref:./tep-1007.adoc[TEP-1007: Txn set checksum]
* xref:./tep-1008.adoc[TEP-1008: Numeric account names]
* xref:./tep-1009.adoc[TEP-1009: Txn header syntax]
=== TEPs in implementation phase
* xref:./tep-1009.adoc[TEP-1009: Txn header syntax] (In Phase 1)
None at the moment.
=== TEPs in planning phase
* xref:./tep-1003.adoc[TEP-1003: Profit and Loss (PnL)]
=== TEP Template
TEP Template: xref:./tep-0001.adoc[TEP-0001]
......
......@@ -108,7 +108,7 @@ Changes to machinery
* [x] Transition
** [x] In phase 1, it must accept old and new format
** [ ] After phase 2, only new format will be accepted
** [x] After phase 2, only new format will be accepted
* [x] Changes to Grammar and CTX-handlers
* [x] All test and reference vectors have to be updated (also those inside GIT repositories)
......@@ -244,16 +244,16 @@ Normal, ok-case tests to validate functionality:
==== Phase 2
* [ ] Rejects old syntax
** [ ] Txn header without `'`-prefix
** [ ] code field with reserved characters
** [ ] Txn metadata with `;:`
* [x] Rejects old syntax
** [x] Txn header without `'`-prefix
** [x] code field with reserved characters
** [x] Txn metadata with `;:`
* [ ] Accepts new syntax
** [ ] Txn header with `'`-prefix
** [ ] Txn metadata with `#`
* [x] Accepts new syntax
** [x] Txn header with `'`-prefix
** [x] Txn metadata with `#`
* [ ] Enable all tests ("todo: perr:" and ignored suites)
* [x] Enable all tests ("todo: perr:" and ignored suites)
=== Errors
......
......@@ -8,7 +8,7 @@ features:
id: 370393e9-bc2f-4aa1-a81c-08d536487fe7
name: "tests/compat/ok/journal-v1v2-01.exec"
descriptions:
- desc: "Journal v1v2 compatibility test vector"
- desc: "Ignored (phase-2): Journal v1v2 compatibility test vector"
- feature:
id: f1d42a7c-4f74-44f7-923d-abbd72b55a71
......@@ -26,7 +26,6 @@ features:
name: "TacklerParserHeaderTimestampTest"
descriptions:
- desc: "check invalid timestamp constructs with format v2"
- desc: "TODO: TEP-1009: phase-2: enable"
operations:
- test:
id: 2c0ee1a2-1a23-4427-a6dc-6156abc36272
......@@ -45,7 +44,6 @@ features:
name: "TacklerParserHeaderCodeTest"
descriptions:
- desc: "invalid code constructs"
- desc: "TODO: TEP-1009: phase-2: enable"
operations:
- test:
id: a5450ec6-42a3-4f3b-b989-27eb2949ccad
......@@ -64,7 +62,6 @@ features:
name: "TacklerParserHeaderDescriptionTest"
descriptions:
- desc: "invalid description constructs"
- desc: "TODO: TEP-1009: phase-2: enable"
operations:
- test:
id: 58d08778-10ee-489c-bb91-7059b9ba0cca
......@@ -83,6 +80,7 @@ features:
name: "TacklerParserMetadataTest"
descriptions:
- desc: "invalid metadata constructs"
- desc: "format version v1 metadata uuid"
operations:
- test:
id: 546e4368-dcfa-44d5-a21d-13f3b8bf51b6
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment