[Anima] looking for practical advice on managing YANG source in XML format RFCs

Michael Richardson <mcr+ietf@sandelman.ca> Mon, 14 June 2021 01:10 UTC

Return-Path: <mcr+ietf@sandelman.ca>
X-Original-To: anima@ietfa.amsl.com
Delivered-To: anima@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 1848D3A18B4; Sun, 13 Jun 2021 18:10:00 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.899
X-Spam-Level:
X-Spam-Status: No, score=-1.899 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id hQcGBxg2u_nS; Sun, 13 Jun 2021 18:09:55 -0700 (PDT)
Received: from tuna.sandelman.ca (tuna.sandelman.ca [209.87.249.19]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 448DB3A18B3; Sun, 13 Jun 2021 18:09:55 -0700 (PDT)
Received: from localhost (localhost [127.0.0.1]) by tuna.sandelman.ca (Postfix) with ESMTP id D2EBE38B27; Sun, 13 Jun 2021 21:10:57 -0400 (EDT)
Received: from tuna.sandelman.ca ([127.0.0.1]) by localhost (localhost [127.0.0.1]) (amavisd-new, port 10024) with LMTP id AM1pyRuQRnEb; Sun, 13 Jun 2021 21:10:57 -0400 (EDT)
Received: from sandelman.ca (obiwan.sandelman.ca [209.87.249.21]) by tuna.sandelman.ca (Postfix) with ESMTP id 498D738B25; Sun, 13 Jun 2021 21:10:57 -0400 (EDT)
Received: from localhost (localhost [IPv6:::1]) by sandelman.ca (Postfix) with ESMTP id EBD422B3; Sun, 13 Jun 2021 21:09:52 -0400 (EDT)
From: Michael Richardson <mcr+ietf@sandelman.ca>
To: netmod@ietf.org
cc: anima@ietf.org, tools-discuss@ietf.org
X-Attribution: mcr
X-Mailer: MH-E 8.6+git; nmh 1.7+dev; GNU Emacs 26.1
X-Face: $\n1pF)h^`}$H>Hk{L"x@)JS7<%Az}5RyS@k9X%29-lHB$Ti.V>2bi.~ehC0; <'$9xN5Ub# z!G,p`nR&p7Fz@^UXIn156S8.~^@MJ*mMsD7=QFeq%AL4m<nPbLgmtKK-5dC@#:k
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="=-=-="; micalg="pgp-sha512"; protocol="application/pgp-signature"
Date: Sun, 13 Jun 2021 21:09:52 -0400
Message-ID: <6795.1623632992@localhost>
Archived-At: <https://mailarchive.ietf.org/arch/msg/anima/xpPS6CfrfV38BRyj1RLIuWXxHKY>
Subject: [Anima] looking for practical advice on managing YANG source in XML format RFCs
X-BeenThere: anima@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Autonomic Networking Integrated Model and Approach <anima.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/anima>, <mailto:anima-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/anima/>
List-Post: <mailto:anima@ietf.org>
List-Help: <mailto:anima-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/anima>, <mailto:anima-request@ietf.org?subject=subscribe>
X-List-Received-Date: Mon, 14 Jun 2021 01:10:00 -0000

Hi, I'm not a regular netmod reader.
I subscribe via IMAP to look into what's going on.  If I'm asking a FAQ, I
appologize as I didn't find anything in the 25K messages archived.
I saw Christian's message in 2019 about org-rfc-export.
I'm not sure if I should Reply-To: tools or netmod.

I'm looking for advice on how to manage things.
A summary of my questions:

1) how to process yang files with YYYY-DD-MM into XML.
2) how to generate yang tree files.
3) how do I get my YANG includes downloaded, and do I put them into my repo?
4) how to do this with MT Makefiles?

When we were working on RFC8995 and RFC8366, in the days before Martin
Thompson's makefile was around, I just put pyang processing into my simple
Makefile.  It's here:  https://github.com/anima-wg/anima-bootstrap/blob/master/Makefile

The perl script at: https://github.com/anima-wg/anima-bootstrap/blob/master/insert-figures
was then developed to insert stuff into the XML.  It's rather hacky in some ways.
It started it's life as just something to find the latest @YYYY-MM-DD yang
file which the Makefile created. (Kent wrote that sed line three quarters of
a decade ago, and the sed line now is old enough to trick-or-treat)
Over time, it grew the ability to insert other bits of code or diagrams.
I keep using it, even when I've moved to Markdown because it inserts the
right artwork stuff, and knows to deal with YANG stuff.  I also keep using my
Makefile, because except for the simplest uses, the MT ones are too
complicated for me to hack.

With kramdown source, I can mostly just add stuff to the MT Makefile to
generate the files I need, and then mostly (without insert-figures), I can
use the ::include mechanism in kramdown to get the right things.  But, no
magic YYYY-MM-DD stuff.

So now I am collaborating with some co-authors which want to stick to XMLv3
rather than kramdown, and whose understanding of Makefiles is poor.  I want
to stick with the normal stuff so that all the github/etc. tooling works for
everyone involved.

I'm looking for advice on how do this this?

--
Michael Richardson <mcr+IETF@sandelman.ca>   . o O ( IPv6 IøT consulting )
           Sandelman Software Works Inc, Ottawa and Worldwide