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

Markdown - Orchestra - Markdown round trip reveals inconsistent behaviour #69

Open
JThoennes opened this issue Oct 13, 2022 · 6 comments

Comments

@JThoennes
Copy link

JThoennes commented Oct 13, 2022

Given that

  • o2m = orchestra2md using the latest reference file
  • m2o = md2orchestra without further options

then the following round trips create strange results IMHO.

Lets start with minimal content, .ie. the definition of the Heartbeat message as file0

### Message Heartbeat type 0 category Session (1)

#### Synopsis

The Heartbeat monitors the status of the communication link and identifies when the last of a string of
messages was not received.

| Name            | Tag       | Presence | Documentation                                                        |
|-----------------|-----------|----------|----------------------------------------------------------------------|
| StandardHeader  | component | required | MsgType = 0                                                          |
| TestReqID       | 112       | optional | Required when the heartbeat is the result of a Test Request message. |
| StandardTrailer | component | required |                                                                      |
  1. m2o file0 file1 adds the missing definitions of the mentioned components and tags to the Orchestra XML:
    • The repository attribute is generated with name="Repository" version="1.0".
    • But the name should be "Repository version 1.0".
  2. o2m file1 file2 updates the Markdown with the missing definitions:
    • The title "Repositoy" is added. But it lacks the version 1.0 as well.
    • The section "Actors and Flows" is added - with content "None" - huh?
  3. m2o file2 file3: Now I would expect that the XML has somewhat stabilized but somehow this differs from file1.
  4. o2m file3 file4: Comparing to previous Markdown in file2:
    • The header gets 1.0 but without version before -- seems to be a bug.
    • Missing fields for the HopGrp are added. This expected and explains the updates to the XML.
    • For some reason, all category markers are dropped -- seems to be a bug.
    • The Synopsis of the MsgTypeCodeSet changes in funny ways --
      Note: A "U" as the first character is duplicated together with the new line character.
  5. Next round of m2o file4 file5; o2m file5 file6:
    • The headings gets another 1.0 -- obviously a bug.
    • The miracle of multiplication of trailing Synopsis text continues -- I regards this as a bug as well.
  6. etc. etc. etc.

I know that this "workflow" is not intended but it reveals some nice issue, IMHO.

@JThoennes
Copy link
Author

@donmendelson I think the bug related to the version keyword starting at 1. is the simplest to correct.

@kleihan
Copy link
Member

kleihan commented Oct 13, 2022

@JThoennes with "o2m" you mean the conversion from XML to markdown, correct? Then I do not understand why file0 is in markdown to begin with.

@JThoennes
Copy link
Author

@kleihan because this is "my workflow". I am lazy and let md2orchestra do the tedious work of adding all those fields, groups, components, codesets etc.

This is not (yet) intended but was the easiest way to describe two bugs found.

Looking forward to @donmendelson ´s findings.

@kleihan
Copy link
Member

kleihan commented Oct 13, 2022

@JThoennes So it should say m2o and not o2m in step 1?

@JThoennes
Copy link
Author

@kleihan So for the confusion, I just updated my description.

@kleihan
Copy link
Member

kleihan commented Oct 13, 2022

o2m = orchestra2md using the latest reference file
m2o = md2orchestra without further options

This can also not be correct. A reference file only applies to md2orchestra. The concept behind this is that markdown is intended for manual authoring and the reference file saves people some time typing stuff in markdown. @JThoennes please switch comments between the two to read:

o2m = orchestra2md without further options
m2o = md2orchestra using the latest reference file

However, if you use orchestra2md without further options then a number of elements/attributes added by md2orchestra due to the reference file will not make it back into markdown.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

No branches or pull requests

2 participants