Skip to content

Commit 219c4c7

Browse files
Replace relative imports with absolute ones
1 parent fac23f8 commit 219c4c7

File tree

7 files changed

+98
-10
lines changed

7 files changed

+98
-10
lines changed
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: Publish Release
2+
3+
on:
4+
push:
5+
tags:
6+
- "v*"
7+
8+
jobs:
9+
release:
10+
name: Build & Publish to PyPI + GitHub Executable
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Checkout Repository
15+
uses: actions/checkout@v4
16+
17+
- name: Set Up Python
18+
uses: actions/setup-python@v4
19+
with:
20+
python-version: "3.11"
21+
22+
- name: Install System Dependencies
23+
run: |
24+
apt-get update
25+
apt-get install -y build-essential python3-dev patchelf
26+
27+
- name: Install Build Dependencies
28+
run: |
29+
python -m pip install --upgrade pip
30+
pip install setuptools wheel twine nuitka
31+
32+
- name: Build PyPI Package
33+
run: |
34+
python setup.py sdist bdist_wheel
35+
36+
- name: Publish to PyPI
37+
env:
38+
TWINE_USERNAME: ${{ secrets.TWINE_USERNAME }}
39+
TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }}
40+
run: |
41+
twine upload dist/*
42+
43+
- name: Build Standalone Executable with Nuitka
44+
run: |
45+
nuitka vulnebify/cli.py --onefile --output-dir=build --output-filename=vulnebify
46+
47+
- name: Create GitHub Release
48+
uses: softprops/action-gh-release@v2
49+
with:
50+
files: |
51+
dist/*
52+
build/vulnebify
53+
generate_release_notes: true

.github/workflows/run_tests.yaml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Run tests
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
paths-ignore:
8+
- 'README.md'
9+
pull_request:
10+
branches:
11+
- main
12+
paths-ignore:
13+
- 'README.md'
14+
15+
jobs:
16+
test:
17+
runs-on: ubuntu-latest
18+
steps:
19+
- name: Checkout code
20+
uses: actions/checkout@v4
21+
22+
- name: Set up Python
23+
uses: actions/setup-python@v5
24+
with:
25+
python-version: '3.11'
26+
27+
- name: Install dependencies
28+
run: |
29+
python -m pip install --upgrade pip
30+
pip install -r requirements-dev.txt
31+
pip install .
32+
33+
- name: Run tests
34+
run: |
35+
pytest .

tests/test_cli.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ def test_run_scan_ip_with_wait():
7676
text=True,
7777
)
7878
assert result.returncode == 0
79-
assert "Discovered open port(s) on 1.1.1.1"
79+
assert "Discovered open port(s) on 1.1.1.1" in result.stdout
8080
assert "✅ Scan finished! Processed: 1 host(s)" in result.stdout
8181

8282

vulnebify/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
from .client import Vulnebify
1+
from vulnebify.client import Vulnebify

vulnebify/cli.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@
88
from typing import List
99
from datetime import datetime
1010

11-
from .client import Vulnebify
12-
from .models import Scan, ScanStatus
13-
from .errors import VulnebifyError
14-
from .output import OutputType, Output, HumanOutput, JsonOutput
11+
from vulnebify.client import Vulnebify
12+
from vulnebify.models import Scan, ScanStatus
13+
from vulnebify.errors import VulnebifyError
14+
from vulnebify.output import OutputType, Output, HumanOutput, JsonOutput
1515

1616
CONFIG_PATH = os.path.expanduser("~/.vulnebifyrc")
1717

vulnebify/client.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
from urllib3.util.retry import Retry
77
from typing import List
88

9-
from .errors import *
10-
from .models import *
9+
from vulnebify.errors import *
10+
from vulnebify.models import *
1111

1212

1313
class Idempotency:

vulnebify/output.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33

44
from abc import ABC, abstractmethod
55

6-
from .models import *
7-
from .errors import VulnebifyError, VulnebifyApiError
6+
from vulnebify.models import *
7+
from vulnebify.errors import VulnebifyError, VulnebifyApiError
88

99

1010
class OutputType(str, Enum):

0 commit comments

Comments
 (0)