openjournals / joss

The Journal of Open Source Software
https://joss.theoj.org
MIT License
1.52k stars 185 forks source link

compiling paper.md on gitlab? #1237

Open maximelucas opened 1 year ago

maximelucas commented 1 year ago

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?

xuanxu commented 1 year ago

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.

warrickball commented 1 year ago

This comment in an inara issue looks relevant.

warrickball commented 1 year ago

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

platipodium commented 1 year ago

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 commented 1 year ago

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: []
maximelucas commented 1 year ago

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?