The SKIRT project
advanced radiative transfer for astrophysics
pts.skiupgrade.do.test_upgrade_ski_files Namespace Reference

Test upgrading ski files to the latest version of SKIRT. More...

Functions

"upgrade ski files in a given directory to the latest version of SKIRT 9" do ((str,"directory containing the ski files to be upgraded") skiDirPath)

Detailed Description

Test upgrading ski files to the latest version of SKIRT.

This script upgrades all SKIRT 9 ski files in a given directory to be appropriate for the latest version of SKIRT 9 without touching the original files. Instead the upgraded versions are given a new name. This is useful when testing the upgrade procedure for a newly updated SKIRT version.

Specifically, the script iterates over all files in the directory with the .ski filename extension and performs as follows for each:

  • if the file is not a SKIRT parameter file, or it is intended for a SKIRT version before version 9, an error message is logged and the file is otherwise ignored.
  • if the file is a SKIRT 9 parameter file and it is up to date with the latest version of SKIRT 9, an informational message is logged and the file is otherwise ignored.
  • if the file is a SKIRT 9 parameter file that needs upgrading, the version upgraded to the latest version of SKIRT 9 is placed in a file with a name similar to the original including the string "upgraded", and a warning message is logged.

The script takes a single positional string argument specifying the path to the directory containing the ski files to be upgraded, or "." (a single period) for the current directory.

See the pts.skiupgrade.skiupgrade module for more information on the ski file upgrade process.