Skip to content

Commit d61c0ab

Browse files
committed
updating Julia template: simplification + auto generate README
1 parent 12e9522 commit d61c0ab

File tree

4 files changed

+95
-92
lines changed

4 files changed

+95
-92
lines changed

README.md

Lines changed: 28 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,34 @@
1+
# Template for contribution to Computo
2+
Jane Doe, John Doe
3+
2025-07-30
14

2-
# Computo template for Julia users
5+
*Template for preparing a submission to Computo, using the [quarto
6+
journal
7+
extension](https://github.com/computorg/computo-quarto-extension), the
8+
Julia 1-10 Jupyter kernel and the Julia `Pkg` manager to set-up the
9+
dependencies.
10+
For a detailed, step-by-step guide on preparing your article, setting up
11+
the continuous integration and submitting it to Computo, please consult
12+
the [guidelines for
13+
authors](https://computo-journal.org/site/guidelines-authors.html).*
314

4-
[![build and deploy](https://github.com/computorg/template-computo-julia/actions/workflows/build.yml/badge.svg)](https://github.com/computorg/template-computo-julia/actions/workflows/build.yml)
15+
[![build and
16+
publish](https://github.com/computorg/template-computo-julia/actions/workflows/build.yml/badge.svg)](https://github.com/computorg/template-computo-julia/actions/workflows/build.yml)
17+
[![Creative Commons
18+
License](https://i.creativecommons.org/l/by/4.0/80x15.png)](http://creativecommons.org/licenses/by/4.0/)
519

6-
Documentation and sample of a simple `Julia`-based submission for the [Computo journal](https://computo-journal.org), using our Quarto-based template and Julia github-action for handling dependencies.
20+
### Authors
721

8-
It shows how to automatically setup and build the HTML and PDF outputs, ready to submit to our peer-review platform.
22+
- [Jane Doe](https://janedoe.someplace.themoon.org) (Name of Affiliation
23+
one)
24+
- [John Doe](https://johndoe.someplace.themoon.org) (Name of
25+
Afficiliation two)
926

10-
:warning: **All important information about writing and preparing an article to be submitted to Computo, and related technicalities** are detailed [in the guidelines for authors](https://computo-journal.org/site/guidelines-authors.html). :warning:
27+
### Abstract
1128

29+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur
30+
posuere vestibulum facilisis. Aenean pretium orci augue, quis lobortis
31+
libero accumsan eu. Nam mollis lorem sit amet pellentesque ullamcorper.
32+
Curabitur lobortis libero eget malesuada vestibulum. Nam nec nibh massa.
33+
Pellentesque porttitor cursus tellus. Mauris urna erat, rhoncus sed
34+
faucibus sit amet, venenatis eu ipsum.

README.qmd

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
format: gfm
3+
---
4+
5+
_{{< meta description >}}_
6+
7+
[![build and publish](https://github.com/{{< meta github-user >}}/{{< meta repo >}}/actions/workflows/build.yml/badge.svg)](https://github.com/{{< meta github-user >}}/{{< meta repo >}}/actions/workflows/build.yml)
8+
[![Creative Commons License](https://i.creativecommons.org/l/by/4.0/80x15.png)](http://creativecommons.org/licenses/by/4.0/)
9+
10+
### Authors
11+
12+
- [{{< meta by-author.1.name.literal >}}]({{< meta by-author.1.url >}}) ({{< meta by-affiliation.1.name >}})
13+
- [{{< meta by-author.2.name.literal >}}]({{< meta by-author.2.url >}}) ({{< meta by-affiliation.2.name >}})
14+
15+
### Abstract
16+
17+
{{< meta abstract >}}
18+

_quarto.yml

Lines changed: 43 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,44 @@
11
project:
2-
title: "template-computo-julia"
2+
type: default
3+
render:
4+
- template-computo-julia.qmd
5+
- README.qmd
6+
7+
title: "Template for contribution to Computo"
8+
subtitle: "Example dedicated to `Julia` users"
9+
author:
10+
- name: Jane Doe
11+
corresponding: true
12+
13+
url: https://janedoe.someplace.themoon.org
14+
orcid: 0000-0000-0000-0000
15+
affiliations:
16+
- name: Name of Affiliation one
17+
department: Statistics
18+
url: https://someplace.themoon.org
19+
- name: John Doe
20+
21+
url: https://johndoe.someplace.themoon.org
22+
orcid: 0000-0000-0000-0000
23+
affiliations:
24+
- name: Name of Afficiliation two
25+
department: Computer Science
26+
url: https://someplace.themoon.org
27+
date: last-modified
28+
date-modified: last-modified
29+
description: |
30+
Template for preparing a submission to Computo, using the [quarto journal extension](https://github.com/computorg/computo-quarto-extension), the Julia 1-10 Jupyter kernel and the Julia `Pkg` manager to set-up the dependencies.
31+
32+
For a detailed, step-by-step guide on preparing your article, setting up the continuous integration and submitting it to Computo, please consult the [guidelines for authors](https://computo-journal.org/site/guidelines-authors.html).
33+
abstract: >+
34+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur posuere vestibulum facilisis. Aenean pretium orci augue, quis lobortis libero accumsan eu. Nam mollis lorem sit amet pellentesque ullamcorper. Curabitur lobortis libero eget malesuada vestibulum. Nam nec nibh massa. Pellentesque porttitor cursus tellus. Mauris urna erat, rhoncus sed faucibus sit amet, venenatis eu ipsum.
35+
keywords: [key1, key2, key3]
36+
bibliography: references.bib
37+
github-user: computorg
38+
repo: "template-computo-julia"
39+
draft: true # set to false once the build is running
40+
published: false # will be set to true once accepted
41+
format:
42+
computo-html: default
43+
computo-pdf: default
44+
jupyter: julia-1.10

template-computo-julia.qmd

Lines changed: 6 additions & 86 deletions
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,14 @@
1-
---
2-
title: "Template for contribution to Computo"
3-
subtitle: "Example dedicated to `Julia` users"
4-
author:
5-
- name: Jane Doe
6-
corresponding: true
7-
8-
url: https://janedoe.someplace.themoon.org
9-
orcid: 0000-0000-0000-0000
10-
affiliations:
11-
- name: Name of Affiliation one
12-
department: Statistics
13-
url: https://someplace.themoon.org
14-
- name: John Doe
15-
16-
url: https://johndoe.someplace.themoon.org
17-
orcid: 0000-0000-0000-0000
18-
affiliations:
19-
- name: Name of Afficiliation two
20-
department: Computer Science
21-
url: https://someplace.themoon.org
22-
date: last-modified
23-
date-modified: last-modified
24-
description: |
25-
This document provides a template based on the [`quarto`](https://quarto.org/) system for contributions to Computo, using the [`quarto journal extension`](https://github.com/computorg/computo-quarto-extension), the Julia 1-10 Jupyter and the Julia `Pkg` manager to set-up the dependencies.
26-
abstract: >+
27-
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur posuere vestibulum facilisis. Aenean pretium orci augue, quis lobortis libero accumsan eu. Nam mollis lorem sit amet pellentesque ullamcorper. Curabitur lobortis libero eget malesuada vestibulum. Nam nec nibh massa. Pellentesque porttitor cursus tellus. Mauris urna erat, rhoncus sed faucibus sit amet, venenatis eu ipsum.
28-
keywords: [key1, key2, key3]
29-
bibliography: references.bib
30-
github-user: computorg
31-
repo: "template-computo-julia"
32-
draft: true # set to false once the build is running
33-
published: false # will be set to true once accepted
34-
format:
35-
computo-html: default
36-
computo-pdf: default
37-
jupyter: julia-1.10
38-
---
391

402
# Introduction
413

424
## About this document
435

44-
This document, accompanied with the [hopefully finely tuned git repos](https://github.com/computorg/template-computo-julia/), provides a template for writing contributions to **Computo** [@computo]. We show how `Julia` code can be included and how the repository can be set up for triggering github actions for rendering the document, with dependencies handled by the built-in `Pkg` manager.
45-
46-
## Setup a github repository for preparing your submission
6+
This document, accompanied with the [hopefully finely tuned git repos](https://github.com/computorg/template-computo-julia/), provides a template for writing contributions to **Computo** [@computo].
477

48-
You can start by clicking the "use this template" button, on the top of the page of the [github repository associated to this document](https://github.com/computorg/template-computo-julia/). Of course, you can set your repository private during the preparation of your manuscript.
8+
::: {.callout-tip}
9+
## Note
10+
This document provides only the key formatting principles. For a detailed, step-by-step guide on preparing your article and submitting it to Computo, please consult the [guidelines for authors](https://computo-journal.org/site/guidelines-authors.html).
11+
:::
4912

5013
## Quarto
5114

@@ -61,20 +24,14 @@ quarto add computorg/computo-quarto-extension
6124

6225
[`Julia`](https://julialang.org/) and [`Jupyter`](https://jupyter.org/install) must be installed on your computer.
6326

64-
## Link with your usual tools
65-
66-
Quarto is expecting a `.qmd` markdown file, but will also works with a standard [Jupyter notebook](https://quarto.org/docs/get-started/hello/jupyter.html) file if you are used to it (it will just require to add the proper YAML metadata^[the same metadata as in the [`template-computo-julia.qmd` file](https://github.com/computorg/template-computo-julia/blob/main/template-computo-julia.qmd) in the first cell, type "Raw", of the notebook]).
67-
68-
**Note**: _More advanced Jupyter-related functionality like Myst/Jupyter book are not supported in this Quarto setup. The markdown syntax inside the Jupyter notebook should follow the Quarto syntax (c.f. [below](#formatting)). If you are more comfortable with using Myst/Jupyter book, we provide a [specific template](https://github.com/computorg/template-computo-myst) but it will requires more formatting work for Computo editorial team, thus highly encourage authors to use the Quarto templates._
69-
7027
# Formatting
7128

7229
This section covers basic formatting guidelines for quarto documents.
7330

7431
To render a document, run `quarto render`. By default, both PDF and HTML documents are generated:
7532

7633
```.bash
77-
quarto render template-computo-julia.qmd # will render both to html and PDF
34+
quarto render # will render both to html and PDF
7835
```
7936

8037
::: {.callout-tip}
@@ -237,43 +194,6 @@ Advanced formatting features are possible and documented (including interactive
237194

238195
:::
239196

240-
# Finalize your submission
241-
242-
## Handle `Julia` dependencies with `Pkg`
243-
244-
To make your work reproducible, you need to fix the packages and environment used to run your analysis. In `Julia`, the built-in `Pkg` package manager is a method of choice. [https://towardsdatascience.com/how-to-setup-project-environments-in-julia-ec8ae73afe9c](This simple tutorial shows how to set up a project).
245-
246-
In this tutorial, we simply need to add the `Plots` library and its dependencies. It is important that you also add `IJulia` to your project, since it is a required dependency for quarto to correclty render your document via Jupyter.
247-
248-
Once added via the `Pkg` manager of Julia (`add Plots; add IJulia`), the files `Project.toml` and `Manifest.toml` in the current project directory contains all the information required.
249-
250-
## Continuous integration
251-
252-
The repository associated with this template is pre-configure to trigger an action on push that performs the following:
253-
254-
1. Check out repository on the `ubuntu-latest` machine
255-
2. Install quarto and dependencies, including the Computo extension
256-
3. Install Julia (1.10) and dependencies based on the files `Project.toml` and `Manifest.toml`
257-
4. Render your .qmd file and Publish the results on a gh-page (both HTML and PDF)
258-
259-
The file [.github/workflows/build_n_publish.yml](https://github.com/computorg/template-computo-python/blob/main/.github/workflows/build_n_publish.yml) is largely inspired from [this file](https://quarto.org/docs/publishing/github-pages.html#example-jupyter-with-venv).
260-
261-
Once this is successful, you are ready to submit your manuscript to the [Computo submission platform](https://computo.scholasticahq.com/).
262-
263-
::: {.callout-warning}
264-
The first time, you possibly need to create the branch for the action to work. This can be done by running the following command from your computer, in your git repository:
265-
266-
```.bash
267-
quarto publish gh-pages
268-
```
269-
270-
Then, set the branch `gh-page` as the source of your github page, and trigger the action to check that everything works fine.
271-
:::
272-
273-
## Data and large files
274-
275-
If your submission materials contain files larger than 50MB, **especially data files**, they won’t fit on a git repository as is. For this reason, we encourage you to put your data or any materials you deem necessary on an external “open data” centered repository hub such a [Zenodo](https://zenodo.org/) or [OSF](https://osf.io/).
276-
277197
# References {.unnumbered}
278198

279199
::: {#refs}

0 commit comments

Comments
 (0)