Skip to content

Commit

Permalink
fix: generating pmtiles with different file extensions, update XLSFor…
Browse files Browse the repository at this point in the history
…m ordering (#278)

* refactor: update logging for OdkDataset property creation

* refactor: move digitization verification questions to end of xlsforms

* fix: handle multiple file extension types for pmtile generation

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* refactor: improve basemapper.dlthread logic readability

* fix: invalid logic setting imagery source via suffix

* refactor: replace dlthread with modular functions

* refactor: do not pass 'xy' param between funcs, use provider config

* fix: do not handle xy within pmtile generation (download standardises to zxy dirs)

* refactor: use imagery providers config for customTMS setup

* refactor: pass zoom levels and image format through to mbtile generation

* refactor: typo in OpenAerialMap provider

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
spwoodcock and pre-commit-ci[bot] authored Jul 30, 2024
1 parent d71ad4e commit ccf87dc
Show file tree
Hide file tree
Showing 7 changed files with 169 additions and 147 deletions.
7 changes: 3 additions & 4 deletions osm_fieldwork/OdkCentralAsync.py
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,6 @@ async def createDataset(
success = await gather(*properties_tasks, return_exceptions=True) # type: ignore
if not success:
log.warning(f"No properties were uploaded for ODK project ({projectId}) dataset name ({datasetName})")
log.info(f"Successfully created properties for dataset ({datasetName})")
except aiohttp.ClientError as e:
msg = f"Failed to create properties: {e}"
log.error(msg)
Expand Down Expand Up @@ -350,12 +349,12 @@ async def createDatasetProperty(
}

try:
log.debug(f"Creating property of dataset {datasetName}")
log.debug(f"Creating property ({field_name}) for dataset {datasetName}")
async with self.session.post(url, ssl=self.verify, json=payload) as response:
response_data = await response.json()
if response.status not in (200, 201):
log.debug(f"Failed to create properties: {response.status}, message='{response_data}'")
log.debug(f"Successfully created properties for dataset {datasetName}")
log.warning(f"Failed to create properties: {response.status}, message='{response_data}'")
log.debug(f"Successfully created property ({field_name}) for dataset {datasetName}")
return response_data
except aiohttp.ClientError as e:
msg = f"Failed to create properties: {e}"
Expand Down
Loading

0 comments on commit ccf87dc

Please sign in to comment.