Skip to content

Commit

Permalink
Add update function to readme
Browse files Browse the repository at this point in the history
  • Loading branch information
jara001 committed Mar 23, 2022
1 parent 184be09 commit 52edb1e
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/).
- `reconfigure`:
- `update()` now supports `list(tuple(str, any))` for ordered addition of multiple parameters.

### Updated
- Readme now contains details about `update()`.

## 0.5.0 - 2022-03-22
### Added
- `reconfigure`:
Expand Down
17 changes: 17 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,23 @@ P.anotherparam = {'default': 5.2, 'min': 2, 'max': 6, 'description': 'I am just
P.smax = ["Speed_max", float, 0, "Level-1 speed", 0.158483034, 0, 0.3]
```

Parameters may be also defined at once using function `P.update(PARAMETERS)`. There are two ways to use it:

- Using dictionary (parameters are ordered randomly):
```python
PARAMETERS = {
"something": 4,
"anotherparam": {'default': 5.2, 'min': 2, 'max': 6, 'description': 'I am just a float.'},
}
```
- Using list of tuples (parameters are ordered):
```python
PARAMETERS = [
("something", 4),
("anotherparam", {'default': 5.2, 'min': 2, 'max': 6, 'description': 'I am just a float.'}),
]
```

##### Enumerated values

Example:
Expand Down

0 comments on commit 52edb1e

Please sign in to comment.