Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions .github/workflows/code-lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Lint and Format

on:
push:
pull_request:
workflow_dispatch:

jobs:
lint-format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Install Python
uses: actions/setup-python@v5
with:
python-version-file: "pyproject.toml"

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install ruff

- name: Run Ruff
run: ruff check --output-format=github .
46 changes: 29 additions & 17 deletions Contributing.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<h1 align="center">Contributors Guide⚡ </h1>
<h3 align="center">Welcome to our open-source project! 😍<br> We appreciate your interest in contributing.😊 <br>This guide will help you get started with the project and make your first contribution.</h3>

---
---

<h1 align="center">Creating first Pull Request 🌟</h1>

Expand All @@ -18,47 +18,59 @@ git clone https://github.com/<your-github-username>/Jarvis.git
cd Jarvis
```

5. Create a virtual environment.
5. Install Dependencies

**Step 1: Install uv (Skip if Already Installed)**

Choose the command for your operating system:

On Linux/macOS (using Bash):
```bash
python -m venv myenv
source myenv/bin/activate # On Windows, use `myenv\Scripts\activate`
curl -LsSf https://astral.sh/uv/install.sh | sh
```

6. Install the dependencies.
```bash
pip install -r requirements.txt
On Windows (using PowerShell):
```sh
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
```

**Step 2: Install Project Dependencies**

Run this command in your project directory. It automatically creates and uses a virtual environment named `.venv`.
```sh
uv sync
```

7. Create a new branch.
6. Create a new branch.
```bash
git checkout -b <your_branch_name>
```

8. Make changes.
9. Stage your changes and commit them.
7. Make changes.
8. Stage your changes and commit them.
```bash
git add .
git commit -m "<your_commit_message"
```

10. Push your local commits to the remote repository.
9. Push your local commits to the remote repository.
```bash
git push -u origin <your_branch_name>
```

11. Create your Pull Request.
12. Congratulations! 🎉 you've made your contribution.
10. Create your Pull Request.
11. Congratulations! 🎉 you've made your contribution.

### Running the Application
### Running the Application

1. Start the application.
```bash
streamlit run Jarvis.py
uv run streamlit run Jarvis.py
```
2. Access the application.
> Open your browser and navigate to `http://localhost:8501`

---
---

