"--fullbulk", default=False, action="store_true", help="Use all supported bulk items", ) parser.add_argument("--nofilter", default=False, action="store_true", help="Disable item pair filters") parser.add_argument("--debug", default=False, action="store_true", help="Enables debug logging") arguments = parser.parse_args() init_logger(arguments.debug) item_list = ItemList.load_from_file() backend = PoeOfficial(item_list) league = arguments.league currency = arguments.currency limit = arguments.limit fullbulk = arguments.fullbulk no_filter = arguments.nofilter config = {"fullbulk": fullbulk} # Load excluded trader list excluded_traders = load_excluded_traders() # Load user config user_config = UserConfig.from_file()
import asyncio import unittest from typing import List import aiohttp from src.commons import init_logger from src.core.backends import poeofficial, poetrade from src.core.backends.backend_pool import BackendPool from src.core.offer import Offer from src.trading.items import ItemList item_list = ItemList.load_from_file() init_logger(True) class BackendTest(unittest.TestCase): def test_backend_pool(self): item_pairs = [("Chaos Orb", "Exalted Orb"), ("Exalted Orb", "Chaos Orb"), ("Chaos Orb", "Orb of Fusing"), ("Orb of Fusing", "Exalted Orb")] league = "Standard" pool = BackendPool(item_list) offers: List[Offer] = pool.schedule(league, item_pairs, item_list) assert len(offers) > 0 for offer in offers:
import json import logging from src.trading.items import ItemList from src.commons import init_logger import cattr init_logger(False) item_list = ItemList.generate() (n_unsynced_items, unsynced_items) = item_list.find_discrepancies() logging.info("Item supports counts per backend: ", n_unsynced_items) logging.info("{} items without full backend support".format( len(unsynced_items))) for item in unsynced_items: logging.info(item) with open("assets/items.json", "w") as f: json.dump(cattr.unstructure(item_list), f, indent=2)