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

Consider format of version control log fille #4546

Closed
wxtim opened this issue Dec 7, 2021 · 5 comments · Fixed by #4548
Closed

Consider format of version control log fille #4546

wxtim opened this issue Dec 7, 2021 · 5 comments · Fixed by #4548
Labels
Milestone

Comments

@wxtim
Copy link
Member

wxtim commented Dec 7, 2021

in metomi/rose#2510 there is a brief discussion about the most appropriate way to store version control information. It seems sensible to store it in either JSON, XML (parsers available in the standard library) or the Cylc data format to make reading it easier for other programs.

Pull requests welcome!

@wxtim wxtim added the small label Dec 7, 2021
@wxtim wxtim added this to the cylc-8.x milestone Dec 7, 2021
@MetRonnie
Copy link
Member

JSON would be easy to implement and is quite human readable. One potential disadvantage compared to Cylc (modified INI) format is readability of the status part

Cylc format (note the whitespace is important for the meaning, the status letters are in specific columns):

status = """
 M flow.cylc
A  whatever.txt
"""

JSON (possibility):

{
    "status": [
        " M flow.cylc",
        "A whatever.txt"
    ]
}

Having said that, it's not looking bad

@wxtim
Copy link
Member Author

wxtim commented Dec 7, 2021

It's overkill for our purposes now, but we could always do

    "status": [
        " M flow.cylc",
        "A whatever.txt"
    ]
    "jsonstatus": {
        "M": ["flow.cylc"],
        "A": ["whatever.txt"]
    }

@MetRonnie
Copy link
Member

I don't think we can do that - it loses the columns

note the whitespace is important for the meaning, the status letters are in specific columns

As long as each status line is recorded, no need to process them any further

@MetRonnie
Copy link
Member

Actually, if I can turn it to JSON in half an hour, it might be worth doing now? Would probably save effort in the long run

@wxtim
Copy link
Member Author

wxtim commented Dec 7, 2021

Up to you - Don't forget that you need to update the rose interface to match

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

Successfully merging a pull request may close this issue.

3 participants