Skip to content

Commit 67cd393

Browse files
committed
W.I.P3
1 parent 6a84c76 commit 67cd393

File tree

3 files changed

+191
-330
lines changed

3 files changed

+191
-330
lines changed

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,9 @@ endif
3535
endif
3636
ifndef SPATIAL
3737
ifeq ($(UNAME),Darwin)
38-
$(error GDAL tools not found in PATH)
38+
# $(error GDAL tools not found in PATH)
3939
endif
40-
sudo apt-get install libsqlite3-mod-spatialite -y
40+
# sudo apt-get install libsqlite3-mod-spatialite -y
4141
endif
4242
pyproj sync --file uk_os_OSTN15_NTv2_OSGBtoETRS.tif -v
4343
# install pre-commits

digital_land/commands.py

Lines changed: 18 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@
99
from packaging.version import Version
1010
import pandas as pd
1111
from pathlib import Path
12-
from datetime import datetime
12+
13+
# from datetime import datetime
1314
from distutils.dir_util import copy_tree
1415
import geojson
1516
from requests import HTTPError
@@ -859,19 +860,19 @@ def validate_and_add_data_input(
859860
plugin=endpoint["plugin"],
860861
refill_todays_logs=True,
861862
)
862-
'''
863-
try:
864-
# log is already returned from fetch, but read from file if needed for verification
865-
log_path = collector.log_path(datetime.utcnow(), endpoint["endpoint"])
866-
if os.path.isfile(log_path):
867-
with open(log_path, "r") as f:
868-
log = json.load(f)
869-
except Exception as e:
870-
print(
871-
f"Error: The log file for {endpoint} could not be read from path {log_path}.\n{e}"
872-
)
873-
break
874-
'''
863+
864+
# try:
865+
# # log is already returned from fetch, but read from file if needed for verification
866+
# log_path = collector.log_path(datetime.utcnow(), endpoint["endpoint"])
867+
# if os.path.isfile(log_path):
868+
# with open(log_path, "r") as f:
869+
# log = json.load(f)
870+
# except Exception as e:
871+
# print(
872+
# f"Error: The log file for {endpoint} could not be read from path {log_path}.\n{e}"
873+
# )
874+
# break
875+
875876
log_status = log.get("status", None)
876877
exception = log.get("exception", None)
877878
if fetch_status not in [FetchStatus.OK, FetchStatus.ALREADY_FETCHED]:
@@ -907,6 +908,9 @@ def validate_and_add_data_input(
907908
"organisation": row["organisation"],
908909
"entry-date": row["entry-date"],
909910
}
911+
# elif:
912+
# raise Error(
913+
# f"No resource avaible: {log_status if log_status else exception}"
910914
)
911915

912916
return collection, endpoint_resource_info

0 commit comments

Comments
 (0)