diff --git a/.github/workflows/vulnerabilities.yaml b/.github/workflows/vulnerabilities.yml similarity index 100% rename from .github/workflows/vulnerabilities.yaml rename to .github/workflows/vulnerabilities.yml diff --git a/.readthedocs.yaml b/.readthedocs.yml similarity index 96% rename from .readthedocs.yaml rename to .readthedocs.yml index 39f82236..f779cadb 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yml @@ -1,4 +1,4 @@ -# .readthedocs.yaml +# .readthedocs.yml # Read the Docs configuration file # See https://docs.readthedocs.io/en/stable/config-file/v2.html for details diff --git a/METdbLoad/sql/scripts/data_loading_config.yaml b/METdbLoad/sql/scripts/data_loading_config.yml similarity index 100% rename from METdbLoad/sql/scripts/data_loading_config.yaml rename to METdbLoad/sql/scripts/data_loading_config.yml diff --git a/METdbLoad/sql/scripts/db_prep.py b/METdbLoad/sql/scripts/db_prep.py index eee7f496..ff986c29 100644 --- a/METdbLoad/sql/scripts/db_prep.py +++ b/METdbLoad/sql/scripts/db_prep.py @@ -1,6 +1,6 @@ ''' Creates the METviewer database to store MET output. Requires a YAML configuration - file (data_loading_config.yaml) with relevant database information (i.e. username, + file (data_loading_config.yml) with relevant database information (i.e. username, password, etc.). ''' import os.path diff --git a/METdbLoad/tests/update_schema_6.0_beta4/test_loading.py b/METdbLoad/tests/update_schema_6.0_beta4/test_loading.py index 192abf11..68814b4e 100644 --- a/METdbLoad/tests/update_schema_6.0_beta4/test_loading.py +++ b/METdbLoad/tests/update_schema_6.0_beta4/test_loading.py @@ -20,7 +20,7 @@ def setup_db(): Read in the config file to retrieve the database login information. """ - config_file = 'test_loading.yaml' + config_file = 'test_loading.yml' with open(config_file, 'r') as stream: try: parms: dict = yaml.load(stream, Loader=yaml.FullLoader) diff --git a/METreadnc/test/test_readnc.yaml b/METreadnc/test/test_readnc.yml similarity index 100% rename from METreadnc/test/test_readnc.yaml rename to METreadnc/test/test_readnc.yml diff --git a/METreadnc/test/test_readnc_env.yaml b/METreadnc/test/test_readnc_env.yml similarity index 100% rename from METreadnc/test/test_readnc_env.yaml rename to METreadnc/test/test_readnc_env.yml diff --git a/METreadnc/util/read_netcdf.yaml b/METreadnc/util/read_netcdf.yml similarity index 100% rename from METreadnc/util/read_netcdf.yaml rename to METreadnc/util/read_netcdf.yml diff --git a/METreformat/ECNT.yaml b/METreformat/ECNT.yml similarity index 100% rename from METreformat/ECNT.yaml rename to METreformat/ECNT.yml diff --git a/METreformat/reformat_stat.yaml b/METreformat/reformat_stat.yml similarity index 100% rename from METreformat/reformat_stat.yaml rename to METreformat/reformat_stat.yml diff --git a/METreformat/test/CNT.yaml b/METreformat/test/CNT.yml similarity index 100% rename from METreformat/test/CNT.yaml rename to METreformat/test/CNT.yml diff --git a/METreformat/test/CTC.yaml b/METreformat/test/CTC.yml similarity index 100% rename from METreformat/test/CTC.yaml rename to METreformat/test/CTC.yml diff --git a/METreformat/test/CTS.yaml b/METreformat/test/CTS.yml similarity index 100% rename from METreformat/test/CTS.yaml rename to METreformat/test/CTS.yml diff --git a/METreformat/test/ECNT.yaml b/METreformat/test/ECNT.yml similarity index 100% rename from METreformat/test/ECNT.yaml rename to METreformat/test/ECNT.yml diff --git a/METreformat/test/ECNT_for_agg.yaml b/METreformat/test/ECNT_for_agg.yml similarity index 100% rename from METreformat/test/ECNT_for_agg.yaml rename to METreformat/test/ECNT_for_agg.yml diff --git a/METreformat/test/FHO.yaml b/METreformat/test/FHO.yml similarity index 100% rename from METreformat/test/FHO.yaml rename to METreformat/test/FHO.yml diff --git a/METreformat/test/FHO_for_agg.yaml b/METreformat/test/FHO_for_agg.yml similarity index 100% rename from METreformat/test/FHO_for_agg.yaml rename to METreformat/test/FHO_for_agg.yml diff --git a/METreformat/test/MCTS.yaml b/METreformat/test/MCTS.yml similarity index 100% rename from METreformat/test/MCTS.yaml rename to METreformat/test/MCTS.yml diff --git a/METreformat/test/PCT_ROC.yaml b/METreformat/test/PCT_ROC.yml similarity index 100% rename from METreformat/test/PCT_ROC.yaml rename to METreformat/test/PCT_ROC.yml diff --git a/METreformat/test/RHIST.yaml b/METreformat/test/RHIST.yml similarity index 100% rename from METreformat/test/RHIST.yaml rename to METreformat/test/RHIST.yml diff --git a/METreformat/test/SL1L2.yaml b/METreformat/test/SL1L2.yml similarity index 100% rename from METreformat/test/SL1L2.yaml rename to METreformat/test/SL1L2.yml diff --git a/METreformat/test/VCNT.yaml b/METreformat/test/VCNT.yml similarity index 100% rename from METreformat/test/VCNT.yaml rename to METreformat/test/VCNT.yml diff --git a/METreformat/test/VL1L2.yaml b/METreformat/test/VL1L2.yml similarity index 100% rename from METreformat/test/VL1L2.yaml rename to METreformat/test/VL1L2.yml diff --git a/METreformat/test/run_benchmark.py b/METreformat/test/run_benchmark.py index aa2acfcf..749bb87a 100644 --- a/METreformat/test/run_benchmark.py +++ b/METreformat/test/run_benchmark.py @@ -69,14 +69,14 @@ def setup_test(yaml_file, is_tcst=False): # BENCHMARKING def test_tcdiag_benchmark(benchmark): - stat_data, config = setup_test('../test/test_reformat_tcdiag.yaml', is_tcst=True) + stat_data, config = setup_test('../test/test_reformat_tcdiag.yml', is_tcst=True) wsa = WriteStatAscii(config) # reformatted_df = wsa.process_tcdiag(stat_data) result = benchmark(wsa.process_tcdiag, stat_data) def test_ecnt_benchmark(benchmark): - stat_data, config = setup_test('../test/ECNT_for_agg.yaml') + stat_data, config = setup_test('../test/ECNT_for_agg.yml') wsa = WriteStatAscii(config) diff --git a/METreformat/test/test_reformat_tcdiag.yaml b/METreformat/test/test_reformat_tcdiag.yml similarity index 100% rename from METreformat/test/test_reformat_tcdiag.yaml rename to METreformat/test/test_reformat_tcdiag.yml diff --git a/METreformat/test/test_reformatting.py b/METreformat/test/test_reformatting.py index 64795e50..535ae656 100644 --- a/METreformat/test/test_reformatting.py +++ b/METreformat/test/test_reformatting.py @@ -84,7 +84,7 @@ def test_point_stat_FHO_consistency(): ''' # Subset the input dataframe to include only the FHO linetype - stat_data, parms = setup_test("FHO.yaml") + stat_data, parms = setup_test("FHO.yml") end = cn.NUM_STAT_FHO_COLS fho_columns_to_use = np.arange(0, end).tolist() linetype = cn.FHO @@ -138,7 +138,7 @@ def test_point_stat_sl1l2_consistency(): ''' # Original data - stat_data, parms = setup_test('SL1L2.yaml') + stat_data, parms = setup_test('SL1L2.yml') # Relevant columns for the SL1L2 line type linetype: str = cn.SL1L2 @@ -195,7 +195,7 @@ def test_point_stat_vl1l2_consistency(): ''' # Original data - stat_data, parms = setup_test('VL1L2.yaml') + stat_data, parms = setup_test('VL1L2.yml') # Relevant columns for the VL1L2 line type linetype: str = cn.VL1L2 @@ -258,7 +258,7 @@ def test_point_stat_ctc_consistency(): ''' # Original data - stat_data, parms = setup_test('CTC.yaml') + stat_data, parms = setup_test('CTC.yml') # Relevant columns for the CTC line type linetype: str = cn.CTC @@ -317,7 +317,7 @@ def test_point_stat_cts_consistency(): ''' # Original data - stat_data, parms = setup_test('CTS.yaml') + stat_data, parms = setup_test('CTS.yml') # Relevant columns for the CTS line type linetype: str = cn.CTS @@ -384,7 +384,7 @@ def test_point_stat_cnt_consistency(): ''' # Original data - stat_data, parms = setup_test('CNT.yaml') + stat_data, parms = setup_test('CNT.yml') # Relevant columns for the CNT line type linetype: str = cn.CNT @@ -452,7 +452,7 @@ def test_point_stat_vcnt_consistency(): ''' # Original data - stat_data, parms = setup_test('VCNT.yaml') + stat_data, parms = setup_test('VCNT.yml') # Relevant columns for the VCNT line type linetype: str = cn.VCNT @@ -506,7 +506,7 @@ def test_point_stat_mcts_consistency(): ''' # Original data - stat_data, parms = setup_test('./MCTS.yaml') + stat_data, parms = setup_test('./MCTS.yml') # Relevant columns for the MCTS line type linetype: str = cn.MCTS @@ -573,7 +573,7 @@ def test_ensemble_stat_ecnt_consistency(): ''' # Original data - stat_data, config = setup_test('ECNT.yaml') + stat_data, config = setup_test('ECNT.yml') # Relevant columns for the ECNT line type linetype: str = cn.ECNT @@ -653,7 +653,7 @@ def test_pct_consistency(): ''' # Original data - stat_data, config = setup_test('PCT_ROC.yaml') + stat_data, config = setup_test('PCT_ROC.yml') # Relevant columns for the PCT line type wsa = WriteStatAscii(config) @@ -708,7 +708,7 @@ def test_rhist_consistency(): ''' # Original data - stat_data, config = setup_test('RHIST.yaml') + stat_data, config = setup_test('RHIST.yml') # Relevant columns for the RHIST line type linetype: str = cn.RHIST @@ -768,7 +768,7 @@ def test_ecnt_reformat_for_agg(): ''' # Original reformatted data - stat_data, config = setup_test('ECNT_for_agg.yaml') + stat_data, config = setup_test('ECNT_for_agg.yml') wsa = WriteStatAscii(config) reformatted_df = wsa.process_ecnt_for_agg(stat_data) @@ -815,7 +815,7 @@ def test_fho_reformat_for_agg(): :return: ''' - stat_data, parms = setup_test("FHO_for_agg.yaml") + stat_data, parms = setup_test("FHO_for_agg.yml") wsa = WriteStatAscii(parms) # Expect error when invoking the process_fho_for_agg directly @@ -832,7 +832,7 @@ def test_tcdiag_from_tcpairs(): Test that the reformatting is correct by comparing values in the original data to the reformatted data ''' - stat_data, config = setup_test('test_reformat_tcdiag.yaml', is_tcst=True) + stat_data, config = setup_test('test_reformat_tcdiag.yml', is_tcst=True) wsa = WriteStatAscii(config) reformatted_df = wsa.process_tcdiag(stat_data) diff --git a/docs/Users_Guide/load_data.rst b/docs/Users_Guide/load_data.rst index 0dd2e509..17032769 100644 --- a/docs/Users_Guide/load_data.rst +++ b/docs/Users_Guide/load_data.rst @@ -14,31 +14,31 @@ In the METdataio/METdbLoad/sql/scripts directory, there are two configuration fi * db_load_specification.xml - * data_loading_config.yaml + * data_loading_config.yml -The *db_load_specification.xml* is a template XML specification file, and *data_loading_config.yaml* -is a template YAML configuration file. The *data_loading_config.yaml* file contains +The *db_load_specification.xml* is a template XML specification file, and *data_loading_config.yml* +is a template YAML configuration file. The *data_loading_config.yml* file contains information about the database (username, password, database name, etc.). This information is used by the *generate_xml_spec.py* script to generate the XML specification file which is then used to load data into the database. Generate the XML Specification File =================================== -Copy the *data_loading_config.yaml* file to a secure location in your workspace, as this file will contain the username +Copy the *data_loading_config.yml* file to a secure location in your workspace, as this file will contain the username and password to the database. **Do not put this file where it can be read by anyone who should not have access to this information.** .. code-block:: ini - cp data_loading_config.yaml /path-to-your-dir/ + cp data_loading_config.yml /path-to-your-dir/ Replace the *path-to-your-dir* with the actual path to where this file is to be saved. -Change directory to the location where the *data_loading_config.yaml* file was copied. +Change directory to the location where the *data_loading_config.yml* file was copied. -Open the data_loading_config.yaml file: +Open the data_loading_config.yml file: -.. literalinclude:: ../../METdbLoad/sql/scripts/data_loading_config.yaml +.. literalinclude:: ../../METdbLoad/sql/scripts/data_loading_config.yml Update the database information with information relevant to the database you are using: @@ -93,9 +93,9 @@ Generate the new XML specification file by running the following: *Replace path-to-METdataio-source to the location where the METdataio source code is saved. - python generate_xml_spec.py path-to/data_loading_config.yaml + python generate_xml_spec.py path-to/data_loading_config.yml - *Replace the path-to with the path to the directory you created to store the copy of the data_loading_config.yaml + *Replace the path-to with the path to the directory you created to store the copy of the data_loading_config.yml file as specified earlier. A new XML specification file *load_met.xml*, will be generated and saved in the @@ -116,7 +116,7 @@ directory. The *path-to-METdataio-source* is the directory where the METdataio python met_db_load.py /path-to/load_met.xml * Replace the path-to with the location where the load_met.xml file was saved. This is the same directory - you created to save the copy of the data_loading_config.yaml file. + you created to save the copy of the data_loading_config.yml file. The usage statement: @@ -258,7 +258,7 @@ Additional Loading Options -------------------------- The load_met.xml specification file created above loads the entire dataset specified in the data_dir setting in the -YAML config file, data_loading_config.yaml. +YAML config file, data_loading_config.yml. A subset of the data can be selected by date and field names (i.e. by model, valid_time, vx_mask, etc.). The load_met.xml specification file can be further modified to accomplish this by adding the date_list and diff --git a/docs/Users_Guide/reformat_stat_data.rst b/docs/Users_Guide/reformat_stat_data.rst index 50efcfa1..cad5fd75 100644 --- a/docs/Users_Guide/reformat_stat_data.rst +++ b/docs/Users_Guide/reformat_stat_data.rst @@ -185,15 +185,15 @@ The YAML configuration file is also used to indicate the name and location of the output file, logging information (filename, log level), and the line type to read in and reformat: -.. literalinclude:: ../../../METdataio/METreformat/reformat_stat.yaml +.. literalinclude:: ../../../METdataio/METreformat/reformat_stat.yml Copy this custom config file from the directory where the source code was saved to the working directory. **Modify the YAML configuration file** -Edit the reformat_stat.yaml config file: -.. literalinclude:: ../../../METdataio/METreformat/reformat_stat.yaml +Edit the reformat_stat.yml config file: +.. literalinclude:: ../../../METdataio/METreformat/reformat_stat.yml Refer to the following details for each of the mandatory settings in the configuration file. @@ -297,7 +297,7 @@ Generate the reformatted file: * NOTE*: This may require reorganization of data that is distributed over numerous directories into a single directory. - - modify the **reformat_stat.yaml** file, indicating the *input directory*, + - modify the **reformat_stat.yml** file, indicating the *input directory*, *output directory*, *output file name*, *line stat to reformat*, and *logging settings* (log level, log filename, log directory). Refer to the **Definition of Configuration Settings** above for a description of each setting. @@ -305,6 +305,6 @@ Generate the reformatted file: .. code-block:: ini - python $BASE_DIR/METreformat/write_stat_ascii.py $WORKING_DIR/*line_type*_stat.yaml + python $BASE_DIR/METreformat/write_stat_ascii.py $WORKING_DIR/*line_type*_stat.yml - A text file will be created in the output directory with the file name that was specified in the yaml file.