You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+15-5Lines changed: 15 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -5,17 +5,19 @@
5
5
6
6
Documentation and sample of a simple `Python`-based submission for the [Computo journal](https://computorg.github.io), using our Quarto-based template and `venv` for handling dependencies.
7
7
8
-
Shows how to automatically setup and build the HTML and PDF outputs, ready to submit to our peer-review platform.
8
+
It shows how to automatically setup and build the HTML and PDF outputs, ready to submit to our peer-review platform.
9
9
10
-
Additional details can be found [in the template manuscript](https://computo.sfds.asso.fr/template-computo-python).
10
+
:warning:**All important information about writing and preparing an article to be submitted to Computo, and related technicalities** are detailed [in the template manuscript](https://computo.sfds.asso.fr/template-computo-python). :warning:
11
11
12
-
## Process overview
12
+
More information about submission and **guidelines for authors** can be found on the [dedicated page](https://computo.sfds.asso.fr/submit/).
13
+
14
+
## Process overview
13
15
14
16
Submissions to [Computo](https://computorg.github.io) require both scientific content (typically equations, codes and figures, data) and a proof that this content is reproducible. This is achieved by means of i) a notebook system, ii) a virtual environment fixing the dependencies and iii) continuous integration (plus, if needed, an external website to store large data files such a [Zenodo](https://zenodo.org/) or [OSF](https://osf.io/) ).
15
17
16
18
A Computo submission is thus a git(hub) repository like this one containing
17
19
18
-
- the source files of the notebook (a quarto .qmd file + a BibTeX .bib file + some statics files, _e.g._ figures or small .csv data tables)
20
+
- the source files of the notebook (a quarto `.qmd` file + a BibTeX `.bib` file + some statics files, _e.g._ figures or small `.csv` data tables)
19
21
- configuration files to set up the dependencies in a virtual environment
20
22
- configuration files to set up the continuous integration rendering the final documents
21
23
@@ -29,7 +31,7 @@ In this template, we focus on `Python` users and detail a solution based on
29
31
30
32
### Step 0: setup a git repository
31
33
32
-
Use this repository as a template via the "use this template" button on the top of this page.
34
+
Use this repository as a template via the **"use this template"** button on the top of this page.
33
35
34
36
**Note**: _You can use Gitlab for submitting for Computo. We hope giving more support in the future._
35
37
@@ -48,10 +50,18 @@ Write your notebook as usual, [as demonstrated in the `template-computo-python.q
48
50
49
51
**Note**: _Make sure that you are able to build your manuscript as a standard notebook on your system before proceeding to the next step._
50
52
53
+
To build your document (both in PDF and HTML by default), you can run the command `quarto render`, e.g. for the template:
54
+
55
+
```.bash
56
+
quarto render template-computo-python.qmd # will render both to html and PDF
57
+
```
58
+
51
59
### Step 3: setup dependencies with `venv`
52
60
53
61
Use the [`venv` package manager](https://cewing.github.io/training.python_web/html/presentations/venv_intro.html) to setup a reproducible environment handling your `Python` dependencies.
54
62
63
+
See [this page](https://computo.sfds.asso.fr/template-computo-python/#handle-python-dependencies-with-venv) for more details about `Python` dependency setup.
64
+
55
65
### Step 4: proof reproducibility
56
66
57
67
Put everything together and check that your work is indeed reproducible. To this end, you need to rely on a github action, whose default is pre-configured and found here: [.github/workflows/build.yml](https://github.com/computorg/template-computo-R/blob/main/.github/workflows/build_n_publish.yml)
Copy file name to clipboardExpand all lines: template-computo-python.qmd
+24-6Lines changed: 24 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -52,19 +52,31 @@ This document, accompanied by the [customized GitHub repository](https://github.
52
52
53
53
## Setup a GitHub repository for preparing your submission
54
54
55
-
You can start by clicking the "use this template" button, on the top of the page of the [github repository associated with this document](https://github.com/computorg/template-computo-python/). Of course, you can set your repository private during the preparation of your manuscript.
55
+
You can start by clicking on the **"use this template"** button, on the top of the page of the [github repository associated with this document](https://github.com/computorg/template-computo-python/). Of course, you can set your repository private during the preparation of your manuscript.
56
56
57
57
## Quarto
58
58
59
+
[Quarto](https://quarto.org/) is a versatile formatting system for authoring documents integrating markdown, LaTeX and code blocks interpreted either via Jupyter or Knitr (thus supporting Python, R and Julia). It relies on the [Pandoc](https://pandoc.org/MANUAL.html) document converter.
60
+
61
+
## Requirements
62
+
59
63
You need [quarto](https://quarto.org/docs/get-started/) installed on your system and the [Computo extension](https://github.com/computorg/computo-quarto-extension) to prepare your document. For the latter, once quarto is installed, run the following to install the extension in the current directory (it creates an `_extension` directory which is ignored by git thanks to `.gitignore` by default):
60
64
61
65
```.bash
62
66
quarto add computorg/computo-quarto-extension
63
67
```
64
68
69
+
[`Python`](https://www.python.org/) and [`Jupyter`](https://jupyter.org/install) must be installed on your computer.
70
+
71
+
## Link with your usual tools
72
+
73
+
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-python.qmd` file](https://github.com/computorg/template-computo-python/blob/main/template-computo-python.qmd) in the first cell, type "Raw", of the notebook]).
74
+
75
+
**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._
76
+
65
77
# Formatting
66
78
67
-
This section covers basic formatting guidelines for [Quarto](https://quarto.org/), a versatile formatting system for authoring documents integrating markdown, LaTeX and code blocks interpreted either via Jupyter or Knitr (thus supporting Python, R or Julia). It relies on the [Pandoc](https://pandoc.org/MANUAL.html) document converter.
79
+
This section covers basic formatting guidelines for quartodocuments.
68
80
69
81
To render a document, run `quarto render`. By default, both PDF and HTML documents are generated:
70
82
@@ -135,7 +147,7 @@ See @thm-slln.
135
147
136
148
## Python Code
137
149
138
-
Quarto uses either Jupyter or knitr to render code chunks. This can be triggered in the yaml header. In this tutorial, we use `Jupyter` (`Python` and `Jupyter` must be installed on your computer).
150
+
Quarto uses either Jupyter or knitr to render code chunks. This can be triggered in the yaml header. In this tutorial, we use `Jupyter`(`Python` and `Jupyter` must be installed on your computer).
139
151
140
152
```yaml
141
153
---
@@ -217,9 +229,12 @@ Advanced formatting features are possible and documented (including interactive
217
229
::: {.callout-warning}
218
230
## More information
219
231
220
-
-[The Quarto web site](https://quarto.org) for comprehensive documentation.
232
+
-[The Quarto web site](https://quarto.org) for comprehensive documentation, including:
-[The template distributed with the Computo Quarto extension](https://computo.sfds.asso.fr/published-paper-tsne/), which uses such advanced features.
237
+
-[The template distributed with the Computo Quarto extension](https://computo.sfds.asso.fr/computo-quarto-extension/), which uses such advanced features.
223
238
224
239
-[Our mock version of the t-SNE paper](https://computo.sfds.asso.fr/published-paper-tsne/), a full and advanced example using Python and the Jupyter kernel.
225
240
@@ -300,8 +315,11 @@ Then, set the branch `gh-page` as the source of your github page, and trigger th
300
315
301
316
[The build and deploy process of our Computo quarto extension](https://github.com/computorg/computo-quarto-extension/blob/main/.github/workflows/build.yml) shows how `miniconda` can be set used in place of `venv`. The main striking difference is the use of a `environment.yml` file in place of `requirements.txt`.
302
317
318
+
## Data and large files
319
+
320
+
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/).
0 commit comments