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

feat(indicators): add inverse parameter to coverage function and add inversed eubucco coverage #762

Merged
merged 4 commits into from
Dec 19, 2023

Conversation

Gigaszi
Copy link
Contributor

@Gigaszi Gigaszi commented Dec 18, 2023

Description

Corresponding issue

Closes #749

New or changed dependencies

  • None

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

matthiasschaub
matthiasschaub previously approved these changes Dec 18, 2023
@@ -39,8 +39,8 @@ def __init__(
self.above_one_th = 1.30

@classmethod
async def coverage(cls) -> Polygon | MultiPolygon:
result = await db_client.get_eubucco_coverage()
async def coverage(cls, inverse=True) -> Polygon | MultiPolygon:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
async def coverage(cls, inverse=True) -> Polygon | MultiPolygon:
async def coverage(cls, inverse=False) -> Polygon | MultiPolygon:

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

tests/integrationtests/test_base_indicator.py Show resolved Hide resolved
@@ -43,9 +43,18 @@ def test_get_indicator_definitions_with_project():
assert indicator.projects == ["core"]


def test_get_coverage(mock_select_eubucco_coverage):
coverage = asyncio.run(definitions.get_coverage("building-comparison"))
def test_get_coverage():
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See above

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

matthiasschaub
matthiasschaub previously approved these changes Dec 18, 2023
@matthiasschaub matthiasschaub merged commit bc59b3c into main Dec 19, 2023
2 checks passed
@matthiasschaub matthiasschaub deleted the eubucco-coverage branch December 19, 2023 13:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants