Skip to content

Commit bd71f1b

Browse files
committed
Rename Python package from website_diff to wayback_diff
Complete the rename started in v1.0.0: rename the package directory, update all internal imports, test imports, CI coverage target, setup.py entry point, SECURITY.md references, and sync version to 1.1.0.
1 parent f712d6c commit bd71f1b

File tree

18 files changed

+30
-30
lines changed

18 files changed

+30
-30
lines changed

.github/workflows/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ jobs:
4646
4747
- name: Run tests
4848
run: |
49-
pytest tests/ -v --cov=website_diff --cov-report=xml --cov-report=term
49+
pytest tests/ -v --cov=wayback_diff --cov-report=xml --cov-report=term
5050
5151
- name: Upload coverage to Codecov
5252
uses: codecov/codecov-action@v3

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,7 @@ pip install -r requirements-dev.txt
354354
pytest tests/ -v
355355

356356
# Run with coverage
357-
pytest tests/ -v --cov=website_diff --cov-report=html
357+
pytest tests/ -v --cov=wayback_diff --cov-report=html
358358
```
359359

360360
---

SECURITY.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
### Security Measures Implemented
1313

1414
#### 1. URL Validation and SSRF Protection
15-
- **Location**: `website_diff/fetcher.py`
15+
- **Location**: `wayback_diff/fetcher.py`
1616
- **Implementation**:
1717
- URL scheme validation (only http/https allowed)
1818
- Basic SSRF protection with localhost/internal network detection
@@ -21,7 +21,7 @@
2121
- **Note**: Localhost access is allowed for development/testing purposes
2222

2323
#### 2. Input Sanitization
24-
- **Location**: `website_diff/cli.py`, `website_diff/link_traverser.py`
24+
- **Location**: `wayback_diff/cli.py`, `wayback_diff/link_traverser.py`
2525
- **Implementation**:
2626
- URL normalization and validation
2727
- Filtering of dangerous protocols (javascript:, mailto:, tel:, etc.)

setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
setup(
99
name="wayback-diff",
10-
version="1.0.0",
10+
version="1.1.0",
1111
author="geiserx",
1212
author_email="sergio@geiser.cloud",
1313
description="A comprehensive tool for comparing web pages with Wayback Machine support",
@@ -43,7 +43,7 @@
4343
},
4444
entry_points={
4545
"console_scripts": [
46-
"wayback-diff=website_diff.cli:main",
46+
"wayback-diff=wayback_diff.cli:main",
4747
],
4848
},
4949
)

tests/test_cli.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import pytest
44
import sys
55
from unittest.mock import patch, Mock
6-
from website_diff.cli import format_output
6+
from wayback_diff.cli import format_output
77

88

99
class TestCLI:

tests/test_diff_engine.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
"""Tests for diff engine."""
22

33
import pytest
4-
from website_diff.diff_engine import DiffEngine
4+
from wayback_diff.diff_engine import DiffEngine
55

66

77
class TestDiffEngine:

tests/test_fetcher.py

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

33
import pytest
44
from unittest.mock import Mock, patch
5-
from website_diff.fetcher import WebFetcher
5+
from wayback_diff.fetcher import WebFetcher
66

77

88
class TestWebFetcher:
@@ -16,7 +16,7 @@ def test_is_html(self):
1616
assert not fetcher.is_html("application/json")
1717
assert not fetcher.is_html(None)
1818

19-
@patch('website_diff.fetcher.requests.Session.get')
19+
@patch('wayback_diff.fetcher.requests.Session.get')
2020
def test_fetch_success(self, mock_get):
2121
"""Test successful fetch."""
2222
mock_response = Mock()
@@ -33,7 +33,7 @@ def test_fetch_success(self, mock_get):
3333
assert content_type == 'text/html; charset=utf-8'
3434
assert metadata['status_code'] == 200
3535

36-
@patch('website_diff.fetcher.requests.Session.get')
36+
@patch('wayback_diff.fetcher.requests.Session.get')
3737
def test_fetch_404(self, mock_get):
3838
"""Test 404 response."""
3939
mock_response = Mock()

tests/test_wayback_cleaner.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
"""Tests for Wayback Machine cleaner."""
22

33
import pytest
4-
from website_diff.wayback_cleaner import WaybackCleaner
4+
from wayback_diff.wayback_cleaner import WaybackCleaner
55

66

77
class TestWaybackCleaner:
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
"""Wayback-Diff: A comprehensive tool for comparing web pages with Wayback Machine support."""
22

3-
__version__ = "0.1.0"
3+
__version__ = "1.1.0"

wayback_diff/__main__.py

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

0 commit comments

Comments
 (0)