Skip to content

Commit

Permalink
Rebase branch and fix tests after feature/metadata rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
BibMartin authored and BibMartin committed Mar 15, 2022
1 parent b3b9193 commit 09f63b0
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion datasetter/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def add_dataset(fast_api, uri, dataset):

@fast_api.get(uri + "/")
def get_metadata():
return as_json(dataset.metadata)
return as_json(dataset.metadata())

@fast_api.get(uri + "/count")
@forge.sign(*kwargs)
Expand Down
3 changes: 2 additions & 1 deletion test/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,14 @@
metadata = {
"description": "A simple dataset to make tests.",
"facets": ['letter', 'greek'],
"name": "Random letters",
"columns": [
{"name": "letter", "type": "string", "description": "A column with letters."},
{"name": "greek", "type": "string", "description": "A column with greek letters."},
{"name": "number", "type": "integer", "description": "A column with numbers."},
]}

dataset = PandasDataset(df, ['letter', 'greek'], metadata=metadata)
dataset = PandasDataset(df, **metadata)

app = FastAPI()
add_dataset(app, 'pandas-dataset', dataset)
Expand Down
1 change: 0 additions & 1 deletion test/test_dataset.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import pytest
import pandas as pd

from datasetter.dataset import Dataset

Expand Down
2 changes: 2 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
[flake8]
max-line-length = 100
exclude = .git,__pycache__,datasetter.egg-info,.eggs,.tox,.ipynb_checkpoints


[tox]
envlist = py38,py39
Expand Down

0 comments on commit 09f63b0

Please sign in to comment.