Code Monkey home page Code Monkey logo

inara's Introduction

Open Journals

This is a test.

inara's People

Contributors

arfon avatar cliffckerr avatar ilonasilverwood avatar jedbrown avatar sneakers-the-rat avatar tarleb avatar xuanxu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

inara's Issues

Example not build

Hello,

First thank for your work.

I try to use this project but when I try to run project on example make failled:

➜ make ARTICLE=example/paper.md
INARA_ARTIFACTS_PATH=publishing-artifacts/ pandoc \
  --data-dir=data \
  --defaults=shared \
  --defaults=pdf.yaml \
  --defaults=resources/joss/defaults.yaml \
  --resource-path=.:resources:example/ \
  --metadata=article-info-file=resources/default-article-info.yaml \
  --variable=joss \
  --output=publishing-artifacts/paper.pdf \
  example/paper.md
[INFO] Running filter data/filters/parse-latex.lua
[INFO] Completed filter data/filters/parse-latex.lua in 2 ms
[INFO] Running filter data/filters/inline-cited-references.lua
Error running filter data/filters/inline-cited-references.lua:
data/filters/inline-cited-references.lua:6: attempt to call a nil value (field 'references')
stack traceback:
	data/filters/inline-cited-references.lua:6: in function 'Pandoc'
make: *** [Makefile:33 : publishing-artifacts/paper.pdf] Erreur 83
```

System:
- Fedora: 36
- pandoc: 2.14
- make: 4.3
- lua 5.4.4
- pdfTeX: 3.141592653-2.6-1.40.22
- TeX Live 2021 full install

Missing Chinese character

I insert some Chinese characters in paper.md. Then this action failed. the error message is "Missing character: There is no 菏 (U+83CF) ("83CF) in font cmr10!". I think it is because the default font family didn't support Chinese characters. is there an option that can change specific sentences' font family.

Bug in template

Hi,
I clone the repo, and try to test makefile on example paper
I got this errors:

~/workspace/tests/inara$ make ARTICLE=example/paper.md
INARA_ARTIFACTS_PATH=publishing-artifacts/ pandoc \
  --data-dir=data \
  --resource-path=.:resources:example/ \
  --metadata=article-info-file=resources/default-article-info.yaml \
  --variable=joss \
  --output=publishing-artifacts/paper.pdf \
  example/paper.md
"template" (line 388, column 16):
unexpected "{"
expecting "$endif$"
make: *** [Makefile:33: publishing-artifacts/paper.pdf] Error 5

Extract Lua components, turn them into separate projects

Components like

  • the "resolve references" filter,
  • and the CrossRef custom writer

are of interest for other projects. They should become easier to re-use.

Likewise, data/filters/parse-latex.lua should be replaced by tarleb/parse-latex.

lualatex error: Undefined control sequence on \citeproc when generating pdf from the example

When generating pdf from the example, I got the following error:

[INFO] [makePDF] LaTeX run number 1
Latexmk: Run number 1 of rule 'lualatex'
Collected error summary (may duplicate other messages):
lualatex: Command for 'lualatex' gave return code 1
Refer to '/tmp/tex2pdf.-7470bf7304835743/input.log' for details
Latexmk: Use the -f option to force complete processing,
unless error was exceeding maximum runs, or warnings treated as errors.
[INFO] [makePDF] LaTeX output
This is LuaTeX, Version 1.10.0 (TeX Live 2019/Debian)
restricted system commands enabled.
Error producing PDF.
! Undefined control sequence.
l.403 Software (\citeproc

I'm using Ubuntu 20.04. My pandoc version is 3.1.11.1, installed from a deb file.

Basic tests

The project is missing basic tests.

Minimum: compare output with golden files for

  • JATS
  • Preprint LaTeX
  • CrossRef

and

  • check that the PDF compiles without errors (builds are non-reproducible, so we cannot use a golden file)

All these should be checked for

  • draft previews and
  • publishing.

Due to its importance, we also need to

  • verify JATS validity

PandocLuaError "Cannot get Attr from TypeNil"

Hello,

I was attempting to compile a manuscript prior to submission using the docker image following the docs

docker run --rm \
    --volume $PWD/paper:/data \
    --user $(id -u):$(id -g) \
    --env JOURNAL=joss \
    openjournals/inara

But ran into this error,

Error running filter /usr/local/share/openjournals/data/filters/normalize-metadata.lua:
PandocLuaError "Cannot get Attr from TypeNil"
stack traceback:
        ...l/share/openjournals/data/filters/normalize-metadata.lua:95: in function 'Meta'

Seems like the same error reported in the Github Action a few months back in openjournals/openjournals-draft-action#6

Typst

I have published once in The Journal of Open Source Software and remember that it wasn't very easy to get LaTeX working. I'm on an ARM MacOS system and there the docker image required at least 10 GB of RAM and the build was very slow (#30).

I'm currently working on writing my PhD thesis in typst. It has been a great experience. Compilation takes about 100ms compared to the typical multiple seconds that LaTeX takes. Also, I converted my JOSS paper to typst with little effort. Apart from a few minor things, which could often be easily solved by writing some typst code, I have gotten everything to work. Things that I can confirm that are now working, and related to openjournals, are references via BibTeX, page numbers, code examples with syntax highlighting, inclusion of images, setting alternative headers/footers, and tables. These features all work out-of-the-box. No need to install extra dependencies in typst.

Since openjournals is the most cutting edge publisher that I know, especially with regards to open source software, maybe typst could be included as an (alternative) back end for the publishing system? This could make it easier for authors to submit their papers to openjournals.

Custom syntax highlighting XML file

The piece of software I'm trying to publish reads a certain input file, and the paper shows some snippets of sample input files.
Being able to generate a PDF with syntax highlight would increase the clearness of the paper.

I tried to add

syntax-definition: feenox.xml

in the YAML block of paper.md (and added feenox.xml in the same directory as paper.md) but it does not work as expected.
Cloning the repository locally, the only way to make it work was to modify the makefile to add

--syntax-definition=$(OPENJOURNALS_PATH)/feenox.xml

to the invocation of pandoc.

Would it be possible to have this custom highlighting XML in JOSS in the automated builds?

SVG files not converted

In the last days, the workflows for building our paper have been failing (example 1 and example 2). This issue seems to be related to this warning hinting that rsvg-convert is missing:
Warning: Could not convert image /tmp/tex2pdf.-9cc0189afa7c7022/piglot.svg: check that rsvg-convert is in path.

Converting the SVG file to another format allows the paper to compile (example).

The timeline seems to point to #52, which is also consistent with the docker images used in our first failing and the last successful builds.

make preprint target broken

README.md says

inara/README.md

Lines 46 to 53 in 0739fb5

All supported publishing formats are generated by default, but you
can select a specific format to be generated by passing it as an
argument. Available options: `html`, `pdf`, `jats`, `crossref`, `cff`, and `preprint`.
E.g., to generate only a PDF file, the command would be
make pdf ARTICLE=/my/path/paper.md

As far as I can tell this is not accurate. Running

$ make preprint ARTICLE=joss/paper.md

results in the error

make: *** No rule to make target 'publishing-artifacts/paper-preprint.tex', needed by 'preprint'.  Stop.

and no .tex file is written to publication_artifacts.

The analogous docker command does work.

orcid missing https base URL in generated JATS XML

I think code in this repository is generating the JATS XML in openjournals/joss-papers which has orcid content values which do not include the base URL https://orcid.org/. For example:
https://github.com/openjournals/joss-papers/blob/c5d4302e65b0d2135b5c70efb9bff3a23b4b1a8a/joss.04611/10.21105.joss.04611.jats

This is inconsistent with what appears in the JATS XML files in the PMC Open Data Set, e.g.:
ftp://ftp.ncbi.nlm.nih.gov/pub/pmc/oa_package/84/fc/PMC9293011.tar.gz
and eLife JATS XML files: e.g.
https://github.com/elifesciences/elife-article-xml/blob/master/articles/elife-77625-v1.xml
These existing JATS XML styles include the https://orcid.org/. Per https://en.wikipedia.org/wiki/ORCID: "Formally, ORCID IDs are specified as URIs". Looks like formally not including the https base URL results in a International Standard Name Identifier (ISNI) and not an ORCID.

Make the program easier to use locally

Some users do not want to install or use Docker. We currently provide a Makefile, but it sometimes goes out of sync with the containerized version and might not work as well on Windows.

Ideally, Inara should be a single downloadable zip-archive or even a single script with minimal dependencies.

A good way to achieve this would be to refactor it into a single Lua program that can be run with pandoc-lua. This would eliminate the need for an additional entrypoint.sh script, could help to avoid certain complexities in the configuration, and allow for more flexible output generation.

The last point is of particularly importance for the production of Pubmed compliant artifacts.

Possible risks with that approach:

  • Pandoc might not expose all required features via its Lua API.
  • Configuration methods might have to be modified.

Additional latex packages

Hi there! I am writing a manuscript for JOSS (draft here), for which I would like to use a package that is not part of the latex installation within the Inara image (the dirtree package).

Is there a way to include additional latex packages before generating PDFs via the Inara container? If not, would you consider to include dirtree in the list of packages that are installed with tlmgr in the image?

docx more full format

Hi, following up on #14 , is there any chance of including authors and affiliations in the docx output? This would be useful for getting track changes from people who are not used to markdown but who would give me feedback through docx. Thank you!

PS: I got a github actions working with this yaml for docx https://github.com/lskatz/Kalamari/blob/f1600cf90338ea99b27a7c9433f50ce7cefc977d/.github/workflows/draft-docx.yml and so thank you so much for having an inara container and a github actions example.

Latex template does not support large number of authors

This is probably hitting yet another edge case, but the PDF is not rendered when there are too many authors, and affiliations.

I am dealing with a submission with 40 authors on it and have been fighting with the latex template to create the following condition:

When there are more than 10 authors, list first 10 and the last author in the title, and remove the remaining authors and their affiliations to the last page.

I don't have much experience with Lua + Latex, if you have any suggestions to deal with this issue, I'd be glad. Thanks!

Including two figures of reduced width makes captions of both invisible.

Hello,
I'm unsure whether this issue should go here or on the Journal of Open Source Software github page, please let me know if you think it'd be better elsewhere.

I'm currently preparing a paper for JOSS and want to include two images side-by-side (like subfigures in LaTeX). I have the following written in my paper.md file:

![An example caption for image one.\label{fig1a}](Fig1a.jpg){ width=40% }
![An example caption for image two.\label{fig1b}](Fig1b.jpg){ width=40% }

The figures themselves show up OK, appearing side-by-side in the text. However, the captions are not visible. Including just one figure, even with width=40% shows the caption so this is obviously a problem only when two figures are inserted.

I guess this is a bug, but may also be me not using the figure commands properly. Any feedback or info you could provide would be gratefully received!

Permission denied errors when running Docker image with podman

As part of a review, I tried to build the paper in this review with the inara Docker container using podman, as follows, in which I encounter a permissions error:

$ git clone --branch joss --single-branch [email protected]:tobin-wainer/elk.git
...
$ cd elk
$ podman pull docker://openjournals/inara:latest
...
$ podman run --rm --volume $PWD:/data --user $(id -u):$(id -g) --env JOURNAL=joss openjournals/inara:latest
pandoc: paper.md: openBinaryFile: permission denied (Permission denied)

If I try using the --privileged flag, I get a bit further but a similar error:

$ podman run --rm --volume $PWD:/data --user $(id -u):$(id -g) --env JOURNAL=joss --privileged openjournals/inara:latest
[INFO] Running filter /usr/local/share/openjournals/data/filters/parse-latex.lua
[INFO] Completed filter /usr/local/share/openjournals/data/filters/parse-latex.lua in 11 ms
[INFO] Running filter /usr/local/share/openjournals/data/filters/inline-cited-references.lua
[INFO] Loaded paper.bib from paper.bib
[INFO] Completed filter /usr/local/share/openjournals/data/filters/inline-cited-references.lua in 94 ms
[INFO] Running filter citeproc
[INFO] Loaded apa.csl from /usr/local/share/openjournals/apa.csl
[INFO] Completed filter citeproc in 134 ms
[INFO] Running filter /usr/local/share/openjournals/data/filters/normalize-metadata.lua
[INFO] Completed filter /usr/local/share/openjournals/data/filters/normalize-metadata.lua in 35 ms
[INFO] Running filter /usr/local/share/openjournals/data/filters/time.lua
[INFO] Completed filter /usr/local/share/openjournals/data/filters/time.lua in 15 ms
[INFO] Running filter /usr/local/share/openjournals/data/filters/normalize-author-names.lua
[INFO] Completed filter /usr/local/share/openjournals/data/filters/normalize-author-names.lua in 17 ms
[INFO] Running filter /usr/local/share/openjournals/data/filters/substitute-in-format.lua
[INFO] Completed filter /usr/local/share/openjournals/data/filters/substitute-in-format.lua in 8 ms
[INFO] Running filter /usr/local/share/openjournals/data/filters/resolve-references.lua
[INFO] Completed filter /usr/local/share/openjournals/data/filters/resolve-references.lua in 59 ms
[INFO] Running filter /usr/local/share/openjournals/data/filters/remove-references-heading.lua
[INFO] Completed filter /usr/local/share/openjournals/data/filters/remove-references-heading.lua in 9 ms
[INFO] Running filter /usr/local/share/openjournals/data/filters/orcid-uri.lua
[INFO] Completed filter /usr/local/share/openjournals/data/filters/orcid-uri.lua in 16 ms
[INFO] Not rendering RawInline (Format "latex") "\\vphantom{\\{}"
[INFO] Not rendering RawInline (Format "latex") "\\aj"
[INFO] Not rendering RawInline (Format "latex") "\\pasp"
[INFO] Not rendering RawInline (Format "latex") "\\mnras"
[INFO] Not rendering RawInline (Format "latex") "\\araa"
pandoc: paper.jats: openFile: permission denied (Permission denied)

I'm new to Docker, podman and the relationship between them, so recognise this might be me misusing something, rather than an actual issue in inara.

I'm using Fedora 38 and podman 4.7.0 from the system repositories.

Corresponding author email does not show up in joss pdf draft

Hello,

Referencing #55 (comment).

Following 02c6106, I added an email to a paper.md header for the corresponding author as follows:

authors:
  - name: Adam Pollack
    corresponding: true
    email: [email protected]
    orcid: 0000-0001-6642-0591
    affiliation: 1

I have the following GitHub action:

on: [push]

jobs:
  paper:
    runs-on: ubuntu-latest
    name: Paper Draft
    steps:
      - name: Checkout
        uses: actions/checkout@v4
      - name: Build draft PDF
        uses: openjournals/openjournals-draft-action@master
        with:
          journal: joss
          # This should be the path to the paper within your repo.
          paper-path: joss_submission/paper.md
      - name: Upload
        uses: actions/upload-artifact@v3
        with:
          name: paper
          # This is the output path where Pandoc will write the compiled
          # PDF. Note, this should be the same directory as the input
          # paper.md
          path: joss_submission/paper.pdf

but I don't see the email show up in the pdf header (see below). Following 02c6106, I expected to see the corresponding author email after the "Corresponding author" text.

image

Doc or docx format

Hi, for our internal review process, I am getting feedback that they would like a Word format to review. Is it possible for this github action to produce a doc or docx format? Or if not that, is it possible some other way like through the container? Thank you!

Inara image cannot be used with Gitlab CI

Inara Docker image in CI pipeline fails with getopt: unrecognized option: c

Running with gitlab-runner 15.10.0-hifis0 (285ec021)
  on hifis-runner-manager-1 qSeqXZze, system ID: s_18a5a67640b5

Preparing the "docker+machine" executor
00:20
Using Docker executor with image openjournals/inara:latest ...
Pulling docker image openjournals/inara:latest ...
Using docker image sha256:a880d6aaa55fe9e8d7d0ffd102d531595ef3e5d8f219e0cb9dcb7bbc2bf3b317 for openjournals/inara:latest with digest openjournals/inara@sha256:86d957f2226bc8010e386180206144c2362fad02b3331ebe300cc1d6088131d9 ...

Preparing environment
00:01
Running on runner-qseqxzze-project-4399-concurrent-0 via runner-qseqxzze-hifis-autoscale-1680471447-19e9c35a...

Getting source from Git repository
00:01
Fetching changes with git depth set to 50...
Initialized empty Git repository in /builds/mussel/netlogo-northsea-species/.git/
Created fresh repository.
Checking out e085305e as detached HEAD (ref is main)...
Skipping Git submodules setup

Executing "step_script" stage of the job script
00:00
Using docker image sha256:a880d6aaa55fe9e8d7d0ffd102d531595ef3e5d8f219e0cb9dcb7bbc2bf3b317 for openjournals/inara:latest with digest openjournals/inara@sha256:86d957f2226bc8010e386180206144c2362fad02b3331ebe300cc1d6088131d9 ...
getopt: unrecognized option: c

Cleaning up project directory and file based variables
00:01
ERROR: Job failed: exit code 1

Introduce versioning

Versioned releases should

  • be created automatically each time a new version-tag is pushed,
  • be documented in the README,
  • come with version-tagged Docker images,
  • follow the semver scheme.

Metadata input file

When calling Inara with the -m option the package accepts a metadata file used to compile the paper.
The goal of this issue is to define the format of the expected metadata file.

👋 @tarleb:

Proposal 1:
A YAML file with this structure/fields:

---
title: 'Nimbus: a Ruby gem to implement Random Forest algorithms in a genomic selection
  context'
tags:
- random forest
- genomics
- machine learning
- ruby
- open science
languages:
- Ruby
- TeX
authors:
- :given_name: Juanjo
  :middle_name:
  :last_name: Bazán
  :orcid: 0000-0001-7699-3983
  :affiliation: "Astroparticle Physics. CIEMAT, Madrid, Spain"
- :given_name: Oscar
  :middle_name:
  :last_name: Gonzalez-Recio
  :orcid: 0000-0002-9106-4063
  :affiliation: Genetics Department. INIA, Madrid, Spain
doi: 10.21105/joss.00351
software_repository_url: https://github.com/xuanxu/nimbus
reviewers:
- "@gemgon"
- "@pjotrp"
volume: 6
issue: 67
year: 2021
page: 15
journal_alias: joss
software_review_url: https://github.com/openjournals/joss-reviews/issues/351
archive_doi: ''
citation_string: 'Bazán et al., (2021). Nimbus: a Ruby gem to implement Random Forest
  algorithms in a genomic selection context. Journal of Open Source Software, 6(67),
  15, https://doi.org/10.21105/joss.00351'
editor:
  :github_user: "@xuanxu"
  :name: Juanjo Bazán
  :url: https://juanjobazan.com
  :orcid: 0000-0001-7699-3983
submitted_at: "12 July 2017"
published_at: "18 August 2017"

PROPOSAL 2: The same info but as JSON, no preference on my part.

Ideally any field could be empty or null, so for example when compiling a draft for a not-yet-published/under-review paper fields like editor, reviewers, archive_doi, published_at, etc would be empty. (I could fill them in with placeholder text/values if needed).

small unicode error?

Hi! When downloading tex files for, e.g., arxiv submission, I notice that a unicode error doesn't get appropriately written to tex (í --> ı́ ). Various tex compilers break to various degrees (pdflatex on Overleaf doesn't complain too much, arxiv breaks completely) unless the offending characters are replaced. Happy to provide more info or move this issue to a more appropriate repo!

The build process is being killed on M2 processor

I have the following script to compile my paper:

→ cat compile.sh
docker run --rm \
    --volume $PWD:/data \
    --user $(id -u):$(id -g) \
    --env JOURNAL=joss \
    openjournals/inara

Somewhere in the middle of the process I get "Killed" message.
In the beginning docker complains with the following warning:
WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested

I tried to set --platform linux/arm64/v8, but it seems that there is no such image available.

Empty metadata time values

When using inara to create a draft, published_at metadata will have no value, and sometimes submitted_at will also be empty.
Now when any of these values are null or an empty string this error is happening in the time filter:

[INFO] Running filter /usr/local/share/openjournals/data/filters/time.lua
Error running filter /usr/local/share/openjournals/data/filters/time.lua:
/usr/local/share/openjournals/data/filters/time.lua:8: bad argument #1 to 'for iterator' (table expected, got string)
stack traceback:
	[C]: in function 'next'
	/usr/local/share/openjournals/data/filters/time.lua:8: in upvalue 'copy_string_values'
	/usr/local/share/openjournals/data/filters/time.lua:21: in function 'Meta'

Inara should accept nil published_at/submitted_at values and compile the paper with an empty value there.

Can the latex template print the corresponding author's email in the paper's header?

In the example paper.md, the corresponding author adds their email: https://github.com/openjournals/inara/blob/main/example/paper.md?plain=1. As far as I can tell, the GitHub action does not print the corresponding author's email anywhere. It doesn't seem like the latex template is accessing this field. Is it possible to add this to the GitHub action? Some preprint servers ask authors to have at least one email on the preprint. Thanks!

Editor metadata ignored

It seems like currently the editor metadata is ignored when included in the metadata file.
The passed values are

editor:
  github_user: "xuanxu"
  name: Juanjo Bazán
  url: https://juanjobazan.com
  orcid: 0000-0001-7699-3983

sometimes all of the values will be null or empty (when compiling a draft before the review has an editor assigned), sometimes some of them will be null or empty (when editor has not provide url or orcid)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.