Skip to content

Commit a75802b

Browse files
authored
Merge pull request #90 from StagPython/mkdocs
Migrate documentation to mkdocs
2 parents 7ca4334 + 0df98f4 commit a75802b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

72 files changed

+1324
-1490
lines changed

.github/workflows/docs.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: docs
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v[0-9]+.[0-9]+.[0-9]+'
7+
pull_request:
8+
branches:
9+
- master
10+
workflow_dispatch:
11+
12+
jobs:
13+
build:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v4
17+
with:
18+
fetch-depth: '0'
19+
- uses: actions/setup-python@v5
20+
with:
21+
python-version: 3.12
22+
- run: python3 -m pip install -U pip
23+
- run: python3 -m pip install -r docs/requirements.txt
24+
- run: python3 -m pip install .
25+
- run: mkdocs build
26+
env:
27+
STAGPY_DOC_CONFIG: 1
28+
- uses: actions/upload-pages-artifact@v3
29+
with:
30+
path: "site/"
31+
32+
deploy:
33+
needs: build
34+
if: github.ref == 'refs/heads/master'
35+
permissions:
36+
pages: write
37+
id-token: write
38+
environment:
39+
name: github-pages
40+
url: ${{ steps.deployment.outputs.page_url }}
41+
runs-on: ubuntu-latest
42+
steps:
43+
- uses: actions/deploy-pages@v4
44+
id: deployment

.gitignore

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,3 @@ stagpy.egg-info/
77
/build/
88
/stagpy/_version.py
99
/stagpy_git/
10-
docs/_build/
11-
docs/_static/
12-
docs/_templates/
13-
docs/sources/config_opts.rst

.readthedocs.yml

Lines changed: 0 additions & 16 deletions
This file was deleted.

README.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
[![PyPI - Version](https://img.shields.io/pypi/v/stagpy)](https://pypi.org/project/stagpy/)
2+
[![DOI on zenodo](https://zenodo.org/badge/DOI/10.5281/zenodo.5512348.svg)](https://doi.org/10.5281/zenodo.5512348)
3+
4+
StagPy
5+
======
6+
7+
StagPy is a command line tool to process the output files of your StagYY
8+
simulations and produce high-quality figures.
9+
10+
This command line tool is built around a generic interface that allows you to
11+
access StagYY output data directly in a Python script.
12+
13+
You can install StagPy with `pip` from the [Python Package
14+
Index](https://pypi.org/project/stagpy/).
15+
16+
If StagPy has been useful to your research, please consider citing the project
17+
as:
18+
19+
> Adrien Morison, Martina Ulvrova, Stephane Labrosse, & contributors. (2021).
20+
StagPython/StagPy. Zenodo. https://doi.org/10.5281/zenodo.5512348
21+
22+
or a specific version with the relevant DOI (e.g. for v0.15.0):
23+
24+
> Adrien Morison, Martina Ulvrova, Stephane Labrosse, & contributors. (2021).
25+
StagPython/StagPy (v0.15.0). Zenodo. https://doi.org/10.5281/zenodo.5512349

README.rst

Lines changed: 0 additions & 40 deletions
This file was deleted.

docs/Makefile

Lines changed: 0 additions & 20 deletions
This file was deleted.

docs/conf.py

Lines changed: 0 additions & 123 deletions
This file was deleted.
Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -2,59 +2,59 @@ Snapshots using command line
22
============================
33

44
For the examples here, simply copy and paste the command line in your
5-
shell, working in the directory where the StagYY par file is located.
5+
shell, working in the directory where the StagYY par file is located.
66
You can also use the examples on the data available in the Examples
7-
directory.
7+
directory.
88

99
The next use of stagpy is to create images of snapshots of the
1010
different fields.
1111

12-
::
13-
14-
% stagpy field -o T
12+
```sh title="shell"
13+
stagpy field -o T
14+
```
1515

1616
will plot the last snapshot of the temperature field.
1717

18-
::
19-
20-
% stagpy field -s : -o T-v3
18+
```sh title="shell"
19+
stagpy field -s : -o T-v3
20+
```
2121

2222
will plot all the snapshots of the temperature and the vertical/radial velocity
2323
on separate figures.
2424

25-
::
26-
27-
% stagpy field -s 3:8:2 -o T,stream
25+
```sh title="shell"
26+
stagpy field -s 3:8:2 -o T,stream
27+
```
2828

2929
will plot the temperature field with isocontours of the stream function from
3030
the third to the eighth snapshot, every two snapshots.
3131

32-
::
32+
```sh title="shell"
33+
stagpy field -o T -s 1,5 --vmin=0.8 --vmax=1.0
34+
```
3335

34-
% stagpy field -o T -s 1,5 --vmin=0.8 --vmax=1.0
35-
3636
will plot the temperature field from the first and the fifth snapshot while
3737
keeping the range of the colorbar fixed between 0.8 and 1.
3838

3939
List of variables to plot
4040
-------------------------
4141

42-
The list of fields specified with the ``-o`` (or ``--plot``) option follows the
43-
same rules as for the ``rprof`` and ``time`` subcommands. Namely,
44-
``,``-separated variables are on the same subplots; ``.``-separated variables
45-
are on the same figure but different subplots; ``-``-separated variables are
42+
The list of fields specified with the `-o` (or `--plot`) option follows the
43+
same rules as for the `rprof` and `time` subcommands. Namely,
44+
`,`-separated variables are on the same subplots; `.`-separated variables
45+
are on the same figure but different subplots; `-`-separated variables are
4646
on different figures.
4747

4848
Note that only two fields can be on the same subplot, the first field is a
4949
color map and the second field can be either:
5050

5151
- a scalar field, isocontours are added to the plot;
52-
- a vector field (e.g. ``v`` for the ``(v1, v2, v3)`` vector), arrows are added
52+
- a vector field (e.g. `v` for the `(v1, v2, v3)` vector), arrows are added
5353
to the plot.
5454

55-
For example, ``-o=T,v3`` asks for a temperature map with isocontour of the
56-
vertical velocity, while ``-o=T,v`` asks for a temperature map with velocity
55+
For example, `-o=T,v3` asks for a temperature map with isocontour of the
56+
vertical velocity, while `-o=T,v` asks for a temperature map with velocity
5757
vectors on top of it.
5858

5959
If you ask for more than two fields on the same subplot, extra fields are
60-
ignored. ``-o=T,stream,v`` is therefore equivalent to ``-o=T,stream``.
60+
ignored. `-o=T,stream,v` is therefore equivalent to `-o=T,stream`.

0 commit comments

Comments
 (0)