Skip to content
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

Implement as_feature functions for indicator/report #86

Merged
merged 3 commits into from
Jul 14, 2021

Conversation

matthiasschaub
Copy link
Collaborator

@matthiasschaub matthiasschaub commented Jul 9, 2021

Description

Implement as_feature function for indicator and report classes.
Implement usage of new as_feature function in the CLI.

Corresponding issue

Closes #84 #67 #64 #12

See also issue #46 and rejected PR #66 for related discussions.

Checklist

  • I have updated my branch to main (e.g. through git rebase main)
  • My code follows the style guide and was checked with pre-commit before committing
  • I have commented my code
  • I have added sufficient unit and integration tests
  • I have updated the CHANGELOG.md

CHANGELOG.md Outdated Show resolved Hide resolved
workers/ohsome_quality_analyst/utils/helper.py Outdated Show resolved Hide resolved
workers/tests/integrationtests/test_base_indicator.py Outdated Show resolved Hide resolved
workers/tests/integrationtests/test_base_indicator.py Outdated Show resolved Hide resolved
workers/tests/integrationtests/test_base_report.py Outdated Show resolved Hide resolved
@joker234 joker234 added this to the Release 0.4.0 milestone Jul 12, 2021
@matthiasschaub matthiasschaub changed the title Implement __geo_interface__ for indicator/report Implement as_feature functions for indicator/report Jul 12, 2021
workers/tests/integrationtests/test_oqt.py Show resolved Hide resolved
workers/ohsome_quality_analyst/oqt.py Outdated Show resolved Hide resolved
workers/ohsome_quality_analyst/oqt.py Outdated Show resolved Hide resolved
joker234
joker234 previously approved these changes Jul 13, 2021
Fix udpate geojson function to not use vars()

Update Changelog
`as_feature` is a function returning a GeoJSON object.

Return report as Feature not as FeatureCollection.

Add test for property keys of indicator Feature.

Update Changelog.

Clean up code.

Fix issue where report attribute feature was None.

This happend when input arguments were `dataset` and `feature_id`.
Fixed by getting the feature from db and initialize report with feature
and dataset+feature_id attributes.
Create indicator will now prefer loading/saving from database when
dataset+feature_id AND feature are given.

Improve docs and comments.

Fix wrong import statement.

Add test case for running create_indicator with

following arguments: feature, dataset and feature_id

Improve docstrings
@matthiasschaub matthiasschaub force-pushed the geo-interface-fix branch 2 times, most recently from 18e1fc0 to 124a109 Compare July 13, 2021 13:53
CHANGELOG.md Outdated Show resolved Hide resolved
workers/tests/integrationtests/test_cli_file_io.py Outdated Show resolved Hide resolved
@matthiasschaub matthiasschaub merged commit a31074e into main Jul 14, 2021
@matthiasschaub matthiasschaub deleted the geo-interface-fix branch July 14, 2021 07:57
@matthiasschaub matthiasschaub mentioned this pull request Oct 5, 2021
2 tasks
matthiasschaub added a commit that referenced this pull request Oct 5, 2021
This is obsolete since introduction of the property `data` for the indicator
object in PR #86.
matthiasschaub added a commit that referenced this pull request Oct 5, 2021
This is obsolete since introduction of the property `data` for the indicator
object in PR #86.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

More granular output in GeoJSON when creating a report through the CLI
2 participants