Skip to content

Commit 42a7825

Browse files
authored
feat: reorg as package (#41)
Signed-off-by: Henry Schreiner <[email protected]>
1 parent 19fbc30 commit 42a7825

30 files changed

+191
-32
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ IDD loads two versions of the same application. The first one is the base versio
1212
## :zap: Usage
1313
Write about how to use this project.
1414

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

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

2929
```
30-
$ pip3 install textual textual_inputs pygdbmi
30+
$ pip install -e.
3131
```
3232

3333
## :cherry_blossom: Community

pyproject.toml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
[build-system]
2+
requires = ["hatchling"]
3+
build-backend = "hatchling.build"
4+
5+
[project]
6+
name = "idd"
7+
version = "0.1.0"
8+
description = "Add your description here"
9+
readme = "README.md"
10+
authors = [
11+
{ name = "Martin Vassilev" },
12+
{ name = "Vassil Vassilev" },
13+
{ name = "Alexander Penev" },
14+
]
15+
requires-python = ">=3.9"
16+
dependencies = [
17+
"pygdbmi",
18+
"rich",
19+
"textual",
20+
]
21+
22+
23+
[project.scripts]
24+
idd = "idd.cli:main"

requirements.txt

Lines changed: 0 additions & 12 deletions
This file was deleted.
File renamed without changes.

src/idd/__main__.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
from idd.cli import main
2+
3+
if __name__ == "__main__":
4+
main()

idd.py renamed to src/idd/cli.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@
1010
from textual.widgets import Input
1111
from textual.containers import Horizontal, Vertical
1212

13-
from diff_driver import DiffDriver
13+
from idd.diff_driver import DiffDriver
1414

15-
from ui.footer import Footer
16-
from ui.header import Header
17-
from ui.scrollable_area import TextScrollView
15+
from idd.ui.footer import Footer
16+
from idd.ui.header import Header
17+
from idd.ui.scrollable_area import TextScrollView
1818

1919

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

415415

416-
if __name__ == "__main__":
416+
def main() -> None:
417417
Debugger = None
418418

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

448448
if comparator == 'gdb':
449-
from debuggers.gdb.gdb_mi_driver import GDBMiDebugger, IDDGdbController
449+
from idd.debuggers.gdb.gdb_mi_driver import GDBMiDebugger, IDDGdbController
450450

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

457457
elif comparator == 'lldb':
458-
from debuggers.lldb.lldb_driver import LLDBParallelDebugger, LLDBDebugger
458+
from idd.debuggers.lldb.lldb_driver import LLDBParallelDebugger, LLDBDebugger
459459

460460
if ra == "" and rpid is None:
461461
Debugger = LLDBDebugger(ba, bpid)

src/idd/debuggers/__init__.py

Whitespace-only changes.

src/idd/debuggers/gdb/__init__.py

Whitespace-only changes.
File renamed without changes.

debuggers/gdb/gdb_driver.py renamed to src/idd/debuggers/gdb/gdb_driver.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from pygdbmi.gdbcontroller import GdbController
22
from pprint import pprint
3-
from driver import Driver
3+
from idd.driver import Driver
44

55
import io
66
import time

0 commit comments

Comments
 (0)