Repository: sunpy/sunpy

Issue:
Bugs in the TimeSeriesMeta creation.
<!-- This comments are hidden when you submit the issue so you do not need to remove them!
Please be sure to check out our contributing guidelines: https://github.com/sunpy/sunpy/blob/master/CONTRIBUTING.rst
Please be sure to check out our code of conduct:
https://github.com/sunpy/sunpy/blob/master/CODE_OF_CONDUCT.rst -->

<!-- Please have a search on our GitHub repository to see if a similar issue has already been posted.
If a similar issue is closed, have a quick look to see if you are satisfied by the resolution.
If not please go ahead and open an issue! -->

### Description
<!-- Provide a general description of the bug. -->
When passing parameters to ``TimeSeriesMetaData``, if only ``meta`` and ``timerange`` are provided, the returned object is empty, and doesn't even store the ``meta`` or ``timerange`` passed.
The docs stating that these parameters are optional are wrong and need to be changed.
All parameters need to be passed for object creation.
### Expected behavior
<!-- What did you expect to happen. -->
When all parameters are passed, the object is created and returned. Otherwise, raise an error.
### Actual behavior
<!-- What actually happened. -->
While a TimeSeriesMeta is returned when just ``meta`` or ``timerange`` is passed, it is empty, and doesn't even store the meta passed.
<!-- Was the output confusing or poorly described? -->

### Steps to Reproduce
<!-- Ideally a code example could be provided so we can run it ourselves. -->
<!-- If you are pasting code, use tripe backticks (```) around your code snippet. -->
Create the ``TimeSeriesMetaData`` object by calling  ``sunpy.timeseries.TimeSeriesMetaData()``
just passing ``meta`` and ``timerange``
### System Details
<!-- We at least need to know the SunPy version you are using. -->
<!-- We provide a short function in SunPy that will provide some of the below information. -->
<!-- It is sunpy.util.system_info(), this is optional but strongly recommended. -->

  - SunPy Version: sunpy 1.0.6
  - Astropy Version: astropy 4.0 
  - Python Version: python 3.7 
  - OS information: ububtu 18.04

As per the discussion in #3639 



Discussion:

Resolving patch:
diff --git a/sunpy/timeseries/metadata.py b/sunpy/timeseries/metadata.py
--- a/sunpy/timeseries/metadata.py
+++ b/sunpy/timeseries/metadata.py
@@ -22,12 +22,12 @@ class TimeSeriesMetaData:
 
     Parameters
     ----------
-    meta : `dict`, `MetaDict`, `tuple`, `list`, optional
+    meta : `dict`, `MetaDict`, `tuple`, `list`
         The metadata giving details about the time series data/instrument.
         Defaults to `None`.
     timerange : `~sunpy.time.TimeRange`
         A `~sunpy.time.TimeRange` representing the timespan of the data. Defaults to `None`.
-    colnames : `list`, optional
+    colnames : `list`
         A mapping from column names in ``data`` to the physical units of that column.
         Defaults to `None`.
 
@@ -84,10 +84,17 @@ def __init__(self, meta=None, timerange=None, colnames=None):
                 self.metadata.append((timerange, colnames, meta))
             elif isinstance(meta, tuple):
                 # Given a single metadata entry as a tuple.
-                self.metadata.append(meta)
+                if isinstance(meta[0], TimeRange) and isinstance(meta[1], list) and isinstance(meta[2], (dict, MetaDict)):
+                    self.metadata.append(meta)
+                else:
+                    raise ValueError("Invalid parameters passed in the meta")
             elif isinstance(meta, list):
                 # Given a complex metadata list (of tuples)
-                self.metadata = copy.copy(meta)
+                for meta_tuple in meta:
+                    if isinstance(meta_tuple[0], TimeRange) and isinstance(meta_tuple[1], list) and isinstance(meta_tuple[2], (dict, MetaDict)):
+                        self.metadata.append(meta_tuple)
+                    else:
+                        raise ValueError("Invalid parameters passed in the meta")
         else:
             # In the event no metadata dictionary is sent we default to something usable
             if isinstance(timerange, TimeRange) and isinstance(colnames, list):


Test patch: