-
Notifications
You must be signed in to change notification settings - Fork 178
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
best practice for integrating pandas-generated tables into manubot docs #494
Comments
Open ended issues are welcomed and helpful for other users. This is also a fairly custom use case, so we don't have a guide anywhere. I can try to help you set up something that works for your project. Looking back at the example in #461, you're right that jinja templates are being used. That example manuscript is a very complex project that runs scripts in GitHub Actions and stores a lot of data in JSON files on a separate branch, including these Markdown tables. Check out line 28 of Do you have your Jupyter notebook in the same repository as your Manubot manuscripts? If so, you should be able to set up a workflow that roughly:
The first step would be to get it working once. Then we could think about how to automate syncing by exporting the Markdown tables from the notebook on every manuscript build, a schedule, every commit, etc. |
I ended up writing my own dataframe to markdown converter (unfortunately pandas I feel I should just be able to
but this always results in:
I will try putting the markdown in the json and rendering this, but it feels a little contorted... |
Using the jinja I'm not familiar with |
That would be great! I seem to recall doing something similar in the past in a different project; create the loader, pass the environment to the loader, and then load directly from the folder: |
Hmm yeah, a way to insert entire text files, either from a local path or URL, would be a great solution here. So the questions are:
|
[feel free to close if this is too open-ended]
I like to have a Jupyter notebook that accompanies every paper I write, and I am always trying to better automate syncing between artefacts generated by the notebook and the paper; in particular data tables.
I like how manubot allows me to use markdown tables as these are easy to auto-generate. It seems I should read up on the pandoc docs on the different table options (I usually just use the basic flavor of markdown)
It looks like there possibilities to do things like auto-include tables that are generated outside:
But I feel I'm not enough of a manubot wizard to understand what's happening here.
{{
looks like jinja templates are being applied? Where do the variables come from? Apologies if I am missing a guide somewhere...The text was updated successfully, but these errors were encountered: