-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rename three of the existing DSRA scenarios #77
Conversation
This was done manually so as to see the results right away (before I fully understand the whole pipeflow) and to allow for some finer edits which would require enhancing the source data and related Python scripts to fully support.
The following DSRA scenarios are renamed for better accuracy: - ACM4p9_Capilano5 -> ACM4p9_GeorgiaStraitFault - ACM7p4_BurwashLanding -> ACM7p4_DenaliFault - SCM5p5_Ottawa -> SCM5p5_ConstanceBay Besides changing the file names of the relevant FINISHED/*.csv, initializations/*.ini and ruptures/*.xml, some of the initializations files are modified to point to the correct/renamed rupture model files.
Run Python Black (with -S, --skip-string-normalization) to unify Python code formatting, and fix some of the issues reported by Pylint, on the scripts TakeSnapshot.py, finishedMap.py and generate_yml.py. Simplify some string definitions with "formatted string literals" (f-strings). Fix ShellCheck issues on finishedMap.sh, and adjust formatting. Add SPDX-License-Identifier, brief copyright notices and authors where applicable.
- Replace "http://" in URLs with secure "https://" - Rename "configParser" variable to simply "config" as per https://docs.python.org/3/library/configparser.html - Ensure GeoJSON and Markdown files have a linefeed at the end of file - TakeSnapshot.py: Fix Usage in comment: change HAZ to SHAKE - generate_yml.py: + Replace "Val Des Bois" with "Val-des-Bois" + Change titles from e.g. "Sidney - Magnitude 7.1" to "M7.1 Sidney"
- ACM4p9_Capilano5 -> ACM4p9_GeorgiaStraitFault - ACM7p4_BurwashLanding -> ACM7p4_DenaliFault - SCM5p5_Ottawa -> SCM5p5_ConstanceBay The following commands were used to generate the .md and .png files: ../scripts/TakeSnapshot.py ACM4p9_GeorgiaStraitFault b 1 2 3 4 5 ../scripts/TakeSnapshot.py ACM7p4_DenaliFault b 181 182 183 184 185 ../scripts/TakeSnapshot.py SCM5p5_ConstanceBay b 118 119 120 121 122
- ACM4p9_Capilano5 -> ACM4p9_GeorgiaStraitFault - ACM7p4_BurwashLanding -> ACM7p4_DenaliFault - SCM5p5_Ottawa -> SCM5p5_ConstanceBay The following command was used to remove the obsolete files: git rm ACM4p9_Capilano5.* ACM7p4_BurwashLanding.* SCM5p5_Ottawa.* Without their removal, finishedMap.sh would fail as follows: $ ../scripts/finishedMap.sh Traceback (most recent call last): File "OpenDRR/earthquake-scenarios/FINISHED/../scripts/generate_yml.py", line 35, in <module> config.read_file(open(f'../initializations/s_Hazard_{name}.ini')) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ FileNotFoundError: [Errno 2] No such file or directory: '../initializations/s_Hazard_ACM4p9_Capilano5.ini'
which updates FinishedScenarios{,Fr}.geojson, FinishedScenarios.md and scenarios.csv files. The changes in the automatically generated docs/_data/dsra.yml are discarded for now and not included in this commit.
977a24d
to
64f39bb
Compare
- ACM4p9_GeorgiaStraitFault - SCM5p0_Montreal - SCM5p5_ConstanceBay The descriptions were translated using DeepL Translator (deepl.com) with the following adjustments: - Quotation marks are replaced with guillemets « » - U+202F NARROW NO-BREAK SPACE (NNBSP) (espace fine insécable) are used before %, », and after «. - Typewriter apostrophes (') are replaced with typographic apostrophes (’)
@tieganh Please review when able |
Going to need changes to dsra_scenario_map.md in /docs/_pages/en and /fr starting at line 449. I wasn't able to automate that part of the GitHub pages. Also, there's probably enough scenarios there to bring back the map that is currently commented out in the index.md (/en and /fr) files starting at line 73 (which also needs an edit to the link from my fork to the main repo). |
Special thanks to Damon Ulmi (@DamonU2) who reminded us that changes are needed to to dsra_scenario_map.md in docs/_pages/{en,fr} starting at line 449 so that the correct areas are displayed on the maps. Part of the series of commits for the rename of the following scenarios: - ACM4p9_Capilano5 -> ACM4p9_GeorgiaStraitFault - ACM7p4_BurwashLanding -> ACM7p4_DenaliFault - SCM5p5_Ottawa -> SCM5p5_ConstanceBay
Can we also remove the old scenario geopackages, and replace them with the new ones for 'completeness'? |
Part of the series of commits for the rename of the following scenarios: - ACM4p9_Capilano5 -> ACM4p9_GeorgiaStraitFault - ACM7p4_BurwashLanding -> ACM7p4_DenaliFault - SCM5p5_Ottawa -> SCM5p5_ConstanceBay Special thanks to William Chow (@wkhchow) for regenerating these GeoPackage files and for reminding me to upload them!
@wkhchow for sure! Sorry I missed your comment earlier, and failed to connect the dots when you first brought it up on Slack. Thank you for your reminder at Iteration Review last Thursday! The relevant GeoPackage files have been replaced in commit c35cf72. Cheers! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All makes sense to me
There are now enough scenarios for it to be really helpful. Thanks to Damon Ulmi (@DamonU2) for creating the map in October 2021! (Also make minor tweaks to punctuations and French translations.)
This pull request aims to rename the following three existing DSRA scenarios in the repository:
for better accuracy and consistency with RiskProfiler.ca. The source initialization files *.ini, rupture models *.xml and "FINISHED" CSV data *.csv are renamed where necessary, and the PNG map files and Markdown files regenerated.
Some minor tweaks were also made to the Bash and Python scripts as well as to the scenario descriptions.
Partially fixes the following issues:
Many thanks!
[Update] Missing French descriptions for the following recently added scenarios have been added, courtesy of DeepL Translator, in commit 03f0ab1:
AFAIK, all the scenario descriptions were translated with DeepL. We probably need real French speakers to review the translations some day. Also, I wonder if the title (e.g. M4.9 Georgia Strait Fault) should eventually be translated too?