Skip to content

Commit 7dc4e8c

Browse files
Use flyspell to find spelling issues to fix typos
1 parent 85548e4 commit 7dc4e8c

File tree

4 files changed

+61
-54
lines changed

4 files changed

+61
-54
lines changed

visiontoolkit/cli.py

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -430,7 +430,7 @@ def process_config():
430430
Order values are set in:
431431
1. Defaults set first, to ensure everything has a valid value, then...
432432
2. Overidden by any config. file specifications, which are in turn...
433-
3. Overidden by any CLI options provided, which are aways applied over
433+
3. Overidden by any CLI options provided, which are always applied over
434434
the former.
435435
436436
Overwrite any config. specified in the config. file given with the CLI
@@ -451,7 +451,7 @@ def process_config():
451451
# to fill in whatever is not provided from the command.
452452
parsed_args = parser.parse_args()
453453

454-
# Configure logging - do this now since otherwise folowing log messages
454+
# Configure logging - do this now since otherwise following log messages
455455
# get missed!
456456
setup_logging(parsed_args.verbose)
457457

@@ -500,7 +500,7 @@ def validate_config(final_config_namespace):
500500
501501
TODO: DETAILED DOCS
502502
"""
503-
# TODO add validation in incrementally to cover all input options & args!
503+
# TODO add validation in incrementally to cover all input options & args
504504

505505
print("final_config_namespace is", final_config_namespace)
506506

@@ -522,8 +522,11 @@ def process_config_file(config_file):
522522
try:
523523
j = json.load(f)
524524
except (json.decoder.JSONDecodeError, AttributeError):
525-
raise ValueError("Bad JSON configuration file.") # TODO better msg
525+
raise ValueError(
526+
"The configuration file specified is not valid JSON: "
527+
f"{config_file}"
528+
)
526529

527-
logger.info(f"Succesfully read-in JSON config. file at: {config_file}")
530+
logger.info(f"Successfully read-in JSON config. file at: {config_file}")
528531

529532
return j

visiontoolkit/constants.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
# *** Script running options ***
77
# Configure messaging to STDOUT, which is very verbose if INFO=True, else
88
# as minimal as allows without log control in cf-plot (at present).
9-
# TODO: Get ESMF logging via cf incoporated into Python logging system,
9+
# TODO: Get ESMF logging via cf incorporated into Python logging system,
1010
# see Issue #286.
1111
"verbose": 0, # corresponds to a count of 0 (-v would be 1, -vv 2, etc.)
1212
# *** Run mode with time override(s) ***
@@ -15,7 +15,7 @@
1515
# datetimes of the observational input data (set "False"),
1616
# 2. where the times on the observations are ignored so that they are
1717
# set and assumed to take a given start time, as specified as one
18-
# datetime string. Datetimes are assuemd to be UTC and should be
18+
# datetime string. Datetimes are assumed to be UTC and should be
1919
# pre-converted from another timezones before input if applicable.
2020
#
2121
# TODO: could have a shortcut if want to assume start time of model?
@@ -43,7 +43,7 @@
4343
"output-file-name": "vision_toolkit_result_field.nc",
4444
"history-message": (
4545
"Processed using the NCAS VISION Toolkit to "
46-
"colocate from model data to the observational data "
46+
"co-locate from model data to the observational data "
4747
"spatio-temporal location."
4848
),
4949
# *** Subspacing options ***
@@ -53,7 +53,7 @@
5353
# Note this option except in rare cases won't be required, as should almost
5454
# always be able to determine what z-coordinate want given it must be
5555
# present in both the model and the observational data, so match those.
56-
# Only if both data have more than one of identical z-coord do we need
56+
# Only if both data have more than one of identical z-coordinate do we need
5757
# to ask for this info.
5858
# Pressure will always be the ideal case, so that is our default and if
5959
# it can't be found, we look for other ways forward for the vertical.

visiontoolkit/plotting.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ def output_plots(
138138
file=f"{outputs_dir}/{plotname_start}_final_colocated_field.png",
139139
)
140140

141-
# Set levels for plotting of data in a colourmap
141+
# Set levels for plotting of data in a colour map
142142
# Min, max as determined using output.min(), .max():
143143
if cfp_output_levs_config:
144144
cfp.levs(**cfp_output_levs_config)

0 commit comments

Comments
 (0)