def __init__(self, client): self.aggregation = lusid.AggregationApi(client) self.analytics_stores = lusid.AnalyticsStoresApi(client) self.metadata = lusid.ApplicationMetadataApi(client) self.corporate_action_sources = lusid.CorporateActionSourcesApi( client) self.data_types = lusid.DataTypesApi(client) self.derived_transaction_portfolios = lusid.DerivedTransactionPortfoliosApi( client) self.instruments = lusid.InstrumentsApi(client) self.login = lusid.InstrumentsApi(client) self.portfolio_groups = lusid.PortfolioGroupsApi(client) self.portfolios = lusid.PortfoliosApi(client) self.property_definitions = lusid.PropertyDefinitionsApi(client) self.quotes = lusid.QuotesApi(client) self.reconciliations = lusid.ReconciliationsApi(client) self.reference_portfolios = lusid.ReferencePortfolioApi(client) self.results = lusid.ResultsApi(client) self.schemas = lusid.SchemasApi(client) self.scopes = lusid.ScopesApi(client) self.search = lusid.SearchApi(client) self.system_configuration = lusid.SystemConfigurationApi(client) self.transaction_portfolios = lusid.TransactionPortfoliosApi( client) self.cut_labels = lusid.CutLabelDefinitionsApi(client)
def setUpClass(cls): # create a configured API client api_client = TestDataUtilities.api_client() cls.orders_api = lusid.OrdersApi(api_client) cls.instruments_api = lusid.InstrumentsApi(api_client) instrument_loader = InstrumentLoader(cls.instruments_api) cls.instrument_ids = instrument_loader.load_instruments()
def setUpClass(cls): # Create a configured API client api_client = TestDataUtilities.api_client() # Setup required LUSID APIs cls.transaction_portfolios_api = lusid.TransactionPortfoliosApi( api_client) cls.portfolios_api = lusid.PortfoliosApi(api_client) cls.instruments_api = lusid.InstrumentsApi(api_client) cls.aggregation_api = lusid.AggregationApi(api_client) cls.quotes_api = lusid.QuotesApi(api_client) cls.recipes_api = lusid.ConfigurationRecipeApi(api_client) instrument_loader = InstrumentLoader(cls.instruments_api) cls.instrument_ids = instrument_loader.load_instruments() # Setup test data from utilities cls.test_data_utilities = TestDataUtilities( cls.transaction_portfolios_api) # Set test parameters cls.effective_date = datetime(2019, 4, 15, tzinfo=pytz.utc) cls.portfolio_code = cls.test_data_utilities.create_transaction_portfolio( TestDataUtilities.tutorials_scope) # Setup test portfolio cls.setup_portfolio(cls.effective_date, cls.portfolio_code)
def setUpClass(cls): # create a configured API client api_client = TestDataUtilities.api_client() cls.property_definitions_api = lusid.PropertyDefinitionsApi(api_client) cls.instruments_api = lusid.InstrumentsApi(api_client) cls.portfolios_api = lusid.PortfoliosApi(api_client) cls.transaction_portfolios_api = lusid.TransactionPortfoliosApi( api_client)
def setUpClass(cls): # create a configured API client api_client = TestDataUtilities.api_client() cls.property_definitions_api = lusid.PropertyDefinitionsApi(api_client) cls.instruments_api = lusid.InstrumentsApi(api_client) # load instruments from InstrumentLoader instrument_loader = InstrumentLoader(cls.instruments_api) cls.instrument_ids = instrument_loader.load_instruments()
def setUpClass(cls): # create a configured API client api_client = TestDataUtilities.api_client() cls.transaction_portfolios_api = lusid.TransactionPortfoliosApi(api_client) cls.instruments_api = lusid.InstrumentsApi(api_client) instrument_loader = InstrumentLoader(cls.instruments_api) cls.instrument_ids = instrument_loader.load_instruments() cls.test_data_utilities = TestDataUtilities(cls.transaction_portfolios_api)
def setUpClass(cls): logging.basicConfig(level=logging.INFO) # create a configured API client api_client = TestDataUtilities.api_client() cls.property_definitions_api = lusid.PropertyDefinitionsApi(api_client) cls.instruments_api = lusid.InstrumentsApi(api_client) cls.portfolios_api = lusid.PortfoliosApi(api_client) cls.transaction_portfolios_api = lusid.TransactionPortfoliosApi( api_client) cls.id_generator = IdGenerator(scope=TestDataUtilities.tutorials_scope)
def setUpClass(cls): # create a configured API client api_client = ApiClientBuilder().build(CredentialsSource.secrets_path()) cls.transaction_portfolios_api = lusid.TransactionPortfoliosApi( api_client) cls.instruments_api = lusid.InstrumentsApi(api_client) instrument_loader = InstrumentLoader(cls.instruments_api) cls.instrument_ids = instrument_loader.load_instruments() cls.test_data_utilities = TestDataUtilities( cls.transaction_portfolios_api)
def setUpClass(cls): logging.basicConfig(level=logging.INFO) # create a configured API client api_client = TestDataUtilities.api_client() cls.property_definitions_api = lusid.PropertyDefinitionsApi(api_client) cls.instruments_api = lusid.InstrumentsApi(api_client) # load instruments from InstrumentLoader instrument_loader = InstrumentLoader(cls.instruments_api) cls.instrument_ids = instrument_loader.load_instruments() cls.id_generator = IdGenerator(scope=TestDataUtilities.tutorials_scope)
def setUp(cls): # create a configured API client api_client = ApiClientBuilder().build( str(CredentialsSource.secrets_path())) cls.instruments_api = lusid.InstrumentsApi(api_client) cls.portfolios_api = lusid.PortfoliosApi(api_client) cls.transaction_portfolios_api = lusid.TransactionPortfoliosApi( api_client) cls.corporate_actions_sources_api = lusid.CorporateActionSourcesApi( api_client) cls.id_generator = IdGenerator(scope=TestDataUtilities.tutorials_scope)
def setUpClass(cls): # create a configured API client api_client = TestDataUtilities.api_client() cls.scopes_api = lusid.ScopesApi(api_client) cls.portfolios_api = lusid.PortfoliosApi(api_client) cls.transaction_portfolios_api = lusid.TransactionPortfoliosApi(api_client) cls.property_definitions_api = lusid.PropertyDefinitionsApi(api_client) cls.instruments_api = lusid.InstrumentsApi(api_client) cls.test_data_utilities = TestDataUtilities(cls.transaction_portfolios_api) cls.id_generator = IdGenerator(scope=TestDataUtilities.tutorials_scope) cls.instrument_loader = InstrumentLoader(cls.instruments_api) cls.instrument_ids = cls.instrument_loader.load_instruments()
def setUpClass(cls): # create a configured API client api_client = ApiClientBuilder().build(CredentialsSource.secrets_path()) cls.property_definitions_api = lusid.PropertyDefinitionsApi(api_client) cls.transaction_portfolios_api = lusid.TransactionPortfoliosApi(api_client) cls.instruments_api = lusid.InstrumentsApi(api_client) cls.portfolios_api = lusid.PortfoliosApi(api_client) instrument_loader = InstrumentLoader(cls.instruments_api) cls.instrument_ids = instrument_loader.load_instruments() cls.test_data_utilities = TestDataUtilities(cls.transaction_portfolios_api) cls.id_generator = IdGenerator(scope=TestDataUtilities.tutorials_scope)
def setUpClass(cls): # Create API client api_client = TestDataUtilities.api_client() # Instantiate APIs we will use cls.reference_portfolio_api = lusid.ReferencePortfolioApi(api_client) cls.portfolios_api = lusid.PortfoliosApi(api_client) cls.instruments_api = lusid.InstrumentsApi(api_client) # Load instruments cls.instrument_loader = InstrumentLoader(cls.instruments_api) cls.instrument_ids = cls.instrument_loader.load_instruments() cls.id_generator = IdGenerator(scope=TestDataUtilities.tutorials_scope)
def setUpClass(cls): # setup logging configuration cls.root_logger = logging.getLogger(__name__) cls.root_logger.setLevel(logging.INFO) # create a configured API client api_client = TestDataUtilities.api_client() cls.property_definitions_api = lusid.PropertyDefinitionsApi(api_client) cls.instruments_api = lusid.InstrumentsApi(api_client) cls.transaction_portfolios_api = lusid.TransactionPortfoliosApi(api_client) # load instruments from InstrumentLoader instrument_loader = InstrumentLoader(cls.instruments_api) cls.instrument_ids = instrument_loader.load_instruments() # set test scope and code cls.scope = "TransactionProperty" cls.code = "TransactionTaxDetail"
def setUpClass(cls): # create a configured API client api_client = TestDataUtilities.api_client() cls.transaction_portfolios_api = lusid.TransactionPortfoliosApi(api_client) cls.instruments_api = lusid.InstrumentsApi(api_client) cls.recipes_api = lusid.ConfigurationRecipeApi(api_client) cls.aggregation_api = lusid.AggregationApi(api_client) cls.quotes_api = lusid.QuotesApi(api_client) cls.portfolios_api = lusid.PortfoliosApi(api_client) instrument_loader = InstrumentLoader(cls.instruments_api) cls.instrument_ids = instrument_loader.load_instruments() cls.test_data_utilities = TestDataUtilities(cls.transaction_portfolios_api) cls.id_generator = IdGenerator(scope=TestDataUtilities.tutorials_scope)
def setUpClass(cls): # Log any exceptions cls.logger = logging.getLogger() cls.logger.setLevel(logging.INFO) # Create API client api_client = TestDataUtilities.api_client() # Instantiate APIs we will use cls.reference_portfolio_api = lusid.ReferencePortfolioApi(api_client) cls.portfolios_api = lusid.PortfoliosApi(api_client) cls.instruments_api = lusid.InstrumentsApi(api_client) # Load instruments cls.instrument_loader = InstrumentLoader(cls.instruments_api) cls.instrument_ids = cls.instrument_loader.load_instruments()
def setUpClass(cls): # create a configured API client api_client = TestDataUtilities.api_client() cls.id_generator = IdGenerator(scope=TestDataUtilities.tutorials_scope) cls.orders_api = lusid.OrdersApi(api_client) cls.instruments_api = lusid.InstrumentsApi(api_client) cls.properties_api = lusid.PropertyDefinitionsApi(api_client) instrument_loader = InstrumentLoader(cls.instruments_api) cls.instrument_ids = instrument_loader.load_instruments() cls.load_properties( properties_api=cls.properties_api, id_generator=cls.id_generator, scopes=cls.tests_scope.values(), codes=cls.test_codes )
def setUpClass(cls): api_client = TestDataUtilities.api_client() cls.instruments_api = lusid.InstrumentsApi(api_client)