Skip to content

Commit

Permalink
Merge pull request #12 from ACCESS-NRI/7-update-documentation
Browse files Browse the repository at this point in the history
Fixed some docs, added installation instructions.
  • Loading branch information
bschroeter authored Jul 3, 2024
2 parents 00ca936 + 3bd945a commit 14747be
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .spellcheck.yml → .github/workflows/.spellcheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ matrix:
mode: en
dictionary:
wordlists:
- .wordlist.txt
- .github/workflows/.wordlist.txt
output: wordlist.dic
encoding: utf-8
pipeline:
Expand Down
3 changes: 2 additions & 1 deletion .wordlist.txt → .github/workflows/.wordlist.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@ py
jobscript
Jinja
README
md
md
conda
2 changes: 1 addition & 1 deletion .github/workflows/ci_spelling.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ jobs:
- name: Check Spelling
uses: rojopolis/[email protected]
with:
config_path: .spellcheck.yml
config_path: .github/workflows/.spellcheck.yml
task_name: Markdown
26 changes: 26 additions & 0 deletions docs/installation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Installation

## Stable release

`hpcpy` is installed via conda.

```shell
conda install -c accessnri hpcpy
```

## Development code

```shell
# Clone the repository
git clone [email protected]:ACCESS-NRI/hpcpy.git

# Create the environment, activate it
cd hpcpy
conda env create -f .conda/hpcpy-dev.yml
conda activate hpcpy_dev

# Install the package in editable mode inside the dev environment
pip install -e .

# Do you development work as normal.
```
11 changes: 4 additions & 7 deletions docs/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ The following describes the basic usage of hpcpy.

## Getting a client object

As the package aspires to be "scheduler agnostic" from the outset, the recommended way to get a `Client` object is to use the `ClientFactory` as follows:
As the package aspires to be "scheduler agnostic" from the outset, the recommended way to get a `Client()` object is to use the `ClientFactory()` as follows:

```python
from hpcpy.client import ClientFactory
Expand Down Expand Up @@ -41,16 +41,13 @@ echo "{{message}}"
```
*submit.py*
```python
# Create a context dictionary for variables
# These are rendered into both the script and the underlying submission command
context = dict(
message="Hello World."
)

job_id = client.submit(
"/path/to/template.sh",
render=True, # Note, this is False by default
message="Hello World!"

# Additional key/value pairs are added to rendering context
message="Hello World."
)
```

Expand Down

0 comments on commit 14747be

Please sign in to comment.