Skip to content
This repository has been archived by the owner on Apr 16, 2024. It is now read-only.

Dockerfile? #27

Open
ianhbell opened this issue Jun 22, 2018 · 5 comments
Open

Dockerfile? #27

ianhbell opened this issue Jun 22, 2018 · 5 comments

Comments

@ianhbell
Copy link

Anybody have a Dockerfile that wraps all of the install into a nice image? If not, I can put one together. I'm starting on my second JOSS submission now, and it seems like the same warts around local builds are still present. I still want to be able to build a reasonable PDF of my submission so I can see what it will look like, and straight pandoc basically works (openjournals/joss#370), but I would prefer something a bit nicer (my internal reviewers are not a fan of the missing author/affiliations for instance).

@arfon
Copy link
Member

arfon commented Jun 25, 2018

Hi @ianhbell - this would be very welcome.

@greatfireball did some related work in https://github.com/greatfireball/docker_whedon_translate4joss

@greatfireball
Copy link

@ianhbell could you use my dockerfile/container at least as starting point?

@ianhbell
Copy link
Author

ianhbell commented Jul 5, 2018

Actually, I abandoned the docker idea (for now), and just wrote a little Python script that gets the job done (after cloning whedon into the folder where this script sits). I can even run it on windows, and it should run everywhere therefore.

cmd = """pandoc  \
-V paper_title="TITLE GOES HERE" \
-V citation_author="Ian H. Bell" \
-V archive_doi="http://dx.doi.org/00.00000/zenodo.0000000" \
-V formatted_doi="00.00000/joss.00000" \
-V paper_url="http://joss.theoj.org/papers/" \
-V review_issue_url="http://joss.theoj.org/papers/" \
-V issue="0" \
-V volume="00" \
-V year="2018" \
-V submitted="00 January 0000" \
-V published="00 January 0000" \
-V page="00" \
-V graphics="true" \
-V logo_path="whedon/resources/joss-logo.png" \
-V geometry:margin=1in \
-o paper.pdf \
--pdf-engine=xelatex \
--filter pandoc-citeproc paper.md \
--from markdown+autolink_bare_uris \
--template "whedon/resources/latex.template"
""".replace('\\','')

import subprocess, sys
subprocess.check_call(cmd, shell=True, stdout=sys.stdout,stderr=sys.stderr)

@vsoch
Copy link

vsoch commented Sep 4, 2018

Hey @ianhbell @greatfireball ! I'm following the issue here, as well as a few other boards - apologies for cross posting, I'm not sure if there's a better way!

The reason I'm poking is because I hit this (and similar issues with Docker / building pdfs) myself! So the last few days I am working on a "whedon paper builder" (actual branding TBD after discussion with @arfon) that is going to serve as a tool for a new organization openbases that is going to provide templates intended for open journals submissions. For this particular issue, the whedon docker container that generates papers (still under development, just fyi!) I think could be a strong start! Specifically, it can:

  • locally take a paper.md (and other inputs) and generate the paper (here it is) and this table.
  • be customized for the metadata, logo, etc.
  • be used as a template if you fork the repo! It will generate an updated table of paper manifests on Github pages so you can come back in the future, find old papers.

My next plans are to:

  1. Create an equivalent Github repo template with the circle config that does everything except build the whedon container (it will just use it from Docker Hub) so that a user can just fork the repo to preview their paper (as an artifact on Circle or back to Github pages).
  2. Create journal specific testing for the paper submission, so you can fail that before getting your pdf and submitting it. That will be provided by this library.

So for example we can have a repo like openbases/submission-joss that will use this container with additional tests for a joss submission, openbases/submission-jose, etc., along with a vanilla openbases/paper-whedon (or something like that, apologies I'm a bit tired!)

There is still a few weeks development before a complete open base template (basically a circle config that will take you from raw stuffs to submission without a huge hassle) but in the meantime I/we would love feedback! The primary question I want to know:

  • Does this fit your use case, why or why not?
  • Suggestions for features or differences in usability?

Thanks everyone! @ianhbell I noticed your solution is also in Python, so you might be interested to check out the whedon-python library linked above.

@arfon @FelixHenninger @tylerburleigh @jodeleeuw

@vsoch
Copy link

vsoch commented Sep 4, 2018

Quick update - @arfon and I chat and the container helper previously (not well chosen) named "whedon" is now builder-whedon! He builds. Here are new links:

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

No branches or pull requests

4 participants