Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion apps/project/tests/e2e_create_street_project_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -300,12 +300,18 @@ class Mutation:

@pytest.mark.vcr("assets/tests/projects/street/cassette")
def test_street_project_e2e(self):
# TODO(susilnem): Add more test with filters
with create_override():
self._test_project(
"assets/tests/projects/street/project_data.json5",
)

@pytest.mark.vcr("assets/tests/projects/street/cassette")
def test_street_project_with_filter_e2e(self):
with create_override():
self._test_project(
"assets/tests/projects/street/project_data_with_filter.json5",
)

# Generic functions

def _test_project(self, filename: str):
Expand Down
2 changes: 1 addition & 1 deletion assets
Submodule assets updated 24 files
+18,977 −0 tests/projects/street/cassette/TestStreetProjectE2E.test_street_project_with_filter_e2e.yaml
+27 −0 tests/projects/street/export_with_filters/expected_project_aggregated_result.csv
+27 −0 tests/projects/street/export_with_filters/expected_project_aggregated_result_modified.csv
+474 −0 tests/projects/street/export_with_filters/expected_project_aggregated_result_with_geometry.geojson
+26 −0 tests/projects/street/export_with_filters/expected_project_aoi.geojson
+2 −2 tests/projects/street/export_with_filters/expected_project_groups.csv
+2 −0 tests/projects/street/export_with_filters/expected_project_history.csv
+27 −0 tests/projects/street/export_with_filters/expected_project_result.csv
+27 −0 tests/projects/street/export_with_filters/expected_project_result_modified.csv
+27 −0 tests/projects/street/export_with_filters/expected_project_tasks.csv
+27 −0 tests/projects/street/export_with_filters/expected_project_tasks_modified.csv
+2 −0 tests/projects/street/export_with_filters/expected_project_users.csv
+0 −11 tests/projects/street/exports/README.md
+0 −906 tests/projects/street/exports/expected_project_aggregated_result_with_geometry_modified.geojson
+2 −2 tests/projects/street/project_data.json5
+511 −0 tests/projects/street/project_data_with_filter.json5
+0 −10 tests/projects/validate/exports/README.md
+0 −0 tests/projects/validate/exports/expected_project_groups.csv
+35 −0 tests/projects/validate/exports/expected_project_tasks.csv
+1 −1 tests/projects/validate/project_data.json5
+0 −4 tests/projects/validate_image/exports/README.md
+839 −0 tests/projects/validate_image/exports/expected_project_aggregated_result_with_geometry.geojson
+2 −2 tests/projects/validate_image/exports/expected_project_groups.csv
+1 −1 tests/projects/validate_image/project_data.json5
2 changes: 1 addition & 1 deletion firebase
Submodule firebase updated 0 files
2 changes: 1 addition & 1 deletion project_types/street/api_calls.py
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ def get_image_metadata(
start_time: str | None = None,
end_time: str | None = None,
randomize_order: bool = False,
sampling_threshold: int | None = None,
sampling_threshold: float | None = None,
) -> Grouping[StreetFeature]:
kwargs = {
"is_pano": is_pano,
Expand Down
2 changes: 1 addition & 1 deletion project_types/street/project.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class StreetMapillaryImageFilters(BaseModel):
start_time: custom_fields.PydanticDate | None = None
end_time: custom_fields.PydanticDate | None = None
randomize_order: custom_fields.PydanticBool = False
sampling_threshold: custom_fields.PydanticPositiveInt | None = None
sampling_threshold: custom_fields.PydanticFloat | None = None


class StreetProjectProperty(base_project.BaseProjectProperty):
Expand Down
4 changes: 2 additions & 2 deletions schema.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -2150,7 +2150,7 @@ type StreetMapillaryImageFilters {
isPano: Boolean
organizationId: String
randomizeOrder: Boolean!
samplingThreshold: Int
samplingThreshold: Float
startTime: String
}

Expand All @@ -2160,7 +2160,7 @@ input StreetMapillaryImageFiltersInput {
isPano: Boolean = null
organizationId: String = null
randomizeOrder: Boolean! = false
samplingThreshold: Int = null
samplingThreshold: Float = null
startTime: String = null
}

Expand Down
2 changes: 2 additions & 0 deletions utils/fields.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,8 @@ def _validate_vector_tile_url(value: typing.Any):

PydanticBool = typing.Annotated[bool, Field(strict=True)]

PydanticFloat = typing.Annotated[float, Field(strict=True)]

PydanticDate = typing.Annotated[
str,
Field(
Expand Down
Loading