-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add option to select different datasets and fid fields as input to OQT #37
Conversation
52ff5a0
to
575a0ef
Compare
3ab57ed
to
50c9fdd
Compare
@@ -40,9 +40,11 @@ def __init__( | |||
bpolys: FeatureCollection = None, | |||
dataset: str = None, | |||
feature_id: int = None, | |||
fid_field: str = None, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where did you document what fid_field
is supposed to be? Do we have documentation for these report parameters in general?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not really. The only documentation is provided through the CLI (cli_opts.py
)
fid_field_opt = [
click.option(
"--fid-field",
type=str,
help=(
"Provide the feature id field of the dataset. "
+ "Use command list-fid-fields to view available "
+ "fid fields for each dataset"
),
default=None,
)
]
workers/ohsome_quality_analyst/geodatabase/create_results_table.sql
Outdated
Show resolved
Hide resolved
async def get_bpolys_from_db(dataset: str, featureId: int): | ||
bpolys = await db_client.get_bpolys_from_db(dataset=dataset, feature_id=featureId) | ||
return bpolys | ||
async def get_bpolys_from_db( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tests are not sufficient for this function. But I will remove the function in a separate PR since it is not in use.
7b5bd3f
to
b5f0de8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you should consider redoing the VCRs with a fresh cassette again. I got some changed/additional requests when running pytest
with a fresh database.
workers/ohsome_quality_analyst/geodatabase/create_results_table.sql
Outdated
Show resolved
Hide resolved
Rename get_fids to get_ids. Make get_ids dataset agnostic.
This is work in progress.
fb30766
to
ebe34ad
Compare
Update docstring Co-authored-by: Johannes Visintini <johannes.visintini@heigit.org> Update docstring Co-authored-by: Johannes Visintini <johannes.visintini@heigit.org>
Recreate VCR cassetts
Co-authored-by: Johannes Visintini <johannes.visintini@heigit.org> Make if stetement more precise Co-authored-by: Johannes Visintini <johannes.visintini@heigit.org>
ebe34ad
to
08288ce
Compare
Description
Add option to select different datasets and fid fields as input to OQT.
Available datasets and possible fid fields are defined in
definitions.py
.Each dataset defaults to a primary fid field. The usage of other fields as identifier is possible.
The attribute/parameter/argument
fid_field
/fidField
is added to the report class, oqt functions and API/CLI.Rewrite save and load indicator from database logic to use one result table for all indicator results.
Corresponding issue
Closes #4
Checklist
main
(e.g. throughgit rebase main
)