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
24 changes: 0 additions & 24 deletions .flake8

This file was deleted.

29 changes: 29 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Run Tests

on:
push:
branches: ["main"]
pull_request:
branches: ["main"]

jobs:
test:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.10"

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

- name: Run tests
run: |
poetry run pytest tests/
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ venv/
__pycache__/
.idea/
SERPENT.egg-info/
build/
build/
29 changes: 29 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-added-large-files

- repo: https://github.com/psf/black
rev: 25.9.0
hooks:
- id: black

- repo: https://github.com/PyCQA/isort
rev: 5.13.2
hooks:
- id: isort
name: isort (python)

- repo: https://github.com/pylint-dev/pylint
rev: v3.3.8
hooks:
- id: pylint
name: pylint
entry: poetry run pylint
language: system
types: [python]
args: ["--rcfile=pyproject.toml"]
Comment thread
coderabbitai[bot] marked this conversation as resolved.
5 changes: 5 additions & 0 deletions .pylintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Source - https://stackoverflow.com/q
# Posted by Łukasz Rogalski, modified by community. See post 'Timeline' for change history
# Retrieved 2026-01-10, License - CC BY-SA 4.0

pylint: max-line-length=120
2 changes: 1 addition & 1 deletion .streamlit/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ primaryColor = "#4CAF50"
backgroundColor = "#FFFFFF"
secondaryBackgroundColor = "#F5F5F5"
textColor = "#262730"
font = "sans serif"
font = "sans serif"
74 changes: 45 additions & 29 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,44 +68,60 @@ def fix_bugs(bugs_remaining):
**Generated Flowchart:**
![Flowchart for fixing bugs](examples/well-this-is-bugging-me.png)

## Getting Started

### Prerequisites
`Python 3.8` or above installed on your local machine. I've made it on `Python 3.13.5` to be precise.

### Installation

1. Clone the repository:
## Getting Started: Zero to Hero 🚀

New to Python? No worries! Follow this step-by-step guide to get SERPENT running on your machine.

### 1. Install Prerequisites

#### Install Python (3.10+)
You need Python to run the code.
- **Windows**: Download the installer from [python.org](https://www.python.org/downloads/).
- *Crucial Step*: Check the box **"Add Python to PATH"** before clicking Install.
- **macOS**: Use Homebrew: `brew install python`
- **Linux**: `sudo apt install python3 python3-pip`

#### Install Poetry (Dependency Manager)
Poetry handles all the library magic for us.
- **Windows (PowerShell)**:
```powershell
(Invoke-WebRequest -Uri https://install.python-poetry.org -UseBasicParsing).Content | python -
```
- **macOS / Linux**:
```bash
curl -sSL https://install.python-poetry.org | python3 -
```
*After installing, close and reopen your terminal/command prompt.*

#### Install Graphviz (The Drawing Engine)
This tool allows Python to generate the actual images.
- **Windows**:
- Download the installer from [graphviz.org](https://graphviz.org/download/).
- *Crucial Step*: select **"Add Graphviz to the system PATH for all users"** during installation.
- **macOS**: `brew install graphviz`
- **Linux**: `sudo apt install graphviz`

### 2. Setup the Project

1. **Clone the repository**:
```bash
git clone https://github.com/Asifdotexe/SERPENT.git
cd SERPENT
```

2. Create and activate a virtual environment (recommended):
2. **Install Dependencies**:
Run this command in the project folder to install everything safely:
```bash
# Create the environment
python -m venv venv

# Activate on Linux/macOS
source venv/bin/activate

# Activate on Windows
venv\Scripts\activate
poetry install
```

3. Install all dependencies from `pyproject.toml`:
```bash
# Install core app for production
pip install .

# Installs core app and development tools in editable mode
pip install -e .[dev]
```
### 3. Run the App

4. Run the Streamlit app:
```bash
streamlit run serpent.py
```
Launch the application with a single command:
```bash
poetry run streamlit run serpent/app.py
```
*Note: The app runs locally in your browser at `http://localhost:8501`.*

---

Expand Down
2 changes: 1 addition & 1 deletion packages.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
graphviz
graphviz
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Loading