Skip to content

Commit

Permalink
Improve doc (no graphviz) (and fix readthedocs build?)
Browse files Browse the repository at this point in the history
  • Loading branch information
paugier committed Dec 1, 2022
1 parent 47f66cb commit 3a41044
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ build:
- build-essential
- gfortran
- libopenmpi-dev
- graphviz
# - graphviz
jobs:
pre_install:
- git clone --depth=1 https://github.com/snek5000/Nek5000.git /home/docs/Nek5000
Expand Down
2 changes: 1 addition & 1 deletion docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,4 @@ cleanall: clean
@rm -rf _generated/*

format:
mdformat --wrap 88 *.md
mdformat --wrap 88 .
1 change: 1 addition & 0 deletions docs/how-to/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ maxdepth: 1
---
restart.md
history_points.md
snek-make.md
```

## For developer of Snek5000 solvers
Expand Down
4 changes: 2 additions & 2 deletions docs/how-to/restart.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ Moreover, there are with Nek5000 two different methods to restart a simulation:
toolbox).

With Snek5000, restarting can be done with the command line `snek-restart` (recommanded)
or with a Python function {func}`snek5000.load_for_restart`. In this page, with
focus on the former method.
or with a Python function {func}`snek5000.load_for_restart`. In this page, with focus on
the former method.

One can get the documentation of the command with

Expand Down
34 changes: 34 additions & 0 deletions docs/how-to/snek-make.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
---
jupytext:
formats: ipynb,md:myst
text_representation:
extension: .md
format_name: myst
format_version: 0.13
jupytext_version: 1.14.1
kernelspec:
display_name: Python 3 (ipykernel)
language: python
name: python3
---

# How to execute Snakemake commands from a directory

Sometimes, it can be useful to execute the Snakemake targets without Python coding from
the directory of a simulation. Calling directly Snakemake can be slightly difficult so
there is a Snek5000 command, `snek-make`, for this task. The help of this function can
be obtained with (the `!` is for calling a command in Jupyter):

```{code-cell} ipython3
!snek-make -h
```

From a simulation directory, `snek-make -l` lists the available targets. One can do for
example:

```bash
snek-make cleanall
snek-make compile
snek-make show_config
snek-make run_fg
```

0 comments on commit 3a41044

Please sign in to comment.