From 3505a530383787efad315f570399a7115a59c8ac Mon Sep 17 00:00:00 2001 From: Andrei Andreev Date: Wed, 9 Mar 2022 12:23:13 +0100 Subject: [PATCH] Move scripts --- .../run_bandwidth_crawler.py | 0 {experiment => scripts/experiments}/README.md | 0 .../popularity_community/README.md | 0 .../analyze_crawled_data.py | 0 .../popularity_community/crawl_torrents.py | 10 ++++---- .../popularity_community/initial_filling.py | 24 +++++++++---------- .../experiments}/requirements.txt | 0 .../experiments/tunnel_community}/__init__.py | 0 .../tunnel_community/hidden_peer_discovery.py | 12 +++++----- .../tunnel_community/hidden_peer_discovery.r | 0 .../tunnel_community/speed_test_e2e.py | 4 ++-- .../tunnel_community/speed_test_e2e.r | 0 .../tunnel_community/speed_test_exit.py | 12 +++++----- .../tunnel_community/speed_test_exit.r | 0 {src => scripts}/seedbox/README.md | 0 {src => scripts}/seedbox/disseminator.py | 24 +++++++++---------- .../seedbox/generate_test_data.py | 0 {src => scripts}/seedbox/requirements.txt | 0 {src => scripts}/seedbox/seeder.py | 0 .../tunnel_helper}/run_tunnel_helper.py | 0 src/{tribler => }/run_tribler_headless.py | 0 21 files changed, 43 insertions(+), 43 deletions(-) rename {src/tribler => scripts/bandwidth_crawler}/run_bandwidth_crawler.py (100%) rename {experiment => scripts/experiments}/README.md (100%) rename {experiment => scripts/experiments}/popularity_community/README.md (100%) rename {experiment => scripts/experiments}/popularity_community/analyze_crawled_data.py (100%) rename {experiment => scripts/experiments}/popularity_community/crawl_torrents.py (97%) rename {experiment => scripts/experiments}/popularity_community/initial_filling.py (87%) rename {experiment => scripts/experiments}/requirements.txt (100%) rename {experiment => scripts/experiments/tunnel_community}/__init__.py (100%) rename {experiment => scripts/experiments}/tunnel_community/hidden_peer_discovery.py (88%) rename {experiment => scripts/experiments}/tunnel_community/hidden_peer_discovery.r (100%) rename {experiment => scripts/experiments}/tunnel_community/speed_test_e2e.py (91%) rename {experiment => scripts/experiments}/tunnel_community/speed_test_e2e.r (100%) rename {experiment => scripts/experiments}/tunnel_community/speed_test_exit.py (91%) rename {experiment => scripts/experiments}/tunnel_community/speed_test_exit.r (100%) rename {src => scripts}/seedbox/README.md (100%) rename {src => scripts}/seedbox/disseminator.py (90%) rename {src => scripts}/seedbox/generate_test_data.py (100%) rename {src => scripts}/seedbox/requirements.txt (100%) rename {src => scripts}/seedbox/seeder.py (100%) rename {src/tribler => scripts/tunnel_helper}/run_tunnel_helper.py (100%) rename src/{tribler => }/run_tribler_headless.py (100%) diff --git a/src/tribler/run_bandwidth_crawler.py b/scripts/bandwidth_crawler/run_bandwidth_crawler.py similarity index 100% rename from src/tribler/run_bandwidth_crawler.py rename to scripts/bandwidth_crawler/run_bandwidth_crawler.py diff --git a/experiment/README.md b/scripts/experiments/README.md similarity index 100% rename from experiment/README.md rename to scripts/experiments/README.md diff --git a/experiment/popularity_community/README.md b/scripts/experiments/popularity_community/README.md similarity index 100% rename from experiment/popularity_community/README.md rename to scripts/experiments/popularity_community/README.md diff --git a/experiment/popularity_community/analyze_crawled_data.py b/scripts/experiments/popularity_community/analyze_crawled_data.py similarity index 100% rename from experiment/popularity_community/analyze_crawled_data.py rename to scripts/experiments/popularity_community/analyze_crawled_data.py diff --git a/experiment/popularity_community/crawl_torrents.py b/scripts/experiments/popularity_community/crawl_torrents.py similarity index 97% rename from experiment/popularity_community/crawl_torrents.py rename to scripts/experiments/popularity_community/crawl_torrents.py index c1d4b5d0e9e..cd9ed366b2d 100644 --- a/experiment/popularity_community/crawl_torrents.py +++ b/scripts/experiments/popularity_community/crawl_torrents.py @@ -42,14 +42,14 @@ from ipv8.lazy_community import lazy_wrapper from ipv8.peer import Peer from ipv8.peerdiscovery.discovery import RandomWalk -from tribler_core.components.metadata_store.db.serialization import REGULAR_TORRENT -from tribler_core.components.metadata_store.remote_query_community.remote_query_community import RemoteQueryCommunity, \ +from tribler.core.components.metadata_store.db.serialization import REGULAR_TORRENT +from tribler.core.components.metadata_store.remote_query_community.remote_query_community import RemoteQueryCommunity, \ RemoteSelectPayload, \ SelectRequest, \ SelectResponsePayload -from tribler_core.components.metadata_store.remote_query_community.settings import RemoteQueryCommunitySettings -from tribler_core.utilities.tiny_tribler_service import TinyTriblerService -from tribler_core.utilities.unicode import hexlify +from tribler.core.components.metadata_store.remote_query_community.settings import RemoteQueryCommunitySettings +from tribler.core.utilities.tiny_tribler_service import TinyTriblerService +from tribler.core.utilities.unicode import hexlify # flake8: noqa diff --git a/experiment/popularity_community/initial_filling.py b/scripts/experiments/popularity_community/initial_filling.py similarity index 87% rename from experiment/popularity_community/initial_filling.py rename to scripts/experiments/popularity_community/initial_filling.py index 2a113af2007..7a5f59cee49 100644 --- a/experiment/popularity_community/initial_filling.py +++ b/scripts/experiments/popularity_community/initial_filling.py @@ -12,18 +12,18 @@ from ipv8.peerdiscovery.discovery import RandomWalk from ipv8_service import IPv8 -from tribler_core.components.ipv8.ipv8_component import Ipv8Component -from tribler_core.components.libtorrent.libtorrent_component import LibtorrentComponent -from tribler_core.components.key.key_component import KeyComponent -from tribler_core.components.metadata_store.metadata_store_component import MetadataStoreComponent -from tribler_core.components.popularity.popularity_component import PopularityComponent -from tribler_core.components.restapi.restapi_component import RESTComponent -from tribler_core.components.socks_servers.socks_servers_component import SocksServersComponent -from tribler_core.components.torrent_checker.torrent_checker_component import TorrentCheckerComponent -from tribler_core.config.tribler_config import TriblerConfig -from tribler_core.components.gigachannel.community.sync_strategy import RemovePeers -from tribler_core.components.popularity.community.popularity_community import PopularityCommunity -from tribler_core.utilities.tiny_tribler_service import TinyTriblerService +from tribler.core.components.ipv8.ipv8_component import Ipv8Component +from tribler.core.components.libtorrent.libtorrent_component import LibtorrentComponent +from tribler.core.components.key.key_component import KeyComponent +from tribler.core.components.metadata_store.metadata_store_component import MetadataStoreComponent +from tribler.core.components.popularity.popularity_component import PopularityComponent +from tribler.core.components.restapi.restapi_component import RESTComponent +from tribler.core.components.socks_servers.socks_servers_component import SocksServersComponent +from tribler.core.components.torrent_checker.torrent_checker_component import TorrentCheckerComponent +from tribler.core.config.tribler_config import TriblerConfig +from tribler.core.components.gigachannel.community.sync_strategy import RemovePeers +from tribler.core.components.popularity.community.popularity_community import PopularityCommunity +from tribler.core.utilities.tiny_tribler_service import TinyTriblerService _logger = logging.getLogger(__name__) interval_in_sec = None diff --git a/experiment/requirements.txt b/scripts/experiments/requirements.txt similarity index 100% rename from experiment/requirements.txt rename to scripts/experiments/requirements.txt diff --git a/experiment/__init__.py b/scripts/experiments/tunnel_community/__init__.py similarity index 100% rename from experiment/__init__.py rename to scripts/experiments/tunnel_community/__init__.py diff --git a/experiment/tunnel_community/hidden_peer_discovery.py b/scripts/experiments/tunnel_community/hidden_peer_discovery.py similarity index 88% rename from experiment/tunnel_community/hidden_peer_discovery.py rename to scripts/experiments/tunnel_community/hidden_peer_discovery.py index 67b543bceec..d7306b1ff0b 100644 --- a/experiment/tunnel_community/hidden_peer_discovery.py +++ b/scripts/experiments/tunnel_community/hidden_peer_discovery.py @@ -6,12 +6,12 @@ from ipv8.taskmanager import TaskManager -from tribler_core.components.ipv8.ipv8_component import Ipv8Component -from tribler_core.components.key.key_component import KeyComponent -from tribler_core.components.restapi.restapi_component import RESTComponent -from tribler_core.components.tunnel.tunnel_component import TunnelsComponent -from tribler_core.config.tribler_config import TriblerConfig -from tribler_core.utilities.tiny_tribler_service import TinyTriblerService +from tribler.core.components.ipv8.ipv8_component import Ipv8Component +from tribler.core.components.key.key_component import KeyComponent +from tribler.core.components.restapi.restapi_component import RESTComponent +from tribler.core.components.tunnel.tunnel_component import TunnelsComponent +from tribler.core.config.tribler_config import TriblerConfig +from tribler.core.utilities.tiny_tribler_service import TinyTriblerService EXPERIMENT_RUN_TIME = int(os.environ.get('EXPERIMENT_RUN_TIME', 3600 * 3)) diff --git a/experiment/tunnel_community/hidden_peer_discovery.r b/scripts/experiments/tunnel_community/hidden_peer_discovery.r similarity index 100% rename from experiment/tunnel_community/hidden_peer_discovery.r rename to scripts/experiments/tunnel_community/hidden_peer_discovery.r diff --git a/experiment/tunnel_community/speed_test_e2e.py b/scripts/experiments/tunnel_community/speed_test_e2e.py similarity index 91% rename from experiment/tunnel_community/speed_test_e2e.py rename to scripts/experiments/tunnel_community/speed_test_e2e.py index 6d67d034e6a..74d26da3f30 100644 --- a/experiment/tunnel_community/speed_test_e2e.py +++ b/scripts/experiments/tunnel_community/speed_test_e2e.py @@ -6,9 +6,9 @@ from ipv8.messaging.anonymization.tunnel import EXIT_NODE, ORIGINATOR from ipv8.taskmanager import task -from tribler_core.components.tunnel.tunnel_component import TunnelsComponent +from tribler.core.components.tunnel.tunnel_component import TunnelsComponent -from experiment.tunnel_community.speed_test_exit import EXPERIMENT_NUM_CIRCUITS, EXPERIMENT_NUM_HOPS, \ +from scripts.experiments.tunnel_community.speed_test_exit import EXPERIMENT_NUM_CIRCUITS, EXPERIMENT_NUM_HOPS, \ Service as SpeedTestExitService EXPERIMENT_NUM_MB = int(os.environ.get('EXPERIMENT_NUM_MB', 10)) diff --git a/experiment/tunnel_community/speed_test_e2e.r b/scripts/experiments/tunnel_community/speed_test_e2e.r similarity index 100% rename from experiment/tunnel_community/speed_test_e2e.r rename to scripts/experiments/tunnel_community/speed_test_e2e.r diff --git a/experiment/tunnel_community/speed_test_exit.py b/scripts/experiments/tunnel_community/speed_test_exit.py similarity index 91% rename from experiment/tunnel_community/speed_test_exit.py rename to scripts/experiments/tunnel_community/speed_test_exit.py index 64d1194c1ae..93442c1c35b 100644 --- a/experiment/tunnel_community/speed_test_exit.py +++ b/scripts/experiments/tunnel_community/speed_test_exit.py @@ -6,12 +6,12 @@ from ipv8.messaging.anonymization.utils import run_speed_test from ipv8.taskmanager import TaskManager -from tribler_core.components.ipv8.ipv8_component import Ipv8Component -from tribler_core.components.key.key_component import KeyComponent -from tribler_core.components.restapi.restapi_component import RESTComponent -from tribler_core.components.tunnel.tunnel_component import TunnelsComponent -from tribler_core.config.tribler_config import TriblerConfig -from tribler_core.utilities.tiny_tribler_service import TinyTriblerService +from tribler.core.components.ipv8.ipv8_component import Ipv8Component +from tribler.core.components.key.key_component import KeyComponent +from tribler.core.components.restapi.restapi_component import RESTComponent +from tribler.core.components.tunnel.tunnel_component import TunnelsComponent +from tribler.core.config.tribler_config import TriblerConfig +from tribler.core.utilities.tiny_tribler_service import TinyTriblerService EXPERIMENT_NUM_MB = int(os.environ.get('EXPERIMENT_NUM_MB', 25)) EXPERIMENT_NUM_CIRCUITS = int(os.environ.get('EXPERIMENT_NUM_CIRCUITS', 10)) diff --git a/experiment/tunnel_community/speed_test_exit.r b/scripts/experiments/tunnel_community/speed_test_exit.r similarity index 100% rename from experiment/tunnel_community/speed_test_exit.r rename to scripts/experiments/tunnel_community/speed_test_exit.r diff --git a/src/seedbox/README.md b/scripts/seedbox/README.md similarity index 100% rename from src/seedbox/README.md rename to scripts/seedbox/README.md diff --git a/src/seedbox/disseminator.py b/scripts/seedbox/disseminator.py similarity index 90% rename from src/seedbox/disseminator.py rename to scripts/seedbox/disseminator.py index 7c52076f67b..155e8cc6c84 100644 --- a/src/seedbox/disseminator.py +++ b/scripts/seedbox/disseminator.py @@ -27,18 +27,18 @@ import sentry_sdk from pony.orm import db_session -from tribler_core.components.gigachannel.gigachannel_component import GigaChannelComponent -from tribler_core.components.gigachannel_manager.gigachannel_manager_component import GigachannelManagerComponent -from tribler_core.components.ipv8.ipv8_component import Ipv8Component -from tribler_core.components.libtorrent.libtorrent_component import LibtorrentComponent -from tribler_core.components.key.key_component import KeyComponent -from tribler_core.components.metadata_store.db.orm_bindings.channel_node import NEW -from tribler_core.components.metadata_store.metadata_store_component import MetadataStoreComponent -from tribler_core.components.restapi.restapi_component import RESTComponent -from tribler_core.components.socks_servers.socks_servers_component import SocksServersComponent -from tribler_core.config.tribler_config import TriblerConfig -from tribler_core.components.libtorrent.torrentdef import TorrentDef -from tribler_core.utilities.tiny_tribler_service import TinyTriblerService +from tribler.core.components.gigachannel.gigachannel_component import GigaChannelComponent +from tribler.core.components.gigachannel_manager.gigachannel_manager_component import GigachannelManagerComponent +from tribler.core.components.ipv8.ipv8_component import Ipv8Component +from tribler.core.components.libtorrent.libtorrent_component import LibtorrentComponent +from tribler.core.components.key.key_component import KeyComponent +from tribler.core.components.metadata_store.db.orm_bindings.channel_node import NEW +from tribler.core.components.metadata_store.metadata_store_component import MetadataStoreComponent +from tribler.core.components.restapi.restapi_component import RESTComponent +from tribler.core.components.socks_servers.socks_servers_component import SocksServersComponent +from tribler.core.config.tribler_config import TriblerConfig +from tribler.core.components.libtorrent.torrentdef import TorrentDef +from tribler.core.utilities.tiny_tribler_service import TinyTriblerService # fmt: off # flake8: noqa diff --git a/src/seedbox/generate_test_data.py b/scripts/seedbox/generate_test_data.py similarity index 100% rename from src/seedbox/generate_test_data.py rename to scripts/seedbox/generate_test_data.py diff --git a/src/seedbox/requirements.txt b/scripts/seedbox/requirements.txt similarity index 100% rename from src/seedbox/requirements.txt rename to scripts/seedbox/requirements.txt diff --git a/src/seedbox/seeder.py b/scripts/seedbox/seeder.py similarity index 100% rename from src/seedbox/seeder.py rename to scripts/seedbox/seeder.py diff --git a/src/tribler/run_tunnel_helper.py b/scripts/tunnel_helper/run_tunnel_helper.py similarity index 100% rename from src/tribler/run_tunnel_helper.py rename to scripts/tunnel_helper/run_tunnel_helper.py diff --git a/src/tribler/run_tribler_headless.py b/src/run_tribler_headless.py similarity index 100% rename from src/tribler/run_tribler_headless.py rename to src/run_tribler_headless.py