From c23e8915023181f59b281f5e8849d9e7309ef30c Mon Sep 17 00:00:00 2001 From: ar-siddiqui Date: Tue, 28 Jul 2026 23:50:30 +0000 Subject: [PATCH] Fix spellings --- CHANGELOG.md | 2 +- cmd/controls/controls.go | 8 ++++---- cmd/controls/controls_test.go | 4 ++-- scripts/readme.md | 2 +- scripts/test_suite_linux.sh | 12 ++++++------ scripts/test_suite_mac.sh | 12 ++++++------ 6 files changed, 20 insertions(+), 20 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9dd82a2..3c83b64 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -27,7 +27,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - `controls` output header is now `reach_id,flow,control_stage,map_exists`. The new column is appended last, so readers of the first three columns (including `flows2fim domain`) are unaffected - `validate` progress messages now read `Number of records found` and `File for created at`, since not every check reports something missing - CHANGELOG.md - adhere to [Keep a Changelog](https://keepachangelog.com/en/1.1.0/) standard -- scripts/create-release-assets.sh - seperate release assets and binaries creation, mkdir release_assets/ directory as part of script, and add checksum generation +- scripts/create-release-assets.sh - separate release assets and binaries creation, mkdir release_assets/ directory as part of script, and add checksum generation ### Removed diff --git a/cmd/controls/controls.go b/cmd/controls/controls.go index 9fd47dc..ac2b1f9 100644 --- a/cmd/controls/controls.go +++ b/cmd/controls/controls.go @@ -19,9 +19,9 @@ import ( var usage string = `Usage of controls: Given a flow file and a reach database. Create controls table of reach flows and downstream boundary conditions. -Flow file's first coloumn values must be reach ids, and second coloumn must be discharges in cfs. Invalid lines are skipped. +Flow file's first column values must be reach ids, and second column must be discharges in cfs. Invalid lines are skipped. -Database file must have a table 'scenarios' and contain following coloumns +Database file must have a table 'scenarios' and contain following columns reach_id INTEGER us_flow REAL us_depth REAL @@ -32,7 +32,7 @@ Database file must have a table 'scenarios' and contain following coloumns map_exists BOOL CHECK(map_exists IN (0, 1)) UNIQUE(reach_id, us_flow, ds_wse, boundary_condition) -Database file must have a table 'network' and contain following coloumns +Database file must have a table 'network' and contain following columns reach_id INTEGER updated_to_id INTEGER @@ -346,7 +346,7 @@ func Run(args []string) (err error) { ) flags.StringVar(&dbPath, "db", "", "Path to the database file") flags.StringVar(&flowsFilePath, "f", "", "Path to the input flows CSV file") - flags.StringVar(&startReachesCSV, "scsv", "", "Path to the CSV file containing starting reach IDs and control stages (Coloumn headers do not matter)") + flags.StringVar(&startReachesCSV, "scsv", "", "Path to the CSV file containing starting reach IDs and control stages (Column headers do not matter)") flags.StringVar(&startReachIDsStr, "sids", "", "Comma-separated list of starting reach IDs (One of -sids or -scsv is required, if both are provided, -sids and -scs flags are ignored)") flags.StringVar(&startControlStagesStr, "scs", "nd", "Comma-separated list of starting control stages (corresponding to the reach IDs)") flags.StringVar(&outputFilePath, "o", "", "Path to the output controls CSV file") diff --git a/cmd/controls/controls_test.go b/cmd/controls/controls_test.go index f4f6b94..1498c6a 100644 --- a/cmd/controls/controls_test.go +++ b/cmd/controls/controls_test.go @@ -29,8 +29,8 @@ func TestReadFlows(t *testing.T) { wantErr: true, }, { - name: "reach_id and flow coloumn swapped", - filePath: "/app/testdata/unit_tests/flow_files/coloumns_swapped.csv", + name: "reach_id and flow column swapped", + filePath: "/app/testdata/unit_tests/flow_files/columns_swapped.csv", wantFlows: map[int]float32{}, wantErr: false, }, diff --git a/scripts/readme.md b/scripts/readme.md index 9a97af2..1e406fe 100644 --- a/scripts/readme.md +++ b/scripts/readme.md @@ -7,4 +7,4 @@ Contains scripts for various build, install, test, and other operational tasks. - **Automation**: Add scripts for automating common development, build, and deployment tasks. ## Usage -This folder provides hosuing for utility scripts to streamline development workflows. +This folder provides housing for utility scripts to streamline development workflows. diff --git a/scripts/test_suite_linux.sh b/scripts/test_suite_linux.sh index 9dd341f..add5ddf 100755 --- a/scripts/test_suite_linux.sh +++ b/scripts/test_suite_linux.sh @@ -1,6 +1,6 @@ #!/bin/bash -# This script provies a comprehensive test suite of the built flows2fim executable on +# This script provides a comprehensive test suite of the built flows2fim executable on # linux systems, also including regression tests. This script, as well as testdata/reference_data # will need to be manually updated as features change. See testdata/readme.md for more information # on how to update the /testdata directory appropriately. @@ -415,7 +415,7 @@ fim_test_cases() { # Capture the output of the compare_directories function as a variable diff_output=$(compare_directories "$fim_test_outputs" "$fim_benchmark_dir" "fim") - # If there is no differnce, test pass + # If there is no difference, test pass if [ -z "$diff_output" ]; then printf "\t \u2714 No significant difference in fim.tif files. \n\n" else @@ -559,11 +559,11 @@ fim_test_cases() { rm "$tempfile" rm "$temp_controls" - printf "(10/${num_test_cases_fim})\t>>>> Controls file without a map_exists coloumn warns and includes every record <<<<\n\n" + printf "(10/${num_test_cases_fim})\t>>>> Controls file without a map_exists column warns and includes every record <<<<\n\n" # Create and assign temp files tempfile=$(mktemp) temp_controls=$(mktemp) - # Controls files written before 0.5.0 have no map_exists coloumn. They must + # Controls files written before 0.5.0 have no map_exists column. They must # keep working, with a warning that map existence is unknown. printf "reach_id,flow,control_stage\n24274741,17668,nd\n" > "$temp_controls" # Test case @@ -571,11 +571,11 @@ fim_test_cases() { -c "$temp_controls" \ -fmt $format \ -lib $library_benchmark \ - -o $fim_test_outputs/fim_no_coloumn.tif &> "$tempfile" + -o $fim_test_outputs/fim_no_column.tif &> "$tempfile" # Assign warning string expected_warning_substring="controls file has no map_exists column" # Warning must be raised and the composite must still be produced - if grep -q "$expected_warning_substring" "$tempfile" && [ -f "$fim_test_outputs/fim_no_coloumn.tif" ]; then + if grep -q "$expected_warning_substring" "$tempfile" && [ -f "$fim_test_outputs/fim_no_column.tif" ]; then printf "\t ✔ Passed: warning raised and composite created. \n\n" else printf "\t ❌ Failed: expected warning and a composite file \n\n" diff --git a/scripts/test_suite_mac.sh b/scripts/test_suite_mac.sh index 06e295f..657304d 100755 --- a/scripts/test_suite_mac.sh +++ b/scripts/test_suite_mac.sh @@ -1,6 +1,6 @@ #!/bin/bash -# This script provies a comprehensive test suite of the built flows2fim executable on +# This script provides a comprehensive test suite of the built flows2fim executable on # linux systems, also including regression tests. This script, as well as testdata/reference_data # will need to be manually updated as features change. See testdata/readme.md for more information # on how to update the /testdata directory appropriately. @@ -415,7 +415,7 @@ fim_test_cases() { # Capture the output of the compare_directories function as a variable diff_output=$(compare_directories "$fim_test_outputs" "$fim_benchmark_dir" "fim") - # If there is no differnce, test pass + # If there is no difference, test pass if [ -z "$diff_output" ]; then printf "\t \u2714 No significant difference in fim.tif files. \n\n" else @@ -559,11 +559,11 @@ fim_test_cases() { rm "$tempfile" rm "$temp_controls" - printf "(10/${num_test_cases_fim})\t>>>> Controls file without a map_exists coloumn warns and includes every record <<<<\n\n" + printf "(10/${num_test_cases_fim})\t>>>> Controls file without a map_exists column warns and includes every record <<<<\n\n" # Create and assign temp files tempfile=$(mktemp) temp_controls=$(mktemp) - # Controls files written before 0.5.0 have no map_exists coloumn. They must + # Controls files written before 0.5.0 have no map_exists column. They must # keep working, with a warning that map existence is unknown. printf "reach_id,flow,control_stage\n24274741,17668,nd\n" > "$temp_controls" # Test case @@ -571,11 +571,11 @@ fim_test_cases() { -c "$temp_controls" \ -fmt $format \ -lib $library_benchmark \ - -o $fim_test_outputs/fim_no_coloumn.tif &> "$tempfile" + -o $fim_test_outputs/fim_no_column.tif &> "$tempfile" # Assign warning string expected_warning_substring="controls file has no map_exists column" # Warning must be raised and the composite must still be produced - if grep -q "$expected_warning_substring" "$tempfile" && [ -f "$fim_test_outputs/fim_no_coloumn.tif" ]; then + if grep -q "$expected_warning_substring" "$tempfile" && [ -f "$fim_test_outputs/fim_no_column.tif" ]; then printf "\t ✔ Passed: warning raised and composite created. \n\n" else printf "\t ❌ Failed: expected warning and a composite file \n\n"