Skip to content

Commit

Permalink
Inject development API_URL when required
Browse files Browse the repository at this point in the history
  • Loading branch information
prouast committed Jul 6, 2024
1 parent 388ca45 commit 99ae199
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ jobs:
run: |
python -m pip install --upgrade pip
python -m pip install ".[test]"
- name: Set API_URL for development branch
if: github.ref == 'refs/heads/development'
run: echo "API_URL=https://api.rouast.com/vitallens-dev" >> $GITHUB_ENV
- name: Lint with flake8
run: |
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ dependencies = [
"numpy",
"onnxruntime",
"prpy[ffmpeg,numpy_min]>=0.2.7",
"python-dotenv",
"pyyaml",
"requests",
]
Expand Down
8 changes: 7 additions & 1 deletion vitallens/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.

from dotenv import load_dotenv
import os
load_dotenv()

SECONDS_PER_MINUTE = 60.0

# Minima and maxima of derived vitals
Expand All @@ -30,7 +34,9 @@
API_MIN_FRAMES = 16
API_MAX_FRAMES = 900
API_OVERLAP = 30
API_URL = "https://api.rouast.com/vitallens-dev"
API_URL = "https://api.rouast.com/vitallens-v1"
if 'API_URL' in os.environ:
API_URL = os.getenv('API_URL')

# Disclaimer message
DISCLAIMER = "The provided values are estimates and should be interpreted according to the provided confidence levels ranging from 0 to 1. The VitalLens API is not a medical device and its estimates are not intended for any medical purposes."

0 comments on commit 99ae199

Please sign in to comment.