Skip to content

Commit

Permalink
Added streamlit to readme & docs update(new make commands)
Browse files Browse the repository at this point in the history
  • Loading branch information
ryansurf committed Jul 24, 2024
1 parent 54207ad commit d4c5853
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 4 deletions.
12 changes: 11 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -162,14 +162,24 @@ Note that the Flask server must be running in order to send emails.
<img src="images/website.gif" alt="cli-surf_website gif" style="width: 700px; height: auto;">
</p>

Although this application was made with the cli in mind, there is a frontend.
Although this application was made with the cli in mind, there are two frontends (experimenting at the moment).

**HTML/JS/CSS Frontend**

`http://localhost:8000/home` **or** `<ip_of_host>:<port>/home` if the application is running on a different host or you have changed the default port.

You may need to change `IP_ADDRESS` in `.env` to match the ip of the host running the machine.

Now, running `python3 server.py` will launch the website!

**Streamlit Frontend**

[Streamlit](https://streamlit.io/) is also an option that we are experimenting with.

To run streamlit: `streamlit run src/dev_streamlit.py`

You will be able to find the frontend here: `http://localhost:8502`


## 📈 Contributing

Expand Down
8 changes: 6 additions & 2 deletions docs/cheat_sheet.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ When developing, these commands may come in handy:
| `poetry add <package-name>` | Add a new dependency to Poetry |
| `poetry add --group dev <package-name>` | Add a new developer dependency to Poetry |
| `poetry show` | List all available dependencies with descriptions |
| `poetry run pre-commit run --all-files` | Run the Linter & Formatter |
| `pre-commit run --all-files` | Run the Linter & Formatter |

## [Mkdocs Commands](https://www.mkdocs.org/user-guide/)

Expand All @@ -30,12 +30,15 @@ When developing, these commands may come in handy:

| Argument | Description|
| -------- | ------- |
| `make install` | Install dependencies and activates the virtual environment. |
| `make run` | Runs `server.py` |
| `make run_docker` | Runs `docker compose up -d` |
| `make test` | Runs pytest |
| `make test_docker` | Runs pytest on Docker |
| `make output_coverage` | Outputs the coverage of the tests |
| `make send_email` | Runs `send_email.py` |
| `make lint` | Runs the ruff linter |
| `make format` | Runs the ruff formatter |


## [Git](https://education.github.com/git-cheat-sheet-education.pdf)
Expand All @@ -51,4 +54,5 @@ When developing, these commands may come in handy:
| `git checkout -b <branch>` | Creates a new branch, `branch`, and switches into it |
| `git branch -d <branch>` | Delete a local branch |
| `git push -u origin <branch-name>` | Pushes a local branch to the upstream remote repo |
| `git log --branches --not --remotes` | View commits that have not yet been pushed |
| `git log --branches --not --remotes` | View commits that have not yet been pushed |
| `git fetch origin pull/ID/head:BRANCH_NAME` | Checking out a PR branch with `ID` and `BRANCH_NAME` |
4 changes: 3 additions & 1 deletion docs/styling.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,6 @@ This is achieved using the ruff Linter and Formatter.

The Linter and Formatter are automatically executed before committing via pre-commit.

If you want to run the Linter and Formatter at any time, execute `poetry run pre-commit run --all-files`.
If you want to run the Linter and Formatter at any time, execute `pre-commit run --all-files`.

You may also run `make lint` or `make format` to run the linter/formatter on its own.

1 comment on commit d4c5853

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Coverage

Coverage Report
FileStmtsMissCoverMissing
src
   __init__.py00100% 
   api.py101694%30, 48, 70–71, 103–104
   art.py9367%24–25, 37
   cli.py25580%26, 37, 55–56, 60
   dev_streamlit.py37370%1–85
   gpt.py10640%16–21, 32–45
   helper.py1575863%53, 55, 57, 59, 61, 63, 65, 67, 69, 71, 73, 75, 77, 79, 91, 102–106, 132, 134, 136, 145–153, 165, 178–179, 197–199, 209, 211–212, 235–236, 274–284, 291–299
   send_email.py24240%5–48
   server.py41410%5–82
   settings.py220100% 
   streamlit_helper.py33330%5–90
TOTAL45921354% 

Tests Skipped Failures Errors Time
9 0 💤 0 ❌ 0 🔥 15.938s ⏱️

Please sign in to comment.