ryansurf / cli-surf

Get surf and ocean data from the command line interface
MIT License
18 stars 30 forks source link

Help.txt path update and new tests #62

Closed ryansurf closed 4 months ago

ryansurf commented 4 months ago

https://github.com/ryansurf/cli-surf/issues/61

help.txt needed its path updated in server.py

I also added new tests in tests/test_server.py, which make sure the Flask server is running and responds as intended (200 OK).

I turned the flask server into a function, create_app(), so we can spin up the server and perform tests on it with a function call.

Let me know what you think! @K-dash

github-actions[bot] commented 4 months ago

Coverage

Coverage Report
FileStmtsMissCoverMissing
src
   __init__.py00100% 
   api.py106793%32–36, 54, 76–77, 109–110
   art.py9367%24–25, 37
   cli.py25388%26, 55–56
   dev_streamlit.py37370%1–86
   gpt.py10640%16–21, 32–45
   helper.py1596062%53, 55, 57, 59, 61, 63, 65, 67, 69, 71, 73, 75, 77, 79, 91, 102–106, 132, 134, 136, 145–155, 167, 180–181, 199–201, 211, 213–214, 237–238, 277–287, 294–302
   send_email.py24240%5–48
   server.py441077%53, 66–69, 83–87, 99–101
   settings.py220100% 
   streamlit_helper.py33330%5–90
TOTAL46918361% 

Tests Skipped Failures Errors Time
10 0 :zzz: 0 :x: 0 :fire: 18.345s :stopwatch:
ryansurf commented 4 months ago

Hey @K-dash , thanks for the review. I like all of your suggestions, passing the environment variables as an argument makes more sense for testing purposes, let's implement these changes.

I believe you can approve the changes you suggested? As the author of this PR I cannot.

K-dash commented 4 months ago

@ryansurf I'm sorry, it seems there were issues with my proposal, as the Lint and Test are failing. 🙇 Could you please help me with the corrections?

ryansurf commented 4 months ago

@ryansurf I'm sorry, it seems there were issues with my proposal, as the Lint and Test are failing. 🙇 Could you please help me with the corrections?

No problem :smiley:

Edit: Linter and formatter passed! Merging