openairclim.utils.create_test_files

Create files for testing purposes.

openairclim.utils.create_test_files.create_test_config_files(repo_path: str, valid_name: str, invalid_name: str) → None[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[str]) → None[source]

Create new test directories if they do not exist.

Parameters:

path_arr (list[str]) – 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: str, inv_name: str) → None[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: str, resp_name: str) → None[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.