• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

gcivil-nyu-org / fall24-monday-team4 / 383

08 Dec 2024 09:22PM UTC coverage: 97.367% (-2.2%) from 99.538%
383

push

travis-pro

web-flow
Merge pull request #157 from gcivil-nyu-org/all_branch_merge

Develop V4

226 of 290 new or added lines in 12 files covered. (77.93%)

4 existing lines in 1 file now uncovered.

2995 of 3076 relevant lines covered (97.37%)

1.95 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

15.79
/utils/location_utils.py
1
import requests
2✔
2

3

4
def reverse_geocode(lat, lng):
2✔
5
    """Convert coordinates to address using Nominatim"""
NEW
6
    try:
×
NEW
7
        url = f"https://nominatim.openstreetmap.org/reverse?lat={lat}&lon={lng}&format=json"
×
NEW
8
        headers = {"User-Agent": "RoutePals/1.0"}
×
NEW
9
        response = requests.get(url, headers=headers)
×
NEW
10
        data = response.json()
×
NEW
11
        return data.get("display_name")
×
NEW
12
    except Exception:
×
NEW
13
        return None
×
14

15

16
def search_location(query):
2✔
17
    """Convert address query to coordinates using Nominatim"""
NEW
18
    try:
×
NEW
19
        url = (
×
20
            f"https://nominatim.openstreetmap.org/search?q={query}&limit=1&format=json"
21
        )
NEW
22
        headers = {"User-Agent": "RoutePals/1.0"}
×
NEW
23
        response = requests.get(url, headers=headers)
×
NEW
24
        data = response.json()
×
NEW
25
        return data[0] if data else None
×
NEW
26
    except Exception:
×
NEW
27
        return None
×
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc