Skip to content

Commit

Permalink
fix regular expression
Browse files Browse the repository at this point in the history
  • Loading branch information
cklunch committed Sep 19, 2024
1 parent 885c0b3 commit 0cd60f0
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ dependencies = [
"importlib-resources",
"importlib.metadata",
"pandas",
"parameterized",
"pyarrow",
"pyproj",
"requests",
Expand Down
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ datetime
importlib-resources
importlib.metadata
pandas
parameterized
pyarrow
pyproj
requests
Expand Down
4 changes: 2 additions & 2 deletions src/neonutilities/helper_mods/api_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -475,10 +475,10 @@ def get_tab_urls(url_set,
# get most recent sensor positions file for each site
if len(sp) > 0:
sp = sum(sp, [])
sr = re.compile("\/[A-Z]{4}\/")
sr = re.compile("[/][A-Z]{4}[/]")
sites = [sr.search(f["url"]).group(0) for f in sp]
sites = list(set(sites))
sites = [re.sub(pattern="\/", repl="", string=s) for s in sites]
sites = [re.sub(pattern="/", repl="", string=s) for s in sites]
try:
for s in sites:
spfl = get_recent(sp, s)
Expand Down

0 comments on commit 0cd60f0

Please sign in to comment.