openairclim.utils.create_test_files

Create files for testing purposes

openairclim.utils.create_test_files.create_test_config_files(repo_path, valid_name, invalid_name)[source]

Create two configuration files for testing.

Parameters:
  • repo_path (str) – The path to the repository.

  • valid_name (str) – The name of the valid configuration file.

  • invalid_name (str) – The name of the invalid configuration file.

Returns:

None

Raises:

OSError – If the creation of a file fails.

openairclim.utils.create_test_files.create_test_directories(path_arr: list)[source]

Create new test directories if they do not exist.

Parameters:

path_arr (list) – A list of paths to be created.

Returns:

None

Raises:

OSError – If the creation of a directory fails.

openairclim.utils.create_test_files.create_test_inv_nc(repo_path, inv_name)[source]

Create an emission inventory netCDF file for testing.

Parameters:
  • repo_path (str) – The path to the repository.

  • inv_name (str) – The name of the emission inventory file.

Returns:

None

Raises:

OSError – If the creation of a file fails.

openairclim.utils.create_test_files.create_test_resp_nc(repo_path, resp_name)[source]

Create a response netCDF file for testing.

Parameters:
  • repo_path (str) – The path to the repository.

  • resp_name (str) – The name of the response file.

Returns:

None

Raises:

OSError – If the creation of a file fails.

openairclim.utils.create_test_files.main()[source]

Parse command-line arguments and create test fixture files.