cedadev / checksit

File-checking made simple
BSD 3-Clause "New" or "Revised" License
1 stars 1 forks source link

Coping with different versions of AMOF standard #26

Closed joshua-hampton closed 1 year ago

joshua-hampton commented 1 year ago

Moved NCAS-AMOF specs and vocabs into folders based on standard release version. When checking an NCAS-AMOF file, checksit:

Changes also to make_specs.py:

Could include call to make_specs, and some code that pulls the vocab CVs from github, from checksit/check - if standard version identified isn't present in checksit, go looking to see if we can make the specs?

agstephens commented 1 year ago

@joshua-hampton , when you have finalised this change and merged it, let's increment the version of checksit as a tagged release.

joshua-hampton commented 1 year ago

I think I have implemented this. In check.py, upon discovering the file in question is an NCAS-AMOF file, checksit will:

A couple of exceptions explicitly caught and raised:

To help this work, make_specs.py has been moved from top level in the repo to within the checksit/ folder.

In doing this, I also discovered that some of the vocab and spec files I had were different than what would be made for v2.0.0 in this method. I had files that I had downloaded myself from the spreadsheets when testing that code, presumably the sheets had been changed since the release version in AMF_CVs. I have updated the ones in checksit to match the v2.0.0 release in AMF_CVs.