ready for prod
	
		
			
	
		
	
	
		
	
		
			Some checks failed
		
		
	
	
		
			
				
	
				Build and deploy the backend to staging / Build and push image (pull_request) Successful in 2m25s
				
			
		
			
				
	
				Run linting on the backend code / Build (pull_request) Successful in 27s
				
			
		
			
				
	
				Run testing on the backend code / Build (pull_request) Failing after 4m5s
				
			
		
			
				
	
				Build and deploy the backend to staging / Deploy to staging (pull_request) Successful in 24s
				
			
		
		
	
	
				
					
				
			
		
			Some checks failed
		
		
	
	Build and deploy the backend to staging / Build and push image (pull_request) Successful in 2m25s
				
			Run linting on the backend code / Build (pull_request) Successful in 27s
				
			Run testing on the backend code / Build (pull_request) Failing after 4m5s
				
			Build and deploy the backend to staging / Deploy to staging (pull_request) Successful in 24s
				
			This commit is contained in:
		
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							| @@ -40,7 +40,7 @@ class ToiletsManager: | |||||||
|  |  | ||||||
|         self.radius = radius |         self.radius = radius | ||||||
|         self.location = location |         self.location = location | ||||||
|         CachingStrategy.use('XML', cacheDir=OSM_CACHE_DIR) |         CachingStrategy.use('XML', cache_dir=OSM_CACHE_DIR) | ||||||
|  |  | ||||||
|  |  | ||||||
|     def generate_toilet_list(self) -> list[Toilets] : |     def generate_toilet_list(self) -> list[Toilets] : | ||||||
| @@ -52,14 +52,14 @@ class ToiletsManager: | |||||||
|         list[Toilets]: A list of `Toilets` objects containing detailed information  |         list[Toilets]: A list of `Toilets` objects containing detailed information  | ||||||
|                        about the toilets found around the given coordinates. |                        about the toilets found around the given coordinates. | ||||||
|         """ |         """ | ||||||
|         bbox = tuple((f"around:{self.radius}", str(self.location[0]), str(self.location[1]))) |         bbox = tuple((self.radius, self.location[0], self.location[1])) | ||||||
|         osm_types = ['node', 'way', 'relation'] |         osm_types = ['node', 'way', 'relation'] | ||||||
|         toilets_list = [] |         toilets_list = [] | ||||||
|  |  | ||||||
|         query = build_query( |         query = build_query( | ||||||
|                 area = bbox, |                 area = bbox, | ||||||
|                 element_types = osm_types, |                 element_types = osm_types, | ||||||
|                 selector = ['"amenity"="toilets"'], |                 selector = '"amenity"="toilets"', | ||||||
|                 out = 'ids center tags' |                 out = 'ids center tags' | ||||||
|                 ) |                 ) | ||||||
|         self.logger.debug(f"Query: {query}") |         self.logger.debug(f"Query: {query}") | ||||||
| @@ -118,17 +118,17 @@ class ToiletsManager: | |||||||
|                 # Extract tags as a dictionary |                 # Extract tags as a dictionary | ||||||
|                 tags = {tag.get('k'): tag.get('v') for tag in elem.findall('tag')} |                 tags = {tag.get('k'): tag.get('v') for tag in elem.findall('tag')} | ||||||
|  |  | ||||||
|                 if 'wheelchair' in tags().keys() and tags['wheelchair'] == 'yes': |                 if 'wheelchair' in tags.keys() and tags['wheelchair'] == 'yes': | ||||||
|                     toilets.wheelchair = True |                     toilets.wheelchair = True | ||||||
|  |  | ||||||
|                 if 'changing_table' in tags().keys() and tags['changing_table'] == 'yes': |                 if 'changing_table' in tags.keys() and tags['changing_table'] == 'yes': | ||||||
|                     toilets.changing_table = True |                     toilets.changing_table = True | ||||||
|  |  | ||||||
|                 if 'fee' in tags().keys() and tags['fee'] == 'yes': |                 if 'fee' in tags.keys() and tags['fee'] == 'yes': | ||||||
|                     toilets.fee = True |                     toilets.fee = True | ||||||
|  |  | ||||||
|                 if 'opening_hours' in tags().keys() : |                 if 'opening_hours' in tags.keys() : | ||||||
|                     toilets.opening_hours = elem.tag('opening_hours') |                     toilets.opening_hours = tags['opening_hours'] | ||||||
|  |  | ||||||
|                 toilets_list.append(toilets) |                 toilets_list.append(toilets) | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user