Skip to content

Commit

Permalink
remove print statements
Browse files Browse the repository at this point in the history
  • Loading branch information
tomkralidis committed Jan 26, 2025
1 parent 22db26d commit ecd975a
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 19 deletions.
2 changes: 1 addition & 1 deletion pycsw/core/metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# Authors: Tom Kralidis <[email protected]>
# Ricardo Garcia Silva <[email protected]>
#
# Copyright (c) 2023 Tom Kralidis
# Copyright (c) 2025 Tom Kralidis
# Copyright (c) 2016 James F. Dickens
# Copyright (c) 2017 Ricardo Garcia Silva
#
Expand Down
6 changes: 1 addition & 5 deletions pycsw/ogc/api/records.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Authors: Tom Kralidis <[email protected]>
# Angelos Tzotsos <[email protected]>
#
# Copyright (c) 2024 Tom Kralidis
# Copyright (c) 2025 Tom Kralidis
# Copyright (c) 2021 Angelos Tzotsos
#
# Permission is hereby granted, free of charge, to any person
Expand Down Expand Up @@ -901,8 +901,6 @@ def item(self, headers_, args, collection, item):
if 'json' in headers_['Content-Type']:
headers_['Content-Type'] = 'application/geo+json'

print("RESPONSE", response)

return self.get_response(200, headers_, response, 'item.html')

def manage_collection_item(self, headers_, action='create', item=None, data=None):
Expand Down Expand Up @@ -1368,8 +1366,6 @@ def record2json(record, url, collection, mode='ogcapi-records'):
if record.time_begin not in [None, '']:
begin, _ = to_rfc3339(record.time_begin)
end, _ = to_rfc3339(record.time_end)
print("BEFORE", record.time_begin, record.time_end)
print("AFTER", begin, end)
record_dict['time'] = {
'interval': [begin, end]
}
Expand Down
10 changes: 1 addition & 9 deletions pycsw/ogc/api/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# Authors: Tom Kralidis <[email protected]>
# Angelos Tzotsos <[email protected]>
#
# Copyright (c) 2024 Tom Kralidis
# Copyright (c) 2025 Tom Kralidis
# Copyright (c) 2021 Angelos Tzotsos
#
# Permission is hereby granted, free of charge, to any person
Expand Down Expand Up @@ -91,13 +91,9 @@ def json_serial(obj):
"""

if isinstance(obj, (datetime, date, time)):
print("1", obj)
print("1", type(obj))
if isinstance(obj, (datetime, time)):
print("DATETIME", obj)
return obj.strftime('%Y-%m-%dT%H:%M:%SZ')
else: # date
print("DATE", obj)
return obj.strftime('%Y-%m-%d')
elif isinstance(obj, bytes):
try:
Expand Down Expand Up @@ -241,7 +237,6 @@ def to_rfc3339(value: str) -> Union[tuple, None]:
:returns: `tuple` of `datetime` of RFC3339 value and date type
"""

print("VALUE", value)
try:
dt = dparse(value) # TODO TIMEZONE)
except Exception as err:
Expand All @@ -255,7 +250,4 @@ def to_rfc3339(value: str) -> Union[tuple, None]:
dt_type = 'date-time'
dt_type = 'date-time'


print("DT", dt)
print("DT_TYPE", dt_type)
return dt, dt_type
3 changes: 1 addition & 2 deletions pycsw/stac/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#
# Authors: Tom Kralidis <[email protected]>
#
# Copyright (c) 2024 Tom Kralidis
# Copyright (c) 2025 Tom Kralidis
#
# Permission is hereby granted, free of charge, to any person
# obtaining a copy of this software and associated documentation
Expand Down Expand Up @@ -460,7 +460,6 @@ def item(self, headers_, args, collection, item):
headers_['Accept'] = 'application/geo+json'
headers, status, response = super().item(headers_, args, collection, item)

print("TOM", response)
if collection not in self.get_all_collections():
msg = 'Invalid collection'
LOGGER.exception(msg)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Authors: Tom Kralidis <[email protected]>
# Angelos Tzotsos <[email protected]>
#
# Copyright (c) 2023 Tom Kralidis
# Copyright (c) 2025 Tom Kralidis
# Copyright (c) 2022 Angelos Tzotsos
#
# Permission is hereby granted, free of charge, to any person
Expand Down Expand Up @@ -270,7 +270,6 @@ def test_json_transaction(config, sample_collection, sample_item,
content = json.loads(api.item({}, {}, 'metadata:main',
'20201211_223832_CS2')[2])

print("JJJ22222", content)
assert content['id'] == '20201211_223832_CS2'
assert content['properties']['datetime'] == sample_item['properties']['datetime']
assert content['collection'] == 'metadata:main'
Expand Down

0 comments on commit ecd975a

Please sign in to comment.