Reorganize project structure: move modules to neopig/, scripts to scripts/, data to data/

This commit is contained in:
Russell Ballestrini 2026-01-06 14:06:43 -05:00
parent ee7a193d0f
commit 58c93f217a
28 changed files with 37 additions and 37 deletions

View file

@ -13,7 +13,7 @@ from pathlib import Path
sys.path.insert(0, os.path.join(os.path.dirname(__file__), "..", ".."))
from filevault import AsyncVault, create_async_vault, content_hash
from neopig.filevault import AsyncVault, create_async_vault, content_hash
class TestAsyncVaultBasics:

View file

@ -10,7 +10,7 @@ from unittest.mock import Mock, AsyncMock, patch, MagicMock
import asyncio
import aiohttp
from async_web_fetcher import (
from neopig.async_web_fetcher import (
CrawlMode,
MediaItem,
strip_uri_fragment,

View file

@ -12,7 +12,7 @@ import os
import json
from datetime import datetime, timezone
from database import (
from neopig.database import (
Database,
CrawlJob,
Media,

View file

@ -12,7 +12,7 @@ import os
import hashlib
from pathlib import Path
from domain_vault import (
from neopig.domain_vault import (
GitRepo,
DomainHtmlVault,
DomainMediaVault,

View file

@ -14,7 +14,7 @@ from pathlib import Path
# Add parent directory to path to import modules
sys.path.insert(0, os.path.join(os.path.dirname(__file__), "..", ".."))
from filevault import (
from neopig.filevault import (
Vault,
create_vault,
ensure_bytes,
@ -636,7 +636,7 @@ class TestVersionAndCompatibility:
def test_version_info(self):
"""Test that version information is available"""
import filevault
from neopig import filevault
assert hasattr(filevault, "__version__")
assert filevault.__version__ == "2.0.0"

View file

@ -11,7 +11,7 @@ import shutil
import os
from pathlib import Path
from repo import (
from neopig.repo import (
detect_vcs,
get_repo_path,
run_cmd,
@ -206,7 +206,7 @@ class TestCloneRepo:
assert success is False
assert "Unknown VCS type" in msg
@patch('repo.run_cmd')
@patch('neopig.repo.run_cmd')
def test_clone_git_shallow(self, mock_run):
"""Test git clone with shallow flag."""
mock_run.return_value = (0, "", "")
@ -219,7 +219,7 @@ class TestCloneRepo:
assert "--depth" in call_args
assert "1" in call_args
@patch('repo.run_cmd')
@patch('neopig.repo.run_cmd')
def test_clone_git_full(self, mock_run):
"""Test git clone without shallow flag."""
mock_run.return_value = (0, "", "")
@ -231,7 +231,7 @@ class TestCloneRepo:
call_args = mock_run.call_args[0][0]
assert "--depth" not in call_args
@patch('repo.run_cmd')
@patch('neopig.repo.run_cmd')
def test_clone_hg(self, mock_run):
"""Test mercurial clone."""
mock_run.return_value = (0, "", "")
@ -244,7 +244,7 @@ class TestCloneRepo:
assert "hg" in call_args
assert "clone" in call_args
@patch('repo.run_cmd')
@patch('neopig.repo.run_cmd')
def test_clone_svn(self, mock_run):
"""Test SVN checkout."""
mock_run.return_value = (0, "", "")
@ -262,7 +262,7 @@ class TestCloneRepoAsync:
"""Test async repository cloning."""
@pytest.mark.asyncio
@patch('repo.clone_repo')
@patch('neopig.repo.clone_repo')
async def test_clone_repo_async(self, mock_clone):
"""Test async clone delegates to sync."""
mock_clone.return_value = (True, "Cloned")
@ -295,7 +295,7 @@ class TestPullRepo:
assert success is False
assert "No VCS directory found" in msg
@patch('repo.run_cmd')
@patch('neopig.repo.run_cmd')
def test_pull_git(self, mock_run):
"""Test git pull."""
mock_run.return_value = (0, "Already up to date", "")
@ -309,7 +309,7 @@ class TestPullRepo:
assert "git" in call_args
assert "pull" in call_args
@patch('repo.run_cmd')
@patch('neopig.repo.run_cmd')
def test_pull_hg(self, mock_run):
"""Test mercurial pull."""
mock_run.return_value = (0, "pulling from...", "")
@ -322,7 +322,7 @@ class TestPullRepo:
assert "hg" in call_args
assert "pull" in call_args
@patch('repo.run_cmd')
@patch('neopig.repo.run_cmd')
def test_pull_svn(self, mock_run):
"""Test SVN update."""
mock_run.return_value = (0, "Updating...", "")
@ -353,7 +353,7 @@ class TestGetCommitHash:
result = get_commit_hash(self.repo_path)
assert result is None
@patch('repo.run_cmd')
@patch('neopig.repo.run_cmd')
def test_get_git_hash(self, mock_run):
"""Test getting git commit hash."""
mock_run.return_value = (0, "abc123def456\n", "")
@ -363,7 +363,7 @@ class TestGetCommitHash:
assert result == "abc123def456"
@patch('repo.run_cmd')
@patch('neopig.repo.run_cmd')
def test_get_hg_hash(self, mock_run):
"""Test getting mercurial changeset hash."""
mock_run.return_value = (0, "abc123+\n", "")

View file

@ -10,7 +10,7 @@ import asyncio
import tempfile
import os
from screenshot import ScreenshotConfig, ScreenshotCapture
from neopig.screenshot import ScreenshotConfig, ScreenshotCapture
class TestScreenshotConfig:

View file

@ -10,7 +10,7 @@ import tempfile
import shutil
import hashlib
from filevault import AsyncVault, Vault, content_hash, hash_to_path
from neopig.filevault import AsyncVault, Vault, content_hash, hash_to_path
class TestAsyncVaultBasics: