Repository: sunpy/sunpy

Issue:
HeliographicCarrington doesn't error if obstime isn't supplied
[The docs](https://docs.sunpy.org/en/latest/api/sunpy.coordinates.frames.HeliographicCarrington.html) state that:

>... (note that obstime must be supplied as a keyword):

But the following code runs without error:
```python
import astropy.units as u
from sunpy.coordinates import frames

lon = [1, 2] * u.deg
lat = [1, 2] * u.deg
r = [1, 2] * u.au

c = frames.HeliographicCarrington(lon=lon, lat=lat, radius=r)
```

I think that this should error given that `obstime` hasn't been provided to `HeliographicCarrington`.



Discussion:
To be clear, the documentation is saying that if you want to specify `obstime`, you need to supply it as a keyword argument as opposed to a positional argument.  (The context is the example instantiations that follow that sentence.)  It's *not* saying that `obstime` must be supplied in all situations.

There are (narrow) use cases to use a frame like `HeliographicCarrington` without a fully defined observer, which is why `obstime` can be left unspecified.  Of course, trying to transform to any other frame without specifying an `obstime` will not work.

Resolving patch:
diff --git a/sunpy/coordinates/frames.py b/sunpy/coordinates/frames.py
--- a/sunpy/coordinates/frames.py
+++ b/sunpy/coordinates/frames.py
@@ -150,12 +150,12 @@ class HeliographicStonyhurst(SunPyBaseCoordinateFrame):
     represented using Cartesian components.
 
     A new instance can be created using the following signatures
-    (note that ``obstime`` and ``representation_type`` must be supplied as
-    keywords)::
+    (note that if supplied, ``obstime`` and ``representation_type`` must be
+    keyword arguments)::
 
-        HeliographicStonyhurst(lon, lat, obstime)
-        HeliographicStonyhurst(lon, lat, radius, obstime)
-        HeliographicStonyhurst(x, y, z, obstime, representation_type='cartesian')
+        HeliographicStonyhurst(lon, lat, obstime=obstime)
+        HeliographicStonyhurst(lon, lat, radius, obstime=obstime)
+        HeliographicStonyhurst(x, y, z, representation_type='cartesian', obstime=obstime)
 
     Parameters
     ----------
@@ -250,10 +250,10 @@ class HeliographicCarrington(HeliographicStonyhurst):
     This system differs from Stonyhurst Heliographic (HGS) in its definition of longitude.
 
     A new instance can be created using the following signatures
-    (note that ``obstime`` must be supplied as a keyword)::
+    (note that if supplied, ``obstime`` must be a keyword argument)::
 
-        HeliographicCarrington(lon, lat, obstime)
-        HeliographicCarrington(lon, lat, radius, obstime)
+        HeliographicCarrington(lon, lat, obstime=obstime)
+        HeliographicCarrington(lon, lat, radius, obstime=obstime)
 
     Parameters
     ----------
@@ -308,11 +308,11 @@ class Heliocentric(SunPyBaseCoordinateFrame):
     by 90 degrees compared to the convention of the Heliocentric Radial (HCR) system.
 
     A new instance can be created using the following signatures
-    (note that ``obstime`` and ``representation_type`` must be supplied as
-    keywords)::
+    (note that if supplied, ``obstime``, ``observer``, and ``representation_type`` must be
+    keyword arguments)::
 
-        Heliocentric(x, y, z, obstime)
-        Heliocentric(rho, psi, z, obstime, representation_type='cylindrical')
+        Heliocentric(x, y, z, obstime=obstime, observer=observer)
+        Heliocentric(rho, psi, z, representation_type='cylindrical', obstime=obstime, observer=observer)
 
     Parameters
     ----------
@@ -373,10 +373,10 @@ class Helioprojective(SunPyBaseCoordinateFrame):
     is appropriate, ``theta_x`` and ``theta_y`` can be approximated as Cartesian components.
 
     A new instance can be created using the following signatures
-    (note that ``obstime`` and ``observer`` must be supplied as keywords)::
+    (note that if supplied, ``obstime`` and ``observer`` must be keyword arguments)::
 
-        Helioprojective(theta_x, theta_y, obstime, observer)
-        Helioprojective(theta_x, theta_y, distance, obstime, observer)
+        Helioprojective(theta_x, theta_y, obstime=obstime, observer=observer)
+        Helioprojective(theta_x, theta_y, distance, obstime=obstime, observer=observer)
 
     Parameters
     ----------


Test patch: