Skip to content

Commit

Permalink
fix reqs
Browse files Browse the repository at this point in the history
  • Loading branch information
pgarrett-scripps committed Jul 24, 2024
1 parent fce7dae commit 8618745
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
6 changes: 4 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,10 @@ classifiers = [
keywords = ["chaparral", "api", "bioinformatics"]

dependencies = [
"requests>=2.25.1",
"pydantic>=1.8"
"requests>=2.31.0",
"pydantic>=2.7.1",
"pydantic[email]>=2.7.1",
"ping3>=4.0.8"
]

[project.optional-dependencies]
Expand Down
7 changes: 4 additions & 3 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
chaparralapi==0.0.1
setuptools==68.2.0
requests==2.31.0
pydantic==2.7.1
setuptools==68.2.0
pytest==8.2.0
pydantic[email]==2.7.1
pytest==8.2.0
ping3==4.0.8
4 changes: 3 additions & 1 deletion src/chaparralapi/utils.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from ping3 import ping
from . import constants


def _get_best_server(ips: list[str]) -> str:
"""
Get the best server from a list of IPs based on ping time
Expand All @@ -22,6 +23,7 @@ def _get_best_server(ips: list[str]) -> str:

return best_ip


def get_best_chaparral_server() -> str:
"""
Get the best Chaparral server based on ping time
Expand All @@ -30,4 +32,4 @@ def get_best_chaparral_server() -> str:
str: The best Chaparral server
"""
servers = constants.CHAPARRAL_SERVERS
return _get_best_server(servers)
return _get_best_server(servers)

0 comments on commit 8618745

Please sign in to comment.