Skip to content

Commit

Permalink
Use flask-pydantic to validate and parse arguments
Browse files Browse the repository at this point in the history
Drops old v1.0 API. I could not find any usage of the old API in Fedora
nor internal instances.

Drops unused REQUIRED_DATA configuration.
  • Loading branch information
hluk committed Oct 21, 2022
1 parent f40a832 commit c103ad6
Show file tree
Hide file tree
Showing 9 changed files with 426 additions and 597 deletions.
10 changes: 0 additions & 10 deletions conf/settings.py.example
Original file line number Diff line number Diff line change
Expand Up @@ -46,16 +46,6 @@ LOGGING = {
},
}

# Specify which fields are required (in addition to those already required)
# when creating result/group/testcase.
# If you want to set some result's extra-data as required, you can do so by
# prepending 'data.' to the name (e.g. 'data.arch').
REQUIRED_DATA = {
'create_result': [],
'create_group': [],
'create_testcase': [],
}

# Extend the list of allowed outcomes.
ADDITIONAL_RESULT_OUTCOMES = []

Expand Down
53 changes: 26 additions & 27 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,12 @@ tox = {version = "4.0.0b2", optional = true}
tox-docker = {version = "4.0.0a2", optional = true}

flask-oidc = "^1.4.0"
Flask-RESTful = "^0.3.9"
Flask-SQLAlchemy = "^2.5.1"
SQLAlchemy = {version = "^1.4.39"}
psycopg2-binary = {version = "^2.9.3"}
alembic = "^1.8.1"
iso8601 = "^1.0.2"
Flask-Pydantic = "^0.11.0"

[tool.poetry.extras]
test = [
Expand Down
10 changes: 0 additions & 10 deletions resultsdb/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,16 +67,6 @@ class Config(object):
},
}

# Specify which fields are required (in addition to those already required)
# when creating result/group/testcase.
# If you want to set some result's extra-data as required, you can do so by
# prepending 'data.' to the name (e.g. 'data.arch').
REQUIRED_DATA = {
'create_result': [],
'create_group': [],
'create_testcase': [],
}

# Extend the list of allowed outcomes.
ADDITIONAL_RESULT_OUTCOMES = ()

Expand Down

0 comments on commit c103ad6

Please sign in to comment.