Commit 27047c1e authored by Aurélien Campéas's avatar Aurélien Campéas
Browse files

series/meta: remove the unused `index_names` attribute

We can leave the old ones in place.
parent 318748138181
...@@ -189,7 +189,7 @@ You can see a series metadata: ...@@ -189,7 +189,7 @@ You can see a series metadata:
```python ```python
>>> tsh.metadata(engine, 'my_series') >>> tsh.metadata(engine, 'my_series')
{'tzaware': False, 'index_type': 'datetime64[ns]', 'value_type': 'float64', {'tzaware': False, 'index_type': 'datetime64[ns]', 'value_type': 'float64',
'index_dtype': '<M8[ns]', 'index_names': [], 'value_dtype': '<f8'} 'index_dtype': '<M8[ns]', 'value_dtype': '<f8'}
``` ```
We built a series with naive time stamps, but timezone-aware We built a series with naive time stamps, but timezone-aware
......
...@@ -334,7 +334,6 @@ def test_serie_metadata(engine, tsh): ...@@ -334,7 +334,6 @@ def test_serie_metadata(engine, tsh):
initialmeta = tsh.metadata(engine, 'ts-metadata') initialmeta = tsh.metadata(engine, 'ts-metadata')
assert initialmeta == { assert initialmeta == {
'index_dtype': '<M8[ns]', 'index_dtype': '<M8[ns]',
'index_names': [],
'index_type': 'datetime64[ns]', 'index_type': 'datetime64[ns]',
'tzaware': False, 'tzaware': False,
'value_dtype': '<f8', 'value_dtype': '<f8',
...@@ -351,7 +350,6 @@ def test_serie_metadata(engine, tsh): ...@@ -351,7 +350,6 @@ def test_serie_metadata(engine, tsh):
assert tsh.metadata(engine, 'ts-metadata') == { assert tsh.metadata(engine, 'ts-metadata') == {
'index_dtype': '<M8[ns]', 'index_dtype': '<M8[ns]',
'index_names': [],
'index_type': 'datetime64[ns]', 'index_type': 'datetime64[ns]',
'topic': 'banana spot price', 'topic': 'banana spot price',
'tzaware': False, 'tzaware': False,
...@@ -1081,7 +1079,6 @@ def test_serie_deletion(engine, tsh): ...@@ -1081,7 +1079,6 @@ def test_serie_deletion(engine, tsh):
'index_type': 'datetime64[ns]', 'index_type': 'datetime64[ns]',
'value_type': 'float64', 'value_type': 'float64',
'index_dtype': '<M8[ns]', 'index_dtype': '<M8[ns]',
'index_names': [],
'value_dtype': '<f8' 'value_dtype': '<f8'
} }
...@@ -1113,7 +1110,6 @@ def test_serie_deletion(engine, tsh): ...@@ -1113,7 +1110,6 @@ def test_serie_deletion(engine, tsh):
'index_type': 'datetime64[ns, UTC]', 'index_type': 'datetime64[ns, UTC]',
'value_type': 'float64', 'value_type': 'float64',
'index_dtype': '|M8[ns]', 'index_dtype': '|M8[ns]',
'index_names': [],
'value_dtype': '<f8' 'value_dtype': '<f8'
} }
......
...@@ -32,7 +32,6 @@ class timeseries(SeriesServices): ...@@ -32,7 +32,6 @@ class timeseries(SeriesServices):
metakeys = { metakeys = {
'tzaware', 'tzaware',
'index_type', 'index_type',
'index_names',
'index_dtype', 'index_dtype',
'value_dtype', 'value_dtype',
'value_type' 'value_type'
...@@ -662,11 +661,9 @@ class timeseries(SeriesServices): ...@@ -662,11 +661,9 @@ class timeseries(SeriesServices):
def _series_initial_meta(self, cn, name, ts): def _series_initial_meta(self, cn, name, ts):
index = ts.index index = ts.index
inames = [name for name in index.names if name]
return { return {
'tzaware': tzaware_serie(ts), 'tzaware': tzaware_serie(ts),
'index_type': index.dtype.name, 'index_type': index.dtype.name,
'index_names': inames,
'index_dtype': index.dtype.str, 'index_dtype': index.dtype.str,
'value_dtype': ts.dtypes.str, 'value_dtype': ts.dtypes.str,
'value_type': ts.dtypes.name 'value_type': ts.dtypes.name
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment