tpb has joined #litex
freemint has joined #litex
freemint has quit [Ping timeout: 245 seconds]
freemint has joined #litex
rohitksingh has quit [Ping timeout: 276 seconds]
CarlFK has quit [Quit: Leaving.]
rohitksingh has joined #litex
freemint has quit [Ping timeout: 245 seconds]
rohitksingh has quit [Ping timeout: 246 seconds]
rohitksingh has joined #litex
CarlFK has joined #litex
rohitksingh has quit [Ping timeout: 245 seconds]
freemint has joined #litex
freemint has quit [Ping timeout: 264 seconds]
freemint has joined #litex
CarlFK has quit [Quit: Leaving.]
pizzaman has quit [Quit: Leaving.]
pizzaman has joined #litex
pizzaman has quit [Client Quit]
pizzaman has joined #litex
pizzaman has quit [Ping timeout: 240 seconds]
<mithro> xobs: FYI You might want to look at testwrap.dedent for having triple quoted strings in Python be aligned with surrounding code
<tpb> Title: textwrap Formatting text paragraphs - Python Module of the Week (at pymotw.com)
<tpb> Title: Suggest using `textwrap.dedent()` to keep indentation even with triple-quote multi-line strings · Issue #26 · amontalenti/elements-of-python-style · GitHub (at github.com)
<tpb> Title: 7.5. textwrap — Text wrapping and filling Python v3.1.5 documentation (at docs.python.org)
<xobs> mithro: Thanks, that looks super useful for this sort of thing. I wonder why it's not more widely known
<xobs> I'll have to look into using that myself. I saw someone used regular expressions on Stack Overflow to accomplish that, which is as far as I'd gotten.
<xobs> xobs: Any recommendations on how we can extract various sections out of a docstring? Or how we could use sphinx? Right now I generate rst files after `soc.do_exit(vns)` and just run sphinx on that.
<mithro> xobs: I only found about it a year or two ago and I've been programming in Python since 1998
<xobs> If there were a way to parse out the various Module docstrings, that would be very useful.
<mithro> xobs: I would suggest using rst headers / section thingies
<xobs> sphinx is, ironically, not well documented. For example, in lxsocdoc, I make each register a `subsubsection`, but in the resulting html it makes them `<h1>` "section"s. I haven't figured out how to not have it include subsubsections all over the place. Or how to include sections.
pizzaman has joined #litex
<xobs> Is docutils part of python, or is it something that got pulled in by sphinx?
<xobs> I see. No, it's not part of the standard distribution, but it has no dependencies and no build requirements other than 3.5+ (same as litex)
freemint has quit [Ping timeout: 240 seconds]
freemint has joined #litex
CarlFK has joined #litex
<xobs> This came up over in #fomu, but is there any particular reason why `CSRStatus` fields have no `.we` signal?
freemint has quit [Ping timeout: 245 seconds]
scanakci has joined #litex
freemint has joined #litex
<mithro> xobs: FYI I would recommend using rst headers / blocks. You can then use docutils to easily extract the sections.
<xobs> mithro: I really don't want to depend on a module like that.
<mithro> xobs: Why not? docutils is a standard library module?
<xobs> It doesn't look like it's part of the standard library. At least it's not listed at https://docs.python.org/3/library/index.html
<tpb> Title: The Python Standard Library Python 3.7.4 documentation (at docs.python.org)
<mithro> Oh maybe I'm wrong...
scanakci has quit [Quit: Leaving]
<xobs> The best way seems to be to generate files that can then be fed into sphinx.
<xobs> I just spent the afternoon helping Bunnie fix his system that has a conflicting sphinx setup. So the fewer modules we need the better.
<tpb> Title: inspect — Inspect live objects Python 3.7.4 documentation (at docs.python.org)
<mithro> xobs: This is why you use self contained Python environments
<xobs> Also, docutils seems to require python 3.5+. litex requires python 3.5+, but I'm afraid of them changing things.
scanakci has joined #litex
<mithro> 0.15 is the last to support Python 2.6, 3.3, and 3.4.
<mithro> Docutils is compatible with Python versions 2.7, and 3.5 to 3.7
<xobs> Right, but my concern is that they don't seem to care much for backwards-compatibility. And I don't see the benefit of doing it that way versus having a sentinal. The drawbacks are needing to package another module, and depending on something that has shown that they will drop support for older versions. What are the benefits?
<mithro> xobs: The choice is "do something custom which will continue to grow in complexity until it reaches the same as the existing solutions" or "Use the current existing most popular solution which has been around a long time and is the default option Python people would reach for (and has a lot of stackoverflow and other existing solutions)"
<mithro> xobs: FYI - The longer you wait to upgrade things, the more painful the upgrade is going to be
freemint has quit [Ping timeout: 245 seconds]
<xobs> mithro: It'll need to be nonstandard anyway. The choice is whether we have a nonstandard prefix on the header, or we have a special sentinal.
<mithro> xobs: Extend an existing standard is better than inventing a new one...
<xobs> I really don't like to add python packages. They always seem to break. The wavedrom sphinx plugin, for example, fails to install because it requires libxcb.dll
<xobs> The idea came from perlpod, which is an existing standard.
<tpb> Title: WIP: Enable link-time-optimization on LiteX builds by mithro · Pull Request #253 · enjoy-digital/litex · GitHub (at github.com)
<mithro> xobs: You can probably just use your regex / string approach and make the sentinel a rst block compatible? https://github.com/ralsina/rst-cheatsheet/blob/master/rst-cheatsheet.rst#blocks
<tpb> Title: rst-cheatsheet/rst-cheatsheet.rst at master · ralsina/rst-cheatsheet · GitHub (at github.com)
<tpb> Title: timer: add documentation by xobs · Pull Request #259 · enjoy-digital/litex · GitHub (at github.com)
freemint has joined #litex
freemint has quit [Ping timeout: 245 seconds]
rohitksingh has joined #litex
freemint has joined #litex
rohitksingh has quit [Ping timeout: 264 seconds]
freemint has quit [Ping timeout: 250 seconds]
<mithro> xobs: with that syntax, it is pretty trivial to write a sphinx extension which takes all those sections and pulls it together.
rohitksingh has joined #litex
rohitksingh has quit [Ping timeout: 276 seconds]
rohitksingh has joined #litex
rohitksingh has quit [Ping timeout: 265 seconds]
freemint has joined #litex
rohitksingh has joined #litex
rohitksingh has quit [Ping timeout: 258 seconds]
rohitksingh has joined #litex
pizzaman1 has joined #litex
pizzaman has quit [Ping timeout: 258 seconds]
pizzaman1 has quit [Ping timeout: 276 seconds]
tpb has quit [Remote host closed the connection]