Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions .github/workflows/joss.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: JOSS Paper
on:
push:
paths:
- doc/paper/**
- .github/workflows/joss.yml
schedule:
- cron: '17 3 * * 0'

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
paper:
runs-on: ubuntu-latest
name: Paper Draft
steps:
- name: Checkout
uses: actions/checkout@v5

- name: Build draft PDF
uses: openjournals/openjournals-draft-action@master
with:
journal: joss
paper-path: doc/paper/paper.md

- name: Upload
uses: actions/upload-artifact@v4
with:
name: paper
path: doc/paper/paper.pdf

# vim: sw=4
5 changes: 5 additions & 0 deletions doc/paper/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
.inara
joss
*.pdf
*.tex
latex.out
77 changes: 77 additions & 0 deletions doc/paper/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
OUTDIR?=latex.out
TEXMK?=latexmk -verbose -pdflua -output-directory=$(OUTDIR)

INARA_PATH := .inara
TARGET_FOLDER := $$(pwd)/publishing-artifacts

JOURNAL := joss
INARA_DATA_PATH := $(INARA_PATH)/data
OPENJOURNALS_PATH := $(INARA_PATH)/resources
ARTICLE_INFO_FILE = $(OPENJOURNALS_PATH)/default-article-info.yaml

all: paper
.PHONY: all

help: ## Show this help
@echo -e "\nSpecify a command. The choices are:\n"
@grep -E '^[0-9a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf " \033[0;36m%-12s\033[m %s\n", $$1, $$2}'
@echo ""
.PHONY: help

%.pdf: %.tex
PYTHONWARNINGS=ignore $(TEXMK) $<
@cp $(OUTDIR)/$@ .

paper: paper.md paper.bib ## Compile paper to PDF using JOSS tools
mkdir -p $(TARGET_FOLDER)
make -C $(INARA_PATH) -B resources/footer.csl
INARA_ARTIFACTS_PATH=$(TARGET_FOLDER)/ pandoc \
--data-dir=$(INARA_DATA_PATH) \
--defaults=$(INARA_DATA_PATH)/defaults/shared.yaml \
--defaults=$(INARA_DATA_PATH)/defaults/pdf.yaml \
--defaults=$(OPENJOURNALS_PATH)/$(JOURNAL)/defaults.yaml \
--resource-path=$$(pwd):$(OPENJOURNALS_PATH) \
--metadata=article-info-file=$(ARTICLE_INFO_FILE) \
--variable=$(JOURNAL) \
--output=$@.tex \
$<
make paper.pdf
.PHONY: paper

inara: ## Download JOSS tools (inara) for compilation
@if [ ! -d "$(INARA_PATH)" ]; then \
git clone git@github.com:openjournals/inara.git $(INARA_PATH); \
else \
cd $(INARA_PATH) && git pull origin main; \
fi
mkdir -p joss
cp $(INARA_PATH)/resources/joss/logo.png joss/logo.png
.PHONY: inara

tidy: paper.bib ## Clean up bibliography (with bibtex-tidy)
@bibtex-tidy \
--modify \
--sort \
--sort-fields \
--drop-all-caps \
--merge last \
--numeric \
--strip-enclosing-braces \
--trailing-commas \
--blank-lines \
--remove-empty-fields \
--remove-dupe-fields \
--wrap \
$<
.PHONY: tidy

clean: ## Remove temporary files generated by JOSS tools
rm -rf $(TARGET_FOLDER)
rm -rf $(OUTDIR)
.PHONY: clean

purge: clean
rm -rf paper.pdf
rm -rf .inara
.PHONY: purge

41 changes: 41 additions & 0 deletions doc/paper/images/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
OUTDIR?=latex.out
TEXMK?=latexmk -verbose -pdf -output-directory=$(OUTDIR)
PYTHON?=python -X dev

all: figures

help: ## Show this help
@echo -e "\nSpecify a command. The choices are:\n"
@grep -E '^[0-9a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf " \033[0;36m%-12s\033[m %s\n", $$1, $$2}'
@echo ""
.PHONY: help

%.pdf: %.tex
PYTHONWARNINGS=ignore $(TEXMK) $<
@cp $(OUTDIR)/$@ .

%.png: %.pdf
magick \
-density 600 \
$< \
-quality 100 \
-background white \
-alpha remove \
$@

quadrature_rules.png:
magick \
quadrature_rule_vr_order_11_2d.png \
\( -size 900x`identify -format "%h" quadrature_rule_vr_order_11_2d.png` xc:white \) \
quadrature_rule_wv_order_11_2d.png \
+append \
-background white \
quadrature_rules.png

figures: simplices quadratures ## Compile all figures
for img in simplices.png pkdo-2d.png quadrature_rules.png; do \
magick "$${img}" -trim +repage "$${img}"; \
done

simplices: simplices.png
quadratures: quadrature_rules.png
Binary file added doc/paper/images/pkdo-2d.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/paper/images/quadrature_rules.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/paper/images/simplices.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
66 changes: 66 additions & 0 deletions doc/paper/images/simplices.tex
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
\documentclass[tikz]{standalone}
\usepackage{tikz}
\usepackage{amsmath}

\renewcommand\familydefault{\sfdefault}

\begin{document}
\large

\begin{tikzpicture}[scale=2]
\definecolor{VertexBlue}{HTML}{4C72B0};
\definecolor{LineBlue}{HTML}{4C72B0};
\definecolor{FaceBlue}{HTML}{D2DBEB};
\definecolor{FaceDarkBlue}{HTML}{C0CDE3};

% 1-simplex
\begin{scope}[shift={(0, 0)}]
\draw[LineBlue, ultra thick] (0, 1) -- (1.5, 1);
\fill[VertexBlue] (0, 1) circle (2pt);
\fill[VertexBlue] (1.5, 1) circle (2pt);
\node at (0.75, -0.5) {1-simplex};
\end{scope}

% 2-simplex
\begin{scope}[shift={(3, 0)}]
\coordinate (A) at (0, 0);
\coordinate (B) at (2, 0);
\coordinate (C) at (0, 2);

\fill[FaceBlue] (A) -- (B) -- (C) -- cycle;
\draw[LineBlue, ultra thick] (A) -- (B) -- (C) -- cycle;
\foreach \p in {A,B,C}
\fill[VertexBlue] (\p) circle (2pt);

\node at (1, -0.5) {2-simplex};
\end{scope}

% 3-simplex
\begin{scope}[shift={(6.5, 0)}]
\coordinate (O) at (0, 0.5, 0);
\coordinate (X) at (2, 0.5, 0);
\coordinate (Y) at (0.75, 2, 0);
\coordinate (Z) at (0.75, 0.0, 0.0);

% faces
\fill[FaceBlue] (O) -- (X) -- (Y) -- cycle;
\fill[FaceBlue] (O) -- (X) -- (Z) -- cycle;
\fill[FaceDarkBlue] (X) -- (Y) -- (Z) -- cycle;
\fill[FaceBlue] (Y) -- (O) -- (Z) -- cycle;

% edges
\draw[LineBlue, ultra thick] (X) -- (Y) -- (O);
\draw[LineBlue!60, ultra thick] (O) -- (X);
\draw[LineBlue, ultra thick] (O) -- (Z);
\draw[LineBlue, ultra thick] (X) -- (Z);
\draw[LineBlue, ultra thick] (Y) -- (Z);

% vertices
\foreach \p in {O,X,Y,Z}
\fill[VertexBlue] (\p) circle (2pt);

\node at (1, -0.5, 0) {3-simplex};
\end{scope}
\end{tikzpicture}

\end{document}
Loading
Loading