Skip to content

Commit a10e572

Browse files
committed
catalog renaming
1 parent 08996c9 commit a10e572

File tree

4 files changed

+20
-20
lines changed

4 files changed

+20
-20
lines changed

services/catalog/src/simcore_service_catalog/api/rpc/_services.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -252,8 +252,8 @@ async def list_my_service_history_latest_first(
252252
product_name=product_name,
253253
user_id=user_id,
254254
service_key=service_key,
255-
limit=limit,
256-
offset=offset,
255+
pagination_limit=limit,
256+
pagination_offset=offset,
257257
filters=TypeAdapter(ServiceDBFilters | None).validate_python(
258258
filters, from_attributes=True
259259
),

services/catalog/src/simcore_service_catalog/repository/services.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -383,8 +383,8 @@ async def list_latest_services(
383383
product_name: ProductName,
384384
user_id: UserID,
385385
# list args: pagination
386-
limit: int | None = None,
387-
offset: int | None = None,
386+
pagination_limit: int | None = None,
387+
pagination_offset: int | None = None,
388388
filters: ServiceDBFilters | None = None,
389389
) -> tuple[PositiveInt, list[ServiceWithHistoryDBGet]]:
390390

@@ -399,8 +399,8 @@ async def list_latest_services(
399399
product_name=product_name,
400400
user_id=user_id,
401401
access_rights=AccessRightsClauses.can_read,
402-
limit=limit,
403-
offset=offset,
402+
limit=pagination_limit,
403+
offset=pagination_offset,
404404
filters=filters,
405405
)
406406

@@ -475,8 +475,8 @@ async def get_service_history_page(
475475
# get args
476476
key: ServiceKey,
477477
# list args: pagination
478-
limit: int | None = None,
479-
offset: int | None = None,
478+
pagination_limit: int | None = None,
479+
pagination_offset: int | None = None,
480480
filters: ServiceDBFilters | None = None,
481481
) -> tuple[PositiveInt, list[ReleaseDBGet]]:
482482

@@ -540,8 +540,8 @@ async def get_service_history_page(
540540
)
541541
)
542542
.order_by(sql.desc(_services_sql.by_version(services_meta_data.c.version)))
543-
.offset(offset)
544-
.limit(limit)
543+
.offset(pagination_offset)
544+
.limit(pagination_limit)
545545
)
546546

547547
async with pass_or_acquire_connection(self.db_engine) as conn:

services/catalog/src/simcore_service_catalog/service/catalog_services.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -144,8 +144,8 @@ async def list_latest_catalog_services(
144144
total_count, services = await repo.list_latest_services(
145145
product_name=product_name,
146146
user_id=user_id,
147-
limit=limit,
148-
offset=offset,
147+
pagination_limit=limit,
148+
pagination_offset=offset,
149149
filters=filters,
150150
)
151151

@@ -519,11 +519,11 @@ async def list_user_service_release_history(
519519
# target service
520520
service_key: ServiceKey,
521521
# pagination
522-
limit: PageLimitInt | None = None,
523-
offset: NonNegativeInt | None = None,
522+
pagination_limit: PageLimitInt | None = None,
523+
pagination_offset: NonNegativeInt | None = None,
524524
# filters
525525
filters: ServiceDBFilters | None = None,
526-
# options
526+
# result options
527527
include_compatibility: bool = False,
528528
) -> tuple[PageTotalCount, list[ServiceRelease]]:
529529

@@ -533,8 +533,8 @@ async def list_user_service_release_history(
533533
product_name=product_name,
534534
user_id=user_id,
535535
key=service_key,
536-
limit=limit,
537-
offset=offset,
536+
pagination_limit=pagination_limit,
537+
pagination_offset=pagination_offset,
538538
filters=filters,
539539
)
540540

services/catalog/tests/unit/with_dbs/test_repositories.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -390,7 +390,7 @@ async def test_list_latest_services_with_pagination(
390390
assert service.version == expected_latest_version
391391

392392
_, services_items = await services_repo.list_latest_services(
393-
product_name=target_product, user_id=user_id, limit=2
393+
product_name=target_product, user_id=user_id, pagination_limit=2
394394
)
395395
assert len(services_items) == 2
396396

@@ -711,8 +711,8 @@ async def test_get_service_history_page(
711711
product_name=target_product,
712712
user_id=user_id,
713713
key=service_key,
714-
limit=limit,
715-
offset=offset,
714+
pagination_limit=limit,
715+
pagination_offset=offset,
716716
)
717717
assert total_count == num_versions
718718
assert len(paginated_history) == limit

0 commit comments

Comments
 (0)