Skip to content
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

Is the project still active? #161

Open
erelsgl opened this issue Nov 8, 2021 · 6 comments
Open

Is the project still active? #161

erelsgl opened this issue Nov 8, 2021 · 6 comments

Comments

@erelsgl
Copy link

erelsgl commented Nov 8, 2021

Because the Readme shows "error".

@contactzen
Copy link

Try zen-knit. It is inspired by this project

@mauro3
Copy link

mauro3 commented Mar 16, 2022

I just saw this https://github.com/mwouts/jupytext. However, I have not tried it, so I cannot vouch for it.

@phlummox
Copy link

Looks like the last commit by the author, @mpastell, was around 5 years ago –

and the last commit by any maintainer was by @abukaj around 4 years ago (as at 2023) –

@mpastell is still active on GitHub (e.g. at https://github.com/TwinYields/TwinYields), but not in this repository, so I guess it's abandonware :/

Alternatives

Some alternatives I found or that have been mentioned:

  • Jupytext (https://github.com/mwouts/jupytext), mentioned by @mauro3 does look like a (reasonable, but heavyweight?) alternative; it lets you convert back and forth between a Jupyter notebook and other forms (such as markdown with embedded Python blocks to be run). So a combination of https://github.com/jupyter/ and Jupytext would cover most use cases of Pweave, I think.

    Going forward, I think this will be my tool of choice, but only because I don't mind having a swathe of Jupyter-related packages as dependencies. Others might prefer something lighter weight.

  • Cog. A somewhat similar project to Pweave (though more limited, I think) is Cog (documentation here). It lets you embed Python fragments in any file between [[[cog ... ]]] delimeters, and inserts the output of that code directly after.

    Dependencies: apparently, none besides Python (>= 3.7, possibly?).

  • Knitty. Another similar project (https://github.com/kiwi0fruit/knitty), but it too appears to be abandonware, and has some obnoxious behaviour: it overwrites your user-installed version of pandoc with a version of its own.

  • Pytwine. https://github.com/arranstewart/pytwine/. Minimalistic tool, takes in Markdown files containing Python fragments in fenced code blocks (i.e. blocks starting with ```aaa), and replaces them with the output of the code. Seems to be somewhat lacking documentation, though, and the README states that it's "pre-alpha"; but on the plus side, seems to have no other dependencies besides python >= 3.6.

Literate programming-related projects

Some somewhat-related programs, in the "literate programming" space:

Pandoc

Also, there's Pandoc, the mammoth in the document-conversion space, which is designed to let you convert between any number of document formats – but one feature is that it lets you specify filters, plugins written in Haskell, Python, or a bunch of other languages which let you operate in arbitrary ways on Pandoc's internal representation of a document.

There are all sorts of published filters, which let you do things like insert diagrams written in Mermaid syntax, improve the way Pandoc handles numbering, cross references, and bibliographic references. A filter to "Find all code blocks with class python and run them using the python interpreter, printing the results to the console" is left as an exercise of the reader, though I'm sure there's a published equivalent somewhere.

In theory, all of this sounds awesome and ideal, and should let you do absolutely anything you want with almost any sort of document. In practice, I've found it kind of irritating for small, ad-hoc projects, because you (a) you need to install multiple tools – Pandoc and the appropriate filters, and (b) you need to keep any filters you use in lockstep with the version of Pandoc you're using, or they'll disagree about the AST they're working with and produce runtime errors. For a major project, that's fine, versioning the tools you use is just part of the job, but for small, ad hoc projects, I want just one tool which I can install, which does just one thing (execute code blocks), and which changes pretty conservatively (so I don't have to re-learn how to do stuff). But YMMV.

Other potentially useful links

Other links that might be of interest:

Footnotes

  1. Launched on 25 March 1995 by programmer Ward Cunningham, according to Wikipedia.

@erelsgl
Copy link
Author

erelsgl commented Mar 24, 2023

Thanks a lot for the detailed survey!

@amichuda
Copy link

I would also check out quarto, the successor to rmarkdown, which integrates python really well:

https://quarto.org/

@phlummox
Copy link

Thanks a lot for the detailed survey!

No problem :) I once again am in need of a tool in the Python-report-generator space, so thought I'd add my findings here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants