Skip to content

feat: reorg as package #41

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 11, 2025
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
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ IDD loads two versions of the same application. The first one is the base versio
## :zap: Usage
Write about how to use this project.

`python3 idd.py -c gdb -ba <path to base executable> -ra <path to regressed executable>`
`python -m idd -c gdb -ba <path to base executable> -ra <path to regressed executable>`

### :electric_plug: Installation
- Steps on how to install this project on Ubuntu 22.04
Expand All @@ -27,7 +27,7 @@ $ source iddenv/bin/activate
-- Installing required packages:

```
$ pip3 install textual textual_inputs pygdbmi
$ pip install -e.
```

## :cherry_blossom: Community
Expand Down
24 changes: 24 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"

[project]
name = "idd"
version = "0.1.0"
description = "Add your description here"
readme = "README.md"
authors = [
{ name = "Martin Vassilev" },
{ name = "Vassil Vassilev" },
{ name = "Alexander Penev" },
]
requires-python = ">=3.9"
dependencies = [
"pygdbmi",
"rich",
"textual",
]


[project.scripts]
idd = "idd.cli:main"
12 changes: 0 additions & 12 deletions requirements.txt

This file was deleted.

File renamed without changes.
4 changes: 4 additions & 0 deletions src/idd/__main__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
from idd.cli import main

if __name__ == "__main__":
main()
14 changes: 7 additions & 7 deletions idd.py → src/idd/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@
from textual.widgets import Input
from textual.containers import Horizontal, Vertical

from diff_driver import DiffDriver
from idd.diff_driver import DiffDriver

from ui.footer import Footer
from ui.header import Header
from ui.scrollable_area import TextScrollView
from idd.ui.footer import Footer
from idd.ui.header import Header
from idd.ui.scrollable_area import TextScrollView


class DiffDebug(App):
Expand Down Expand Up @@ -413,7 +413,7 @@ async def on_key(self, event: events.Key) -> None:
self.regressed_command_bar.value = self.regressed_history[self.regressed_history_index]


if __name__ == "__main__":
def main() -> None:
Debugger = None

parser = argparse.ArgumentParser(description='Diff Debug for simple debugging!')
Expand Down Expand Up @@ -446,7 +446,7 @@ async def on_key(self, event: events.Key) -> None:
base_only = False

if comparator == 'gdb':
from debuggers.gdb.gdb_mi_driver import GDBMiDebugger, IDDGdbController
from idd.debuggers.gdb.gdb_mi_driver import GDBMiDebugger, IDDGdbController

if ra == "" and rpid is None:
Debugger = IDDGdbController(ba, bpid, bs)
Expand All @@ -455,7 +455,7 @@ async def on_key(self, event: events.Key) -> None:
Debugger = GDBMiDebugger(ba, bs, ra, rs, base_pid=bpid, regression_pid=rpid)

elif comparator == 'lldb':
from debuggers.lldb.lldb_driver import LLDBParallelDebugger, LLDBDebugger
from idd.debuggers.lldb.lldb_driver import LLDBParallelDebugger, LLDBDebugger

if ra == "" and rpid is None:
Debugger = LLDBDebugger(ba, bpid)
Expand Down
Empty file added src/idd/debuggers/__init__.py
Empty file.
Empty file.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from pygdbmi.gdbcontroller import GdbController
from pprint import pprint
from driver import Driver
from idd.driver import Driver

import io
import time
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import os
import json

from debuggers.gdb.idd_gdb_controller import create_IDDGdbController, terminate_all_IDDGdbController, IDDGdbController
from driver import Driver
from idd.debuggers.gdb.idd_gdb_controller import create_IDDGdbController, terminate_all_IDDGdbController, IDDGdbController
from idd.driver import Driver

from debuggers.gdb.utils import parse_gdb_line
from idd.debuggers.gdb.utils import parse_gdb_line

base_response = []
regressed_response = []
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
import subprocess
import json

from driver import IDDParallelTerminate
from debuggers.gdb.utils import parse_gdb_line
from idd.driver import IDDParallelTerminate
from idd.debuggers.gdb.utils import parse_gdb_line

from pygdbmi.gdbcontroller import GdbController
from pygdbmi.IoManager import IoManager
Expand Down
File renamed without changes.
Empty file.
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import os
import lldb

from driver import Driver, IDDParallelTerminate
from debuggers.lldb.lldb_extensions import *
from idd.driver import Driver, IDDParallelTerminate
from idd.debuggers.lldb.lldb_extensions import *
from multiprocessing import Process, Pipe


Expand Down
3 changes: 1 addition & 2 deletions diff_driver.py → src/idd/diff_driver.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import difflib
from differ import Differ
from idd.differ import Differ

class DiffDriver:
def get_diff(self, a, b, typ):
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion driver.py → src/idd/driver.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import abc
from abc import ABCMeta, abstractmethod
from abc import abstractmethod

class Driver(metaclass=abc.ABCMeta):
@abstractmethod
Expand Down
File renamed without changes.
Empty file added src/idd/py.typed
Empty file.
Empty file added src/idd/ui/__init__.py
Empty file.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
144 changes: 144 additions & 0 deletions uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.