Re: [netmod] Lines too long in YANG tree diagrams

2023-07-05 Thread Carsten Bormann
On 6. Jul 2023, at 00:43, Scott Mansfield 
 wrote:
> 
> I could editorialize about how in 2023 we are still hindered by a limit 
> imposed by a VT100 from 1978, but I have said enough.

The VT100 had 80 columns (132 with an option).

We are talking about ASR33 teletypes here, with 72 columns.

One problem with RFCXML is that we don’t have the equivalent of “artset” for 
sourcecode; so we can’t apply 8792 folding for teletype plaintext, while using 
different settings for HTML/PDF.  It is really weird to see these folding 
efforts in HTML/PDF where it might not be needed (or can enjoy more relaxed 
parameters).

Grüße, Carsten

___
netmod mailing list
netmod@ietf.org
https://www.ietf.org/mailman/listinfo/netmod


Re: [netmod] Lines too long in YANG tree diagrams

2023-07-05 Thread Kent Watsen

> But what I do for readability and to avoid lint issues is use rfcfold on 
> trees or examples that have long lines.  For the examples that are xml or 
> json based, the consumer of the RFC needs to reverse the fold so that the 
> example works in yanglint or other tools.

It would be ideal for Datatracker to unfold folded-artwork for other output 
formats, specifically HTML, where a horizontal scrollbar could be used.


> I could editorialize about how in 2023 we are still hindered by a limit 
> imposed by a VT100 from 1978, but I have said enough.

No kidding, this is what I was thinking when I wrote `rfcfold`.


> Regards,
> -scott.

K.


___
netmod mailing list
netmod@ietf.org
https://www.ietf.org/mailman/listinfo/netmod


Re: [netmod] Lines too long in YANG tree diagrams

2023-07-05 Thread Scott Mansfield
My reading is that it is recommended.  Not required.
But what I do for readability and to avoid lint issues is use rfcfold on trees 
or examples that have long lines.  For the examples that are xml or json based, 
the consumer of the RFC needs to reverse the fold so that the example works in 
yanglint or other tools.

I could editorialize about how in 2023 we are still hindered by a limit imposed 
by a VT100 from 1978, but I have said enough.

Regards,
-scott.

From: CCAMP  On Behalf Of Italo Busi
Sent: Wednesday, July 5, 2023 5:59 PM
To: netmod@ietf.org
Cc: cc...@ietf.org; TEAS WG 
Subject: [CCAMP] Lines too long in YANG tree diagrams

RFC8340 suggests to use the "--tree-line-length 69" option to produce YANG tree 
diagrams to be included into an Internet-Draft or RFC.

Although this option works well in many cases, there are few cases where pyang 
produces YANG tree diagram with lines too long even with the 
"--tree-line-length 69" option and in this case it is not fully clear what 
could be done when including those YANG tree diagram into Internet-Drafts or 
RFCs

Section 5.2 of RFC8792 says:

It is RECOMMENDED that authors do as much as possible within the selected 
format to avoid long lines.

My interpretation of the RECOMMENDED key word and of "as much as possible" is 
that we MUST always use the "--tree-line-length 69" option to generate the YANG 
tree diagrams to be included into Internet-Drafts or RFCs and that we MAY use 
RFC8792 tool to fold the YANG tree diagrams when they contain lines too long

Is my interpretation correct?

Thanks, Italo


___
netmod mailing list
netmod@ietf.org
https://www.ietf.org/mailman/listinfo/netmod


Re: [netmod] Lines too long in YANG tree diagrams

2023-07-05 Thread Jürgen Schönwälder
Tree diagrams are a means to explain the structure of a module. It is
often useful to larger diagrams into small pieces and then the line
length problem resolves itself. See also Section 3.3 of RFC 8340.

/js

