Currently the rules and tile files to be used for a night of observing is specified in afternoon planning by the config.yaml file used in afternoon planning. This can be awkward because afternoon planning makes copies of the rules, tile, and config file it uses. We then want the copied config file to point to the copied rules and tile files, so currently afternoon planning edits the config.yaml file in a somewhat fragile way after copying it, to point to the new files.
This works and isn't so bad. But there's a risk that someone will be surprised that something disappears from the config.yaml file during this editing process.
Some possibilities:
Stephen suggested demanding that the config file use "local" paths, that wouldn't need to be updated were the working directory properly updated. This is a bit harder than it sounds. I guess I could chdir(...) or something so that desimodel.io.load_tiles(...) looks in the local directory, but even then, load_tiles() has some shadowing features that may be surprising, while absolute paths are very explicit. The configuration file output_dir is also edited by hand at present to be the value of ${DESISURVEY_OUTPUT} rather than the environment variable, since that may change. rules files are by default found in the desisurvey/py/desisurvey/data directory, rather than in the local directory, so changes would be necessary to let a local path work there.
I could make a special config.yaml stub file that is not allowed to include any of the fields that I currently edit. Then I could add those lines to the end of the file. By just adding lines and making sure that those fields don't currently exist, I would be less worried about any fragility.
Currently the rules and tile files to be used for a night of observing is specified in afternoon planning by the config.yaml file used in afternoon planning. This can be awkward because afternoon planning makes copies of the rules, tile, and config file it uses. We then want the copied config file to point to the copied rules and tile files, so currently afternoon planning edits the config.yaml file in a somewhat fragile way after copying it, to point to the new files.
This works and isn't so bad. But there's a risk that someone will be surprised that something disappears from the config.yaml file during this editing process.
Some possibilities: