From ca781a3c3be60d244a524b8dd5c8dc3460631ceb Mon Sep 17 00:00:00 2001 From: Paul Pfeister Date: Mon, 24 Jun 2024 16:40:03 -0400 Subject: [PATCH] Rename importable module --- docs/{pyproj => pyproject}/README.md | 0 pyproject.toml | 6 +++--- {sherlock => sherlock_project}/__init__.py | 0 {sherlock => sherlock_project}/__main__.py | 2 +- {sherlock => sherlock_project}/notify.py | 2 +- {sherlock => sherlock_project}/resources/data.json | 0 .../resources/data.schema.json | 0 {sherlock => sherlock_project}/result.py | 0 {sherlock => sherlock_project}/sherlock.py | 12 ++++++------ {sherlock => sherlock_project}/sites.py | 0 tests/conftest.py | 2 +- tests/few_test_basic.py | 4 ++-- tests/test_probes.py | 6 +++--- tests/test_ux.py | 2 +- tests/test_version.py | 4 ++-- 15 files changed, 20 insertions(+), 20 deletions(-) rename docs/{pyproj => pyproject}/README.md (100%) rename {sherlock => sherlock_project}/__init__.py (100%) rename {sherlock => sherlock_project}/__main__.py (92%) rename {sherlock => sherlock_project}/notify.py (99%) rename {sherlock => sherlock_project}/resources/data.json (100%) rename {sherlock => sherlock_project}/resources/data.schema.json (100%) rename {sherlock => sherlock_project}/result.py (100%) rename {sherlock => sherlock_project}/sherlock.py (98%) rename {sherlock => sherlock_project}/sites.py (100%) diff --git a/docs/pyproj/README.md b/docs/pyproject/README.md similarity index 100% rename from docs/pyproj/README.md rename to docs/pyproject/README.md diff --git a/pyproject.toml b/pyproject.toml index 7f5a89630..0cfc9276a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -20,8 +20,8 @@ maintainers = [ "Matheus Felipe ", "Sondre Karlsen Dyrnes " ] -readme = "docs/pyproj/README.md" -packages = [ { include = "sherlock"} ] +readme = "docs/pyproject/README.md" +packages = [ { include = "sherlock_project"} ] keywords = [ "osint", "reconnaissance", "information gathering" ] classifiers = [ "Development Status :: 5 - Production/Stable", @@ -56,4 +56,4 @@ openpyxl = "^3.0.10" jsonschema = "^4.0.0" [tool.poetry.scripts] -sherlock = 'sherlock.sherlock:main' +sherlock = 'sherlock_project.sherlock:main' diff --git a/sherlock/__init__.py b/sherlock_project/__init__.py similarity index 100% rename from sherlock/__init__.py rename to sherlock_project/__init__.py diff --git a/sherlock/__main__.py b/sherlock_project/__main__.py similarity index 92% rename from sherlock/__main__.py rename to sherlock_project/__main__.py index 014d8b353..319383174 100644 --- a/sherlock/__main__.py +++ b/sherlock_project/__main__.py @@ -18,5 +18,5 @@ print(f"Sherlock requires Python 3.8+\nYou are using Python {python_version}, which is not supported by Sherlock.") sys.exit(1) - from sherlock import sherlock + from sherlock_project import sherlock sherlock.main() diff --git a/sherlock/notify.py b/sherlock_project/notify.py similarity index 99% rename from sherlock/notify.py rename to sherlock_project/notify.py index c198fe620..f6c785d63 100644 --- a/sherlock/notify.py +++ b/sherlock_project/notify.py @@ -3,7 +3,7 @@ This module defines the objects for notifying the caller about the results of queries. """ -from sherlock.result import QueryStatus +from sherlock_project.result import QueryStatus from colorama import Fore, Style import webbrowser diff --git a/sherlock/resources/data.json b/sherlock_project/resources/data.json similarity index 100% rename from sherlock/resources/data.json rename to sherlock_project/resources/data.json diff --git a/sherlock/resources/data.schema.json b/sherlock_project/resources/data.schema.json similarity index 100% rename from sherlock/resources/data.schema.json rename to sherlock_project/resources/data.schema.json diff --git a/sherlock/result.py b/sherlock_project/result.py similarity index 100% rename from sherlock/result.py rename to sherlock_project/result.py diff --git a/sherlock/sherlock.py b/sherlock_project/sherlock.py similarity index 98% rename from sherlock/sherlock.py rename to sherlock_project/sherlock.py index db8e9c2cb..4497d44b8 100644 --- a/sherlock/sherlock.py +++ b/sherlock_project/sherlock.py @@ -24,18 +24,18 @@ __version__ = "0.14.4" del __version__ -from .__init__ import ( # noqa: E402 +from sherlock_project.__init__ import ( # noqa: E402 __longname__, __version__ ) from requests_futures.sessions import FuturesSession # noqa: E402 from torrequest import TorRequest # noqa: E402 -from sherlock.result import QueryStatus # noqa: E402 -from sherlock.result import QueryResult # noqa: E402 -from sherlock.notify import QueryNotify # noqa: E402 -from sherlock.notify import QueryNotifyPrint # noqa: E402 -from sherlock.sites import SitesInformation # noqa: E402 +from sherlock_project.result import QueryStatus # noqa: E402 +from sherlock_project.result import QueryResult # noqa: E402 +from sherlock_project.notify import QueryNotify # noqa: E402 +from sherlock_project.notify import QueryNotifyPrint # noqa: E402 +from sherlock_project.sites import SitesInformation # noqa: E402 from colorama import init # noqa: E402 from argparse import ArgumentTypeError # noqa: E402 diff --git a/sherlock/sites.py b/sherlock_project/sites.py similarity index 100% rename from sherlock/sites.py rename to sherlock_project/sites.py diff --git a/tests/conftest.py b/tests/conftest.py index a13388bb2..2dcf7843b 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -2,7 +2,7 @@ import json import urllib import pytest -from sherlock.sites import SitesInformation +from sherlock_project.sites import SitesInformation @pytest.fixture() def sites_obj(): diff --git a/tests/few_test_basic.py b/tests/few_test_basic.py index 7ec81ac12..f70403226 100644 --- a/tests/few_test_basic.py +++ b/tests/few_test_basic.py @@ -1,7 +1,7 @@ -import sherlock +import sherlock_project #from sherlock.sites import SitesInformation #local_manifest = data_file_path=os.path.join(os.path.dirname(__file__), "../sherlock/resources/data.json") def test_username_via_message(): - sherlock.__main__("--version") + sherlock_project.__main__("--version") diff --git a/tests/test_probes.py b/tests/test_probes.py index 06f8e3c40..21bbe1d2e 100644 --- a/tests/test_probes.py +++ b/tests/test_probes.py @@ -2,9 +2,9 @@ import random import string import re -from sherlock.sherlock import sherlock -from sherlock.notify import QueryNotify -from sherlock.result import QueryStatus +from sherlock_project.sherlock import sherlock +from sherlock_project.notify import QueryNotify +from sherlock_project.result import QueryStatus #from sherlock_interactives import Interactives diff --git a/tests/test_ux.py b/tests/test_ux.py index c14035f58..3c62463b5 100644 --- a/tests/test_ux.py +++ b/tests/test_ux.py @@ -1,5 +1,5 @@ import pytest -from sherlock import sherlock +from sherlock_project import sherlock from sherlock_interactives import Interactives from sherlock_interactives import InteractivesSubprocessError diff --git a/tests/test_version.py b/tests/test_version.py index 68119c9ed..c4fd00de2 100644 --- a/tests/test_version.py +++ b/tests/test_version.py @@ -1,10 +1,10 @@ import os from sherlock_interactives import Interactives -import sherlock +import sherlock_project def test_versioning() -> None: # Ensure __version__ matches version presented to the user - assert sherlock.__version__ in Interactives.run_cli("--version") + assert sherlock_project.__version__ in Interactives.run_cli("--version") # Ensure __init__ is single source of truth for __version__ in package # Temporarily allows sherlock.py so as to not trigger early upgrades found:list = Interactives.walk_sherlock_for_files_with(r'__version__ *= *')