Skip to content
Snippets Groups Projects
Commit fba38bb2 authored by Markus Holzer's avatar Markus Holzer
Browse files

Fixed pandas deprication warning

parent c83faa47
No related merge requests found
...@@ -13,6 +13,7 @@ tests-and-coverage: ...@@ -13,6 +13,7 @@ tests-and-coverage:
- $ENABLE_NIGHTLY_BUILDS - $ENABLE_NIGHTLY_BUILDS
image: i10git.cs.fau.de:5005/pycodegen/pycodegen/full image: i10git.cs.fau.de:5005/pycodegen/pycodegen/full
script: script:
- env
- pip list - pip list
- export NUM_CORES=$(nproc --all) - export NUM_CORES=$(nproc --all)
- mkdir -p ~/.config/matplotlib - mkdir -p ~/.config/matplotlib
...@@ -73,6 +74,7 @@ ubuntu: ...@@ -73,6 +74,7 @@ ubuntu:
- $ENABLE_NIGHTLY_BUILDS - $ENABLE_NIGHTLY_BUILDS
image: i10git.cs.fau.de:5005/pycodegen/pycodegen/ubuntu image: i10git.cs.fau.de:5005/pycodegen/pycodegen/ubuntu
script: script:
- pip install --upgrade pytest
- mkdir -p ~/.config/matplotlib - mkdir -p ~/.config/matplotlib
- echo "backend:template" > ~/.config/matplotlib/matplotlibrc - echo "backend:template" > ~/.config/matplotlib/matplotlibrc
- sed -i 's/--doctest-modules //g' pytest.ini - sed -i 's/--doctest-modules //g' pytest.ini
......
...@@ -151,7 +151,8 @@ class IPyNbFile(pytest.File): ...@@ -151,7 +151,8 @@ class IPyNbFile(pytest.File):
warnings.filterwarnings("ignore", "IPython.core.inputsplitter is deprecated") warnings.filterwarnings("ignore", "IPython.core.inputsplitter is deprecated")
notebook = nbformat.read(notebook_contents, 4) notebook = nbformat.read(notebook_contents, 4)
code, _ = exporter.from_notebook_node(notebook) code, _ = exporter.from_notebook_node(notebook)
yield IPyNbTest.from_parent(name=self.name, parent=self, code=code) yield IPyNbTest(self.name, self, code)
# pytest v 2.4>: yield IPyNbTest.from_parent(name=self.name, parent=self, code=code)
def teardown(self): def teardown(self):
pass pass
...@@ -160,4 +161,5 @@ class IPyNbFile(pytest.File): ...@@ -160,4 +161,5 @@ class IPyNbFile(pytest.File):
def pytest_collect_file(path, parent): def pytest_collect_file(path, parent):
glob_exprs = ["*demo*.ipynb", "*tutorial*.ipynb", "test_*.ipynb"] glob_exprs = ["*demo*.ipynb", "*tutorial*.ipynb", "test_*.ipynb"]
if any(path.fnmatch(g) for g in glob_exprs): if any(path.fnmatch(g) for g in glob_exprs):
return IPyNbFile.from_parent(fspath=path, parent=parent) return IPyNbFile(path, parent)
# pytest v 2.4 >: return IPyNbFile.from_parent(fspath=path, parent=parent)
...@@ -120,7 +120,7 @@ class Database: ...@@ -120,7 +120,7 @@ class Database:
Returns: Returns:
pandas data frame pandas data frame
""" """
from pandas.io.json import json_normalize from pandas import json_normalize
query_result = self.filter_params(parameter_query) query_result = self.filter_params(parameter_query)
attributes = [e.attributes for e in query_result] attributes = [e.attributes for e in query_result]
......
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