Skip to content

Commit 6709b8d

Browse files
authored
Merge pull request #3 from computorg/minor_modif1
Minor modifications and improvements
2 parents 3c655d0 + 733fc00 commit 6709b8d

File tree

2 files changed

+39
-11
lines changed

2 files changed

+39
-11
lines changed

README.md

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,19 @@
55

66
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.
77

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.
99

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:
1111

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
1315

1416
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/) ).
1517

1618
A Computo submission is thus a git(hub) repository like this one containing
1719

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)
1921
- configuration files to set up the dependencies in a virtual environment
2022
- configuration files to set up the continuous integration rendering the final documents
2123

@@ -29,7 +31,7 @@ In this template, we focus on `Python` users and detail a solution based on
2931

3032
### Step 0: setup a git repository
3133

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.
3335

3436
**Note**: _You can use Gitlab for submitting for Computo. We hope giving more support in the future._
3537

@@ -48,10 +50,18 @@ Write your notebook as usual, [as demonstrated in the `template-computo-python.q
4850

4951
**Note**: _Make sure that you are able to build your manuscript as a standard notebook on your system before proceeding to the next step._
5052

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+
5159
### Step 3: setup dependencies with `venv`
5260

5361
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.
5462

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+
5565
### Step 4: proof reproducibility
5666

5767
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)

template-computo-python.qmd

Lines changed: 24 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -52,19 +52,31 @@ This document, accompanied by the [customized GitHub repository](https://github.
5252

5353
## Setup a GitHub repository for preparing your submission
5454

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.
5656

5757
## Quarto
5858

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+
5963
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):
6064

6165
```.bash
6266
quarto add computorg/computo-quarto-extension
6367
```
6468

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+
6577
# Formatting
6678

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 quarto documents.
6880

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

@@ -135,7 +147,7 @@ See @thm-slln.
135147

136148
## Python Code
137149

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).
139151

140152
``` yaml
141153
---
@@ -217,9 +229,12 @@ Advanced formatting features are possible and documented (including interactive
217229
::: {.callout-warning}
218230
## More information
219231

220-
- [The Quarto web site](https://quarto.org) for comprehensive documentation.
232+
- [The Quarto web site](https://quarto.org) for comprehensive documentation, including:
233+
+ [Tutorial](https://quarto.org/docs/get-started/)
234+
+ [User guide](https://quarto.org/docs/guide/)
235+
+ [Options reference](https://quarto.org/docs/reference/)
221236

222-
- [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.
223238

224239
- [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.
225240

@@ -300,8 +315,11 @@ Then, set the branch `gh-page` as the source of your github page, and trigger th
300315

301316
[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`.
302317

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/).
321+
303322
# References {.unnumbered}
304323

305324
::: {#refs}
306325
:::
307-

0 commit comments

Comments
 (0)