ickc / pantable

CSV Tables in Markdown: Pandoc Filter for CSV Tables
https://ickc.github.io/pantable/
BSD 3-Clause "New" or "Revised" License
86 stars 15 forks source link

Allowing to run filters automatically #19

Closed reenberg closed 7 years ago

reenberg commented 7 years ago

Minor update to the run_filter and main function, to support running the filters automatically, as documented here: http://scorreia.com/software/panflute/guide.html#running-filters-automatically

This allows the user to add panflute-filters and panflute-path meta-data fields to the pandoc document and in turn having all of these filters run by just running pandoc as: pandoc -F panflute ...

Minor changes to the test was done, to reflect the new doc argument. Tests passed for py3 on my machine, but still not for py2 (as previously noted).

I guess new tests should be added to demonstrate this, but I don't really know how to do this without invoking pandoc. And to be honest, I haven't worked that much with Travis/CI to know the implications of doing this. As far as I can see no other tests invoke pandoc.

coveralls commented 7 years ago

Coverage Status

Coverage remained the same at 100.0% when pulling cf03292460a3912505db463a481a110c6f2c9a13 on reenberg:feature/running-filters-automatically into 5106bdeaace87bceaaa71c02edf706b53f5ff6c6 on ickc:master.

ickc commented 7 years ago

Your py2 build has failed probably because you haven't pasteurized it. That's a trick I did to panflute to support Python2, so that it can hide away most of Python2's differences from us. But then it makes the testing on Py2 most obscure.

The trick then is to rely on Travis CI. You can open an account there for free too, and you can activate Travis CI for your fork. As long as you pushes to your branch and the Travis build passes, it's good to go.

In this case I don't think we need a test on if the autofilter works. We simply follow his documentation and if it breaks that issue should be submitted to panflute.

ickc commented 7 years ago

I bumped the version and prepared a release on PyPI. Travis should push to PyPI in a few minutes. Let me know if it has problems.