Re: [yang-doctors] pyang tree formatting doesn't honor line length

Kent Watsen <kent@watsen.net> Mon, 05 August 2019 20:15 UTC

Return-Path: <0100016c636bd7f9-b867a911-a57e-4e03-a8a5-7cf891c67c8b-000000@amazonses.watsen.net>
X-Original-To: yang-doctors@ietfa.amsl.com
Delivered-To: yang-doctors@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id D2174120105 for <yang-doctors@ietfa.amsl.com>; Mon, 5 Aug 2019 13:15:10 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.897
X-Spam-Level:
X-Spam-Status: No, score=-1.897 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_NONE=0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=amazonses.com
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 ABGP3QwHMrga for <yang-doctors@ietfa.amsl.com>; Mon, 5 Aug 2019 13:15:09 -0700 (PDT)
Received: from a8-31.smtp-out.amazonses.com (a8-31.smtp-out.amazonses.com [54.240.8.31]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 0D7341200D8 for <yang-doctors@ietf.org>; Mon, 5 Aug 2019 13:15:08 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=6gbrjpgwjskckoa6a5zn6fwqkn67xbtw; d=amazonses.com; t=1565036107; h=From:Message-Id:Content-Type:Mime-Version:Subject:Date:In-Reply-To:Cc:To:References:Feedback-ID; bh=Lmi3iD1YF+LKgOm1qa+t57eHxOoIXADeIX8FjKWszQw=; b=VQ6uqy5Nn4gF4kZZ1/VBVAkVRJ9ztSwlP7Mg0WjLp+HzzvHEBWYskYuRf2jt9hpR 5m4Ix6yAI1Cc02UquSO94Y5bsjEs4X6d9ii8I3VZ5f2R78fOjegBrK50+e+lJxRw45H ETteAxkoeAJaMH/3rcroozCj3343Ks9+FdGF61no=
From: Kent Watsen <kent@watsen.net>
Message-ID: <0100016c636bd7f9-b867a911-a57e-4e03-a8a5-7cf891c67c8b-000000@email.amazonses.com>
Content-Type: multipart/alternative; boundary="Apple-Mail=_978D5084-3946-46CF-BB6F-515E98B6DC9D"
Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.11\))
Date: Mon, 5 Aug 2019 20:15:07 +0000
In-Reply-To: <EB241305-F84A-4542-8AC6-11AB28ABA38A@cisco.com>
Cc: YANG Doctors <yang-doctors@ietf.org>
To: "Acee Lindem (acee)" <acee@cisco.com>
References: <EB241305-F84A-4542-8AC6-11AB28ABA38A@cisco.com>
X-Mailer: Apple Mail (2.3445.104.11)
X-SES-Outgoing: 2019.08.05-54.240.8.31
Feedback-ID: 1.us-east-1.DKmIRZFhhsBhtmFMNikgwZUWVrODEw9qVcPhqJEI2DA=:AmazonSES
Archived-At: <https://mailarchive.ietf.org/arch/msg/yang-doctors/7ujjxGueZ6_vkKEK14QYjrFQDlg>
Subject: Re: [yang-doctors] pyang tree formatting doesn't honor line length
X-BeenThere: yang-doctors@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Email list of the yang-doctors directorate <yang-doctors.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/yang-doctors>, <mailto:yang-doctors-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/yang-doctors/>
List-Post: <mailto:yang-doctors@ietf.org>
List-Help: <mailto:yang-doctors-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/yang-doctors>, <mailto:yang-doctors-request@ietf.org?subject=subscribe>
X-List-Received-Date: Mon, 05 Aug 2019 20:15:11 -0000

It's best-effort (for now).

Given that one could generate an arbitrarily nested model, the tree-diagram would have no recourse but to indent for each level of the tree.Sadly, I use `rfcfold` on top of tree-diagrams, which placates idnits, but results in ugly tree diagrams sometimes.  For instance: https://tools.ietf.org/html/draft-ietf-netconf-netconf-client-server-14#appendix-A.1 <https://tools.ietf.org/html/draft-ietf-netconf-netconf-client-server-14#appendix-A.1>;.

Kent


> On Aug 5, 2019, at 11:50 AM, Acee Lindem (acee) <acee@cisco.com>; wrote:
> 
> One thing really annoying is that “pyang -f tree -–tree-line-length=66” doesn’t seem to honor the maximum line length. Am I doing something wrong or is the line formatting simply best effort?
>  
> Thanks,
> Acee
> _______________________________________________
> yang-doctors mailing list
> yang-doctors@ietf.org <mailto:yang-doctors@ietf.org>
> https://www.ietf.org/mailman/listinfo/yang-doctors <https://www.ietf.org/mailman/listinfo/yang-doctors>