Skip to content

Commit

Permalink
Fix configuratioin examples (#178)
Browse files Browse the repository at this point in the history
Co-authored-by: Giselle Rosetta <135234996+gisellerosetta@users.noreply.github.com>
  • Loading branch information
MarkPaulin and gisellerosetta authored May 22, 2024
1 parent 23c50b9 commit f585104
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions book/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ The YAML example above could be read into our analysis as follows:
import yaml

with open("./my_config.yaml") as file:
config = yaml.load(file)
config = yaml.safe_load(file)

data = read_csv(config["input_path"])
...
Expand Down Expand Up @@ -240,13 +240,13 @@ This can be achieved in a number of ways, but we'll discuss a minimal example he
import sys
import yaml
if sys.argv < 2:
if len(sys.argv) < 2:
# The Python script name is counted as the first argument
raise ValueError("Configuration file must be passed as an argument.")
config_path = sys.argv[1]
with open(config_path) as file:
config = yaml.load(file)
config = yaml.safe_load(file)
...
```
Expand Down

0 comments on commit f585104

Please sign in to comment.