On Wed, Jul 05, 2023 at 09:58:46PM +, Italo Busi wrote:
> RFC8340 suggests to use the "--tree-line-length 69" option to produce YANG 
> tree diagrams to be included into an Internet-Draft or RFC.
> 
> Although this option works well in many cases, there are few cases where 
> pyang produces YANG tree diagram with lines too long even with the 
> "--tree-line-length 69" option and in this case it is not fully clear what 
> could be done when including those  YANG tree diagram into Internet-Drafts or 
> RFCs
> 
> Section 5.2 of RFC8792 says:
> 
> It is RECOMMENDED that authors do as much as possible within the selected 
> format to avoid long lines.
> 
> My interpretation of the RECOMMENDED key word and of "as much as possible" is 
> that we MUST always use the "--tree-line-length 69" option to generate the 
> YANG tree diagrams to be included into Internet-Drafts or RFCs and that we 
> MAY use RFC8792 tool to fold the YANG tree diagrams when they contain lines 
> too long
> 
> Is my interpretation correct?
> 
> Thanks, Italo
> 
> 

> ___
> netmod mailing list
> netmod@ietf.org
> https://www.ietf.org/mailman/listinfo/netmod


-- 
Jürgen Schönwälder  Constructor University Bremen gGmbH
Phone: +49 421 200 3587 Campus Ring 1 | 28759 Bremen | Germany
Fax:   +49 421 200 3103 

___
netmod mailing list
netmod@ietf.org
https://www.ietf.org/mailman/listinfo/netmod


Re: [netmod] Lines too long in YANG tree diagrams

2023-07-05 Thread Kent Watsen
Hi Italo,

> On Jul 5, 2023, at 5:58 PM, Italo Busi 
>  wrote:
> 
> RFC8340 suggests to use the "--tree-line-length 69" option to produce YANG 
> tree diagrams to be included into an Internet-Draft or RFC.
>  
> Although this option works well in many cases, there are few cases where 
> pyang produces YANG tree diagram with lines too long even with the 
> "--tree-line-length 69" option and in this case it is not fully clear what 
> could be done when including those YANG tree diagram into Internet-Drafts or 
> RFCs
>  
> Section 5.2 of RFC8792 says:
>  
> It is RECOMMENDED that authors do as much as possible within the selected 
> format to avoid long lines.
>  
> My interpretation of the RECOMMENDED key word and of “as much as possible” is 
> that we MUST always use the "--tree-line-length 69" option to generate the 
> YANG tree diagrams to be included into Internet-Drafts or RFCs and that we 
> MAY use RFC8792 tool to fold the YANG tree diagrams when they contain lines 
> too long
>  
> Is my interpretation correct?

Sounds right to me, and is what my automation scripts do.

Pro-tip: `rfcfold` won’t fold a file that doesn’t need folding, i.e., the 
output file will equal the input file.

> Thanks, Italo

K.


___
netmod mailing list
netmod@ietf.org
https://www.ietf.org/mailman/listinfo/netmod


[netmod] Lines too long in YANG tree diagrams

2023-07-05 Thread Italo Busi
RFC8340 suggests to use the "--tree-line-length 69" option to produce YANG tree 
diagrams to be included into an Internet-Draft or RFC.

Although this option works well in many cases, there are few cases where pyang 
produces YANG tree diagram with lines too long even with the 
"--tree-line-length 69" option and in this case it is not fully clear what 
could be done when including those  YANG tree diagram into Internet-Drafts or 
RFCs

Section 5.2 of RFC8792 says:

It is RECOMMENDED that authors do as much as possible within the selected 
format to avoid long lines.

My interpretation of the RECOMMENDED key word and of "as much as possible" is 
that we MUST always use the "--tree-line-length 69" option to generate the YANG 
tree diagrams to be included into Internet-Drafts or RFCs and that we MAY use 
RFC8792 tool to fold the YANG tree diagrams when they contain lines too long

Is my interpretation correct?

Thanks, Italo


___
netmod mailing list
netmod@ietf.org
https://www.ietf.org/mailman/listinfo/netmod