MCPcopy Create free account

hub / github.com/cosmicpython/code / functions

Functions133 in github.com/cosmicpython/code

↓ 31 callersMethodhandle
(self, message: Message)
src/allocation/service_layer/messagebus.py:26
↓ 17 callersMethodget
(self, sku)
src/allocation/adapters/repository.py:15
↓ 10 callersMethodcommit
(self)
src/allocation/service_layer/unit_of_work.py:22
↓ 8 callersMethodadd
(self, product: model.Product)
src/allocation/adapters/repository.py:11
↓ 7 callersMethodallocate
(self, line: OrderLine)
src/allocation/domain/model.py:15
↓ 7 callersMethodallocate
(self, line: OrderLine)
src/allocation/domain/model.py:74
↓ 7 callersFunctionbootstrap_test_app
()
tests/unit/test_handlers.py:52
↓ 6 callersMethodcan_allocate
(self, line: OrderLine)
src/allocation/domain/model.py:89
↓ 6 callersFunctionrandom_batchref
(name="")
tests/random_refs.py:12
↓ 6 callersFunctionrandom_sku
(name="")
tests/random_refs.py:8
↓ 5 callersFunctionrandom_orderid
(name="")
tests/random_refs.py:16
↓ 4 callersFunctioninsert_batch
(session, ref, sku, qty, eta, product_version=1)
tests/integration/test_uow.py:15
↓ 4 callersFunctionmake_batch_and_line
(sku, batch_qty, line_qty)
tests/unit/test_batches.py:14
↓ 4 callersFunctionsqlite_session_factory
(in_memory_sqlite_db)
tests/conftest.py:28
↓ 3 callersMethodget_by_batchref
(self, batchref)
src/allocation/adapters/repository.py:21
↓ 3 callersFunctionrandom_suffix
()
tests/random_refs.py:4
↓ 2 callersMethodcollect_new_events
(self)
src/allocation/service_layer/unit_of_work.py:25
↓ 2 callersFunctioninject_dependencies
(handler, dependencies)
src/allocation/bootstrap.py:44
↓ 2 callersFunctionpostgres_session_factory
(postgres_db)
tests/conftest.py:64
↓ 2 callersMethodrollback
(self)
src/allocation/service_layer/unit_of_work.py:35
↓ 2 callersFunctiontry_to_allocate
(orderid, sku, exceptions, session_factory)
tests/integration/test_uow.py:81
↓ 1 callersMethod__enter__
(self)
src/allocation/service_layer/unit_of_work.py:16
↓ 1 callersMethod__exit__
(self, *args)
src/allocation/service_layer/unit_of_work.py:19
↓ 1 callersMethod__init__
(self)
src/allocation/adapters/repository.py:8
↓ 1 callersMethod_add
(self, product: model.Product)
src/allocation/adapters/repository.py:28
↓ 1 callersMethod_commit
(self)
src/allocation/service_layer/unit_of_work.py:31
↓ 1 callersMethod_get
(self, sku)
src/allocation/adapters/repository.py:32
↓ 1 callersMethod_get_by_batchref
(self, batchref)
src/allocation/adapters/repository.py:36
↓ 1 callersFunctionallocate
( cmd: commands.Allocate, uow: unit_of_work.AbstractUnitOfWork, )
src/allocation/service_layer/handlers.py:30
↓ 1 callersMethodchange_batch_quantity
(self, ref: str, qty: int)
src/allocation/domain/model.py:33
↓ 1 callersMethoddeallocate_one
(self)
src/allocation/domain/model.py:78
↓ 1 callersFunctionget_allocated_batch_ref
(session, orderid, sku)
tests/integration/test_uow.py:27
↓ 1 callersFunctionget_email_from_mailhog
(sku)
tests/integration/test_email.py:24
↓ 1 callersFunctionhandle_change_batch_quantity
(m, bus)
src/allocation/entrypoints/redis_eventconsumer.py:23
↓ 1 callersMethodhandle_command
(self, command: commands.Command)
src/allocation/service_layer/messagebus.py:47
↓ 1 callersMethodhandle_event
(self, event: events.Event)
src/allocation/service_layer/messagebus.py:37
↓ 1 callersFunctionmain
()
src/allocation/entrypoints/redis_eventconsumer.py:13
↓ 1 callersFunctionpublish
(channel, event: events.Event)
src/allocation/adapters/redis_eventpublisher.py:14
↓ 1 callersMethodsend
(self, destination, message)
src/allocation/adapters/notifications.py:22
↓ 1 callersFunctionstart_mappers
()
src/allocation/adapters/orm.py:63
↓ 1 callersFunctionwait_for_postgres_to_come_up
(engine)
tests/conftest.py:40
↓ 1 callersFunctionwait_for_redis_to_come_up
()
tests/conftest.py:50
↓ 1 callersFunctionwait_for_webapp_to_come_up
()
tests/conftest.py:45
Method__enter__
(self)
src/allocation/service_layer/unit_of_work.py:51
Method__eq__
(self, other)
src/allocation/domain/model.py:59
Method__exit__
(self, *args)
src/allocation/service_layer/unit_of_work.py:56
Method__gt__
(self, other)
src/allocation/domain/model.py:67
Method__hash__
(self)
src/allocation/domain/model.py:64
Method__init__
(self, sku: str, batches: List[Batch], version_number: int = 0)
src/allocation/domain/model.py:9
Method__init__
(self, ref: str, sku: str, qty: int, eta: Optional[date])
src/allocation/domain/model.py:49
Method__init__
(self, session_factory=DEFAULT_SESSION_FACTORY)
src/allocation/service_layer/unit_of_work.py:48
Method__init__
( self, uow: unit_of_work.AbstractUnitOfWork, event_handlers: Dict[Type[events.Event],
src/allocation/service_layer/messagebus.py:16
Method__init__
(self, smtp_host=DEFAULT_HOST, port=DEFAULT_PORT)
src/allocation/adapters/notifications.py:18
Method__init__
(self, session)
src/allocation/adapters/repository.py:41
Method__init__
(self, products)
tests/unit/test_handlers.py:15
Method__init__
(self)
tests/unit/test_handlers.py:33
Method__init__
(self)
tests/unit/test_handlers.py:45
Method__repr__
(self)
src/allocation/domain/model.py:56
Method_add
(self, product)
src/allocation/adapters/repository.py:45
Method_add
(self, product)
tests/unit/test_handlers.py:19
Method_commit
(self)
src/allocation/service_layer/unit_of_work.py:60
Method_commit
(self)
tests/unit/test_handlers.py:37
Method_get
(self, sku)
src/allocation/adapters/repository.py:48
Method_get
(self, sku)
tests/unit/test_handlers.py:22
Method_get_by_batchref
(self, batchref)
src/allocation/adapters/repository.py:51
Method_get_by_batchref
(self, batchref)
tests/unit/test_handlers.py:25
Functionadd_allocation_to_read_model
( event: events.Allocated, uow: unit_of_work.SqlAlchemyUnitOfWork, )
src/allocation/service_layer/handlers.py:80
Functionadd_batch
()
src/allocation/entrypoints/flask_app.py:12
Functionadd_batch
( cmd: commands.CreateBatch, uow: unit_of_work.AbstractUnitOfWork, )
src/allocation/service_layer/handlers.py:17
Functionallocate_endpoint
()
src/allocation/entrypoints/flask_app.py:24
Methodallocated_quantity
(self)
src/allocation/domain/model.py:82
Functionallocations
(orderid: str, uow: unit_of_work.SqlAlchemyUnitOfWork)
src/allocation/views.py:4
Functionallocations_view_endpoint
(orderid)
src/allocation/entrypoints/flask_app.py:37
Methodavailable_quantity
(self)
src/allocation/domain/model.py:86
Functionbootstrap
( start_orm: bool = True, uow: unit_of_work.AbstractUnitOfWork = unit_of_work.SqlAlchemyUnitOfWork(),
src/allocation/bootstrap.py:11
Functionbus
(sqlite_session_factory)
tests/integration/test_email.py:13
Functionchange_batch_quantity
( cmd: commands.ChangeBatchQuantity, uow: unit_of_work.AbstractUnitOfWork, )
src/allocation/service_layer/handlers.py:50
Functionget_allocation
(orderid)
tests/e2e/api_client.py:28
Functionget_api_url
()
src/allocation/config.py:12
Functionget_email_host_and_port
()
src/allocation/config.py:24
Functionget_postgres_uri
()
src/allocation/config.py:4
Functionget_redis_host_and_port
()
src/allocation/config.py:18
Functionin_memory_sqlite_db
()
tests/conftest.py:21
Functionmappers
()
tests/conftest.py:33
Functionpost_to_add_batch
(ref, sku, qty, eta)
tests/e2e/api_client.py:5
Functionpost_to_allocate
(orderid, sku, qty, expect_success=True)
tests/e2e/api_client.py:13
Functionpostgres_db
()
tests/conftest.py:56
Functionpostgres_session
(postgres_session_factory)
tests/conftest.py:69
Functionpublish_allocated_event
( event: events.Allocated, publish: Callable, )
src/allocation/service_layer/handlers.py:73
Functionpublish_message
(channel, message)
tests/e2e/redis_client.py:17
Functionreallocate
( event: events.Deallocated, uow: unit_of_work.AbstractUnitOfWork, )
src/allocation/service_layer/handlers.py:43
Functionreceive_load
(product, _)
src/allocation/adapters/orm.py:85
Functionremove_allocation_from_read_model
( event: events.Deallocated, uow: unit_of_work.SqlAlchemyUnitOfWork, )
src/allocation/service_layer/handlers.py:95
Functionrestart_api
()
tests/conftest.py:74
Functionrestart_redis_pubsub
()
tests/conftest.py:81
Methodrollback
(self)
src/allocation/service_layer/unit_of_work.py:63
Methodrollback
(self)
tests/unit/test_handlers.py:40
Methodsend
(self, destination, message)
src/allocation/adapters/notifications.py:9
Methodsend
(self, destination, message)
tests/unit/test_handlers.py:48
Functionsend_out_of_stock_notification
( event: events.OutOfStock, notifications: notifications.AbstractNotifications, )
src/allocation/service_layer/handlers.py:63
next →1–100 of 133, ranked by callers