-
-
Notifications
You must be signed in to change notification settings - Fork 2k
Description
This isn't terribly high priority and probably only has a handful of usecases, but like in other cases where we have some kind of global state there should be a way to use a context manager to use an alternative to the global state--in this case astropy.coordinates.transformations.master_transform_graph.
This came up in the context of #1822, where a test adds a transformation alias, permanently modifying the global state. The test can be easily worked around for now, but this should be addressed at some point as a matter of principle.
One open question I have about this, is should a context manager provide a completely blank slate (which might not be very useful), or provide a copy of the existing master transformation graph (that can then be cleared or modified as needed)?