GalSim-developers/GalSim — pull request #462 by rmjarvis (2013-08-28 07:52:22+00:00)
Title: #460 Change galsim_yaml, galsim_json executables to just galsim.

This isn't so important a pull request. (Nothing here for great3 for instance.) But it includes a few changes that I think are worth getting into the forthcoming version 1.0 release.

- I changed the `galsim_yaml` executable to be called just `galsim`. It now checks the extension of the config file and does either yaml processing or json as appropriate. (Really just a matter of how it reads in the dict.) You can also explicitly specify which file_type you want if you want to override the automatic determination.
- I have a new version of `galsim_yaml` and `galsim_json` which are just present for backwards compatibility (i.e. they are undocumented), which just gall `galsim -f yaml ...` and `galsim -f json ...` respectively.
- I added a new feature to the `galsim` executable: `-m module`, which lets you import other modules besides just `import galsim` before running through the config file. Thus, people can have their own external modules and not have to bundle them with GalSim to get them to work with the config machinery.
- I removed the line `import des` from GalSim's `__init__.py` file. Now to run the des.yaml example, you need to write `galsim -m des des.yaml`.
- I added the version of GalSim to the output of `galsim -h`. I also added `galsim --version` which only prints the version.
- I got rid of the requirement to do `scons examples` before running `check_yaml` or `check_json`. There is a helper script called `installed_python` which can be used to run the correct python version (as specified by the SCons options) for any python script. So this is now used to run each of the demo*.py files.
- I changed the default WARN from true to false. We had planned on doing this when we have our version 1.0 release to avoid saddling the users with gratuitous warnings if their compiler is more particular than the once we test on. Developers will now need to run scons WARN=true to get it turned back on. You only need to do this once. (Well, at least after this is merged into master, that is.)

Warning: because of the new bin/galsim executable, and bin/galsim.py file, you may have problems if you checkout this branch and then go back to a different branch. You'll probably need to `git clean -f bin` if you do this.