-
Notifications
You must be signed in to change notification settings - Fork 88
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
align teidata.version
with Semantic Versioning Specification, closes #1993
#1996
base: dev
Are you sure you want to change the base?
Conversation
to comply with the new semver format
This reverts commit 679339e.
since those are not supported by XML Schema Regular Expressions, see https://www.regular-expressions.info/xml.html
the current version (e.g. '4.1.0') is inserted in the `<editionStmt>` dynamically, while this hard coded value was referring to the 'P' number of the Guidelines.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See individual comments.
@@ -9,21 +9,20 @@ See the file COPYING.txt for details | |||
ident="teidata.version"> | |||
<desc versionDate="2013-11-20" | |||
xml:lang="en">defines the range of attribute values which may be used to | |||
specify a TEI or Unicode version number.</desc> | |||
specify a version number following the Semantic Versioning Specification.</desc> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I really don’t want to say we follow this spec. It is far too restrictive for our use, I think.
- Our semantics for MAJOR, MINOR, and PATCH are different than theirs
- We want build metadata considered when determining precedence
- SemVer is about the API; we are about schemas and documentation
Thus I would much prefer we either not mention the Semantic Version Specification, or (better, IMHO) mention it as the inspiration for the system we use, and cite it properly in the BIB. Something lie “using the syntax of the Semantic Versioning system” or “based on the Semantic Versioning system”, with a link to the BIB (which gives a pointer to the 2.0.0 spec).
<desc xml:lang="fr" | ||
versionDate="2007-06-12">définit la gamme des valeurs d'attribut | ||
exprimant un numéro de version TEI.</desc> | ||
<content> | ||
<dataRef name="token" restriction="[\d]+(\.[\d]+){0,2}"/> | ||
<dataRef name="token" restriction="(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(-((0|[1-9]\d*|\d*[\-a-zA-Z][\-0-9a-zA-Z]*)(\.(0|[1-9]\d*|\d*[\-a-zA-Z][\-0-9a-zA-Z]*))*))?(\+([\-0-9a-zA-Z]+(\.[\-0-9a-zA-Z]+)*))?"/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have not hand-parsed the regular expression and seen that it makes sense. I did test it against all 71 test cases, and it correctly flags the first 31 as valid and the remaining 40 as invalid. So this looks like the correct W3C regular expression for SemVer.
So hurrah! to @peterstadler for a job well done. I think he should submit this to the SemVer folks, but hope he’ll coordinate with me, as I may have an entirely different regexp for them, as well.
That said, I think we should be much more restrictive for @version
of <TEI>
and <teiCorpus>
. Something more akin to 4\.1(\.(0|[1-9]\d*))?(-(alpha|beta))?(\+([\-0-9a-zA-Z]+(\.[\-0-9a-zA-Z]+)*))?
.
number, for minor and sub-minor version numbers, may also be | ||
supplied. | ||
the Semantic Versioning Specification (<ptr target="https://semver.org"/>). A version number | ||
contains digits only and consists at least of three parts separated by a dot. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- “consists at least of three parts” should probably be “consists of at least three parts”.
- But in truth (as alluded to above), I am not sure why a user should be required to specify the patch number in the
@version
of<TEI>
or<teiCorpus>
.
I have to say the question if TEI (guidelines and stylesheets) is an api according sem-ver definition is not straight forward to me. Actually i m leaning more towards saying yes. IIRC anything that is build metadata should be sorted alphabetically when determining version precedence, no? |
Maybe it’s me … I am certainly an old dog in a new trick game. But I cannot see TEI as an API. (In fact, I just yesterday got a virtual earful of how it is problematic that there is no Web API that allows one to get snippets of the source of the Guidelines.) An API “defines the kinds of calls or requests that can be made, how to make them, the data formats that should be used, the conventions to follow, etc.” [Wikipedia]. What call or request can a software system make to TEI? As for build metadata, I wish that were so, @duncdrum, but what the SemVer spec says is “Build metadata does not figure into precedence”. But I think we want build metadata included in our little universe, although we may want to go ahead with this ticket first, and then add it later. |
VF2F subgroup thinks that it is appropriate to say that a TEI version number follows the Semantic Versioning Specification. |
Council SVF2F NA group thinks:
|
Council SVF2F NA group still thinks the 3 items listed on 07 May should be addressed. For 2nd bullet point we suggest that there be a soft requirement. I.e., prose that says “they should match”, not an actual schema test that will fail if they don’t. |
Council meeting 2022-04-08: Add language to indicate that for the TEI Guidelines we’re inspired by the semantic versioning conventions but we’re applying our own TEI conventions to it (not following the custom for identifying “major” / “minor”.) |
Note: commit 7131846 did nothing except merge in the 664 commits that had been made to 'dev' branch in the interim. |
Council at VF2F 16 March 2024: Discussion
Council decision: Development of a comprehensive system for datatypes of version numbers
|
This PR updates the regex used for defining the value of
teidata.version
to match the Semantic Versioning Specification. In fact, it's a slight modification of the provided regex at https://semver.org to work around the special flavor of XML Schema Regular Expressions (see https://www.regular-expressions.info/xml.html).Additionally, the english prose was updated and some 'wrong'
@version
attributes removed from the Guidelines source.