Skip to content

Commit

Permalink
removed 1_ and 0_ from into and getting started files
Browse files Browse the repository at this point in the history
  • Loading branch information
mduncans committed Jan 8, 2025
1 parent 4311b4d commit 798b41e
Show file tree
Hide file tree
Showing 9 changed files with 13 additions and 13 deletions.
4 changes: 2 additions & 2 deletions astro.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ export default defineConfig({
label: 'User Guide',
// introduce slurmtools and describe what it does
items: [
{ label: 'Introduction', slug: 'guides/0_intro'},
{ label: 'Getting started', slug: 'guides/1_getting_started' },
{ label: 'Introduction', slug: 'guides/intro'},
{ label: 'Getting started', slug: 'guides/getting_started' },
// introduce submit functionality and how the tutorials work together
{
label: 'Submitting a job',
Expand Down
4 changes: 2 additions & 2 deletions src/content/docs/blogs/nmm_template.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ This guide describes how to create a template file that uses [`nmm`](https://git
</Steps>

## nmm template file
Below is a simple template file that can be used to submit NONMEM jobs to slurm with [`nmm`](https://github.com/a2-ai/nonmem-monitor).
Below is a simple template file that can be used to submit NONMEM jobs to slurm with [`nmm`](https://github.com/a2-ai/nonmem-monitor)<span style={{ display: 'inline-block', verticalAlign: 'middle' }}><Icon name="external" /></span>.

import tmpl from '/src/code/nmm-template.tmpl?raw';

<Code title='slurm-job.tmpl' lang='bash' code={tmpl}/>

The template file uses the [whisker package](https://github.com/edwindj/whisker?tab=readme-ov-file)<span style={{ display: 'inline-block', verticalAlign: 'middle' }}><Icon name="external" /></span> to fill in variables according to the [Mustache templating standard](https://mustache.github.io). When `submit_slurm_job` is called, it reads the template file and injects both the [default values provided to the template](/reference/values_provided_to_template) and any values passed in via the [`slurm_template_opts` argument](/reference/submit_slurm_job_reference#using-the-slurm_template_opts-argument). Variables in the template file are denoted with double curly brackets, such as `{{ injected_variable }}`, and these placeholders are replaced with the respective values when submit_slurm_job runs.
The template file uses the [whisker package](https://github.com/edwindj/whisker?tab=readme-ov-file)<span style={{ display: 'inline-block', verticalAlign: 'middle' }}><Icon name="external" /></span> to fill in variables according to the [Mustache templating standard](https://mustache.github.io)<span style={{ display: 'inline-block', verticalAlign: 'middle' }}><Icon name="external" /></span>. When `submit_slurm_job` is called, it reads the template file and injects both the [default values provided to the template](/reference/values_provided_to_template) and any values passed in via the [`slurm_template_opts` argument](/reference/submit_slurm_job_reference#using-the-slurm_template_opts-argument). Variables in the template file are denoted with double curly brackets, such as `{{ injected_variable }}`, and these placeholders are replaced with the respective values when submit_slurm_job runs.

<Aside type="note">
If a variable in the template file is not supplied to `submit_slurm_job`, it will remain blank in the final output.
Expand Down
2 changes: 1 addition & 1 deletion src/content/docs/blogs/simple_notifications.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,6 @@ import submit from '/src/code/ntfy-submit.R?raw';
<Code title='ntfy-submit.R' lang='r' code={submit}/>

## Job status alerts
This sends off two messages to [ntfy.sh](https://ntfy.sh):
This sends off two messages to [ntfy.sh](https://ntfy.sh)<span style={{ display: 'inline-block', verticalAlign: 'middle' }}><Icon name="external" /></span>:

![](/slurmtools-docs/ntfy_sh.png)
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ and a helper function:
5. [generate_nmm_config](/slurmtools-docs/guides/generate_nmm_config) - which helps setup [nmm](https://github.com/a2-ai/nonmem-monitor) - a NONMEM monitor tool
</Steps>

Ready to dive into `slurmtools`? Head over to the [getting started guide](/slurmtools-docs/guides/1_getting_started) to get setup using `slurmtools` or check out our function-specific guides for detailed insights and advanced tips!
Ready to dive into `slurmtools`? Head over to the [getting started guide](/slurmtools-docs/guides/getting_started) to get setup using `slurmtools` or check out our function-specific guides for detailed insights and advanced tips!
2 changes: 1 addition & 1 deletion src/content/docs/guides/simple_template_file.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ pagefind: true

import { Aside, Code, Icon } from '@astrojs/starlight/components';

When calling `submit_slurm_job(mod)` the template file supplied through [`slurmtools` options](/slurmtools-docs/guides/1_getting_started#slurmtools-options), or the [`slurm_job_template_path` argument](/slurmtools-docs/reference/submit_slurm_job_reference#using-the-slurm_job_template_path-argument) is populated and submitted to slurm as a bash job. This setup offers extensive customization options through `slurmtools`, allowing you to adapt job configurations to suit your specific needs.
When calling `submit_slurm_job(mod)` the template file supplied through [`slurmtools` options](/slurmtools-docs/guides/getting_started#slurmtools-options), or the [`slurm_job_template_path` argument](/slurmtools-docs/reference/submit_slurm_job_reference#using-the-slurm_job_template_path-argument) is populated and submitted to slurm as a bash job. This setup offers extensive customization options through `slurmtools`, allowing you to adapt job configurations to suit your specific needs.

## Simple template file

Expand Down
4 changes: 2 additions & 2 deletions src/content/docs/guides/submit_slurm_job.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ pagefind: true
---
import { Aside, Code, Steps, Icon } from '@astrojs/starlight/components';

This guide describes how to submit a NONMEM job to slurm using the `submit_slurm_job` function. First, make sure you have loaded `slurmtools` and are familiar with the [needed options](/slurmtools-docs/guides/1_getting_started) to use slurmtools.
This guide describes how to submit a NONMEM job to slurm using the `submit_slurm_job` function. First, make sure you have loaded `slurmtools` and are familiar with the [needed options](/slurmtools-docs/guides/getting_started) to use slurmtools.

## Prerequisites

Expand All @@ -21,7 +21,7 @@ To use `submit_slurm_job` you need a few things set before hand
Once these are set, you're ready to roll with your Slurm submission!

## Submitting a NONMEM job
Here's the code you'll use to submit a job with `submit_slurm_job`, this uses default values for all arguments, many of which are determined via the `slurmtools` options discussed [here](/slurmtools-docs/guides/1_getting_started).
Here's the code you'll use to submit a job with `submit_slurm_job`, this uses default values for all arguments, many of which are determined via the `slurmtools` options discussed [here](/slurmtools-docs/guides/getting_started).

import submit_code from '/src/code/submit.R?raw';

Expand Down
2 changes: 1 addition & 1 deletion src/content/docs/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ hero:
file: ../../assets/slurmtools.png
actions:
- text: Slurmtools User Guide
link: guides/0_intro/
link: guides/intro/
icon: right-arrow
- text: Explore the slurmtools repository
link: https://github.com/a2-ai/slurmtools/
Expand Down
6 changes: 3 additions & 3 deletions src/content/docs/reference/submit_slurm_job_reference.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -67,14 +67,14 @@ $partition
```

### Using the `slurm_job_template_path` argument
By default, `submit_slurm_job` uses `getOption('slurmtools.slurm_job_template_path')` for the path to the template file (see [Getting Started Guide](/slurmtools-docs/guides/1_getting_started) if you're unfamiliar with the `slurmtools` options). You can update this argument to use a different template file as needed.
By default, `submit_slurm_job` uses `getOption('slurmtools.slurm_job_template_path')` for the path to the template file (see [Getting Started Guide](/slurmtools-docs/guides/getting_started) if you're unfamiliar with the `slurmtools` options). You can update this argument to use a different template file as needed.

import submit_code_path from '/src/code/submit_path.R?raw';

<Code title="submit_job.R" lang="r" code={submit_code_path}/>

### Using the `submission_root` argument
This directory is used to track submission scripts and output. It will be populated with the shell scripts created from filling in the template file when calling `submit_slurm_job` and the stdout/stderr from the bash script. If you would like to set it and forget it use the `slurmtools` option `options('slurmtools.submission_root')` (see the [Getting Started Guide](/slurmtools-docs/guides/1_getting_started) if you are unfamiliar with this option). If you'd like to set this at runtime simply provide the path to the directory you'd like to save the output to.
This directory is used to track submission scripts and output. It will be populated with the shell scripts created from filling in the template file when calling `submit_slurm_job` and the stdout/stderr from the bash script. If you would like to set it and forget it use the `slurmtools` option `options('slurmtools.submission_root')` (see the [Getting Started Guide](/slurmtools-docs/guides/getting_started) if you are unfamiliar with this option). If you'd like to set this at runtime simply provide the path to the directory you'd like to save the output to.

import submit_code_root from '/src/code/submit_path.R?raw';

Expand All @@ -85,7 +85,7 @@ If the directory does not exists, `submit_slurm_job` will create it.
</Aside>

### Using the `bbi_config_path` argument
If you are using [`bbi`](https://github.com/metrumresearchgroup/bbi)<Icon name='external'/> to submit nonmem jobs this specifies the path to the bbi config file `bbi.yaml`. By default, `submit_slurm_job` uses the `slurmtools` option `options('slurmtools.bbi_config_path)` (see the [Getting Started Guide](/slurmtools-docs/guides/1_getting_started) if you are unfamiliar with this option). If you would like to use a different configuration for `bbi` you can specify the path to a new config file and use that.
If you are using [`bbi`](https://github.com/metrumresearchgroup/bbi)<Icon name='external'/> to submit nonmem jobs this specifies the path to the bbi config file `bbi.yaml`. By default, `submit_slurm_job` uses the `slurmtools` option `options('slurmtools.bbi_config_path)` (see the [Getting Started Guide](/slurmtools-docs/guides/getting_started) if you are unfamiliar with this option). If you would like to use a different configuration for `bbi` you can specify the path to a new config file and use that.

import submit_code_bbi from '/src/code/submit_bbi.R?raw';

Expand Down

0 comments on commit 798b41e

Please sign in to comment.