Skip to content

Commit dcdf5b5

Browse files
committed
Pass on template, ignore latex auxiliary files
1 parent a72865b commit dcdf5b5

File tree

2 files changed

+20
-15
lines changed

2 files changed

+20
-15
lines changed

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,8 @@ _extensions/
88
/.quarto/
99
/.joblib
1010
/_extensions/
11+
12+
# Latex compilation files:
13+
*.aux
14+
*.log
15+
*.toc

template-computo-python.qmd

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -48,34 +48,34 @@ jupyter: python3
4848

4949
## About this document
5050

51-
This document, accompanied with the [hopefully finely tuned git repos](https://github.com/computorg/template-computo-python/), provides a template for writing contributions to **Computo** [@computo]. We show how `Python` code can be included and how the repository can be set up for triggering github actions for rendering the document, with dependencies handled by `venv/pip`.
51+
This document, accompanied by the [customized GitHub repository](https://github.com/computorg/template-computo-python/), provides a template for writing contributions to **Computo** [@computo]. We show how `Python` code can be included and how the repository can be set up for triggering GitHub actions for rendering the document, with dependencies handled by `venv` and `pip`.
5252

53-
## Setup a github repository for preparing your submission
53+
## 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 to 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 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-
You need [quarto](https://quarto.org/) 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 a `_extension` directory which is ignored by git thanks to `.gitignore` by default):
59+
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):
6060

6161
```.bash
6262
quarto add computorg/computo-quarto-extension
6363
```
6464

6565
# Formatting
6666

67-
This section covers basic formatting guidelines for [Quarto](https://quarto.org/), a versatile formatting system for authoring document integrating markdown, LaTeX and various code block interpreted either via Jupyter or Knitr (and thus dealing with Python, R or Julia). It relies on the [Pandoc](https://pandoc.org/MANUAL.html) document converter.
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.
6868

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

7171
```.bash
72-
quarto render template-computo-python.qmd # will render both to html and PDF
72+
quarto render template-computo-python.qmd # renders both HTML and PDF
7373
```
7474

7575
::: {.callout-tip}
7676
## Note
7777

78-
To check the syntax of the formatting below, you can use the `</> source` button at the top left of this document.
78+
To check the syntax of the formatting below, you can use the `</> source` button at the top right of this document.
7979
:::
8080

8181
## Basic markdown formatting
@@ -135,7 +135,7 @@ See @thm-slln.
135135

136136
## Python Code
137137

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

140140
``` yaml
141141
---
@@ -237,7 +237,7 @@ To make your work reproducible, you need to fix the packages and environment use
237237
python3 -m venv my_env
238238
```
239239

240-
and activate it
240+
and activate it
241241

242242
``` .bash
243243
source my_env/bin/activate
@@ -249,7 +249,7 @@ Then installed the packages required to perform your analysis. Here,
249249
python3 -m pip install jupyter matplotlib numpy
250250
```
251251

252-
Once you are all set up, you need to save your working environment into a file so that anyone can reproduce your analysis on his/her side:
252+
Once you are all set up, you need to save your working environment into a file so that anyone can reproduce your analysis on their side:
253253

254254
``` .bash
255255
python3 -m pip freeze > requirements.txt
@@ -265,19 +265,19 @@ numpy
265265

266266
::: {.callout-important}
267267
`requirements.txt` is the only file that needs to be versioned by git.
268-
:::
268+
:::
269269

270270
More details for using `venv` and `pip` can be found on the [quarto page dedicated to environments](https://quarto.org/docs/projects/virtual-environments.html#using-venv).
271271

272272
### What about `conda`?
273273

274-
For `conda` user, it is also possible to follow the same path with your favorite version of `conda`. There is a [quarto page dedicated to the conda environments](https://quarto.org/docs/projects/virtual-environments.html#using-conda).
274+
For `conda` users, it is also possible to follow the same path with your favorite version of `conda`. There is a [quarto page dedicated to the conda environments](https://quarto.org/docs/projects/virtual-environments.html#using-conda).
275275

276276
## Continuous integration
277277

278-
The repository associated with this template is pre-configure to trigger an action on push that performs the following:
278+
The repository associated with this template is pre-configured to trigger an action on push that performs the following:
279279

280-
1. Check out repository on the `ubuntu-latest` machine
280+
1. Check out the repository on an `ubuntu-latest` machine
281281
2. Install quarto and dependencies, including the Computo extension
282282
3. Install Python (3.10) and dependencies with `venv`, using your `requirements.txt` file
283283
4. Render your .qmd file and Publish the results on a gh-page (both HTML and PDF)
@@ -294,7 +294,7 @@ quarto publish gh-pages
294294
```
295295

296296
Then, set the branch `gh-page` as the source of your github page, and trigger the action to check that everything works fine.
297-
:::
297+
:::
298298

299299
### What about CI and `conda`?
300300

0 commit comments

Comments
 (0)