### Communication and Support 💬
- Join the project's communication channels to interact with other contributors and seek assistance.
Expand All @@ -80,7 +92,7 @@ You can refer to the following articles on basics of Git and Github and also con
- [Getting started with Git and GitHub](https://towardsdatascience.com/getting-started-with-git-and-github-6fcd0f2d4ac6)
- [Learn GitHub from Scratch](https://lab.github.com/githubtraining/introduction-to-github)

---
---

### Note from Admin ❗

Expand Down
15 changes: 9 additions & 6 deletions Jarvis.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import streamlit as st

from src.helpers.structPages import structPages
from src.helpers.getFolders import getFolders
from src.helpers.structPages import structPages


def application():
Expand All @@ -23,12 +23,15 @@ def application():
pages[folder_name.title()] = structPages(f"{MAIN_DIR}/{folder_dir}")

if st.user.email == st.secrets["general"]["ADMIN_EMAIL"] and st.user.given_name == st.secrets["general"]["ADMIN_NAME"]:
pages.update({
"Admin": [
st.Page("src/apps/auth/env.py", title="Environment Variables", icon=":material/security:"),
]
})
pages.update(
{
"Admin": [
st.Page("src/apps/auth/env.py", title="Environment Variables", icon=":material/security:"),
]
}
)

return st.navigation(pages)


application().run()
14 changes: 6 additions & 8 deletions SETUP.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Welcome to the Jarvis Virtual Assistant! This guide will walk you through settin
Ensure you have the following installed:

- [Python 3.9+](https://www.python.org/downloads/)
- [pip](https://pip.pypa.io/en/stable/)
- [uv](https://docs.astral.sh/uv/)
- [Git](https://git-scm.com/downloads)
- [Streamlit](https://docs.streamlit.io/)

Expand All @@ -27,28 +27,26 @@ cd jarvis

---

### 🧰 Set Up a Virtual Environment (Recommended)
### 🧰 Install uv

#### ▶️ Windows

```bash
python -m venv venv
venv\Scripts\activate
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
```

#### 🐧 macOS/Linux

```bash
python3 -m venv venv
source venv/bin/activate
curl -LsSf https://astral.sh/uv/install.sh | sh
```

---

### 🧪 Install Dependencies

```bash
pip install -r requirements.txt
uv sync
```

---
Expand Down Expand Up @@ -104,7 +102,7 @@ This will let you access all core features locally during development.
Launch the application:

```bash
streamlit run src/apps/public/home.py
uv run streamlit run src/apps/public/home.py
```

It should open in your browser at `http://localhost:8501`.
Expand Down
63 changes: 63 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
[project]
name = "jarvis"
version = "0.1.0"
description = "Jarvis is a powerful virtual AI assistant designed to simplify your daily tasks through voice command integration."
readme = "README.md"
requires-python = ">=3.13"
dependencies = [
"authlib>=1.6.5",
"deep-translator>=1.11.4",
"deepface>=0.0.95",
"faiss-cpu>=1.12.0",
"google-generativeai>=0.8.5",
"groq>=0.32.0",
"kaggle>=1.7.4.5",
"langchain-community>=0.3.30",
"langchain-core>=0.3.78",
"langchain-google-genai>=2.0.10",
"langchain-groq>=0.3.8",
"langchain-text-splitters>=0.3.11",
"matplotlib>=3.10.6",
"mtcnn>=1.0.0",
"opencv-python-headless>=4.12.0.88",
"pint>=0.25",
"plotly>=6.3.1",
"pygame>=2.6.1",
"pymultidictionary>=1.3.2",
"pypdf>=6.1.1",
"pypdf2>=3.0.1",
"pyperclip>=1.11.0",
"pyshorteners>=1.0.1",
"python-barcode>=0.16.1",
"python-dotenv>=1.1.1",
"pytz>=2025.2",
"qrcode>=8.2",
"speedtest-cli>=2.1.3",
"spotipy>=2.25.1",
"streamlit>=1.50.0",
"tensorflow>=2.20.0",
"tf-keras>=2.20.1",
"transformers>=4.57.0",
]

[dependency-groups]
lint = [
"ruff>=0.13.3",
]

[tool.ruff.lint]
select = [
"E",
"F",
"UP",
"B",
"SIM",
"I",
]

[tool.ruff.format]
indent-style = "space"

[tool.ruff]
line-length = 150
indent-width = 2
10 changes: 7 additions & 3 deletions src/apps/auth/auth.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,18 @@
from datetime import datetime
import streamlit as st
from time import sleep

import pytz
import streamlit as st

from src.utils.greeting import GreetUser


def unix_to_ist(timestamp):
india_tz = pytz.timezone('Asia/Kolkata')
format_str = '%I:%M:%S %p IST'
india_tz = pytz.timezone("Asia/Kolkata")
format_str = "%I:%M:%S %p IST"
return datetime.fromtimestamp(timestamp, pytz.utc).astimezone(india_tz).strftime(format_str)


def auth():
if st.user and not st.user.is_logged_in:
st.title("🔐 Login Required")
Expand All @@ -28,4 +31,5 @@ def auth():
sleep(2)
st.logout()


auth()
3 changes: 3 additions & 0 deletions src/apps/auth/env.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import streamlit as st


def displayStreamlitSecrets(data, prefix=""):
for key, value in data.items():
full_key = f"{prefix}{key}"
Expand All @@ -10,6 +11,7 @@ def displayStreamlitSecrets(data, prefix=""):
else:
st.text_input(label=key, value=str(value), disabled=True, key=full_key)


def env():
st.title("Environment Variables")
st.markdown(
Expand All @@ -24,4 +26,5 @@ def env():
else:
st.warning("You are not authorized to view the environment variables.", icon="⚠️")


env()
Loading