joss icon indicating copy to clipboard operation
joss copied to clipboard

compiling paper.md on gitlab?

Open maximelucas opened this issue 1 year ago • 6 comments

Hi, I am currently writing a manuscript to be submitted to your great journal. Unfortunately, I am having trouble compiling the paper.md: the guidelines (https://joss.readthedocs.io/en/latest/submitting.html) provide two ways but none seems to work for me.

  1. Github Action: my code is hosted on Gitlab for which this action does not exist.
  2. Docker, locally: the command seems to find the paper files etc., starts compiling, but stops at:
    [INFO] Running filter /usr/local/share/openjournals/data/filters/self-citation.lua
    Killed
    

The error provides no other information to help be understand what is wrong.

Would you have an equivalent to the Github Action but for Gitlab?

maximelucas avatar Jun 16 '23 10:06 maximelucas

Having a GH Action equivalent running on GitLab sounds like a good idea, but right now it is not in our list of priorities.

Internally the GitHub action uses this package: https://github.com/openjournals/inara You could try to run it locally or from a custom GitLab action.

xuanxu avatar Jun 16 '23 11:06 xuanxu

This comment in an inara issue looks relevant.

warrickball avatar Jun 16 '23 11:06 warrickball

I snooped a bit further and here's the repo in which it's used (h/t @platipodium):

https://gitlab.hzdr.de/mussel/netlogo-northsea-species/-/blob/main/.gitlab/joss.yaml#L50-68

warrickball avatar Jun 16 '23 11:06 warrickball

Yeah... as you can see in my code https://gitlab.hzdr.de/mussel/netlogo-northsea-species/-/blob/main/.gitlab/joss.yaml#L50-68 I had to fiddle around with several ideas. But it's operational now :=)! If you @maximelucas have any questions, feel free to do that here or on the linked gitlab issue tracker.

platipodium avatar Jun 16 '23 11:06 platipodium

Here's the .gitlab-ci.yml

# The JOSS-provided workflow did not work for issues between inara docker
# and gitlab, see https://github.com/openjournals/inara/issues/34.
# This is resolved by resetting the container's entrypoint.
joss-inara:
  stage: deploy
  image:
    name: openjournals/inara
    entrypoint: ["/bin/sh", "-c"]
  variables:
    GIT_SHA: $CI_COMMIT_SHA
    JOURNAL: joss
  script:
    - inara -o pdf,cff doc/joss/paper.md
  allow_failure: false
  artifacts:
    paths:
      - ./doc/joss/paper.pdf
      - ./doc/joss/CITATION.cff
  needs: []

platipodium avatar Jun 16 '23 14:06 platipodium

This worked like a charm @platipodium! Thanks so much everyone.

I was looking for a solution from other repos just like this one, but couldn't find one. Maybe this solution could be added to the guidelines for others in the same case?

maximelucas avatar Jun 17 '23 07:06 maximelucas