From df4a08f7b54223120dfe216c30e2c1afa6a28afa Mon Sep 17 00:00:00 2001 From: Thomas Schaffter Date: Tue, 28 Jan 2025 14:56:31 -0800 Subject: [PATCH] chore(openchallenges): remove OC API client for Python (#2985) --- .../api-client-python/.gitignore | 160 ---- .../.openapi-generator-ignore | 31 - .../.openapi-generator/FILES | 116 --- .../.openapi-generator/VERSION | 1 - .../api-client-python/.python-version | 1 - .../api-client-python/README.md | 162 ---- .../api-client-python/docs/BasicError.md | 32 - .../api-client-python/docs/Challenge.md | 47 - .../docs/ChallengeAnalyticsApi.md | 72 -- .../api-client-python/docs/ChallengeApi.md | 147 --- .../docs/ChallengeCategory.md | 10 - .../docs/ChallengeContribution.md | 31 - .../docs/ChallengeContributionApi.md | 76 -- .../docs/ChallengeContributionRole.md | 10 - .../docs/ChallengeContributionsPage.md | 35 - .../docs/ChallengeDifficulty.md | 10 - .../docs/ChallengeDirection.md | 10 - .../docs/ChallengeIncentive.md | 10 - .../docs/ChallengeInputDataType.md | 33 - .../docs/ChallengeInputDataTypeApi.md | 77 -- .../docs/ChallengeInputDataTypeDirection.md | 10 - .../docs/ChallengeInputDataTypeSearchQuery.md | 33 - .../docs/ChallengeInputDataTypeSort.md | 10 - .../docs/ChallengeInputDataTypesPage.md | 35 - .../docs/ChallengePlatform.md | 35 - .../docs/ChallengePlatformApi.md | 147 --- .../docs/ChallengePlatformDirection.md | 10 - .../docs/ChallengePlatformSearchQuery.md | 33 - .../docs/ChallengePlatformSort.md | 10 - .../docs/ChallengePlatformsPage.md | 35 - .../docs/ChallengeSearchQuery.md | 44 - .../api-client-python/docs/ChallengeSort.md | 10 - .../api-client-python/docs/ChallengeStatus.md | 10 - .../docs/ChallengeSubmissionType.md | 10 - .../api-client-python/docs/ChallengesPage.md | 35 - .../docs/ChallengesPerYear.md | 30 - .../api-client-python/docs/Image.md | 29 - .../api-client-python/docs/ImageApi.md | 77 -- .../docs/ImageAspectRatio.md | 10 - .../api-client-python/docs/ImageHeight.md | 10 - .../api-client-python/docs/ImageQuery.md | 31 - .../api-client-python/docs/Organization.md | 39 - .../api-client-python/docs/OrganizationApi.md | 147 --- .../docs/OrganizationCategory.md | 10 - .../docs/OrganizationDirection.md | 10 - .../docs/OrganizationSearchQuery.md | 35 - .../docs/OrganizationSort.md | 10 - .../docs/OrganizationsPage.md | 35 - .../api-client-python/docs/PageMetadata.md | 34 - .../docs/SimpleChallengeInputDataType.md | 31 - .../docs/SimpleChallengePlatform.md | 31 - .../api-client-python/docs/User.md | 38 - .../api-client-python/docs/UserApi.md | 289 ------ .../docs/UserCreateRequest.md | 34 - .../docs/UserCreateResponse.md | 29 - .../api-client-python/docs/UserStatus.md | 10 - .../api-client-python/docs/UsersPage.md | 35 - .../api-client-python/openapitools.json | 17 - .../openchallenges_client/__init__.py | 113 --- .../openchallenges_client/api/__init__.py | 15 - .../api/challenge_analytics_api.py | 177 ---- .../api/challenge_api.py | 362 -------- .../api/challenge_contribution_api.py | 200 ----- .../api/challenge_input_data_type_api.py | 219 ----- .../api/challenge_platform_api.py | 371 -------- .../openchallenges_client/api/image_api.py | 200 ----- .../api/organization_api.py | 366 -------- .../openchallenges_client/api/user_api.py | 704 --------------- .../openchallenges_client/api_client.py | 838 ------------------ .../openchallenges_client/api_response.py | 26 - .../openchallenges_client/configuration.py | 452 ---------- .../openchallenges_client/exceptions.py | 165 ---- .../openchallenges_client/models/__init__.py | 85 -- .../models/basic_error.py | 84 -- .../openchallenges_client/models/challenge.py | 203 ----- .../models/challenge_category.py | 38 - .../models/challenge_contribution.py | 83 -- .../models/challenge_contribution_role.py | 36 - .../models/challenge_contributions_page.py | 120 --- .../models/challenge_difficulty.py | 36 - .../models/challenge_direction.py | 35 - .../models/challenge_incentive.py | 37 - .../models/challenge_input_data_type.py | 94 -- .../challenge_input_data_type_direction.py | 35 - .../challenge_input_data_type_search_query.py | 102 --- .../models/challenge_input_data_type_sort.py | 35 - .../models/challenge_input_data_types_page.py | 122 --- .../models/challenge_platform.py | 106 --- .../models/challenge_platform_direction.py | 35 - .../models/challenge_platform_search_query.py | 100 --- .../models/challenge_platform_sort.py | 35 - .../models/challenge_platforms_page.py | 118 --- .../models/challenge_search_query.py | 208 ----- .../models/challenge_sort.py | 39 - .../models/challenge_status.py | 36 - .../models/challenge_submission_type.py | 37 - .../models/challenges_page.py | 113 --- .../models/challenges_per_year.py | 70 -- .../openchallenges_client/models/image.py | 66 -- .../models/image_aspect_ratio.py | 38 - .../models/image_height.py | 39 - .../models/image_query.py | 88 -- .../models/organization.py | 116 --- .../models/organization_category.py | 34 - .../models/organization_direction.py | 35 - .../models/organization_search_query.py | 121 --- .../models/organization_sort.py | 37 - .../models/organizations_page.py | 118 --- .../models/page_metadata.py | 97 -- .../simple_challenge_input_data_type.py | 85 -- .../models/simple_challenge_platform.py | 85 -- .../openchallenges_client/models/user.py | 118 --- .../models/user_create_request.py | 96 -- .../models/user_create_response.py | 66 -- .../models/user_status.py | 37 - .../models/users_page.py | 113 --- .../openchallenges_client/py.typed | 0 .../openchallenges_client/rest.py | 406 --------- .../api-client-python/poetry.lock | 408 --------- .../api-client-python/prepare-python.sh | 6 - .../api-client-python/project.json | 31 - .../api-client-python/pyproject.toml | 30 - .../api-client-python/requirements.txt | 5 - .../openchallenges/api-client-python/setup.py | 50 -- .../api-client-python/test-requirements.txt | 3 - .../api-client-python/test/__init__.py | 0 .../test/test_basic_error.py | 61 -- .../api-client-python/test/test_challenge.py | 105 --- .../test/test_challenge_analytics_api.py | 44 - .../test/test_challenge_api.py | 47 - .../test/test_challenge_category.py | 40 - .../test/test_challenge_contribution.py | 63 -- .../test/test_challenge_contribution_api.py | 44 - .../test/test_challenge_contribution_role.py | 40 - .../test/test_challenge_contributions_page.py | 81 -- .../test/test_challenge_difficulty.py | 40 - .../test/test_challenge_direction.py | 40 - .../test/test_challenge_incentive.py | 40 - .../test/test_challenge_input_data_type.py | 67 -- .../test_challenge_input_data_type_api.py | 44 - ...est_challenge_input_data_type_direction.py | 40 - ..._challenge_input_data_type_search_query.py | 62 -- .../test_challenge_input_data_type_sort.py | 40 - .../test_challenge_input_data_types_page.py | 85 -- .../test/test_challenge_platform.py | 71 -- .../test/test_challenge_platform_api.py | 51 -- .../test/test_challenge_platform_direction.py | 40 - .../test_challenge_platform_search_query.py | 62 -- .../test/test_challenge_platform_sort.py | 40 - .../test/test_challenge_platforms_page.py | 89 -- .../test/test_challenge_search_query.py | 89 -- .../test/test_challenge_sort.py | 38 - .../test/test_challenge_status.py | 38 - .../test/test_challenge_submission_type.py | 40 - .../test/test_challenges_page.py | 135 --- .../test/test_challenges_per_year.py | 69 -- .../api-client-python/test/test_image.py | 57 -- .../api-client-python/test/test_image_api.py | 40 - .../test/test_image_aspect_ratio.py | 40 - .../test/test_image_height.py | 38 - .../test/test_image_query.py | 59 -- .../test/test_organization.py | 74 -- .../test/test_organization_api.py | 49 - .../test/test_organization_category.py | 40 - .../test/test_organization_direction.py | 40 - .../test/test_organization_search_query.py | 68 -- .../test/test_organization_sort.py | 40 - .../test/test_organizations_page.py | 97 -- .../test/test_page_metadata.py | 67 -- .../test_simple_challenge_input_data_type.py | 63 -- .../test/test_simple_challenge_platform.py | 63 -- .../api-client-python/test/test_user.py | 70 -- .../api-client-python/test/test_user_api.py | 61 -- .../test/test_user_create_request.py | 66 -- .../test/test_user_create_response.py | 59 -- .../test/test_user_status.py | 38 - .../api-client-python/test/test_users_page.py | 73 -- libs/openchallenges/api-client-python/tox.ini | 9 - 178 files changed, 14093 deletions(-) delete mode 100644 libs/openchallenges/api-client-python/.gitignore delete mode 100644 libs/openchallenges/api-client-python/.openapi-generator-ignore delete mode 100644 libs/openchallenges/api-client-python/.openapi-generator/FILES delete mode 100644 libs/openchallenges/api-client-python/.openapi-generator/VERSION delete mode 100644 libs/openchallenges/api-client-python/.python-version delete mode 100644 libs/openchallenges/api-client-python/README.md delete mode 100644 libs/openchallenges/api-client-python/docs/BasicError.md delete mode 100644 libs/openchallenges/api-client-python/docs/Challenge.md delete mode 100644 libs/openchallenges/api-client-python/docs/ChallengeAnalyticsApi.md delete mode 100644 libs/openchallenges/api-client-python/docs/ChallengeApi.md delete mode 100644 libs/openchallenges/api-client-python/docs/ChallengeCategory.md delete mode 100644 libs/openchallenges/api-client-python/docs/ChallengeContribution.md delete mode 100644 libs/openchallenges/api-client-python/docs/ChallengeContributionApi.md delete mode 100644 libs/openchallenges/api-client-python/docs/ChallengeContributionRole.md delete mode 100644 libs/openchallenges/api-client-python/docs/ChallengeContributionsPage.md delete mode 100644 libs/openchallenges/api-client-python/docs/ChallengeDifficulty.md delete mode 100644 libs/openchallenges/api-client-python/docs/ChallengeDirection.md delete mode 100644 libs/openchallenges/api-client-python/docs/ChallengeIncentive.md delete mode 100644 libs/openchallenges/api-client-python/docs/ChallengeInputDataType.md delete mode 100644 libs/openchallenges/api-client-python/docs/ChallengeInputDataTypeApi.md delete mode 100644 libs/openchallenges/api-client-python/docs/ChallengeInputDataTypeDirection.md delete mode 100644 libs/openchallenges/api-client-python/docs/ChallengeInputDataTypeSearchQuery.md delete mode 100644 libs/openchallenges/api-client-python/docs/ChallengeInputDataTypeSort.md delete mode 100644 libs/openchallenges/api-client-python/docs/ChallengeInputDataTypesPage.md delete mode 100644 libs/openchallenges/api-client-python/docs/ChallengePlatform.md delete mode 100644 libs/openchallenges/api-client-python/docs/ChallengePlatformApi.md delete mode 100644 libs/openchallenges/api-client-python/docs/ChallengePlatformDirection.md delete mode 100644 libs/openchallenges/api-client-python/docs/ChallengePlatformSearchQuery.md delete mode 100644 libs/openchallenges/api-client-python/docs/ChallengePlatformSort.md delete mode 100644 libs/openchallenges/api-client-python/docs/ChallengePlatformsPage.md delete mode 100644 libs/openchallenges/api-client-python/docs/ChallengeSearchQuery.md delete mode 100644 libs/openchallenges/api-client-python/docs/ChallengeSort.md delete mode 100644 libs/openchallenges/api-client-python/docs/ChallengeStatus.md delete mode 100644 libs/openchallenges/api-client-python/docs/ChallengeSubmissionType.md delete mode 100644 libs/openchallenges/api-client-python/docs/ChallengesPage.md delete mode 100644 libs/openchallenges/api-client-python/docs/ChallengesPerYear.md delete mode 100644 libs/openchallenges/api-client-python/docs/Image.md delete mode 100644 libs/openchallenges/api-client-python/docs/ImageApi.md delete mode 100644 libs/openchallenges/api-client-python/docs/ImageAspectRatio.md delete mode 100644 libs/openchallenges/api-client-python/docs/ImageHeight.md delete mode 100644 libs/openchallenges/api-client-python/docs/ImageQuery.md delete mode 100644 libs/openchallenges/api-client-python/docs/Organization.md delete mode 100644 libs/openchallenges/api-client-python/docs/OrganizationApi.md delete mode 100644 libs/openchallenges/api-client-python/docs/OrganizationCategory.md delete mode 100644 libs/openchallenges/api-client-python/docs/OrganizationDirection.md delete mode 100644 libs/openchallenges/api-client-python/docs/OrganizationSearchQuery.md delete mode 100644 libs/openchallenges/api-client-python/docs/OrganizationSort.md delete mode 100644 libs/openchallenges/api-client-python/docs/OrganizationsPage.md delete mode 100644 libs/openchallenges/api-client-python/docs/PageMetadata.md delete mode 100644 libs/openchallenges/api-client-python/docs/SimpleChallengeInputDataType.md delete mode 100644 libs/openchallenges/api-client-python/docs/SimpleChallengePlatform.md delete mode 100644 libs/openchallenges/api-client-python/docs/User.md delete mode 100644 libs/openchallenges/api-client-python/docs/UserApi.md delete mode 100644 libs/openchallenges/api-client-python/docs/UserCreateRequest.md delete mode 100644 libs/openchallenges/api-client-python/docs/UserCreateResponse.md delete mode 100644 libs/openchallenges/api-client-python/docs/UserStatus.md delete mode 100644 libs/openchallenges/api-client-python/docs/UsersPage.md delete mode 100644 libs/openchallenges/api-client-python/openapitools.json delete mode 100644 libs/openchallenges/api-client-python/openchallenges_client/__init__.py delete mode 100644 libs/openchallenges/api-client-python/openchallenges_client/api/__init__.py delete mode 100644 libs/openchallenges/api-client-python/openchallenges_client/api/challenge_analytics_api.py delete mode 100644 libs/openchallenges/api-client-python/openchallenges_client/api/challenge_api.py delete mode 100644 libs/openchallenges/api-client-python/openchallenges_client/api/challenge_contribution_api.py delete mode 100644 libs/openchallenges/api-client-python/openchallenges_client/api/challenge_input_data_type_api.py delete mode 100644 libs/openchallenges/api-client-python/openchallenges_client/api/challenge_platform_api.py delete mode 100644 libs/openchallenges/api-client-python/openchallenges_client/api/image_api.py delete mode 100644 libs/openchallenges/api-client-python/openchallenges_client/api/organization_api.py delete mode 100644 libs/openchallenges/api-client-python/openchallenges_client/api/user_api.py delete mode 100644 libs/openchallenges/api-client-python/openchallenges_client/api_client.py delete mode 100644 libs/openchallenges/api-client-python/openchallenges_client/api_response.py delete mode 100644 libs/openchallenges/api-client-python/openchallenges_client/configuration.py delete mode 100644 libs/openchallenges/api-client-python/openchallenges_client/exceptions.py delete mode 100644 libs/openchallenges/api-client-python/openchallenges_client/models/__init__.py delete mode 100644 libs/openchallenges/api-client-python/openchallenges_client/models/basic_error.py delete mode 100644 libs/openchallenges/api-client-python/openchallenges_client/models/challenge.py delete mode 100644 libs/openchallenges/api-client-python/openchallenges_client/models/challenge_category.py delete mode 100644 libs/openchallenges/api-client-python/openchallenges_client/models/challenge_contribution.py delete mode 100644 libs/openchallenges/api-client-python/openchallenges_client/models/challenge_contribution_role.py delete mode 100644 libs/openchallenges/api-client-python/openchallenges_client/models/challenge_contributions_page.py delete mode 100644 libs/openchallenges/api-client-python/openchallenges_client/models/challenge_difficulty.py delete mode 100644 libs/openchallenges/api-client-python/openchallenges_client/models/challenge_direction.py delete mode 100644 libs/openchallenges/api-client-python/openchallenges_client/models/challenge_incentive.py delete mode 100644 libs/openchallenges/api-client-python/openchallenges_client/models/challenge_input_data_type.py delete mode 100644 libs/openchallenges/api-client-python/openchallenges_client/models/challenge_input_data_type_direction.py delete mode 100644 libs/openchallenges/api-client-python/openchallenges_client/models/challenge_input_data_type_search_query.py delete mode 100644 libs/openchallenges/api-client-python/openchallenges_client/models/challenge_input_data_type_sort.py delete mode 100644 libs/openchallenges/api-client-python/openchallenges_client/models/challenge_input_data_types_page.py delete mode 100644 libs/openchallenges/api-client-python/openchallenges_client/models/challenge_platform.py delete mode 100644 libs/openchallenges/api-client-python/openchallenges_client/models/challenge_platform_direction.py delete mode 100644 libs/openchallenges/api-client-python/openchallenges_client/models/challenge_platform_search_query.py delete mode 100644 libs/openchallenges/api-client-python/openchallenges_client/models/challenge_platform_sort.py delete mode 100644 libs/openchallenges/api-client-python/openchallenges_client/models/challenge_platforms_page.py delete mode 100644 libs/openchallenges/api-client-python/openchallenges_client/models/challenge_search_query.py delete mode 100644 libs/openchallenges/api-client-python/openchallenges_client/models/challenge_sort.py delete mode 100644 libs/openchallenges/api-client-python/openchallenges_client/models/challenge_status.py delete mode 100644 libs/openchallenges/api-client-python/openchallenges_client/models/challenge_submission_type.py delete mode 100644 libs/openchallenges/api-client-python/openchallenges_client/models/challenges_page.py delete mode 100644 libs/openchallenges/api-client-python/openchallenges_client/models/challenges_per_year.py delete mode 100644 libs/openchallenges/api-client-python/openchallenges_client/models/image.py delete mode 100644 libs/openchallenges/api-client-python/openchallenges_client/models/image_aspect_ratio.py delete mode 100644 libs/openchallenges/api-client-python/openchallenges_client/models/image_height.py delete mode 100644 libs/openchallenges/api-client-python/openchallenges_client/models/image_query.py delete mode 100644 libs/openchallenges/api-client-python/openchallenges_client/models/organization.py delete mode 100644 libs/openchallenges/api-client-python/openchallenges_client/models/organization_category.py delete mode 100644 libs/openchallenges/api-client-python/openchallenges_client/models/organization_direction.py delete mode 100644 libs/openchallenges/api-client-python/openchallenges_client/models/organization_search_query.py delete mode 100644 libs/openchallenges/api-client-python/openchallenges_client/models/organization_sort.py delete mode 100644 libs/openchallenges/api-client-python/openchallenges_client/models/organizations_page.py delete mode 100644 libs/openchallenges/api-client-python/openchallenges_client/models/page_metadata.py delete mode 100644 libs/openchallenges/api-client-python/openchallenges_client/models/simple_challenge_input_data_type.py delete mode 100644 libs/openchallenges/api-client-python/openchallenges_client/models/simple_challenge_platform.py delete mode 100644 libs/openchallenges/api-client-python/openchallenges_client/models/user.py delete mode 100644 libs/openchallenges/api-client-python/openchallenges_client/models/user_create_request.py delete mode 100644 libs/openchallenges/api-client-python/openchallenges_client/models/user_create_response.py delete mode 100644 libs/openchallenges/api-client-python/openchallenges_client/models/user_status.py delete mode 100644 libs/openchallenges/api-client-python/openchallenges_client/models/users_page.py delete mode 100644 libs/openchallenges/api-client-python/openchallenges_client/py.typed delete mode 100644 libs/openchallenges/api-client-python/openchallenges_client/rest.py delete mode 100644 libs/openchallenges/api-client-python/poetry.lock delete mode 100755 libs/openchallenges/api-client-python/prepare-python.sh delete mode 100644 libs/openchallenges/api-client-python/project.json delete mode 100644 libs/openchallenges/api-client-python/pyproject.toml delete mode 100644 libs/openchallenges/api-client-python/requirements.txt delete mode 100644 libs/openchallenges/api-client-python/setup.py delete mode 100644 libs/openchallenges/api-client-python/test-requirements.txt delete mode 100644 libs/openchallenges/api-client-python/test/__init__.py delete mode 100644 libs/openchallenges/api-client-python/test/test_basic_error.py delete mode 100644 libs/openchallenges/api-client-python/test/test_challenge.py delete mode 100644 libs/openchallenges/api-client-python/test/test_challenge_analytics_api.py delete mode 100644 libs/openchallenges/api-client-python/test/test_challenge_api.py delete mode 100644 libs/openchallenges/api-client-python/test/test_challenge_category.py delete mode 100644 libs/openchallenges/api-client-python/test/test_challenge_contribution.py delete mode 100644 libs/openchallenges/api-client-python/test/test_challenge_contribution_api.py delete mode 100644 libs/openchallenges/api-client-python/test/test_challenge_contribution_role.py delete mode 100644 libs/openchallenges/api-client-python/test/test_challenge_contributions_page.py delete mode 100644 libs/openchallenges/api-client-python/test/test_challenge_difficulty.py delete mode 100644 libs/openchallenges/api-client-python/test/test_challenge_direction.py delete mode 100644 libs/openchallenges/api-client-python/test/test_challenge_incentive.py delete mode 100644 libs/openchallenges/api-client-python/test/test_challenge_input_data_type.py delete mode 100644 libs/openchallenges/api-client-python/test/test_challenge_input_data_type_api.py delete mode 100644 libs/openchallenges/api-client-python/test/test_challenge_input_data_type_direction.py delete mode 100644 libs/openchallenges/api-client-python/test/test_challenge_input_data_type_search_query.py delete mode 100644 libs/openchallenges/api-client-python/test/test_challenge_input_data_type_sort.py delete mode 100644 libs/openchallenges/api-client-python/test/test_challenge_input_data_types_page.py delete mode 100644 libs/openchallenges/api-client-python/test/test_challenge_platform.py delete mode 100644 libs/openchallenges/api-client-python/test/test_challenge_platform_api.py delete mode 100644 libs/openchallenges/api-client-python/test/test_challenge_platform_direction.py delete mode 100644 libs/openchallenges/api-client-python/test/test_challenge_platform_search_query.py delete mode 100644 libs/openchallenges/api-client-python/test/test_challenge_platform_sort.py delete mode 100644 libs/openchallenges/api-client-python/test/test_challenge_platforms_page.py delete mode 100644 libs/openchallenges/api-client-python/test/test_challenge_search_query.py delete mode 100644 libs/openchallenges/api-client-python/test/test_challenge_sort.py delete mode 100644 libs/openchallenges/api-client-python/test/test_challenge_status.py delete mode 100644 libs/openchallenges/api-client-python/test/test_challenge_submission_type.py delete mode 100644 libs/openchallenges/api-client-python/test/test_challenges_page.py delete mode 100644 libs/openchallenges/api-client-python/test/test_challenges_per_year.py delete mode 100644 libs/openchallenges/api-client-python/test/test_image.py delete mode 100644 libs/openchallenges/api-client-python/test/test_image_api.py delete mode 100644 libs/openchallenges/api-client-python/test/test_image_aspect_ratio.py delete mode 100644 libs/openchallenges/api-client-python/test/test_image_height.py delete mode 100644 libs/openchallenges/api-client-python/test/test_image_query.py delete mode 100644 libs/openchallenges/api-client-python/test/test_organization.py delete mode 100644 libs/openchallenges/api-client-python/test/test_organization_api.py delete mode 100644 libs/openchallenges/api-client-python/test/test_organization_category.py delete mode 100644 libs/openchallenges/api-client-python/test/test_organization_direction.py delete mode 100644 libs/openchallenges/api-client-python/test/test_organization_search_query.py delete mode 100644 libs/openchallenges/api-client-python/test/test_organization_sort.py delete mode 100644 libs/openchallenges/api-client-python/test/test_organizations_page.py delete mode 100644 libs/openchallenges/api-client-python/test/test_page_metadata.py delete mode 100644 libs/openchallenges/api-client-python/test/test_simple_challenge_input_data_type.py delete mode 100644 libs/openchallenges/api-client-python/test/test_simple_challenge_platform.py delete mode 100644 libs/openchallenges/api-client-python/test/test_user.py delete mode 100644 libs/openchallenges/api-client-python/test/test_user_api.py delete mode 100644 libs/openchallenges/api-client-python/test/test_user_create_request.py delete mode 100644 libs/openchallenges/api-client-python/test/test_user_create_response.py delete mode 100644 libs/openchallenges/api-client-python/test/test_user_status.py delete mode 100644 libs/openchallenges/api-client-python/test/test_users_page.py delete mode 100644 libs/openchallenges/api-client-python/tox.ini diff --git a/libs/openchallenges/api-client-python/.gitignore b/libs/openchallenges/api-client-python/.gitignore deleted file mode 100644 index 68bc17f9ff..0000000000 --- a/libs/openchallenges/api-client-python/.gitignore +++ /dev/null @@ -1,160 +0,0 @@ -# Byte-compiled / optimized / DLL files -__pycache__/ -*.py[cod] -*$py.class - -# C extensions -*.so - -# Distribution / packaging -.Python -build/ -develop-eggs/ -dist/ -downloads/ -eggs/ -.eggs/ -lib/ -lib64/ -parts/ -sdist/ -var/ -wheels/ -share/python-wheels/ -*.egg-info/ -.installed.cfg -*.egg -MANIFEST - -# PyInstaller -# Usually these files are written by a python script from a template -# before PyInstaller builds the exe, so as to inject date/other infos into it. -*.manifest -*.spec - -# Installer logs -pip-log.txt -pip-delete-this-directory.txt - -# Unit test / coverage reports -htmlcov/ -.tox/ -.nox/ -.coverage -.coverage.* -.cache -nosetests.xml -coverage.xml -*.cover -*.py,cover -.hypothesis/ -.pytest_cache/ -cover/ - -# Translations -*.mo -*.pot - -# Django stuff: -*.log -local_settings.py -db.sqlite3 -db.sqlite3-journal - -# Flask stuff: -instance/ -.webassets-cache - -# Scrapy stuff: -.scrapy - -# Sphinx documentation -docs/_build/ - -# PyBuilder -.pybuilder/ -target/ - -# Jupyter Notebook -.ipynb_checkpoints - -# IPython -profile_default/ -ipython_config.py - -# pyenv -# For a library or package, you might want to ignore these files since the code is -# intended to run in multiple environments; otherwise, check them in: -# .python-version - -# pipenv -# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. -# However, in case of collaboration, if having platform-specific dependencies or dependencies -# having no cross-platform support, pipenv may install dependencies that don't work, or not -# install all needed dependencies. -#Pipfile.lock - -# poetry -# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control. -# This is especially recommended for binary packages to ensure reproducibility, and is more -# commonly ignored for libraries. -# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control -#poetry.lock - -# pdm -# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control. -#pdm.lock -# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it -# in version control. -# https://pdm.fming.dev/#use-with-ide -.pdm.toml - -# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm -__pypackages__/ - -# Celery stuff -celerybeat-schedule -celerybeat.pid - -# SageMath parsed files -*.sage.py - -# Environments -.env -.venv -env/ -venv/ -ENV/ -env.bak/ -venv.bak/ - -# Spyder project settings -.spyderproject -.spyproject - -# Rope project settings -.ropeproject - -# mkdocs documentation -/site - -# mypy -.mypy_cache/ -.dmypy.json -dmypy.json - -# Pyre type checker -.pyre/ - -# pytype static type analyzer -.pytype/ - -# Cython debug symbols -cython_debug/ - -# PyCharm -# JetBrains specific template is maintained in a separate JetBrains.gitignore that can -# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore -# and can be added to the global gitignore or merged into this file. For a more nuclear -# option (not recommended) you can uncomment the following to ignore the entire idea folder. -#.idea/ diff --git a/libs/openchallenges/api-client-python/.openapi-generator-ignore b/libs/openchallenges/api-client-python/.openapi-generator-ignore deleted file mode 100644 index 453fab92bb..0000000000 --- a/libs/openchallenges/api-client-python/.openapi-generator-ignore +++ /dev/null @@ -1,31 +0,0 @@ -# OpenAPI Generator Ignore -# Generated by openapi-generator https://github.com/openapitools/openapi-generator - -# Use this file to prevent files from being overwritten by the generator. -# The patterns follow closely to .gitignore or .dockerignore. - -# As an example, the C# client generator defines ApiClient.cs. -# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: -#ApiClient.cs - -# You can match any string of characters against a directory, file or extension with a single asterisk (*): -#foo/*/qux -# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux - -# You can recursively match patterns against a directory, file or extension with a double asterisk (**): -#foo/**/qux -# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux - -# You can also negate patterns with an exclamation (!). -# For example, you can ignore all files in a docs folder with the file extension .md: -#docs/*.md -# Then explicitly reverse the ignore rule for a single file: -#!docs/README.md -.github/ -.gitignore -.gitlab-ci.yml -.travis.yml -git_push.sh -pyproject.toml -README.md -setup.cfg \ No newline at end of file diff --git a/libs/openchallenges/api-client-python/.openapi-generator/FILES b/libs/openchallenges/api-client-python/.openapi-generator/FILES deleted file mode 100644 index d163c7b1ab..0000000000 --- a/libs/openchallenges/api-client-python/.openapi-generator/FILES +++ /dev/null @@ -1,116 +0,0 @@ -docs/BasicError.md -docs/Challenge.md -docs/ChallengeAnalyticsApi.md -docs/ChallengeApi.md -docs/ChallengeCategory.md -docs/ChallengeContribution.md -docs/ChallengeContributionApi.md -docs/ChallengeContributionRole.md -docs/ChallengeContributionsPage.md -docs/ChallengeDifficulty.md -docs/ChallengeDirection.md -docs/ChallengeIncentive.md -docs/ChallengeInputDataType.md -docs/ChallengeInputDataTypeApi.md -docs/ChallengeInputDataTypeDirection.md -docs/ChallengeInputDataTypeSearchQuery.md -docs/ChallengeInputDataTypeSort.md -docs/ChallengeInputDataTypesPage.md -docs/ChallengePlatform.md -docs/ChallengePlatformApi.md -docs/ChallengePlatformDirection.md -docs/ChallengePlatformSearchQuery.md -docs/ChallengePlatformSort.md -docs/ChallengePlatformsPage.md -docs/ChallengeSearchQuery.md -docs/ChallengeSort.md -docs/ChallengeStatus.md -docs/ChallengeSubmissionType.md -docs/ChallengesPage.md -docs/ChallengesPerYear.md -docs/Image.md -docs/ImageApi.md -docs/ImageAspectRatio.md -docs/ImageHeight.md -docs/ImageQuery.md -docs/Organization.md -docs/OrganizationApi.md -docs/OrganizationCategory.md -docs/OrganizationDirection.md -docs/OrganizationSearchQuery.md -docs/OrganizationSort.md -docs/OrganizationsPage.md -docs/PageMetadata.md -docs/SimpleChallengeInputDataType.md -docs/SimpleChallengePlatform.md -docs/User.md -docs/UserApi.md -docs/UserCreateRequest.md -docs/UserCreateResponse.md -docs/UserStatus.md -docs/UsersPage.md -openchallenges_client/__init__.py -openchallenges_client/api/__init__.py -openchallenges_client/api/challenge_analytics_api.py -openchallenges_client/api/challenge_api.py -openchallenges_client/api/challenge_contribution_api.py -openchallenges_client/api/challenge_input_data_type_api.py -openchallenges_client/api/challenge_platform_api.py -openchallenges_client/api/image_api.py -openchallenges_client/api/organization_api.py -openchallenges_client/api/user_api.py -openchallenges_client/api_client.py -openchallenges_client/api_response.py -openchallenges_client/configuration.py -openchallenges_client/exceptions.py -openchallenges_client/models/__init__.py -openchallenges_client/models/basic_error.py -openchallenges_client/models/challenge.py -openchallenges_client/models/challenge_category.py -openchallenges_client/models/challenge_contribution.py -openchallenges_client/models/challenge_contribution_role.py -openchallenges_client/models/challenge_contributions_page.py -openchallenges_client/models/challenge_difficulty.py -openchallenges_client/models/challenge_direction.py -openchallenges_client/models/challenge_incentive.py -openchallenges_client/models/challenge_input_data_type.py -openchallenges_client/models/challenge_input_data_type_direction.py -openchallenges_client/models/challenge_input_data_type_search_query.py -openchallenges_client/models/challenge_input_data_type_sort.py -openchallenges_client/models/challenge_input_data_types_page.py -openchallenges_client/models/challenge_platform.py -openchallenges_client/models/challenge_platform_direction.py -openchallenges_client/models/challenge_platform_search_query.py -openchallenges_client/models/challenge_platform_sort.py -openchallenges_client/models/challenge_platforms_page.py -openchallenges_client/models/challenge_search_query.py -openchallenges_client/models/challenge_sort.py -openchallenges_client/models/challenge_status.py -openchallenges_client/models/challenge_submission_type.py -openchallenges_client/models/challenges_page.py -openchallenges_client/models/challenges_per_year.py -openchallenges_client/models/image.py -openchallenges_client/models/image_aspect_ratio.py -openchallenges_client/models/image_height.py -openchallenges_client/models/image_query.py -openchallenges_client/models/organization.py -openchallenges_client/models/organization_category.py -openchallenges_client/models/organization_direction.py -openchallenges_client/models/organization_search_query.py -openchallenges_client/models/organization_sort.py -openchallenges_client/models/organizations_page.py -openchallenges_client/models/page_metadata.py -openchallenges_client/models/simple_challenge_input_data_type.py -openchallenges_client/models/simple_challenge_platform.py -openchallenges_client/models/user.py -openchallenges_client/models/user_create_request.py -openchallenges_client/models/user_create_response.py -openchallenges_client/models/user_status.py -openchallenges_client/models/users_page.py -openchallenges_client/py.typed -openchallenges_client/rest.py -requirements.txt -setup.py -test-requirements.txt -test/__init__.py -tox.ini diff --git a/libs/openchallenges/api-client-python/.openapi-generator/VERSION b/libs/openchallenges/api-client-python/.openapi-generator/VERSION deleted file mode 100644 index 4122521804..0000000000 --- a/libs/openchallenges/api-client-python/.openapi-generator/VERSION +++ /dev/null @@ -1 +0,0 @@ -7.0.0 \ No newline at end of file diff --git a/libs/openchallenges/api-client-python/.python-version b/libs/openchallenges/api-client-python/.python-version deleted file mode 100644 index 2009c7dfad..0000000000 --- a/libs/openchallenges/api-client-python/.python-version +++ /dev/null @@ -1 +0,0 @@ -3.9.2 diff --git a/libs/openchallenges/api-client-python/README.md b/libs/openchallenges/api-client-python/README.md deleted file mode 100644 index 1e226ab43a..0000000000 --- a/libs/openchallenges/api-client-python/README.md +++ /dev/null @@ -1,162 +0,0 @@ -# openchallenges-client - -No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: - -- API version: 1.0.0 -- Package version: 1.0.0 -- Build package: org.openapitools.codegen.languages.PythonClientCodegen - For more information, please visit [https://github.com/Sage-Bionetworks/sage-monorepo](https://github.com/Sage-Bionetworks/sage-monorepo) - -## Requirements. - -Python 3.7+ - -## Installation & Usage - -### pip install - -If the python package is hosted on a repository, you can install directly using: - -```sh -pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git -``` - -(you may need to run `pip` with root permission: `sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git`) - -Then import the package: - -```python -import openchallenges_client -``` - -### Setuptools - -Install via [Setuptools](http://pypi.python.org/pypi/setuptools). - -```sh -python setup.py install --user -``` - -(or `sudo python setup.py install` to install the package for all users) - -Then import the package: - -```python -import openchallenges_client -``` - -### Tests - -Execute `pytest` to run the tests. - -## Getting Started - -Please follow the [installation procedure](#installation--usage) and then run the following: - -```python - -import time -import openchallenges_client -from openchallenges_client.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to http://localhost/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = openchallenges_client.Configuration( - host = "http://localhost/v1" -) - - - -# Enter a context with an instance of the API client -with openchallenges_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = openchallenges_client.ChallengeApi(api_client) - challenge_id = 56 # int | The unique identifier of the challenge. - - try: - # Get a challenge - api_response = api_instance.get_challenge(challenge_id) - print("The response of ChallengeApi->get_challenge:\n") - pprint(api_response) - except ApiException as e: - print("Exception when calling ChallengeApi->get_challenge: %s\n" % e) - -``` - -## Documentation for API Endpoints - -All URIs are relative to _http://localhost/v1_ - -| Class | Method | HTTP request | Description | -| --------------------------- | -------------------------------------------------------------------------------------------------------- | --------------------------------------------------- | --------------------------------------------- | -| _ChallengeApi_ | [**get_challenge**](docs/ChallengeApi.md#get_challenge) | **GET** /challenges/{challengeId} | Get a challenge | -| _ChallengeApi_ | [**list_challenges**](docs/ChallengeApi.md#list_challenges) | **GET** /challenges | List challenges | -| _ChallengeAnalyticsApi_ | [**get_challenges_per_year**](docs/ChallengeAnalyticsApi.md#get_challenges_per_year) | **GET** /challengeAnalytics/challengesPerYear | Get the number of challenges tracked per year | -| _ChallengeContributionApi_ | [**list_challenge_contributions**](docs/ChallengeContributionApi.md#list_challenge_contributions) | **GET** /challenges/{challengeId}/contributions | List challenge contributions | -| _ChallengeInputDataTypeApi_ | [**list_challenge_input_data_types**](docs/ChallengeInputDataTypeApi.md#list_challenge_input_data_types) | **GET** /challengeInputDataTypes | List challenge input data types | -| _ChallengePlatformApi_ | [**get_challenge_platform**](docs/ChallengePlatformApi.md#get_challenge_platform) | **GET** /challengePlatforms/{challengePlatformName} | Get a challenge platform | -| _ChallengePlatformApi_ | [**list_challenge_platforms**](docs/ChallengePlatformApi.md#list_challenge_platforms) | **GET** /challengePlatforms | List challenge platforms | -| _ImageApi_ | [**get_image**](docs/ImageApi.md#get_image) | **GET** /images | Get an image | -| _OrganizationApi_ | [**get_organization**](docs/OrganizationApi.md#get_organization) | **GET** /organizations/{org} | Get an organization | -| _OrganizationApi_ | [**list_organizations**](docs/OrganizationApi.md#list_organizations) | **GET** /organizations | List organizations | -| _UserApi_ | [**create_user**](docs/UserApi.md#create_user) | **POST** /users/register | Create a user | -| _UserApi_ | [**delete_user**](docs/UserApi.md#delete_user) | **DELETE** /users/{userId} | Delete a user | -| _UserApi_ | [**get_user**](docs/UserApi.md#get_user) | **GET** /users/{userId} | Get a user | -| _UserApi_ | [**list_users**](docs/UserApi.md#list_users) | **GET** /users | Get all users | - -## Documentation For Models - -- [BasicError](docs/BasicError.md) -- [Challenge](docs/Challenge.md) -- [ChallengeCategory](docs/ChallengeCategory.md) -- [ChallengeContribution](docs/ChallengeContribution.md) -- [ChallengeContributionRole](docs/ChallengeContributionRole.md) -- [ChallengeContributionsPage](docs/ChallengeContributionsPage.md) -- [ChallengeDifficulty](docs/ChallengeDifficulty.md) -- [ChallengeDirection](docs/ChallengeDirection.md) -- [ChallengeIncentive](docs/ChallengeIncentive.md) -- [ChallengeInputDataType](docs/ChallengeInputDataType.md) -- [ChallengeInputDataTypeDirection](docs/ChallengeInputDataTypeDirection.md) -- [ChallengeInputDataTypeSearchQuery](docs/ChallengeInputDataTypeSearchQuery.md) -- [ChallengeInputDataTypeSort](docs/ChallengeInputDataTypeSort.md) -- [ChallengeInputDataTypesPage](docs/ChallengeInputDataTypesPage.md) -- [ChallengePlatform](docs/ChallengePlatform.md) -- [ChallengePlatformDirection](docs/ChallengePlatformDirection.md) -- [ChallengePlatformSearchQuery](docs/ChallengePlatformSearchQuery.md) -- [ChallengePlatformSort](docs/ChallengePlatformSort.md) -- [ChallengePlatformsPage](docs/ChallengePlatformsPage.md) -- [ChallengeSearchQuery](docs/ChallengeSearchQuery.md) -- [ChallengeSort](docs/ChallengeSort.md) -- [ChallengeStatus](docs/ChallengeStatus.md) -- [ChallengeSubmissionType](docs/ChallengeSubmissionType.md) -- [ChallengesPage](docs/ChallengesPage.md) -- [ChallengesPerYear](docs/ChallengesPerYear.md) -- [Image](docs/Image.md) -- [ImageAspectRatio](docs/ImageAspectRatio.md) -- [ImageHeight](docs/ImageHeight.md) -- [ImageQuery](docs/ImageQuery.md) -- [Organization](docs/Organization.md) -- [OrganizationCategory](docs/OrganizationCategory.md) -- [OrganizationDirection](docs/OrganizationDirection.md) -- [OrganizationSearchQuery](docs/OrganizationSearchQuery.md) -- [OrganizationSort](docs/OrganizationSort.md) -- [OrganizationsPage](docs/OrganizationsPage.md) -- [PageMetadata](docs/PageMetadata.md) -- [SimpleChallengeInputDataType](docs/SimpleChallengeInputDataType.md) -- [SimpleChallengePlatform](docs/SimpleChallengePlatform.md) -- [User](docs/User.md) -- [UserCreateRequest](docs/UserCreateRequest.md) -- [UserCreateResponse](docs/UserCreateResponse.md) -- [UserStatus](docs/UserStatus.md) -- [UsersPage](docs/UsersPage.md) - - - -## Documentation For Authorization - -Endpoints do not require authorization. - -## Author diff --git a/libs/openchallenges/api-client-python/docs/BasicError.md b/libs/openchallenges/api-client-python/docs/BasicError.md deleted file mode 100644 index 88db9cdcbf..0000000000 --- a/libs/openchallenges/api-client-python/docs/BasicError.md +++ /dev/null @@ -1,32 +0,0 @@ -# BasicError - -Problem details (tools.ietf.org/html/rfc7807) - -## Properties - -| Name | Type | Description | Notes | -| ---------- | ------- | ----------------------------------------------------------------------- | ---------- | -| **title** | **str** | A human readable documentation for the problem type | -| **status** | **int** | The HTTP status code | -| **detail** | **str** | A human readable explanation specific to this occurrence of the problem | [optional] | -| **type** | **str** | An absolute URI that identifies the problem type | [optional] | - -## Example - -```python -from openchallenges_client.models.basic_error import BasicError - -# TODO update the JSON string below -json = "{}" -# create an instance of BasicError from a JSON string -basic_error_instance = BasicError.from_json(json) -# print the JSON string representation of the object -print BasicError.to_json() - -# convert the object into a dict -basic_error_dict = basic_error_instance.to_dict() -# create an instance of BasicError from a dict -basic_error_form_dict = basic_error.from_dict(basic_error_dict) -``` - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/libs/openchallenges/api-client-python/docs/Challenge.md b/libs/openchallenges/api-client-python/docs/Challenge.md deleted file mode 100644 index 912711e236..0000000000 --- a/libs/openchallenges/api-client-python/docs/Challenge.md +++ /dev/null @@ -1,47 +0,0 @@ -# Challenge - -A challenge - -## Properties - -| Name | Type | Description | Notes | -| -------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------ | -------------- | -| **id** | **int** | The unique identifier of the challenge. | -| **slug** | **str** | The slug of the challenge. | -| **name** | **str** | The name of the challenge. | -| **headline** | **str** | The headline of the challenge. | [optional] | -| **description** | **str** | The description of the challenge. | -| **doi** | **str** | | [optional] | -| **status** | [**ChallengeStatus**](ChallengeStatus.md) | | -| **difficulty** | [**ChallengeDifficulty**](ChallengeDifficulty.md) | | -| **platform** | [**SimpleChallengePlatform**](SimpleChallengePlatform.md) | | -| **website_url** | **str** | | [optional] | -| **avatar_url** | **str** | | [optional] | -| **incentives** | [**List[ChallengeIncentive]**](ChallengeIncentive.md) | | -| **submission_types** | [**List[ChallengeSubmissionType]**](ChallengeSubmissionType.md) | | -| **input_data_types** | [**List[SimpleChallengeInputDataType]**](SimpleChallengeInputDataType.md) | | [optional] | -| **start_date** | **date** | The start date of the challenge. | [optional] | -| **end_date** | **date** | The end date of the challenge. | [optional] | -| **starred_count** | **int** | The number of times the challenge has been starred by users. | [default to 0] | -| **created_at** | **datetime** | | -| **updated_at** | **datetime** | | - -## Example - -```python -from openchallenges_client.models.challenge import Challenge - -# TODO update the JSON string below -json = "{}" -# create an instance of Challenge from a JSON string -challenge_instance = Challenge.from_json(json) -# print the JSON string representation of the object -print Challenge.to_json() - -# convert the object into a dict -challenge_dict = challenge_instance.to_dict() -# create an instance of Challenge from a dict -challenge_form_dict = challenge.from_dict(challenge_dict) -``` - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/libs/openchallenges/api-client-python/docs/ChallengeAnalyticsApi.md b/libs/openchallenges/api-client-python/docs/ChallengeAnalyticsApi.md deleted file mode 100644 index c5a33685be..0000000000 --- a/libs/openchallenges/api-client-python/docs/ChallengeAnalyticsApi.md +++ /dev/null @@ -1,72 +0,0 @@ -# openchallenges_client.ChallengeAnalyticsApi - -All URIs are relative to _http://localhost/v1_ - -| Method | HTTP request | Description | -| ------------------------------------------------------------------------------- | --------------------------------------------- | --------------------------------------------- | -| [**get_challenges_per_year**](ChallengeAnalyticsApi.md#get_challenges_per_year) | **GET** /challengeAnalytics/challengesPerYear | Get the number of challenges tracked per year | - -# **get_challenges_per_year** - -> ChallengesPerYear get_challenges_per_year() - -Get the number of challenges tracked per year - -Returns the number of challenges tracked per year - -### Example - -```python -import time -import os -import openchallenges_client -from openchallenges_client.models.challenges_per_year import ChallengesPerYear -from openchallenges_client.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to http://localhost/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = openchallenges_client.Configuration( - host = "http://localhost/v1" -) - - -# Enter a context with an instance of the API client -with openchallenges_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = openchallenges_client.ChallengeAnalyticsApi(api_client) - - try: - # Get the number of challenges tracked per year - api_response = api_instance.get_challenges_per_year() - print("The response of ChallengeAnalyticsApi->get_challenges_per_year:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling ChallengeAnalyticsApi->get_challenges_per_year: %s\n" % e) -``` - -### Parameters - -This endpoint does not need any parameter. - -### Return type - -[**ChallengesPerYear**](ChallengesPerYear.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json, application/problem+json - -### HTTP response details - -| Status code | Description | Response headers | -| ----------- | ----------------------------------------------------------------- | ---------------- | -| **200** | An object | - | -| **500** | The request cannot be fulfilled due to an unexpected server error | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) diff --git a/libs/openchallenges/api-client-python/docs/ChallengeApi.md b/libs/openchallenges/api-client-python/docs/ChallengeApi.md deleted file mode 100644 index 3a33d68eaf..0000000000 --- a/libs/openchallenges/api-client-python/docs/ChallengeApi.md +++ /dev/null @@ -1,147 +0,0 @@ -# openchallenges_client.ChallengeApi - -All URIs are relative to _http://localhost/v1_ - -| Method | HTTP request | Description | -| ------------------------------------------------------ | --------------------------------- | --------------- | -| [**get_challenge**](ChallengeApi.md#get_challenge) | **GET** /challenges/{challengeId} | Get a challenge | -| [**list_challenges**](ChallengeApi.md#list_challenges) | **GET** /challenges | List challenges | - -# **get_challenge** - -> Challenge get_challenge(challenge_id) - -Get a challenge - -Returns the challenge specified - -### Example - -```python -import time -import os -import openchallenges_client -from openchallenges_client.models.challenge import Challenge -from openchallenges_client.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to http://localhost/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = openchallenges_client.Configuration( - host = "http://localhost/v1" -) - - -# Enter a context with an instance of the API client -with openchallenges_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = openchallenges_client.ChallengeApi(api_client) - challenge_id = 56 # int | The unique identifier of the challenge. - - try: - # Get a challenge - api_response = api_instance.get_challenge(challenge_id) - print("The response of ChallengeApi->get_challenge:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling ChallengeApi->get_challenge: %s\n" % e) -``` - -### Parameters - -| Name | Type | Description | Notes | -| ---------------- | ------- | --------------------------------------- | ----- | -| **challenge_id** | **int** | The unique identifier of the challenge. | - -### Return type - -[**Challenge**](Challenge.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json, application/problem+json - -### HTTP response details - -| Status code | Description | Response headers | -| ----------- | ----------------------------------------------------------------- | ---------------- | -| **200** | A challenge | - | -| **404** | The specified resource was not found | - | -| **500** | The request cannot be fulfilled due to an unexpected server error | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **list_challenges** - -> ChallengesPage list_challenges(challenge_search_query=challenge_search_query) - -List challenges - -List challenges - -### Example - -```python -import time -import os -import openchallenges_client -from openchallenges_client.models.challenge_search_query import ChallengeSearchQuery -from openchallenges_client.models.challenges_page import ChallengesPage -from openchallenges_client.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to http://localhost/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = openchallenges_client.Configuration( - host = "http://localhost/v1" -) - - -# Enter a context with an instance of the API client -with openchallenges_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = openchallenges_client.ChallengeApi(api_client) - challenge_search_query = openchallenges_client.ChallengeSearchQuery() # ChallengeSearchQuery | The search query used to find challenges. (optional) - - try: - # List challenges - api_response = api_instance.list_challenges(challenge_search_query=challenge_search_query) - print("The response of ChallengeApi->list_challenges:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling ChallengeApi->list_challenges: %s\n" % e) -``` - -### Parameters - -| Name | Type | Description | Notes | -| -------------------------- | ------------------------------- | ----------------------------------------- | ---------- | -| **challenge_search_query** | [**ChallengeSearchQuery**](.md) | The search query used to find challenges. | [optional] | - -### Return type - -[**ChallengesPage**](ChallengesPage.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json, application/problem+json - -### HTTP response details - -| Status code | Description | Response headers | -| ----------- | ----------------------------------------------------------------- | ---------------- | -| **200** | Success | - | -| **400** | Invalid request | - | -| **500** | The request cannot be fulfilled due to an unexpected server error | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) diff --git a/libs/openchallenges/api-client-python/docs/ChallengeCategory.md b/libs/openchallenges/api-client-python/docs/ChallengeCategory.md deleted file mode 100644 index 3de67afb9f..0000000000 --- a/libs/openchallenges/api-client-python/docs/ChallengeCategory.md +++ /dev/null @@ -1,10 +0,0 @@ -# ChallengeCategory - -The category of the challenge. - -## Properties - -| Name | Type | Description | Notes | -| ---- | ---- | ----------- | ----- | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/libs/openchallenges/api-client-python/docs/ChallengeContribution.md b/libs/openchallenges/api-client-python/docs/ChallengeContribution.md deleted file mode 100644 index 09654f3fa4..0000000000 --- a/libs/openchallenges/api-client-python/docs/ChallengeContribution.md +++ /dev/null @@ -1,31 +0,0 @@ -# ChallengeContribution - -A challenge contribution. - -## Properties - -| Name | Type | Description | Notes | -| ------------------- | ------------------------------------------------------------- | ---------------------------------------- | ----- | -| **challenge_id** | **int** | The unique identifier of the challenge. | -| **organization_id** | **int** | The unique identifier of an organization | -| **role** | [**ChallengeContributionRole**](ChallengeContributionRole.md) | | - -## Example - -```python -from openchallenges_client.models.challenge_contribution import ChallengeContribution - -# TODO update the JSON string below -json = "{}" -# create an instance of ChallengeContribution from a JSON string -challenge_contribution_instance = ChallengeContribution.from_json(json) -# print the JSON string representation of the object -print ChallengeContribution.to_json() - -# convert the object into a dict -challenge_contribution_dict = challenge_contribution_instance.to_dict() -# create an instance of ChallengeContribution from a dict -challenge_contribution_form_dict = challenge_contribution.from_dict(challenge_contribution_dict) -``` - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/libs/openchallenges/api-client-python/docs/ChallengeContributionApi.md b/libs/openchallenges/api-client-python/docs/ChallengeContributionApi.md deleted file mode 100644 index b694ce3b0c..0000000000 --- a/libs/openchallenges/api-client-python/docs/ChallengeContributionApi.md +++ /dev/null @@ -1,76 +0,0 @@ -# openchallenges_client.ChallengeContributionApi - -All URIs are relative to _http://localhost/v1_ - -| Method | HTTP request | Description | -| -------------------------------------------------------------------------------------------- | ----------------------------------------------- | ---------------------------- | -| [**list_challenge_contributions**](ChallengeContributionApi.md#list_challenge_contributions) | **GET** /challenges/{challengeId}/contributions | List challenge contributions | - -# **list_challenge_contributions** - -> ChallengeContributionsPage list_challenge_contributions(challenge_id) - -List challenge contributions - -List challenge contributions - -### Example - -```python -import time -import os -import openchallenges_client -from openchallenges_client.models.challenge_contributions_page import ChallengeContributionsPage -from openchallenges_client.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to http://localhost/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = openchallenges_client.Configuration( - host = "http://localhost/v1" -) - - -# Enter a context with an instance of the API client -with openchallenges_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = openchallenges_client.ChallengeContributionApi(api_client) - challenge_id = 56 # int | The unique identifier of the challenge. - - try: - # List challenge contributions - api_response = api_instance.list_challenge_contributions(challenge_id) - print("The response of ChallengeContributionApi->list_challenge_contributions:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling ChallengeContributionApi->list_challenge_contributions: %s\n" % e) -``` - -### Parameters - -| Name | Type | Description | Notes | -| ---------------- | ------- | --------------------------------------- | ----- | -| **challenge_id** | **int** | The unique identifier of the challenge. | - -### Return type - -[**ChallengeContributionsPage**](ChallengeContributionsPage.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json, application/problem+json - -### HTTP response details - -| Status code | Description | Response headers | -| ----------- | ----------------------------------------------------------------- | ---------------- | -| **200** | Success | - | -| **400** | Invalid request | - | -| **500** | The request cannot be fulfilled due to an unexpected server error | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) diff --git a/libs/openchallenges/api-client-python/docs/ChallengeContributionRole.md b/libs/openchallenges/api-client-python/docs/ChallengeContributionRole.md deleted file mode 100644 index 9f922e222e..0000000000 --- a/libs/openchallenges/api-client-python/docs/ChallengeContributionRole.md +++ /dev/null @@ -1,10 +0,0 @@ -# ChallengeContributionRole - -The nature of a challenge contribution. - -## Properties - -| Name | Type | Description | Notes | -| ---- | ---- | ----------- | ----- | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/libs/openchallenges/api-client-python/docs/ChallengeContributionsPage.md b/libs/openchallenges/api-client-python/docs/ChallengeContributionsPage.md deleted file mode 100644 index 6298b4d5aa..0000000000 --- a/libs/openchallenges/api-client-python/docs/ChallengeContributionsPage.md +++ /dev/null @@ -1,35 +0,0 @@ -# ChallengeContributionsPage - -A page of challenge challenge contributions. - -## Properties - -| Name | Type | Description | Notes | -| --------------------------- | ----------------------------------------------------------- | ------------------------------------------- | ----- | -| **number** | **int** | The page number. | -| **size** | **int** | The number of items in a single page. | -| **total_elements** | **int** | Total number of elements in the result set. | -| **total_pages** | **int** | Total number of pages in the result set. | -| **has_next** | **bool** | Returns if there is a next page. | -| **has_previous** | **bool** | Returns if there is a previous page. | -| **challenge_contributions** | [**List[ChallengeContribution]**](ChallengeContribution.md) | A list of challenge contributions. | - -## Example - -```python -from openchallenges_client.models.challenge_contributions_page import ChallengeContributionsPage - -# TODO update the JSON string below -json = "{}" -# create an instance of ChallengeContributionsPage from a JSON string -challenge_contributions_page_instance = ChallengeContributionsPage.from_json(json) -# print the JSON string representation of the object -print ChallengeContributionsPage.to_json() - -# convert the object into a dict -challenge_contributions_page_dict = challenge_contributions_page_instance.to_dict() -# create an instance of ChallengeContributionsPage from a dict -challenge_contributions_page_form_dict = challenge_contributions_page.from_dict(challenge_contributions_page_dict) -``` - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/libs/openchallenges/api-client-python/docs/ChallengeDifficulty.md b/libs/openchallenges/api-client-python/docs/ChallengeDifficulty.md deleted file mode 100644 index a7f20b99a1..0000000000 --- a/libs/openchallenges/api-client-python/docs/ChallengeDifficulty.md +++ /dev/null @@ -1,10 +0,0 @@ -# ChallengeDifficulty - -The difficulty level of a challenge. - -## Properties - -| Name | Type | Description | Notes | -| ---- | ---- | ----------- | ----- | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/libs/openchallenges/api-client-python/docs/ChallengeDirection.md b/libs/openchallenges/api-client-python/docs/ChallengeDirection.md deleted file mode 100644 index ae013e8a9f..0000000000 --- a/libs/openchallenges/api-client-python/docs/ChallengeDirection.md +++ /dev/null @@ -1,10 +0,0 @@ -# ChallengeDirection - -The direction to sort the results by. - -## Properties - -| Name | Type | Description | Notes | -| ---- | ---- | ----------- | ----- | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/libs/openchallenges/api-client-python/docs/ChallengeIncentive.md b/libs/openchallenges/api-client-python/docs/ChallengeIncentive.md deleted file mode 100644 index 9e1c602054..0000000000 --- a/libs/openchallenges/api-client-python/docs/ChallengeIncentive.md +++ /dev/null @@ -1,10 +0,0 @@ -# ChallengeIncentive - -The incentive type of the challenge. - -## Properties - -| Name | Type | Description | Notes | -| ---- | ---- | ----------- | ----- | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/libs/openchallenges/api-client-python/docs/ChallengeInputDataType.md b/libs/openchallenges/api-client-python/docs/ChallengeInputDataType.md deleted file mode 100644 index c6c6a6ef43..0000000000 --- a/libs/openchallenges/api-client-python/docs/ChallengeInputDataType.md +++ /dev/null @@ -1,33 +0,0 @@ -# ChallengeInputDataType - -A challenge input data type. - -## Properties - -| Name | Type | Description | Notes | -| -------------- | ------------ | ----------------------------------------------------- | ----- | -| **id** | **int** | The unique identifier of a challenge input data type. | -| **slug** | **str** | The slug of the challenge input data type. | -| **name** | **str** | The name of the challenge input data type. | -| **created_at** | **datetime** | | -| **updated_at** | **datetime** | | - -## Example - -```python -from openchallenges_client.models.challenge_input_data_type import ChallengeInputDataType - -# TODO update the JSON string below -json = "{}" -# create an instance of ChallengeInputDataType from a JSON string -challenge_input_data_type_instance = ChallengeInputDataType.from_json(json) -# print the JSON string representation of the object -print ChallengeInputDataType.to_json() - -# convert the object into a dict -challenge_input_data_type_dict = challenge_input_data_type_instance.to_dict() -# create an instance of ChallengeInputDataType from a dict -challenge_input_data_type_form_dict = challenge_input_data_type.from_dict(challenge_input_data_type_dict) -``` - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/libs/openchallenges/api-client-python/docs/ChallengeInputDataTypeApi.md b/libs/openchallenges/api-client-python/docs/ChallengeInputDataTypeApi.md deleted file mode 100644 index 34041fec9b..0000000000 --- a/libs/openchallenges/api-client-python/docs/ChallengeInputDataTypeApi.md +++ /dev/null @@ -1,77 +0,0 @@ -# openchallenges_client.ChallengeInputDataTypeApi - -All URIs are relative to _http://localhost/v1_ - -| Method | HTTP request | Description | -| --------------------------------------------------------------------------------------------------- | -------------------------------- | ------------------------------- | -| [**list_challenge_input_data_types**](ChallengeInputDataTypeApi.md#list_challenge_input_data_types) | **GET** /challengeInputDataTypes | List challenge input data types | - -# **list_challenge_input_data_types** - -> ChallengeInputDataTypesPage list_challenge_input_data_types(challenge_input_data_type_search_query=challenge_input_data_type_search_query) - -List challenge input data types - -List challenge input data types - -### Example - -```python -import time -import os -import openchallenges_client -from openchallenges_client.models.challenge_input_data_type_search_query import ChallengeInputDataTypeSearchQuery -from openchallenges_client.models.challenge_input_data_types_page import ChallengeInputDataTypesPage -from openchallenges_client.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to http://localhost/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = openchallenges_client.Configuration( - host = "http://localhost/v1" -) - - -# Enter a context with an instance of the API client -with openchallenges_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = openchallenges_client.ChallengeInputDataTypeApi(api_client) - challenge_input_data_type_search_query = openchallenges_client.ChallengeInputDataTypeSearchQuery() # ChallengeInputDataTypeSearchQuery | The search query used to find challenge input data types. (optional) - - try: - # List challenge input data types - api_response = api_instance.list_challenge_input_data_types(challenge_input_data_type_search_query=challenge_input_data_type_search_query) - print("The response of ChallengeInputDataTypeApi->list_challenge_input_data_types:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling ChallengeInputDataTypeApi->list_challenge_input_data_types: %s\n" % e) -``` - -### Parameters - -| Name | Type | Description | Notes | -| ------------------------------------------ | -------------------------------------------- | --------------------------------------------------------- | ---------- | -| **challenge_input_data_type_search_query** | [**ChallengeInputDataTypeSearchQuery**](.md) | The search query used to find challenge input data types. | [optional] | - -### Return type - -[**ChallengeInputDataTypesPage**](ChallengeInputDataTypesPage.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json, application/problem+json - -### HTTP response details - -| Status code | Description | Response headers | -| ----------- | ----------------------------------------------------------------- | ---------------- | -| **200** | Success | - | -| **400** | Invalid request | - | -| **500** | The request cannot be fulfilled due to an unexpected server error | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) diff --git a/libs/openchallenges/api-client-python/docs/ChallengeInputDataTypeDirection.md b/libs/openchallenges/api-client-python/docs/ChallengeInputDataTypeDirection.md deleted file mode 100644 index a799029b8e..0000000000 --- a/libs/openchallenges/api-client-python/docs/ChallengeInputDataTypeDirection.md +++ /dev/null @@ -1,10 +0,0 @@ -# ChallengeInputDataTypeDirection - -The direction to sort the results by. - -## Properties - -| Name | Type | Description | Notes | -| ---- | ---- | ----------- | ----- | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/libs/openchallenges/api-client-python/docs/ChallengeInputDataTypeSearchQuery.md b/libs/openchallenges/api-client-python/docs/ChallengeInputDataTypeSearchQuery.md deleted file mode 100644 index fd453f698e..0000000000 --- a/libs/openchallenges/api-client-python/docs/ChallengeInputDataTypeSearchQuery.md +++ /dev/null @@ -1,33 +0,0 @@ -# ChallengeInputDataTypeSearchQuery - -A challenge input data type search query. - -## Properties - -| Name | Type | Description | Notes | -| ---------------- | ------------------------------------------------------------------------- | ---------------------------------------------------- | --------------------------- | -| **page_number** | **int** | The page number. | [optional] [default to 0] | -| **page_size** | **int** | The number of items in a single page. | [optional] [default to 100] | -| **sort** | [**ChallengeInputDataTypeSort**](ChallengeInputDataTypeSort.md) | | [optional] | -| **direction** | [**ChallengeInputDataTypeDirection**](ChallengeInputDataTypeDirection.md) | | [optional] | -| **search_terms** | **str** | A string of search terms used to filter the results. | [optional] | - -## Example - -```python -from openchallenges_client.models.challenge_input_data_type_search_query import ChallengeInputDataTypeSearchQuery - -# TODO update the JSON string below -json = "{}" -# create an instance of ChallengeInputDataTypeSearchQuery from a JSON string -challenge_input_data_type_search_query_instance = ChallengeInputDataTypeSearchQuery.from_json(json) -# print the JSON string representation of the object -print ChallengeInputDataTypeSearchQuery.to_json() - -# convert the object into a dict -challenge_input_data_type_search_query_dict = challenge_input_data_type_search_query_instance.to_dict() -# create an instance of ChallengeInputDataTypeSearchQuery from a dict -challenge_input_data_type_search_query_form_dict = challenge_input_data_type_search_query.from_dict(challenge_input_data_type_search_query_dict) -``` - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/libs/openchallenges/api-client-python/docs/ChallengeInputDataTypeSort.md b/libs/openchallenges/api-client-python/docs/ChallengeInputDataTypeSort.md deleted file mode 100644 index 90505f07c1..0000000000 --- a/libs/openchallenges/api-client-python/docs/ChallengeInputDataTypeSort.md +++ /dev/null @@ -1,10 +0,0 @@ -# ChallengeInputDataTypeSort - -What to sort results by. - -## Properties - -| Name | Type | Description | Notes | -| ---- | ---- | ----------- | ----- | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/libs/openchallenges/api-client-python/docs/ChallengeInputDataTypesPage.md b/libs/openchallenges/api-client-python/docs/ChallengeInputDataTypesPage.md deleted file mode 100644 index 4d7b10d6e2..0000000000 --- a/libs/openchallenges/api-client-python/docs/ChallengeInputDataTypesPage.md +++ /dev/null @@ -1,35 +0,0 @@ -# ChallengeInputDataTypesPage - -A page of challenge input data types. - -## Properties - -| Name | Type | Description | Notes | -| ------------------------------ | ------------------------------------------------------------- | ------------------------------------------- | ----- | -| **number** | **int** | The page number. | -| **size** | **int** | The number of items in a single page. | -| **total_elements** | **int** | Total number of elements in the result set. | -| **total_pages** | **int** | Total number of pages in the result set. | -| **has_next** | **bool** | Returns if there is a next page. | -| **has_previous** | **bool** | Returns if there is a previous page. | -| **challenge_input_data_types** | [**List[ChallengeInputDataType]**](ChallengeInputDataType.md) | A list of challenge input data types. | - -## Example - -```python -from openchallenges_client.models.challenge_input_data_types_page import ChallengeInputDataTypesPage - -# TODO update the JSON string below -json = "{}" -# create an instance of ChallengeInputDataTypesPage from a JSON string -challenge_input_data_types_page_instance = ChallengeInputDataTypesPage.from_json(json) -# print the JSON string representation of the object -print ChallengeInputDataTypesPage.to_json() - -# convert the object into a dict -challenge_input_data_types_page_dict = challenge_input_data_types_page_instance.to_dict() -# create an instance of ChallengeInputDataTypesPage from a dict -challenge_input_data_types_page_form_dict = challenge_input_data_types_page.from_dict(challenge_input_data_types_page_dict) -``` - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/libs/openchallenges/api-client-python/docs/ChallengePlatform.md b/libs/openchallenges/api-client-python/docs/ChallengePlatform.md deleted file mode 100644 index 055cc9edbd..0000000000 --- a/libs/openchallenges/api-client-python/docs/ChallengePlatform.md +++ /dev/null @@ -1,35 +0,0 @@ -# ChallengePlatform - -A challenge platform - -## Properties - -| Name | Type | Description | Notes | -| --------------- | ------------ | ---------------------------------------------- | ----- | -| **id** | **int** | The unique identifier of a challenge platform. | -| **slug** | **str** | The slug of the challenge platform. | -| **name** | **str** | The name of the challenge platform. | -| **avatar_url** | **str** | | -| **website_url** | **str** | | -| **created_at** | **datetime** | | -| **updated_at** | **datetime** | | - -## Example - -```python -from openchallenges_client.models.challenge_platform import ChallengePlatform - -# TODO update the JSON string below -json = "{}" -# create an instance of ChallengePlatform from a JSON string -challenge_platform_instance = ChallengePlatform.from_json(json) -# print the JSON string representation of the object -print ChallengePlatform.to_json() - -# convert the object into a dict -challenge_platform_dict = challenge_platform_instance.to_dict() -# create an instance of ChallengePlatform from a dict -challenge_platform_form_dict = challenge_platform.from_dict(challenge_platform_dict) -``` - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/libs/openchallenges/api-client-python/docs/ChallengePlatformApi.md b/libs/openchallenges/api-client-python/docs/ChallengePlatformApi.md deleted file mode 100644 index 48e61ef481..0000000000 --- a/libs/openchallenges/api-client-python/docs/ChallengePlatformApi.md +++ /dev/null @@ -1,147 +0,0 @@ -# openchallenges_client.ChallengePlatformApi - -All URIs are relative to _http://localhost/v1_ - -| Method | HTTP request | Description | -| -------------------------------------------------------------------------------- | --------------------------------------------------- | ------------------------ | -| [**get_challenge_platform**](ChallengePlatformApi.md#get_challenge_platform) | **GET** /challengePlatforms/{challengePlatformName} | Get a challenge platform | -| [**list_challenge_platforms**](ChallengePlatformApi.md#list_challenge_platforms) | **GET** /challengePlatforms | List challenge platforms | - -# **get_challenge_platform** - -> ChallengePlatform get_challenge_platform(challenge_platform_name) - -Get a challenge platform - -Returns the challenge platform specified - -### Example - -```python -import time -import os -import openchallenges_client -from openchallenges_client.models.challenge_platform import ChallengePlatform -from openchallenges_client.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to http://localhost/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = openchallenges_client.Configuration( - host = "http://localhost/v1" -) - - -# Enter a context with an instance of the API client -with openchallenges_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = openchallenges_client.ChallengePlatformApi(api_client) - challenge_platform_name = 'challenge_platform_name_example' # str | The unique identifier of the challenge platform. - - try: - # Get a challenge platform - api_response = api_instance.get_challenge_platform(challenge_platform_name) - print("The response of ChallengePlatformApi->get_challenge_platform:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling ChallengePlatformApi->get_challenge_platform: %s\n" % e) -``` - -### Parameters - -| Name | Type | Description | Notes | -| --------------------------- | ------- | ------------------------------------------------ | ----- | -| **challenge_platform_name** | **str** | The unique identifier of the challenge platform. | - -### Return type - -[**ChallengePlatform**](ChallengePlatform.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json, application/problem+json - -### HTTP response details - -| Status code | Description | Response headers | -| ----------- | ----------------------------------------------------------------- | ---------------- | -| **200** | Success | - | -| **404** | The specified resource was not found | - | -| **500** | The request cannot be fulfilled due to an unexpected server error | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **list_challenge_platforms** - -> ChallengePlatformsPage list_challenge_platforms(challenge_platform_search_query=challenge_platform_search_query) - -List challenge platforms - -List challenge platforms - -### Example - -```python -import time -import os -import openchallenges_client -from openchallenges_client.models.challenge_platform_search_query import ChallengePlatformSearchQuery -from openchallenges_client.models.challenge_platforms_page import ChallengePlatformsPage -from openchallenges_client.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to http://localhost/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = openchallenges_client.Configuration( - host = "http://localhost/v1" -) - - -# Enter a context with an instance of the API client -with openchallenges_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = openchallenges_client.ChallengePlatformApi(api_client) - challenge_platform_search_query = openchallenges_client.ChallengePlatformSearchQuery() # ChallengePlatformSearchQuery | The search query used to find challenge platforms. (optional) - - try: - # List challenge platforms - api_response = api_instance.list_challenge_platforms(challenge_platform_search_query=challenge_platform_search_query) - print("The response of ChallengePlatformApi->list_challenge_platforms:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling ChallengePlatformApi->list_challenge_platforms: %s\n" % e) -``` - -### Parameters - -| Name | Type | Description | Notes | -| ----------------------------------- | --------------------------------------- | -------------------------------------------------- | ---------- | -| **challenge_platform_search_query** | [**ChallengePlatformSearchQuery**](.md) | The search query used to find challenge platforms. | [optional] | - -### Return type - -[**ChallengePlatformsPage**](ChallengePlatformsPage.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json, application/problem+json - -### HTTP response details - -| Status code | Description | Response headers | -| ----------- | ----------------------------------------------------------------- | ---------------- | -| **200** | Success | - | -| **400** | Invalid request | - | -| **500** | The request cannot be fulfilled due to an unexpected server error | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) diff --git a/libs/openchallenges/api-client-python/docs/ChallengePlatformDirection.md b/libs/openchallenges/api-client-python/docs/ChallengePlatformDirection.md deleted file mode 100644 index b5e220a9df..0000000000 --- a/libs/openchallenges/api-client-python/docs/ChallengePlatformDirection.md +++ /dev/null @@ -1,10 +0,0 @@ -# ChallengePlatformDirection - -The direction to sort the results by. - -## Properties - -| Name | Type | Description | Notes | -| ---- | ---- | ----------- | ----- | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/libs/openchallenges/api-client-python/docs/ChallengePlatformSearchQuery.md b/libs/openchallenges/api-client-python/docs/ChallengePlatformSearchQuery.md deleted file mode 100644 index 582951fe42..0000000000 --- a/libs/openchallenges/api-client-python/docs/ChallengePlatformSearchQuery.md +++ /dev/null @@ -1,33 +0,0 @@ -# ChallengePlatformSearchQuery - -A challenge platform search query. - -## Properties - -| Name | Type | Description | Notes | -| ---------------- | --------------------------------------------------------------- | ---------------------------------------------------- | --------------------------- | -| **page_number** | **int** | The page number. | [optional] [default to 0] | -| **page_size** | **int** | The number of items in a single page. | [optional] [default to 100] | -| **sort** | [**ChallengePlatformSort**](ChallengePlatformSort.md) | | [optional] | -| **direction** | [**ChallengePlatformDirection**](ChallengePlatformDirection.md) | | [optional] | -| **search_terms** | **str** | A string of search terms used to filter the results. | [optional] | - -## Example - -```python -from openchallenges_client.models.challenge_platform_search_query import ChallengePlatformSearchQuery - -# TODO update the JSON string below -json = "{}" -# create an instance of ChallengePlatformSearchQuery from a JSON string -challenge_platform_search_query_instance = ChallengePlatformSearchQuery.from_json(json) -# print the JSON string representation of the object -print ChallengePlatformSearchQuery.to_json() - -# convert the object into a dict -challenge_platform_search_query_dict = challenge_platform_search_query_instance.to_dict() -# create an instance of ChallengePlatformSearchQuery from a dict -challenge_platform_search_query_form_dict = challenge_platform_search_query.from_dict(challenge_platform_search_query_dict) -``` - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/libs/openchallenges/api-client-python/docs/ChallengePlatformSort.md b/libs/openchallenges/api-client-python/docs/ChallengePlatformSort.md deleted file mode 100644 index 776350c907..0000000000 --- a/libs/openchallenges/api-client-python/docs/ChallengePlatformSort.md +++ /dev/null @@ -1,10 +0,0 @@ -# ChallengePlatformSort - -What to sort results by. - -## Properties - -| Name | Type | Description | Notes | -| ---- | ---- | ----------- | ----- | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/libs/openchallenges/api-client-python/docs/ChallengePlatformsPage.md b/libs/openchallenges/api-client-python/docs/ChallengePlatformsPage.md deleted file mode 100644 index 29d0dba69a..0000000000 --- a/libs/openchallenges/api-client-python/docs/ChallengePlatformsPage.md +++ /dev/null @@ -1,35 +0,0 @@ -# ChallengePlatformsPage - -A page of challenge platforms. - -## Properties - -| Name | Type | Description | Notes | -| ----------------------- | --------------------------------------------------- | ------------------------------------------- | ----- | -| **number** | **int** | The page number. | -| **size** | **int** | The number of items in a single page. | -| **total_elements** | **int** | Total number of elements in the result set. | -| **total_pages** | **int** | Total number of pages in the result set. | -| **has_next** | **bool** | Returns if there is a next page. | -| **has_previous** | **bool** | Returns if there is a previous page. | -| **challenge_platforms** | [**List[ChallengePlatform]**](ChallengePlatform.md) | A list of challenge platforms. | - -## Example - -```python -from openchallenges_client.models.challenge_platforms_page import ChallengePlatformsPage - -# TODO update the JSON string below -json = "{}" -# create an instance of ChallengePlatformsPage from a JSON string -challenge_platforms_page_instance = ChallengePlatformsPage.from_json(json) -# print the JSON string representation of the object -print ChallengePlatformsPage.to_json() - -# convert the object into a dict -challenge_platforms_page_dict = challenge_platforms_page_instance.to_dict() -# create an instance of ChallengePlatformsPage from a dict -challenge_platforms_page_form_dict = challenge_platforms_page.from_dict(challenge_platforms_page_dict) -``` - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/libs/openchallenges/api-client-python/docs/ChallengeSearchQuery.md b/libs/openchallenges/api-client-python/docs/ChallengeSearchQuery.md deleted file mode 100644 index 91358bcc8d..0000000000 --- a/libs/openchallenges/api-client-python/docs/ChallengeSearchQuery.md +++ /dev/null @@ -1,44 +0,0 @@ -# ChallengeSearchQuery - -A challenge search query. - -## Properties - -| Name | Type | Description | Notes | -| -------------------- | --------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------- | -| **page_number** | **int** | The page number. | [optional] [default to 0] | -| **page_size** | **int** | The number of items in a single page. | [optional] [default to 100] | -| **sort** | [**ChallengeSort**](ChallengeSort.md) | | [optional] | -| **sort_seed** | **int** | The seed that initializes the random sorter. | [optional] | -| **direction** | [**ChallengeDirection**](ChallengeDirection.md) | | [optional] | -| **difficulties** | [**List[ChallengeDifficulty]**](ChallengeDifficulty.md) | An array of challenge difficulty levels used to filter the results. | [optional] | -| **incentives** | [**List[ChallengeIncentive]**](ChallengeIncentive.md) | An array of challenge incentive types used to filter the results. | [optional] | -| **min_start_date** | **date** | Keep the challenges that start at this date or later. | [optional] | -| **max_start_date** | **date** | Keep the challenges that start at this date or sooner. | [optional] | -| **platforms** | **List[str]** | An array of challenge platform ids used to filter the results. | [optional] | -| **organizations** | **List[int]** | An array of organization ids used to filter the results. | [optional] | -| **input_data_types** | **List[str]** | An array of challenge input data type ids used to filter the results. | [optional] | -| **status** | [**List[ChallengeStatus]**](ChallengeStatus.md) | An array of challenge status used to filter the results. | [optional] | -| **submission_types** | [**List[ChallengeSubmissionType]**](ChallengeSubmissionType.md) | An array of challenge submission types used to filter the results. | [optional] | -| **categories** | [**List[ChallengeCategory]**](ChallengeCategory.md) | The array of challenge categories used to filter the results. | [optional] | -| **search_terms** | **str** | A string of search terms used to filter the results. | [optional] | - -## Example - -```python -from openchallenges_client.models.challenge_search_query import ChallengeSearchQuery - -# TODO update the JSON string below -json = "{}" -# create an instance of ChallengeSearchQuery from a JSON string -challenge_search_query_instance = ChallengeSearchQuery.from_json(json) -# print the JSON string representation of the object -print ChallengeSearchQuery.to_json() - -# convert the object into a dict -challenge_search_query_dict = challenge_search_query_instance.to_dict() -# create an instance of ChallengeSearchQuery from a dict -challenge_search_query_form_dict = challenge_search_query.from_dict(challenge_search_query_dict) -``` - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/libs/openchallenges/api-client-python/docs/ChallengeSort.md b/libs/openchallenges/api-client-python/docs/ChallengeSort.md deleted file mode 100644 index 741ffacd04..0000000000 --- a/libs/openchallenges/api-client-python/docs/ChallengeSort.md +++ /dev/null @@ -1,10 +0,0 @@ -# ChallengeSort - -What to sort results by. - -## Properties - -| Name | Type | Description | Notes | -| ---- | ---- | ----------- | ----- | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/libs/openchallenges/api-client-python/docs/ChallengeStatus.md b/libs/openchallenges/api-client-python/docs/ChallengeStatus.md deleted file mode 100644 index 012dab3040..0000000000 --- a/libs/openchallenges/api-client-python/docs/ChallengeStatus.md +++ /dev/null @@ -1,10 +0,0 @@ -# ChallengeStatus - -The status of the challenge. - -## Properties - -| Name | Type | Description | Notes | -| ---- | ---- | ----------- | ----- | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/libs/openchallenges/api-client-python/docs/ChallengeSubmissionType.md b/libs/openchallenges/api-client-python/docs/ChallengeSubmissionType.md deleted file mode 100644 index 35646b7dfe..0000000000 --- a/libs/openchallenges/api-client-python/docs/ChallengeSubmissionType.md +++ /dev/null @@ -1,10 +0,0 @@ -# ChallengeSubmissionType - -The submission type of the challenge. - -## Properties - -| Name | Type | Description | Notes | -| ---- | ---- | ----------- | ----- | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/libs/openchallenges/api-client-python/docs/ChallengesPage.md b/libs/openchallenges/api-client-python/docs/ChallengesPage.md deleted file mode 100644 index ec6ac58e0b..0000000000 --- a/libs/openchallenges/api-client-python/docs/ChallengesPage.md +++ /dev/null @@ -1,35 +0,0 @@ -# ChallengesPage - -A page of challenges. - -## Properties - -| Name | Type | Description | Notes | -| ------------------ | ----------------------------------- | ------------------------------------------- | ----- | -| **number** | **int** | The page number. | -| **size** | **int** | The number of items in a single page. | -| **total_elements** | **int** | Total number of elements in the result set. | -| **total_pages** | **int** | Total number of pages in the result set. | -| **has_next** | **bool** | Returns if there is a next page. | -| **has_previous** | **bool** | Returns if there is a previous page. | -| **challenges** | [**List[Challenge]**](Challenge.md) | A list of challenges. | - -## Example - -```python -from openchallenges_client.models.challenges_page import ChallengesPage - -# TODO update the JSON string below -json = "{}" -# create an instance of ChallengesPage from a JSON string -challenges_page_instance = ChallengesPage.from_json(json) -# print the JSON string representation of the object -print ChallengesPage.to_json() - -# convert the object into a dict -challenges_page_dict = challenges_page_instance.to_dict() -# create an instance of ChallengesPage from a dict -challenges_page_form_dict = challenges_page.from_dict(challenges_page_dict) -``` - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/libs/openchallenges/api-client-python/docs/ChallengesPerYear.md b/libs/openchallenges/api-client-python/docs/ChallengesPerYear.md deleted file mode 100644 index 234aa40bfc..0000000000 --- a/libs/openchallenges/api-client-python/docs/ChallengesPerYear.md +++ /dev/null @@ -1,30 +0,0 @@ -# ChallengesPerYear - -An object - -## Properties - -| Name | Type | Description | Notes | -| -------------------- | ------------- | ----------- | ----- | -| **years** | **List[str]** | | -| **challenge_counts** | **List[int]** | | - -## Example - -```python -from openchallenges_client.models.challenges_per_year import ChallengesPerYear - -# TODO update the JSON string below -json = "{}" -# create an instance of ChallengesPerYear from a JSON string -challenges_per_year_instance = ChallengesPerYear.from_json(json) -# print the JSON string representation of the object -print ChallengesPerYear.to_json() - -# convert the object into a dict -challenges_per_year_dict = challenges_per_year_instance.to_dict() -# create an instance of ChallengesPerYear from a dict -challenges_per_year_form_dict = challenges_per_year.from_dict(challenges_per_year_dict) -``` - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/libs/openchallenges/api-client-python/docs/Image.md b/libs/openchallenges/api-client-python/docs/Image.md deleted file mode 100644 index c9576bf3dc..0000000000 --- a/libs/openchallenges/api-client-python/docs/Image.md +++ /dev/null @@ -1,29 +0,0 @@ -# Image - -An image - -## Properties - -| Name | Type | Description | Notes | -| ------- | ------- | ----------- | ----- | -| **url** | **str** | | - -## Example - -```python -from openchallenges_client.models.image import Image - -# TODO update the JSON string below -json = "{}" -# create an instance of Image from a JSON string -image_instance = Image.from_json(json) -# print the JSON string representation of the object -print Image.to_json() - -# convert the object into a dict -image_dict = image_instance.to_dict() -# create an instance of Image from a dict -image_form_dict = image.from_dict(image_dict) -``` - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/libs/openchallenges/api-client-python/docs/ImageApi.md b/libs/openchallenges/api-client-python/docs/ImageApi.md deleted file mode 100644 index 080b251cfb..0000000000 --- a/libs/openchallenges/api-client-python/docs/ImageApi.md +++ /dev/null @@ -1,77 +0,0 @@ -# openchallenges_client.ImageApi - -All URIs are relative to _http://localhost/v1_ - -| Method | HTTP request | Description | -| -------------------------------------- | --------------- | ------------ | -| [**get_image**](ImageApi.md#get_image) | **GET** /images | Get an image | - -# **get_image** - -> Image get_image(image_query=image_query) - -Get an image - -Returns the image specified. - -### Example - -```python -import time -import os -import openchallenges_client -from openchallenges_client.models.image import Image -from openchallenges_client.models.image_query import ImageQuery -from openchallenges_client.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to http://localhost/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = openchallenges_client.Configuration( - host = "http://localhost/v1" -) - - -# Enter a context with an instance of the API client -with openchallenges_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = openchallenges_client.ImageApi(api_client) - image_query = openchallenges_client.ImageQuery() # ImageQuery | The query used to get an image. (optional) - - try: - # Get an image - api_response = api_instance.get_image(image_query=image_query) - print("The response of ImageApi->get_image:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling ImageApi->get_image: %s\n" % e) -``` - -### Parameters - -| Name | Type | Description | Notes | -| --------------- | --------------------- | ------------------------------- | ---------- | -| **image_query** | [**ImageQuery**](.md) | The query used to get an image. | [optional] | - -### Return type - -[**Image**](Image.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json, application/problem+json - -### HTTP response details - -| Status code | Description | Response headers | -| ----------- | ----------------------------------------------------------------- | ---------------- | -| **200** | An image | - | -| **404** | The specified resource was not found | - | -| **500** | The request cannot be fulfilled due to an unexpected server error | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) diff --git a/libs/openchallenges/api-client-python/docs/ImageAspectRatio.md b/libs/openchallenges/api-client-python/docs/ImageAspectRatio.md deleted file mode 100644 index 7fc5b28eb4..0000000000 --- a/libs/openchallenges/api-client-python/docs/ImageAspectRatio.md +++ /dev/null @@ -1,10 +0,0 @@ -# ImageAspectRatio - -The aspect ratio of the image (the height of the image must be specified). - -## Properties - -| Name | Type | Description | Notes | -| ---- | ---- | ----------- | ----- | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/libs/openchallenges/api-client-python/docs/ImageHeight.md b/libs/openchallenges/api-client-python/docs/ImageHeight.md deleted file mode 100644 index b72e7e0058..0000000000 --- a/libs/openchallenges/api-client-python/docs/ImageHeight.md +++ /dev/null @@ -1,10 +0,0 @@ -# ImageHeight - -The height of the image. - -## Properties - -| Name | Type | Description | Notes | -| ---- | ---- | ----------- | ----- | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/libs/openchallenges/api-client-python/docs/ImageQuery.md b/libs/openchallenges/api-client-python/docs/ImageQuery.md deleted file mode 100644 index a8da5489b8..0000000000 --- a/libs/openchallenges/api-client-python/docs/ImageQuery.md +++ /dev/null @@ -1,31 +0,0 @@ -# ImageQuery - -An image query. - -## Properties - -| Name | Type | Description | Notes | -| ---------------- | ------------------------------------------- | ----------------------------------- | ---------- | -| **object_key** | **str** | The unique identifier of the image. | -| **height** | [**ImageHeight**](ImageHeight.md) | | [optional] | -| **aspect_ratio** | [**ImageAspectRatio**](ImageAspectRatio.md) | | [optional] | - -## Example - -```python -from openchallenges_client.models.image_query import ImageQuery - -# TODO update the JSON string below -json = "{}" -# create an instance of ImageQuery from a JSON string -image_query_instance = ImageQuery.from_json(json) -# print the JSON string representation of the object -print ImageQuery.to_json() - -# convert the object into a dict -image_query_dict = image_query_instance.to_dict() -# create an instance of ImageQuery from a dict -image_query_form_dict = image_query.from_dict(image_query_dict) -``` - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/libs/openchallenges/api-client-python/docs/Organization.md b/libs/openchallenges/api-client-python/docs/Organization.md deleted file mode 100644 index cc8d819d93..0000000000 --- a/libs/openchallenges/api-client-python/docs/Organization.md +++ /dev/null @@ -1,39 +0,0 @@ -# Organization - -An organization - -## Properties - -| Name | Type | Description | Notes | -| ------------------- | ------------ | ---------------------------------------- | ---------- | -| **id** | **int** | The unique identifier of an organization | -| **name** | **str** | | -| **email** | **str** | An email address. | -| **login** | **str** | The login of an organization | -| **description** | **str** | | -| **avatar_key** | **str** | | [optional] | -| **website_url** | **str** | | -| **challenge_count** | **int** | | [optional] | -| **created_at** | **datetime** | | -| **updated_at** | **datetime** | | -| **acronym** | **str** | | [optional] | - -## Example - -```python -from openchallenges_client.models.organization import Organization - -# TODO update the JSON string below -json = "{}" -# create an instance of Organization from a JSON string -organization_instance = Organization.from_json(json) -# print the JSON string representation of the object -print Organization.to_json() - -# convert the object into a dict -organization_dict = organization_instance.to_dict() -# create an instance of Organization from a dict -organization_form_dict = organization.from_dict(organization_dict) -``` - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/libs/openchallenges/api-client-python/docs/OrganizationApi.md b/libs/openchallenges/api-client-python/docs/OrganizationApi.md deleted file mode 100644 index 5aedc07754..0000000000 --- a/libs/openchallenges/api-client-python/docs/OrganizationApi.md +++ /dev/null @@ -1,147 +0,0 @@ -# openchallenges_client.OrganizationApi - -All URIs are relative to _http://localhost/v1_ - -| Method | HTTP request | Description | -| --------------------------------------------------------------- | ---------------------------- | ------------------- | -| [**get_organization**](OrganizationApi.md#get_organization) | **GET** /organizations/{org} | Get an organization | -| [**list_organizations**](OrganizationApi.md#list_organizations) | **GET** /organizations | List organizations | - -# **get_organization** - -> Organization get_organization(org) - -Get an organization - -Returns the organization specified - -### Example - -```python -import time -import os -import openchallenges_client -from openchallenges_client.models.organization import Organization -from openchallenges_client.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to http://localhost/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = openchallenges_client.Configuration( - host = "http://localhost/v1" -) - - -# Enter a context with an instance of the API client -with openchallenges_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = openchallenges_client.OrganizationApi(api_client) - org = 'dream' # str | The id or login of the organization. - - try: - # Get an organization - api_response = api_instance.get_organization(org) - print("The response of OrganizationApi->get_organization:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling OrganizationApi->get_organization: %s\n" % e) -``` - -### Parameters - -| Name | Type | Description | Notes | -| ------- | ------- | ------------------------------------ | ----- | -| **org** | **str** | The id or login of the organization. | - -### Return type - -[**Organization**](Organization.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json, application/problem+json - -### HTTP response details - -| Status code | Description | Response headers | -| ----------- | ----------------------------------------------------------------- | ---------------- | -| **200** | An organization | - | -| **404** | The specified resource was not found | - | -| **500** | The request cannot be fulfilled due to an unexpected server error | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **list_organizations** - -> OrganizationsPage list_organizations(organization_search_query=organization_search_query) - -List organizations - -List organizations - -### Example - -```python -import time -import os -import openchallenges_client -from openchallenges_client.models.organization_search_query import OrganizationSearchQuery -from openchallenges_client.models.organizations_page import OrganizationsPage -from openchallenges_client.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to http://localhost/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = openchallenges_client.Configuration( - host = "http://localhost/v1" -) - - -# Enter a context with an instance of the API client -with openchallenges_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = openchallenges_client.OrganizationApi(api_client) - organization_search_query = openchallenges_client.OrganizationSearchQuery() # OrganizationSearchQuery | The search query used to find organizations. (optional) - - try: - # List organizations - api_response = api_instance.list_organizations(organization_search_query=organization_search_query) - print("The response of OrganizationApi->list_organizations:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling OrganizationApi->list_organizations: %s\n" % e) -``` - -### Parameters - -| Name | Type | Description | Notes | -| ----------------------------- | ---------------------------------- | -------------------------------------------- | ---------- | -| **organization_search_query** | [**OrganizationSearchQuery**](.md) | The search query used to find organizations. | [optional] | - -### Return type - -[**OrganizationsPage**](OrganizationsPage.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json, application/problem+json - -### HTTP response details - -| Status code | Description | Response headers | -| ----------- | ----------------------------------------------------------------- | ---------------- | -| **200** | Success | - | -| **400** | Invalid request | - | -| **500** | The request cannot be fulfilled due to an unexpected server error | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) diff --git a/libs/openchallenges/api-client-python/docs/OrganizationCategory.md b/libs/openchallenges/api-client-python/docs/OrganizationCategory.md deleted file mode 100644 index 88445b9576..0000000000 --- a/libs/openchallenges/api-client-python/docs/OrganizationCategory.md +++ /dev/null @@ -1,10 +0,0 @@ -# OrganizationCategory - -The category of the organization. - -## Properties - -| Name | Type | Description | Notes | -| ---- | ---- | ----------- | ----- | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/libs/openchallenges/api-client-python/docs/OrganizationDirection.md b/libs/openchallenges/api-client-python/docs/OrganizationDirection.md deleted file mode 100644 index 390ccff847..0000000000 --- a/libs/openchallenges/api-client-python/docs/OrganizationDirection.md +++ /dev/null @@ -1,10 +0,0 @@ -# OrganizationDirection - -The direction to sort the results by. - -## Properties - -| Name | Type | Description | Notes | -| ---- | ---- | ----------- | ----- | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/libs/openchallenges/api-client-python/docs/OrganizationSearchQuery.md b/libs/openchallenges/api-client-python/docs/OrganizationSearchQuery.md deleted file mode 100644 index 842884096e..0000000000 --- a/libs/openchallenges/api-client-python/docs/OrganizationSearchQuery.md +++ /dev/null @@ -1,35 +0,0 @@ -# OrganizationSearchQuery - -An organization search query. - -## Properties - -| Name | Type | Description | Notes | -| -------------------------------- | ------------------------------------------------------------------- | -------------------------------------------------------------------- | --------------------------- | -| **page_number** | **int** | The page number. | [optional] [default to 0] | -| **page_size** | **int** | The number of items in a single page. | [optional] [default to 100] | -| **categories** | [**List[OrganizationCategory]**](OrganizationCategory.md) | The array of organization categories used to filter the results. | [optional] | -| **challenge_contribution_roles** | [**List[ChallengeContributionRole]**](ChallengeContributionRole.md) | An array of challenge contribution roles used to filter the results. | [optional] | -| **sort** | [**OrganizationSort**](OrganizationSort.md) | | [optional] | -| **direction** | [**OrganizationDirection**](OrganizationDirection.md) | | [optional] | -| **search_terms** | **str** | A string of search terms used to filter the results. | [optional] | - -## Example - -```python -from openchallenges_client.models.organization_search_query import OrganizationSearchQuery - -# TODO update the JSON string below -json = "{}" -# create an instance of OrganizationSearchQuery from a JSON string -organization_search_query_instance = OrganizationSearchQuery.from_json(json) -# print the JSON string representation of the object -print OrganizationSearchQuery.to_json() - -# convert the object into a dict -organization_search_query_dict = organization_search_query_instance.to_dict() -# create an instance of OrganizationSearchQuery from a dict -organization_search_query_form_dict = organization_search_query.from_dict(organization_search_query_dict) -``` - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/libs/openchallenges/api-client-python/docs/OrganizationSort.md b/libs/openchallenges/api-client-python/docs/OrganizationSort.md deleted file mode 100644 index 1d84109c97..0000000000 --- a/libs/openchallenges/api-client-python/docs/OrganizationSort.md +++ /dev/null @@ -1,10 +0,0 @@ -# OrganizationSort - -What to sort results by. - -## Properties - -| Name | Type | Description | Notes | -| ---- | ---- | ----------- | ----- | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/libs/openchallenges/api-client-python/docs/OrganizationsPage.md b/libs/openchallenges/api-client-python/docs/OrganizationsPage.md deleted file mode 100644 index bc297795fd..0000000000 --- a/libs/openchallenges/api-client-python/docs/OrganizationsPage.md +++ /dev/null @@ -1,35 +0,0 @@ -# OrganizationsPage - -A page of organizations - -## Properties - -| Name | Type | Description | Notes | -| ------------------ | ----------------------------------------- | ------------------------------------------- | ----- | -| **number** | **int** | The page number. | -| **size** | **int** | The number of items in a single page. | -| **total_elements** | **int** | Total number of elements in the result set. | -| **total_pages** | **int** | Total number of pages in the result set. | -| **has_next** | **bool** | Returns if there is a next page. | -| **has_previous** | **bool** | Returns if there is a previous page. | -| **organizations** | [**List[Organization]**](Organization.md) | A list of organizations | - -## Example - -```python -from openchallenges_client.models.organizations_page import OrganizationsPage - -# TODO update the JSON string below -json = "{}" -# create an instance of OrganizationsPage from a JSON string -organizations_page_instance = OrganizationsPage.from_json(json) -# print the JSON string representation of the object -print OrganizationsPage.to_json() - -# convert the object into a dict -organizations_page_dict = organizations_page_instance.to_dict() -# create an instance of OrganizationsPage from a dict -organizations_page_form_dict = organizations_page.from_dict(organizations_page_dict) -``` - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/libs/openchallenges/api-client-python/docs/PageMetadata.md b/libs/openchallenges/api-client-python/docs/PageMetadata.md deleted file mode 100644 index 57710786a5..0000000000 --- a/libs/openchallenges/api-client-python/docs/PageMetadata.md +++ /dev/null @@ -1,34 +0,0 @@ -# PageMetadata - -The metadata of a page. - -## Properties - -| Name | Type | Description | Notes | -| ------------------ | -------- | ------------------------------------------- | ----- | -| **number** | **int** | The page number. | -| **size** | **int** | The number of items in a single page. | -| **total_elements** | **int** | Total number of elements in the result set. | -| **total_pages** | **int** | Total number of pages in the result set. | -| **has_next** | **bool** | Returns if there is a next page. | -| **has_previous** | **bool** | Returns if there is a previous page. | - -## Example - -```python -from openchallenges_client.models.page_metadata import PageMetadata - -# TODO update the JSON string below -json = "{}" -# create an instance of PageMetadata from a JSON string -page_metadata_instance = PageMetadata.from_json(json) -# print the JSON string representation of the object -print PageMetadata.to_json() - -# convert the object into a dict -page_metadata_dict = page_metadata_instance.to_dict() -# create an instance of PageMetadata from a dict -page_metadata_form_dict = page_metadata.from_dict(page_metadata_dict) -``` - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/libs/openchallenges/api-client-python/docs/SimpleChallengeInputDataType.md b/libs/openchallenges/api-client-python/docs/SimpleChallengeInputDataType.md deleted file mode 100644 index 1a337a59a0..0000000000 --- a/libs/openchallenges/api-client-python/docs/SimpleChallengeInputDataType.md +++ /dev/null @@ -1,31 +0,0 @@ -# SimpleChallengeInputDataType - -A simple challenge input data type. - -## Properties - -| Name | Type | Description | Notes | -| -------- | ------- | ----------------------------------------------------- | ----- | -| **id** | **int** | The unique identifier of a challenge input data type. | -| **slug** | **str** | The slug of the challenge input data type. | -| **name** | **str** | The name of the challenge input data type. | - -## Example - -```python -from openchallenges_client.models.simple_challenge_input_data_type import SimpleChallengeInputDataType - -# TODO update the JSON string below -json = "{}" -# create an instance of SimpleChallengeInputDataType from a JSON string -simple_challenge_input_data_type_instance = SimpleChallengeInputDataType.from_json(json) -# print the JSON string representation of the object -print SimpleChallengeInputDataType.to_json() - -# convert the object into a dict -simple_challenge_input_data_type_dict = simple_challenge_input_data_type_instance.to_dict() -# create an instance of SimpleChallengeInputDataType from a dict -simple_challenge_input_data_type_form_dict = simple_challenge_input_data_type.from_dict(simple_challenge_input_data_type_dict) -``` - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/libs/openchallenges/api-client-python/docs/SimpleChallengePlatform.md b/libs/openchallenges/api-client-python/docs/SimpleChallengePlatform.md deleted file mode 100644 index 769736a5a3..0000000000 --- a/libs/openchallenges/api-client-python/docs/SimpleChallengePlatform.md +++ /dev/null @@ -1,31 +0,0 @@ -# SimpleChallengePlatform - -A simple challenge platform. - -## Properties - -| Name | Type | Description | Notes | -| -------- | ------- | ---------------------------------------------- | ----- | -| **id** | **int** | The unique identifier of a challenge platform. | -| **slug** | **str** | The slug of the challenge platform. | -| **name** | **str** | The name of the challenge platform. | - -## Example - -```python -from openchallenges_client.models.simple_challenge_platform import SimpleChallengePlatform - -# TODO update the JSON string below -json = "{}" -# create an instance of SimpleChallengePlatform from a JSON string -simple_challenge_platform_instance = SimpleChallengePlatform.from_json(json) -# print the JSON string representation of the object -print SimpleChallengePlatform.to_json() - -# convert the object into a dict -simple_challenge_platform_dict = simple_challenge_platform_instance.to_dict() -# create an instance of SimpleChallengePlatform from a dict -simple_challenge_platform_form_dict = simple_challenge_platform.from_dict(simple_challenge_platform_dict) -``` - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/libs/openchallenges/api-client-python/docs/User.md b/libs/openchallenges/api-client-python/docs/User.md deleted file mode 100644 index 401ce967c4..0000000000 --- a/libs/openchallenges/api-client-python/docs/User.md +++ /dev/null @@ -1,38 +0,0 @@ -# User - -A simple user - -## Properties - -| Name | Type | Description | Notes | -| -------------- | ------------------------------- | ----------------------------------- | ---------- | -| **id** | **int** | The unique identifier of an account | [optional] | -| **login** | **str** | | -| **email** | **str** | An email address. | -| **name** | **str** | | [optional] | -| **status** | [**UserStatus**](UserStatus.md) | | [optional] | -| **avatar_url** | **str** | | [optional] | -| **created_at** | **datetime** | | -| **updated_at** | **datetime** | | -| **type** | **str** | | -| **bio** | **str** | | [optional] | - -## Example - -```python -from openchallenges_client.models.user import User - -# TODO update the JSON string below -json = "{}" -# create an instance of User from a JSON string -user_instance = User.from_json(json) -# print the JSON string representation of the object -print User.to_json() - -# convert the object into a dict -user_dict = user_instance.to_dict() -# create an instance of User from a dict -user_form_dict = user.from_dict(user_dict) -``` - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/libs/openchallenges/api-client-python/docs/UserApi.md b/libs/openchallenges/api-client-python/docs/UserApi.md deleted file mode 100644 index 8a5481aa79..0000000000 --- a/libs/openchallenges/api-client-python/docs/UserApi.md +++ /dev/null @@ -1,289 +0,0 @@ -# openchallenges_client.UserApi - -All URIs are relative to _http://localhost/v1_ - -| Method | HTTP request | Description | -| ----------------------------------------- | -------------------------- | ------------- | -| [**create_user**](UserApi.md#create_user) | **POST** /users/register | Create a user | -| [**delete_user**](UserApi.md#delete_user) | **DELETE** /users/{userId} | Delete a user | -| [**get_user**](UserApi.md#get_user) | **GET** /users/{userId} | Get a user | -| [**list_users**](UserApi.md#list_users) | **GET** /users | Get all users | - -# **create_user** - -> UserCreateResponse create_user(user_create_request) - -Create a user - -Create a user with the specified account name - -### Example - -```python -import time -import os -import openchallenges_client -from openchallenges_client.models.user_create_request import UserCreateRequest -from openchallenges_client.models.user_create_response import UserCreateResponse -from openchallenges_client.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to http://localhost/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = openchallenges_client.Configuration( - host = "http://localhost/v1" -) - - -# Enter a context with an instance of the API client -with openchallenges_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = openchallenges_client.UserApi(api_client) - user_create_request = openchallenges_client.UserCreateRequest() # UserCreateRequest | - - try: - # Create a user - api_response = api_instance.create_user(user_create_request) - print("The response of UserApi->create_user:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling UserApi->create_user: %s\n" % e) -``` - -### Parameters - -| Name | Type | Description | Notes | -| ----------------------- | --------------------------------------------- | ----------- | ----- | -| **user_create_request** | [**UserCreateRequest**](UserCreateRequest.md) | | - -### Return type - -[**UserCreateResponse**](UserCreateResponse.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json, application/problem+json - -### HTTP response details - -| Status code | Description | Response headers | -| ----------- | ----------------------------------------------------------------- | ---------------- | -| **201** | Account created | - | -| **400** | Invalid request | - | -| **409** | The request conflicts with current state of the target resource | - | -| **500** | The request cannot be fulfilled due to an unexpected server error | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **delete_user** - -> object delete_user(user_id) - -Delete a user - -Deletes the user specified - -### Example - -```python -import time -import os -import openchallenges_client -from openchallenges_client.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to http://localhost/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = openchallenges_client.Configuration( - host = "http://localhost/v1" -) - - -# Enter a context with an instance of the API client -with openchallenges_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = openchallenges_client.UserApi(api_client) - user_id = 56 # int | The unique identifier of the user, either the user account ID or login - - try: - # Delete a user - api_response = api_instance.delete_user(user_id) - print("The response of UserApi->delete_user:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling UserApi->delete_user: %s\n" % e) -``` - -### Parameters - -| Name | Type | Description | Notes | -| ----------- | ------- | ---------------------------------------------------------------------- | ----- | -| **user_id** | **int** | The unique identifier of the user, either the user account ID or login | - -### Return type - -**object** - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json, application/problem+json - -### HTTP response details - -| Status code | Description | Response headers | -| ----------- | ----------------------------------------------------------------- | ---------------- | -| **200** | Deleted | - | -| **400** | The specified resource was not found | - | -| **500** | The request cannot be fulfilled due to an unexpected server error | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **get_user** - -> User get_user(user_id) - -Get a user - -Returns the user specified - -### Example - -```python -import time -import os -import openchallenges_client -from openchallenges_client.models.user import User -from openchallenges_client.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to http://localhost/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = openchallenges_client.Configuration( - host = "http://localhost/v1" -) - - -# Enter a context with an instance of the API client -with openchallenges_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = openchallenges_client.UserApi(api_client) - user_id = 56 # int | The unique identifier of the user, either the user account ID or login - - try: - # Get a user - api_response = api_instance.get_user(user_id) - print("The response of UserApi->get_user:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling UserApi->get_user: %s\n" % e) -``` - -### Parameters - -| Name | Type | Description | Notes | -| ----------- | ------- | ---------------------------------------------------------------------- | ----- | -| **user_id** | **int** | The unique identifier of the user, either the user account ID or login | - -### Return type - -[**User**](User.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json, application/problem+json - -### HTTP response details - -| Status code | Description | Response headers | -| ----------- | ----------------------------------------------------------------- | ---------------- | -| **200** | A user | - | -| **404** | The specified resource was not found | - | -| **500** | The request cannot be fulfilled due to an unexpected server error | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **list_users** - -> UsersPage list_users(page_number=page_number, page_size=page_size) - -Get all users - -Returns the users - -### Example - -```python -import time -import os -import openchallenges_client -from openchallenges_client.models.users_page import UsersPage -from openchallenges_client.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to http://localhost/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = openchallenges_client.Configuration( - host = "http://localhost/v1" -) - - -# Enter a context with an instance of the API client -with openchallenges_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = openchallenges_client.UserApi(api_client) - page_number = 0 # int | The page number. (optional) (default to 0) - page_size = 100 # int | The number of items in a single page. (optional) (default to 100) - - try: - # Get all users - api_response = api_instance.list_users(page_number=page_number, page_size=page_size) - print("The response of UserApi->list_users:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling UserApi->list_users: %s\n" % e) -``` - -### Parameters - -| Name | Type | Description | Notes | -| --------------- | ------- | ------------------------------------- | --------------------------- | -| **page_number** | **int** | The page number. | [optional] [default to 0] | -| **page_size** | **int** | The number of items in a single page. | [optional] [default to 100] | - -### Return type - -[**UsersPage**](UsersPage.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json, application/problem+json - -### HTTP response details - -| Status code | Description | Response headers | -| ----------- | ----------------------------------------------------------------- | ---------------- | -| **200** | Success | - | -| **400** | Invalid request | - | -| **500** | The request cannot be fulfilled due to an unexpected server error | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) diff --git a/libs/openchallenges/api-client-python/docs/UserCreateRequest.md b/libs/openchallenges/api-client-python/docs/UserCreateRequest.md deleted file mode 100644 index b696a3867d..0000000000 --- a/libs/openchallenges/api-client-python/docs/UserCreateRequest.md +++ /dev/null @@ -1,34 +0,0 @@ -# UserCreateRequest - -The information required to create a user account - -## Properties - -| Name | Type | Description | Notes | -| -------------- | ------- | ----------------- | ---------- | -| **login** | **str** | | -| **email** | **str** | An email address. | -| **password** | **str** | | -| **name** | **str** | | [optional] | -| **avatar_url** | **str** | | [optional] | -| **bio** | **str** | | [optional] | - -## Example - -```python -from openchallenges_client.models.user_create_request import UserCreateRequest - -# TODO update the JSON string below -json = "{}" -# create an instance of UserCreateRequest from a JSON string -user_create_request_instance = UserCreateRequest.from_json(json) -# print the JSON string representation of the object -print UserCreateRequest.to_json() - -# convert the object into a dict -user_create_request_dict = user_create_request_instance.to_dict() -# create an instance of UserCreateRequest from a dict -user_create_request_form_dict = user_create_request.from_dict(user_create_request_dict) -``` - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/libs/openchallenges/api-client-python/docs/UserCreateResponse.md b/libs/openchallenges/api-client-python/docs/UserCreateResponse.md deleted file mode 100644 index 24ed80b925..0000000000 --- a/libs/openchallenges/api-client-python/docs/UserCreateResponse.md +++ /dev/null @@ -1,29 +0,0 @@ -# UserCreateResponse - -The response returned after the creation of the user - -## Properties - -| Name | Type | Description | Notes | -| ------ | ------- | ----------------------------------- | ----- | -| **id** | **int** | The unique identifier of an account | - -## Example - -```python -from openchallenges_client.models.user_create_response import UserCreateResponse - -# TODO update the JSON string below -json = "{}" -# create an instance of UserCreateResponse from a JSON string -user_create_response_instance = UserCreateResponse.from_json(json) -# print the JSON string representation of the object -print UserCreateResponse.to_json() - -# convert the object into a dict -user_create_response_dict = user_create_response_instance.to_dict() -# create an instance of UserCreateResponse from a dict -user_create_response_form_dict = user_create_response.from_dict(user_create_response_dict) -``` - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/libs/openchallenges/api-client-python/docs/UserStatus.md b/libs/openchallenges/api-client-python/docs/UserStatus.md deleted file mode 100644 index ade0e3532f..0000000000 --- a/libs/openchallenges/api-client-python/docs/UserStatus.md +++ /dev/null @@ -1,10 +0,0 @@ -# UserStatus - -The account status of a user - -## Properties - -| Name | Type | Description | Notes | -| ---- | ---- | ----------- | ----- | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/libs/openchallenges/api-client-python/docs/UsersPage.md b/libs/openchallenges/api-client-python/docs/UsersPage.md deleted file mode 100644 index 8788398c96..0000000000 --- a/libs/openchallenges/api-client-python/docs/UsersPage.md +++ /dev/null @@ -1,35 +0,0 @@ -# UsersPage - -A page of users - -## Properties - -| Name | Type | Description | Notes | -| ------------------ | ------------------------- | ------------------------------------------- | ----- | -| **number** | **int** | The page number. | -| **size** | **int** | The number of items in a single page. | -| **total_elements** | **int** | Total number of elements in the result set. | -| **total_pages** | **int** | Total number of pages in the result set. | -| **has_next** | **bool** | Returns if there is a next page. | -| **has_previous** | **bool** | Returns if there is a previous page. | -| **users** | [**List[User]**](User.md) | A list of users | - -## Example - -```python -from openchallenges_client.models.users_page import UsersPage - -# TODO update the JSON string below -json = "{}" -# create an instance of UsersPage from a JSON string -users_page_instance = UsersPage.from_json(json) -# print the JSON string representation of the object -print UsersPage.to_json() - -# convert the object into a dict -users_page_dict = users_page_instance.to_dict() -# create an instance of UsersPage from a dict -users_page_form_dict = users_page.from_dict(users_page_dict) -``` - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/libs/openchallenges/api-client-python/openapitools.json b/libs/openchallenges/api-client-python/openapitools.json deleted file mode 100644 index d00ef2bc60..0000000000 --- a/libs/openchallenges/api-client-python/openapitools.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "$schema": "../../../node_modules/@openapitools/openapi-generator-cli/config.schema.json", - "spaces": 2, - "generator-cli": { - "version": "7.0.0", - "generators": { - "api-client-python": { - "generatorName": "python", - "inputSpec": "#{cwd}/../api-description/build/openapi.yaml", - "output": "#{cwd}/", - "additionalProperties": { - "packageName": "openchallenges_client" - } - } - } - } -} diff --git a/libs/openchallenges/api-client-python/openchallenges_client/__init__.py b/libs/openchallenges/api-client-python/openchallenges_client/__init__.py deleted file mode 100644 index 14d719fa8c..0000000000 --- a/libs/openchallenges/api-client-python/openchallenges_client/__init__.py +++ /dev/null @@ -1,113 +0,0 @@ -# coding: utf-8 - -# flake8: noqa - -""" - OpenChallenges REST API - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -__version__ = "1.0.0" - -# import apis into sdk package -from openchallenges_client.api.challenge_api import ChallengeApi -from openchallenges_client.api.challenge_analytics_api import ChallengeAnalyticsApi -from openchallenges_client.api.challenge_contribution_api import ( - ChallengeContributionApi, -) -from openchallenges_client.api.challenge_input_data_type_api import ( - ChallengeInputDataTypeApi, -) -from openchallenges_client.api.challenge_platform_api import ChallengePlatformApi -from openchallenges_client.api.image_api import ImageApi -from openchallenges_client.api.organization_api import OrganizationApi -from openchallenges_client.api.user_api import UserApi - -# import ApiClient -from openchallenges_client.api_response import ApiResponse -from openchallenges_client.api_client import ApiClient -from openchallenges_client.configuration import Configuration -from openchallenges_client.exceptions import OpenApiException -from openchallenges_client.exceptions import ApiTypeError -from openchallenges_client.exceptions import ApiValueError -from openchallenges_client.exceptions import ApiKeyError -from openchallenges_client.exceptions import ApiAttributeError -from openchallenges_client.exceptions import ApiException - -# import models into sdk package -from openchallenges_client.models.basic_error import BasicError -from openchallenges_client.models.challenge import Challenge -from openchallenges_client.models.challenge_category import ChallengeCategory -from openchallenges_client.models.challenge_contribution import ChallengeContribution -from openchallenges_client.models.challenge_contribution_role import ( - ChallengeContributionRole, -) -from openchallenges_client.models.challenge_contributions_page import ( - ChallengeContributionsPage, -) -from openchallenges_client.models.challenge_difficulty import ChallengeDifficulty -from openchallenges_client.models.challenge_direction import ChallengeDirection -from openchallenges_client.models.challenge_incentive import ChallengeIncentive -from openchallenges_client.models.challenge_input_data_type import ( - ChallengeInputDataType, -) -from openchallenges_client.models.challenge_input_data_type_direction import ( - ChallengeInputDataTypeDirection, -) -from openchallenges_client.models.challenge_input_data_type_search_query import ( - ChallengeInputDataTypeSearchQuery, -) -from openchallenges_client.models.challenge_input_data_type_sort import ( - ChallengeInputDataTypeSort, -) -from openchallenges_client.models.challenge_input_data_types_page import ( - ChallengeInputDataTypesPage, -) -from openchallenges_client.models.challenge_platform import ChallengePlatform -from openchallenges_client.models.challenge_platform_direction import ( - ChallengePlatformDirection, -) -from openchallenges_client.models.challenge_platform_search_query import ( - ChallengePlatformSearchQuery, -) -from openchallenges_client.models.challenge_platform_sort import ChallengePlatformSort -from openchallenges_client.models.challenge_platforms_page import ChallengePlatformsPage -from openchallenges_client.models.challenge_search_query import ChallengeSearchQuery -from openchallenges_client.models.challenge_sort import ChallengeSort -from openchallenges_client.models.challenge_status import ChallengeStatus -from openchallenges_client.models.challenge_submission_type import ( - ChallengeSubmissionType, -) -from openchallenges_client.models.challenges_page import ChallengesPage -from openchallenges_client.models.challenges_per_year import ChallengesPerYear -from openchallenges_client.models.image import Image -from openchallenges_client.models.image_aspect_ratio import ImageAspectRatio -from openchallenges_client.models.image_height import ImageHeight -from openchallenges_client.models.image_query import ImageQuery -from openchallenges_client.models.organization import Organization -from openchallenges_client.models.organization_category import OrganizationCategory -from openchallenges_client.models.organization_direction import OrganizationDirection -from openchallenges_client.models.organization_search_query import ( - OrganizationSearchQuery, -) -from openchallenges_client.models.organization_sort import OrganizationSort -from openchallenges_client.models.organizations_page import OrganizationsPage -from openchallenges_client.models.page_metadata import PageMetadata -from openchallenges_client.models.simple_challenge_input_data_type import ( - SimpleChallengeInputDataType, -) -from openchallenges_client.models.simple_challenge_platform import ( - SimpleChallengePlatform, -) -from openchallenges_client.models.user import User -from openchallenges_client.models.user_create_request import UserCreateRequest -from openchallenges_client.models.user_create_response import UserCreateResponse -from openchallenges_client.models.user_status import UserStatus -from openchallenges_client.models.users_page import UsersPage diff --git a/libs/openchallenges/api-client-python/openchallenges_client/api/__init__.py b/libs/openchallenges/api-client-python/openchallenges_client/api/__init__.py deleted file mode 100644 index abc2e119f9..0000000000 --- a/libs/openchallenges/api-client-python/openchallenges_client/api/__init__.py +++ /dev/null @@ -1,15 +0,0 @@ -# flake8: noqa - -# import apis into api package -from openchallenges_client.api.challenge_api import ChallengeApi -from openchallenges_client.api.challenge_analytics_api import ChallengeAnalyticsApi -from openchallenges_client.api.challenge_contribution_api import ( - ChallengeContributionApi, -) -from openchallenges_client.api.challenge_input_data_type_api import ( - ChallengeInputDataTypeApi, -) -from openchallenges_client.api.challenge_platform_api import ChallengePlatformApi -from openchallenges_client.api.image_api import ImageApi -from openchallenges_client.api.organization_api import OrganizationApi -from openchallenges_client.api.user_api import UserApi diff --git a/libs/openchallenges/api-client-python/openchallenges_client/api/challenge_analytics_api.py b/libs/openchallenges/api-client-python/openchallenges_client/api/challenge_analytics_api.py deleted file mode 100644 index 644c52b753..0000000000 --- a/libs/openchallenges/api-client-python/openchallenges_client/api/challenge_analytics_api.py +++ /dev/null @@ -1,177 +0,0 @@ -# coding: utf-8 - -""" - OpenChallenges REST API - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import re # noqa: F401 -import io -import warnings - -from pydantic import validate_arguments, ValidationError -from typing_extensions import Annotated - -from openchallenges_client.models.challenges_per_year import ChallengesPerYear - -from openchallenges_client.api_client import ApiClient -from openchallenges_client.api_response import ApiResponse -from openchallenges_client.exceptions import ApiTypeError, ApiValueError # noqa: F401 - - -class ChallengeAnalyticsApi(object): - """NOTE: This class is auto generated by OpenAPI Generator - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - def __init__(self, api_client=None): - if api_client is None: - api_client = ApiClient.get_default() - self.api_client = api_client - - @validate_arguments - def get_challenges_per_year(self, **kwargs) -> ChallengesPerYear: # noqa: E501 - """Get the number of challenges tracked per year # noqa: E501 - - Returns the number of challenges tracked per year # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.get_challenges_per_year(async_req=True) - >>> result = thread.get() - - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: ChallengesPerYear - """ - kwargs["_return_http_data_only"] = True - if "_preload_content" in kwargs: - raise ValueError( - "Error! Please call the get_challenges_per_year_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" - ) - return self.get_challenges_per_year_with_http_info(**kwargs) # noqa: E501 - - @validate_arguments - def get_challenges_per_year_with_http_info( - self, **kwargs - ) -> ApiResponse: # noqa: E501 - """Get the number of challenges tracked per year # noqa: E501 - - Returns the number of challenges tracked per year # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.get_challenges_per_year_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the ApiResponse.data will - be set to none and raw_data will store the - HTTP response body without reading/decoding. - Default is True. - :type _preload_content: bool, optional - :param _return_http_data_only: response data instead of ApiResponse - object with status code, headers, etc - :type _return_http_data_only: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: tuple(ChallengesPerYear, status_code(int), headers(HTTPHeaderDict)) - """ - - _params = locals() - - _all_params = [] - _all_params.extend( - [ - "async_req", - "_return_http_data_only", - "_preload_content", - "_request_timeout", - "_request_auth", - "_content_type", - "_headers", - ] - ) - - # validate the arguments - for _key, _val in _params["kwargs"].items(): - if _key not in _all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method get_challenges_per_year" % _key - ) - _params[_key] = _val - del _params["kwargs"] - - _collection_formats = {} - - # process the path parameters - _path_params = {} - - # process the query parameters - _query_params = [] - # process the header parameters - _header_params = dict(_params.get("_headers", {})) - # process the form parameters - _form_params = [] - _files = {} - # process the body parameter - _body_params = None - # set the HTTP header `Accept` - _header_params["Accept"] = self.api_client.select_header_accept( - ["application/json", "application/problem+json"] - ) # noqa: E501 - - # authentication setting - _auth_settings = [] # noqa: E501 - - _response_types_map = { - "200": "ChallengesPerYear", - "500": "BasicError", - } - - return self.api_client.call_api( - "/challengeAnalytics/challengesPerYear", - "GET", - _path_params, - _query_params, - _header_params, - body=_body_params, - post_params=_form_params, - files=_files, - response_types_map=_response_types_map, - auth_settings=_auth_settings, - async_req=_params.get("async_req"), - _return_http_data_only=_params.get("_return_http_data_only"), # noqa: E501 - _preload_content=_params.get("_preload_content", True), - _request_timeout=_params.get("_request_timeout"), - collection_formats=_collection_formats, - _request_auth=_params.get("_request_auth"), - ) diff --git a/libs/openchallenges/api-client-python/openchallenges_client/api/challenge_api.py b/libs/openchallenges/api-client-python/openchallenges_client/api/challenge_api.py deleted file mode 100644 index 542c364c87..0000000000 --- a/libs/openchallenges/api-client-python/openchallenges_client/api/challenge_api.py +++ /dev/null @@ -1,362 +0,0 @@ -# coding: utf-8 - -""" - OpenChallenges REST API - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import re # noqa: F401 -import io -import warnings - -from pydantic import validate_arguments, ValidationError -from typing_extensions import Annotated - -from pydantic import Field, StrictInt - -from typing import Optional - -from openchallenges_client.models.challenge import Challenge -from openchallenges_client.models.challenge_search_query import ChallengeSearchQuery -from openchallenges_client.models.challenges_page import ChallengesPage - -from openchallenges_client.api_client import ApiClient -from openchallenges_client.api_response import ApiResponse -from openchallenges_client.exceptions import ApiTypeError, ApiValueError # noqa: F401 - - -class ChallengeApi(object): - """NOTE: This class is auto generated by OpenAPI Generator - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - def __init__(self, api_client=None): - if api_client is None: - api_client = ApiClient.get_default() - self.api_client = api_client - - @validate_arguments - def get_challenge( - self, - challenge_id: Annotated[ - StrictInt, Field(..., description="The unique identifier of the challenge.") - ], - **kwargs - ) -> Challenge: # noqa: E501 - """Get a challenge # noqa: E501 - - Returns the challenge specified # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.get_challenge(challenge_id, async_req=True) - >>> result = thread.get() - - :param challenge_id: The unique identifier of the challenge. (required) - :type challenge_id: int - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: Challenge - """ - kwargs["_return_http_data_only"] = True - if "_preload_content" in kwargs: - raise ValueError( - "Error! Please call the get_challenge_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" - ) - return self.get_challenge_with_http_info(challenge_id, **kwargs) # noqa: E501 - - @validate_arguments - def get_challenge_with_http_info( - self, - challenge_id: Annotated[ - StrictInt, Field(..., description="The unique identifier of the challenge.") - ], - **kwargs - ) -> ApiResponse: # noqa: E501 - """Get a challenge # noqa: E501 - - Returns the challenge specified # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.get_challenge_with_http_info(challenge_id, async_req=True) - >>> result = thread.get() - - :param challenge_id: The unique identifier of the challenge. (required) - :type challenge_id: int - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the ApiResponse.data will - be set to none and raw_data will store the - HTTP response body without reading/decoding. - Default is True. - :type _preload_content: bool, optional - :param _return_http_data_only: response data instead of ApiResponse - object with status code, headers, etc - :type _return_http_data_only: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: tuple(Challenge, status_code(int), headers(HTTPHeaderDict)) - """ - - _params = locals() - - _all_params = ["challenge_id"] - _all_params.extend( - [ - "async_req", - "_return_http_data_only", - "_preload_content", - "_request_timeout", - "_request_auth", - "_content_type", - "_headers", - ] - ) - - # validate the arguments - for _key, _val in _params["kwargs"].items(): - if _key not in _all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method get_challenge" % _key - ) - _params[_key] = _val - del _params["kwargs"] - - _collection_formats = {} - - # process the path parameters - _path_params = {} - if _params["challenge_id"]: - _path_params["challengeId"] = _params["challenge_id"] - - # process the query parameters - _query_params = [] - # process the header parameters - _header_params = dict(_params.get("_headers", {})) - # process the form parameters - _form_params = [] - _files = {} - # process the body parameter - _body_params = None - # set the HTTP header `Accept` - _header_params["Accept"] = self.api_client.select_header_accept( - ["application/json", "application/problem+json"] - ) # noqa: E501 - - # authentication setting - _auth_settings = [] # noqa: E501 - - _response_types_map = { - "200": "Challenge", - "404": "BasicError", - "500": "BasicError", - } - - return self.api_client.call_api( - "/challenges/{challengeId}", - "GET", - _path_params, - _query_params, - _header_params, - body=_body_params, - post_params=_form_params, - files=_files, - response_types_map=_response_types_map, - auth_settings=_auth_settings, - async_req=_params.get("async_req"), - _return_http_data_only=_params.get("_return_http_data_only"), # noqa: E501 - _preload_content=_params.get("_preload_content", True), - _request_timeout=_params.get("_request_timeout"), - collection_formats=_collection_formats, - _request_auth=_params.get("_request_auth"), - ) - - @validate_arguments - def list_challenges( - self, - challenge_search_query: Annotated[ - Optional[ChallengeSearchQuery], - Field(description="The search query used to find challenges."), - ] = None, - **kwargs - ) -> ChallengesPage: # noqa: E501 - """List challenges # noqa: E501 - - List challenges # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.list_challenges(challenge_search_query, async_req=True) - >>> result = thread.get() - - :param challenge_search_query: The search query used to find challenges. - :type challenge_search_query: ChallengeSearchQuery - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: ChallengesPage - """ - kwargs["_return_http_data_only"] = True - if "_preload_content" in kwargs: - raise ValueError( - "Error! Please call the list_challenges_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" - ) - return self.list_challenges_with_http_info( - challenge_search_query, **kwargs - ) # noqa: E501 - - @validate_arguments - def list_challenges_with_http_info( - self, - challenge_search_query: Annotated[ - Optional[ChallengeSearchQuery], - Field(description="The search query used to find challenges."), - ] = None, - **kwargs - ) -> ApiResponse: # noqa: E501 - """List challenges # noqa: E501 - - List challenges # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.list_challenges_with_http_info(challenge_search_query, async_req=True) - >>> result = thread.get() - - :param challenge_search_query: The search query used to find challenges. - :type challenge_search_query: ChallengeSearchQuery - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the ApiResponse.data will - be set to none and raw_data will store the - HTTP response body without reading/decoding. - Default is True. - :type _preload_content: bool, optional - :param _return_http_data_only: response data instead of ApiResponse - object with status code, headers, etc - :type _return_http_data_only: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: tuple(ChallengesPage, status_code(int), headers(HTTPHeaderDict)) - """ - - _params = locals() - - _all_params = ["challenge_search_query"] - _all_params.extend( - [ - "async_req", - "_return_http_data_only", - "_preload_content", - "_request_timeout", - "_request_auth", - "_content_type", - "_headers", - ] - ) - - # validate the arguments - for _key, _val in _params["kwargs"].items(): - if _key not in _all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method list_challenges" % _key - ) - _params[_key] = _val - del _params["kwargs"] - - _collection_formats = {} - - # process the path parameters - _path_params = {} - - # process the query parameters - _query_params = [] - if _params.get("challenge_search_query") is not None: # noqa: E501 - _query_params.append( - ("challengeSearchQuery", _params["challenge_search_query"]) - ) - - # process the header parameters - _header_params = dict(_params.get("_headers", {})) - # process the form parameters - _form_params = [] - _files = {} - # process the body parameter - _body_params = None - # set the HTTP header `Accept` - _header_params["Accept"] = self.api_client.select_header_accept( - ["application/json", "application/problem+json"] - ) # noqa: E501 - - # authentication setting - _auth_settings = [] # noqa: E501 - - _response_types_map = { - "200": "ChallengesPage", - "400": "BasicError", - "500": "BasicError", - } - - return self.api_client.call_api( - "/challenges", - "GET", - _path_params, - _query_params, - _header_params, - body=_body_params, - post_params=_form_params, - files=_files, - response_types_map=_response_types_map, - auth_settings=_auth_settings, - async_req=_params.get("async_req"), - _return_http_data_only=_params.get("_return_http_data_only"), # noqa: E501 - _preload_content=_params.get("_preload_content", True), - _request_timeout=_params.get("_request_timeout"), - collection_formats=_collection_formats, - _request_auth=_params.get("_request_auth"), - ) diff --git a/libs/openchallenges/api-client-python/openchallenges_client/api/challenge_contribution_api.py b/libs/openchallenges/api-client-python/openchallenges_client/api/challenge_contribution_api.py deleted file mode 100644 index b336a96692..0000000000 --- a/libs/openchallenges/api-client-python/openchallenges_client/api/challenge_contribution_api.py +++ /dev/null @@ -1,200 +0,0 @@ -# coding: utf-8 - -""" - OpenChallenges REST API - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import re # noqa: F401 -import io -import warnings - -from pydantic import validate_arguments, ValidationError -from typing_extensions import Annotated - -from pydantic import Field, StrictInt - -from openchallenges_client.models.challenge_contributions_page import ( - ChallengeContributionsPage, -) - -from openchallenges_client.api_client import ApiClient -from openchallenges_client.api_response import ApiResponse -from openchallenges_client.exceptions import ApiTypeError, ApiValueError # noqa: F401 - - -class ChallengeContributionApi(object): - """NOTE: This class is auto generated by OpenAPI Generator - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - def __init__(self, api_client=None): - if api_client is None: - api_client = ApiClient.get_default() - self.api_client = api_client - - @validate_arguments - def list_challenge_contributions( - self, - challenge_id: Annotated[ - StrictInt, Field(..., description="The unique identifier of the challenge.") - ], - **kwargs - ) -> ChallengeContributionsPage: # noqa: E501 - """List challenge contributions # noqa: E501 - - List challenge contributions # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.list_challenge_contributions(challenge_id, async_req=True) - >>> result = thread.get() - - :param challenge_id: The unique identifier of the challenge. (required) - :type challenge_id: int - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: ChallengeContributionsPage - """ - kwargs["_return_http_data_only"] = True - if "_preload_content" in kwargs: - raise ValueError( - "Error! Please call the list_challenge_contributions_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" - ) - return self.list_challenge_contributions_with_http_info( - challenge_id, **kwargs - ) # noqa: E501 - - @validate_arguments - def list_challenge_contributions_with_http_info( - self, - challenge_id: Annotated[ - StrictInt, Field(..., description="The unique identifier of the challenge.") - ], - **kwargs - ) -> ApiResponse: # noqa: E501 - """List challenge contributions # noqa: E501 - - List challenge contributions # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.list_challenge_contributions_with_http_info(challenge_id, async_req=True) - >>> result = thread.get() - - :param challenge_id: The unique identifier of the challenge. (required) - :type challenge_id: int - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the ApiResponse.data will - be set to none and raw_data will store the - HTTP response body without reading/decoding. - Default is True. - :type _preload_content: bool, optional - :param _return_http_data_only: response data instead of ApiResponse - object with status code, headers, etc - :type _return_http_data_only: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: tuple(ChallengeContributionsPage, status_code(int), headers(HTTPHeaderDict)) - """ - - _params = locals() - - _all_params = ["challenge_id"] - _all_params.extend( - [ - "async_req", - "_return_http_data_only", - "_preload_content", - "_request_timeout", - "_request_auth", - "_content_type", - "_headers", - ] - ) - - # validate the arguments - for _key, _val in _params["kwargs"].items(): - if _key not in _all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method list_challenge_contributions" % _key - ) - _params[_key] = _val - del _params["kwargs"] - - _collection_formats = {} - - # process the path parameters - _path_params = {} - if _params["challenge_id"]: - _path_params["challengeId"] = _params["challenge_id"] - - # process the query parameters - _query_params = [] - # process the header parameters - _header_params = dict(_params.get("_headers", {})) - # process the form parameters - _form_params = [] - _files = {} - # process the body parameter - _body_params = None - # set the HTTP header `Accept` - _header_params["Accept"] = self.api_client.select_header_accept( - ["application/json", "application/problem+json"] - ) # noqa: E501 - - # authentication setting - _auth_settings = [] # noqa: E501 - - _response_types_map = { - "200": "ChallengeContributionsPage", - "400": "BasicError", - "500": "BasicError", - } - - return self.api_client.call_api( - "/challenges/{challengeId}/contributions", - "GET", - _path_params, - _query_params, - _header_params, - body=_body_params, - post_params=_form_params, - files=_files, - response_types_map=_response_types_map, - auth_settings=_auth_settings, - async_req=_params.get("async_req"), - _return_http_data_only=_params.get("_return_http_data_only"), # noqa: E501 - _preload_content=_params.get("_preload_content", True), - _request_timeout=_params.get("_request_timeout"), - collection_formats=_collection_formats, - _request_auth=_params.get("_request_auth"), - ) diff --git a/libs/openchallenges/api-client-python/openchallenges_client/api/challenge_input_data_type_api.py b/libs/openchallenges/api-client-python/openchallenges_client/api/challenge_input_data_type_api.py deleted file mode 100644 index 2a7b517773..0000000000 --- a/libs/openchallenges/api-client-python/openchallenges_client/api/challenge_input_data_type_api.py +++ /dev/null @@ -1,219 +0,0 @@ -# coding: utf-8 - -""" - OpenChallenges REST API - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import re # noqa: F401 -import io -import warnings - -from pydantic import validate_arguments, ValidationError -from typing_extensions import Annotated - -from pydantic import Field - -from typing import Optional - -from openchallenges_client.models.challenge_input_data_type_search_query import ( - ChallengeInputDataTypeSearchQuery, -) -from openchallenges_client.models.challenge_input_data_types_page import ( - ChallengeInputDataTypesPage, -) - -from openchallenges_client.api_client import ApiClient -from openchallenges_client.api_response import ApiResponse -from openchallenges_client.exceptions import ApiTypeError, ApiValueError # noqa: F401 - - -class ChallengeInputDataTypeApi(object): - """NOTE: This class is auto generated by OpenAPI Generator - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - def __init__(self, api_client=None): - if api_client is None: - api_client = ApiClient.get_default() - self.api_client = api_client - - @validate_arguments - def list_challenge_input_data_types( - self, - challenge_input_data_type_search_query: Annotated[ - Optional[ChallengeInputDataTypeSearchQuery], - Field( - description="The search query used to find challenge input data types." - ), - ] = None, - **kwargs - ) -> ChallengeInputDataTypesPage: # noqa: E501 - """List challenge input data types # noqa: E501 - - List challenge input data types # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.list_challenge_input_data_types(challenge_input_data_type_search_query, async_req=True) - >>> result = thread.get() - - :param challenge_input_data_type_search_query: The search query used to find challenge input data types. - :type challenge_input_data_type_search_query: ChallengeInputDataTypeSearchQuery - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: ChallengeInputDataTypesPage - """ - kwargs["_return_http_data_only"] = True - if "_preload_content" in kwargs: - raise ValueError( - "Error! Please call the list_challenge_input_data_types_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" - ) - return self.list_challenge_input_data_types_with_http_info( - challenge_input_data_type_search_query, **kwargs - ) # noqa: E501 - - @validate_arguments - def list_challenge_input_data_types_with_http_info( - self, - challenge_input_data_type_search_query: Annotated[ - Optional[ChallengeInputDataTypeSearchQuery], - Field( - description="The search query used to find challenge input data types." - ), - ] = None, - **kwargs - ) -> ApiResponse: # noqa: E501 - """List challenge input data types # noqa: E501 - - List challenge input data types # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.list_challenge_input_data_types_with_http_info(challenge_input_data_type_search_query, async_req=True) - >>> result = thread.get() - - :param challenge_input_data_type_search_query: The search query used to find challenge input data types. - :type challenge_input_data_type_search_query: ChallengeInputDataTypeSearchQuery - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the ApiResponse.data will - be set to none and raw_data will store the - HTTP response body without reading/decoding. - Default is True. - :type _preload_content: bool, optional - :param _return_http_data_only: response data instead of ApiResponse - object with status code, headers, etc - :type _return_http_data_only: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: tuple(ChallengeInputDataTypesPage, status_code(int), headers(HTTPHeaderDict)) - """ - - _params = locals() - - _all_params = ["challenge_input_data_type_search_query"] - _all_params.extend( - [ - "async_req", - "_return_http_data_only", - "_preload_content", - "_request_timeout", - "_request_auth", - "_content_type", - "_headers", - ] - ) - - # validate the arguments - for _key, _val in _params["kwargs"].items(): - if _key not in _all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method list_challenge_input_data_types" % _key - ) - _params[_key] = _val - del _params["kwargs"] - - _collection_formats = {} - - # process the path parameters - _path_params = {} - - # process the query parameters - _query_params = [] - if ( - _params.get("challenge_input_data_type_search_query") is not None - ): # noqa: E501 - _query_params.append( - ( - "challengeInputDataTypeSearchQuery", - _params["challenge_input_data_type_search_query"], - ) - ) - - # process the header parameters - _header_params = dict(_params.get("_headers", {})) - # process the form parameters - _form_params = [] - _files = {} - # process the body parameter - _body_params = None - # set the HTTP header `Accept` - _header_params["Accept"] = self.api_client.select_header_accept( - ["application/json", "application/problem+json"] - ) # noqa: E501 - - # authentication setting - _auth_settings = [] # noqa: E501 - - _response_types_map = { - "200": "ChallengeInputDataTypesPage", - "400": "BasicError", - "500": "BasicError", - } - - return self.api_client.call_api( - "/challengeInputDataTypes", - "GET", - _path_params, - _query_params, - _header_params, - body=_body_params, - post_params=_form_params, - files=_files, - response_types_map=_response_types_map, - auth_settings=_auth_settings, - async_req=_params.get("async_req"), - _return_http_data_only=_params.get("_return_http_data_only"), # noqa: E501 - _preload_content=_params.get("_preload_content", True), - _request_timeout=_params.get("_request_timeout"), - collection_formats=_collection_formats, - _request_auth=_params.get("_request_auth"), - ) diff --git a/libs/openchallenges/api-client-python/openchallenges_client/api/challenge_platform_api.py b/libs/openchallenges/api-client-python/openchallenges_client/api/challenge_platform_api.py deleted file mode 100644 index d54e4db2f5..0000000000 --- a/libs/openchallenges/api-client-python/openchallenges_client/api/challenge_platform_api.py +++ /dev/null @@ -1,371 +0,0 @@ -# coding: utf-8 - -""" - OpenChallenges REST API - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import re # noqa: F401 -import io -import warnings - -from pydantic import validate_arguments, ValidationError -from typing_extensions import Annotated - -from pydantic import Field, constr - -from typing import Optional - -from openchallenges_client.models.challenge_platform import ChallengePlatform -from openchallenges_client.models.challenge_platform_search_query import ( - ChallengePlatformSearchQuery, -) -from openchallenges_client.models.challenge_platforms_page import ChallengePlatformsPage - -from openchallenges_client.api_client import ApiClient -from openchallenges_client.api_response import ApiResponse -from openchallenges_client.exceptions import ApiTypeError, ApiValueError # noqa: F401 - - -class ChallengePlatformApi(object): - """NOTE: This class is auto generated by OpenAPI Generator - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - def __init__(self, api_client=None): - if api_client is None: - api_client = ApiClient.get_default() - self.api_client = api_client - - @validate_arguments - def get_challenge_platform( - self, - challenge_platform_name: Annotated[ - constr(strict=True, max_length=30, min_length=3), - Field(..., description="The unique identifier of the challenge platform."), - ], - **kwargs - ) -> ChallengePlatform: # noqa: E501 - """Get a challenge platform # noqa: E501 - - Returns the challenge platform specified # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.get_challenge_platform(challenge_platform_name, async_req=True) - >>> result = thread.get() - - :param challenge_platform_name: The unique identifier of the challenge platform. (required) - :type challenge_platform_name: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: ChallengePlatform - """ - kwargs["_return_http_data_only"] = True - if "_preload_content" in kwargs: - raise ValueError( - "Error! Please call the get_challenge_platform_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" - ) - return self.get_challenge_platform_with_http_info( - challenge_platform_name, **kwargs - ) # noqa: E501 - - @validate_arguments - def get_challenge_platform_with_http_info( - self, - challenge_platform_name: Annotated[ - constr(strict=True, max_length=30, min_length=3), - Field(..., description="The unique identifier of the challenge platform."), - ], - **kwargs - ) -> ApiResponse: # noqa: E501 - """Get a challenge platform # noqa: E501 - - Returns the challenge platform specified # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.get_challenge_platform_with_http_info(challenge_platform_name, async_req=True) - >>> result = thread.get() - - :param challenge_platform_name: The unique identifier of the challenge platform. (required) - :type challenge_platform_name: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the ApiResponse.data will - be set to none and raw_data will store the - HTTP response body without reading/decoding. - Default is True. - :type _preload_content: bool, optional - :param _return_http_data_only: response data instead of ApiResponse - object with status code, headers, etc - :type _return_http_data_only: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: tuple(ChallengePlatform, status_code(int), headers(HTTPHeaderDict)) - """ - - _params = locals() - - _all_params = ["challenge_platform_name"] - _all_params.extend( - [ - "async_req", - "_return_http_data_only", - "_preload_content", - "_request_timeout", - "_request_auth", - "_content_type", - "_headers", - ] - ) - - # validate the arguments - for _key, _val in _params["kwargs"].items(): - if _key not in _all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method get_challenge_platform" % _key - ) - _params[_key] = _val - del _params["kwargs"] - - _collection_formats = {} - - # process the path parameters - _path_params = {} - if _params["challenge_platform_name"]: - _path_params["challengePlatformName"] = _params["challenge_platform_name"] - - # process the query parameters - _query_params = [] - # process the header parameters - _header_params = dict(_params.get("_headers", {})) - # process the form parameters - _form_params = [] - _files = {} - # process the body parameter - _body_params = None - # set the HTTP header `Accept` - _header_params["Accept"] = self.api_client.select_header_accept( - ["application/json", "application/problem+json"] - ) # noqa: E501 - - # authentication setting - _auth_settings = [] # noqa: E501 - - _response_types_map = { - "200": "ChallengePlatform", - "404": "BasicError", - "500": "BasicError", - } - - return self.api_client.call_api( - "/challengePlatforms/{challengePlatformName}", - "GET", - _path_params, - _query_params, - _header_params, - body=_body_params, - post_params=_form_params, - files=_files, - response_types_map=_response_types_map, - auth_settings=_auth_settings, - async_req=_params.get("async_req"), - _return_http_data_only=_params.get("_return_http_data_only"), # noqa: E501 - _preload_content=_params.get("_preload_content", True), - _request_timeout=_params.get("_request_timeout"), - collection_formats=_collection_formats, - _request_auth=_params.get("_request_auth"), - ) - - @validate_arguments - def list_challenge_platforms( - self, - challenge_platform_search_query: Annotated[ - Optional[ChallengePlatformSearchQuery], - Field(description="The search query used to find challenge platforms."), - ] = None, - **kwargs - ) -> ChallengePlatformsPage: # noqa: E501 - """List challenge platforms # noqa: E501 - - List challenge platforms # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.list_challenge_platforms(challenge_platform_search_query, async_req=True) - >>> result = thread.get() - - :param challenge_platform_search_query: The search query used to find challenge platforms. - :type challenge_platform_search_query: ChallengePlatformSearchQuery - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: ChallengePlatformsPage - """ - kwargs["_return_http_data_only"] = True - if "_preload_content" in kwargs: - raise ValueError( - "Error! Please call the list_challenge_platforms_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" - ) - return self.list_challenge_platforms_with_http_info( - challenge_platform_search_query, **kwargs - ) # noqa: E501 - - @validate_arguments - def list_challenge_platforms_with_http_info( - self, - challenge_platform_search_query: Annotated[ - Optional[ChallengePlatformSearchQuery], - Field(description="The search query used to find challenge platforms."), - ] = None, - **kwargs - ) -> ApiResponse: # noqa: E501 - """List challenge platforms # noqa: E501 - - List challenge platforms # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.list_challenge_platforms_with_http_info(challenge_platform_search_query, async_req=True) - >>> result = thread.get() - - :param challenge_platform_search_query: The search query used to find challenge platforms. - :type challenge_platform_search_query: ChallengePlatformSearchQuery - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the ApiResponse.data will - be set to none and raw_data will store the - HTTP response body without reading/decoding. - Default is True. - :type _preload_content: bool, optional - :param _return_http_data_only: response data instead of ApiResponse - object with status code, headers, etc - :type _return_http_data_only: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: tuple(ChallengePlatformsPage, status_code(int), headers(HTTPHeaderDict)) - """ - - _params = locals() - - _all_params = ["challenge_platform_search_query"] - _all_params.extend( - [ - "async_req", - "_return_http_data_only", - "_preload_content", - "_request_timeout", - "_request_auth", - "_content_type", - "_headers", - ] - ) - - # validate the arguments - for _key, _val in _params["kwargs"].items(): - if _key not in _all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method list_challenge_platforms" % _key - ) - _params[_key] = _val - del _params["kwargs"] - - _collection_formats = {} - - # process the path parameters - _path_params = {} - - # process the query parameters - _query_params = [] - if _params.get("challenge_platform_search_query") is not None: # noqa: E501 - _query_params.append( - ( - "challengePlatformSearchQuery", - _params["challenge_platform_search_query"], - ) - ) - - # process the header parameters - _header_params = dict(_params.get("_headers", {})) - # process the form parameters - _form_params = [] - _files = {} - # process the body parameter - _body_params = None - # set the HTTP header `Accept` - _header_params["Accept"] = self.api_client.select_header_accept( - ["application/json", "application/problem+json"] - ) # noqa: E501 - - # authentication setting - _auth_settings = [] # noqa: E501 - - _response_types_map = { - "200": "ChallengePlatformsPage", - "400": "BasicError", - "500": "BasicError", - } - - return self.api_client.call_api( - "/challengePlatforms", - "GET", - _path_params, - _query_params, - _header_params, - body=_body_params, - post_params=_form_params, - files=_files, - response_types_map=_response_types_map, - auth_settings=_auth_settings, - async_req=_params.get("async_req"), - _return_http_data_only=_params.get("_return_http_data_only"), # noqa: E501 - _preload_content=_params.get("_preload_content", True), - _request_timeout=_params.get("_request_timeout"), - collection_formats=_collection_formats, - _request_auth=_params.get("_request_auth"), - ) diff --git a/libs/openchallenges/api-client-python/openchallenges_client/api/image_api.py b/libs/openchallenges/api-client-python/openchallenges_client/api/image_api.py deleted file mode 100644 index 43c3e629d1..0000000000 --- a/libs/openchallenges/api-client-python/openchallenges_client/api/image_api.py +++ /dev/null @@ -1,200 +0,0 @@ -# coding: utf-8 - -""" - OpenChallenges REST API - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import re # noqa: F401 -import io -import warnings - -from pydantic import validate_arguments, ValidationError -from typing_extensions import Annotated - -from pydantic import Field - -from typing import Optional - -from openchallenges_client.models.image import Image -from openchallenges_client.models.image_query import ImageQuery - -from openchallenges_client.api_client import ApiClient -from openchallenges_client.api_response import ApiResponse -from openchallenges_client.exceptions import ApiTypeError, ApiValueError # noqa: F401 - - -class ImageApi(object): - """NOTE: This class is auto generated by OpenAPI Generator - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - def __init__(self, api_client=None): - if api_client is None: - api_client = ApiClient.get_default() - self.api_client = api_client - - @validate_arguments - def get_image( - self, - image_query: Annotated[ - Optional[ImageQuery], Field(description="The query used to get an image.") - ] = None, - **kwargs - ) -> Image: # noqa: E501 - """Get an image # noqa: E501 - - Returns the image specified. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.get_image(image_query, async_req=True) - >>> result = thread.get() - - :param image_query: The query used to get an image. - :type image_query: ImageQuery - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: Image - """ - kwargs["_return_http_data_only"] = True - if "_preload_content" in kwargs: - raise ValueError( - "Error! Please call the get_image_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" - ) - return self.get_image_with_http_info(image_query, **kwargs) # noqa: E501 - - @validate_arguments - def get_image_with_http_info( - self, - image_query: Annotated[ - Optional[ImageQuery], Field(description="The query used to get an image.") - ] = None, - **kwargs - ) -> ApiResponse: # noqa: E501 - """Get an image # noqa: E501 - - Returns the image specified. # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.get_image_with_http_info(image_query, async_req=True) - >>> result = thread.get() - - :param image_query: The query used to get an image. - :type image_query: ImageQuery - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the ApiResponse.data will - be set to none and raw_data will store the - HTTP response body without reading/decoding. - Default is True. - :type _preload_content: bool, optional - :param _return_http_data_only: response data instead of ApiResponse - object with status code, headers, etc - :type _return_http_data_only: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: tuple(Image, status_code(int), headers(HTTPHeaderDict)) - """ - - _params = locals() - - _all_params = ["image_query"] - _all_params.extend( - [ - "async_req", - "_return_http_data_only", - "_preload_content", - "_request_timeout", - "_request_auth", - "_content_type", - "_headers", - ] - ) - - # validate the arguments - for _key, _val in _params["kwargs"].items(): - if _key not in _all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method get_image" % _key - ) - _params[_key] = _val - del _params["kwargs"] - - _collection_formats = {} - - # process the path parameters - _path_params = {} - - # process the query parameters - _query_params = [] - if _params.get("image_query") is not None: # noqa: E501 - _query_params.append(("imageQuery", _params["image_query"])) - - # process the header parameters - _header_params = dict(_params.get("_headers", {})) - # process the form parameters - _form_params = [] - _files = {} - # process the body parameter - _body_params = None - # set the HTTP header `Accept` - _header_params["Accept"] = self.api_client.select_header_accept( - ["application/json", "application/problem+json"] - ) # noqa: E501 - - # authentication setting - _auth_settings = [] # noqa: E501 - - _response_types_map = { - "200": "Image", - "404": "BasicError", - "500": "BasicError", - } - - return self.api_client.call_api( - "/images", - "GET", - _path_params, - _query_params, - _header_params, - body=_body_params, - post_params=_form_params, - files=_files, - response_types_map=_response_types_map, - auth_settings=_auth_settings, - async_req=_params.get("async_req"), - _return_http_data_only=_params.get("_return_http_data_only"), # noqa: E501 - _preload_content=_params.get("_preload_content", True), - _request_timeout=_params.get("_request_timeout"), - collection_formats=_collection_formats, - _request_auth=_params.get("_request_auth"), - ) diff --git a/libs/openchallenges/api-client-python/openchallenges_client/api/organization_api.py b/libs/openchallenges/api-client-python/openchallenges_client/api/organization_api.py deleted file mode 100644 index 293d6a4723..0000000000 --- a/libs/openchallenges/api-client-python/openchallenges_client/api/organization_api.py +++ /dev/null @@ -1,366 +0,0 @@ -# coding: utf-8 - -""" - OpenChallenges REST API - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import re # noqa: F401 -import io -import warnings - -from pydantic import validate_arguments, ValidationError -from typing_extensions import Annotated - -from pydantic import Field, constr - -from typing import Optional - -from openchallenges_client.models.organization import Organization -from openchallenges_client.models.organization_search_query import ( - OrganizationSearchQuery, -) -from openchallenges_client.models.organizations_page import OrganizationsPage - -from openchallenges_client.api_client import ApiClient -from openchallenges_client.api_response import ApiResponse -from openchallenges_client.exceptions import ApiTypeError, ApiValueError # noqa: F401 - - -class OrganizationApi(object): - """NOTE: This class is auto generated by OpenAPI Generator - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - def __init__(self, api_client=None): - if api_client is None: - api_client = ApiClient.get_default() - self.api_client = api_client - - @validate_arguments - def get_organization( - self, - org: Annotated[ - constr(strict=True, max_length=64, min_length=1), - Field(..., description="The id or login of the organization."), - ], - **kwargs - ) -> Organization: # noqa: E501 - """Get an organization # noqa: E501 - - Returns the organization specified # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.get_organization(org, async_req=True) - >>> result = thread.get() - - :param org: The id or login of the organization. (required) - :type org: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: Organization - """ - kwargs["_return_http_data_only"] = True - if "_preload_content" in kwargs: - raise ValueError( - "Error! Please call the get_organization_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" - ) - return self.get_organization_with_http_info(org, **kwargs) # noqa: E501 - - @validate_arguments - def get_organization_with_http_info( - self, - org: Annotated[ - constr(strict=True, max_length=64, min_length=1), - Field(..., description="The id or login of the organization."), - ], - **kwargs - ) -> ApiResponse: # noqa: E501 - """Get an organization # noqa: E501 - - Returns the organization specified # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.get_organization_with_http_info(org, async_req=True) - >>> result = thread.get() - - :param org: The id or login of the organization. (required) - :type org: str - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the ApiResponse.data will - be set to none and raw_data will store the - HTTP response body without reading/decoding. - Default is True. - :type _preload_content: bool, optional - :param _return_http_data_only: response data instead of ApiResponse - object with status code, headers, etc - :type _return_http_data_only: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: tuple(Organization, status_code(int), headers(HTTPHeaderDict)) - """ - - _params = locals() - - _all_params = ["org"] - _all_params.extend( - [ - "async_req", - "_return_http_data_only", - "_preload_content", - "_request_timeout", - "_request_auth", - "_content_type", - "_headers", - ] - ) - - # validate the arguments - for _key, _val in _params["kwargs"].items(): - if _key not in _all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method get_organization" % _key - ) - _params[_key] = _val - del _params["kwargs"] - - _collection_formats = {} - - # process the path parameters - _path_params = {} - if _params["org"]: - _path_params["org"] = _params["org"] - - # process the query parameters - _query_params = [] - # process the header parameters - _header_params = dict(_params.get("_headers", {})) - # process the form parameters - _form_params = [] - _files = {} - # process the body parameter - _body_params = None - # set the HTTP header `Accept` - _header_params["Accept"] = self.api_client.select_header_accept( - ["application/json", "application/problem+json"] - ) # noqa: E501 - - # authentication setting - _auth_settings = [] # noqa: E501 - - _response_types_map = { - "200": "Organization", - "404": "BasicError", - "500": "BasicError", - } - - return self.api_client.call_api( - "/organizations/{org}", - "GET", - _path_params, - _query_params, - _header_params, - body=_body_params, - post_params=_form_params, - files=_files, - response_types_map=_response_types_map, - auth_settings=_auth_settings, - async_req=_params.get("async_req"), - _return_http_data_only=_params.get("_return_http_data_only"), # noqa: E501 - _preload_content=_params.get("_preload_content", True), - _request_timeout=_params.get("_request_timeout"), - collection_formats=_collection_formats, - _request_auth=_params.get("_request_auth"), - ) - - @validate_arguments - def list_organizations( - self, - organization_search_query: Annotated[ - Optional[OrganizationSearchQuery], - Field(description="The search query used to find organizations."), - ] = None, - **kwargs - ) -> OrganizationsPage: # noqa: E501 - """List organizations # noqa: E501 - - List organizations # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.list_organizations(organization_search_query, async_req=True) - >>> result = thread.get() - - :param organization_search_query: The search query used to find organizations. - :type organization_search_query: OrganizationSearchQuery - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: OrganizationsPage - """ - kwargs["_return_http_data_only"] = True - if "_preload_content" in kwargs: - raise ValueError( - "Error! Please call the list_organizations_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" - ) - return self.list_organizations_with_http_info( - organization_search_query, **kwargs - ) # noqa: E501 - - @validate_arguments - def list_organizations_with_http_info( - self, - organization_search_query: Annotated[ - Optional[OrganizationSearchQuery], - Field(description="The search query used to find organizations."), - ] = None, - **kwargs - ) -> ApiResponse: # noqa: E501 - """List organizations # noqa: E501 - - List organizations # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.list_organizations_with_http_info(organization_search_query, async_req=True) - >>> result = thread.get() - - :param organization_search_query: The search query used to find organizations. - :type organization_search_query: OrganizationSearchQuery - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the ApiResponse.data will - be set to none and raw_data will store the - HTTP response body without reading/decoding. - Default is True. - :type _preload_content: bool, optional - :param _return_http_data_only: response data instead of ApiResponse - object with status code, headers, etc - :type _return_http_data_only: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: tuple(OrganizationsPage, status_code(int), headers(HTTPHeaderDict)) - """ - - _params = locals() - - _all_params = ["organization_search_query"] - _all_params.extend( - [ - "async_req", - "_return_http_data_only", - "_preload_content", - "_request_timeout", - "_request_auth", - "_content_type", - "_headers", - ] - ) - - # validate the arguments - for _key, _val in _params["kwargs"].items(): - if _key not in _all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method list_organizations" % _key - ) - _params[_key] = _val - del _params["kwargs"] - - _collection_formats = {} - - # process the path parameters - _path_params = {} - - # process the query parameters - _query_params = [] - if _params.get("organization_search_query") is not None: # noqa: E501 - _query_params.append( - ("organizationSearchQuery", _params["organization_search_query"]) - ) - - # process the header parameters - _header_params = dict(_params.get("_headers", {})) - # process the form parameters - _form_params = [] - _files = {} - # process the body parameter - _body_params = None - # set the HTTP header `Accept` - _header_params["Accept"] = self.api_client.select_header_accept( - ["application/json", "application/problem+json"] - ) # noqa: E501 - - # authentication setting - _auth_settings = [] # noqa: E501 - - _response_types_map = { - "200": "OrganizationsPage", - "400": "BasicError", - "500": "BasicError", - } - - return self.api_client.call_api( - "/organizations", - "GET", - _path_params, - _query_params, - _header_params, - body=_body_params, - post_params=_form_params, - files=_files, - response_types_map=_response_types_map, - auth_settings=_auth_settings, - async_req=_params.get("async_req"), - _return_http_data_only=_params.get("_return_http_data_only"), # noqa: E501 - _preload_content=_params.get("_preload_content", True), - _request_timeout=_params.get("_request_timeout"), - collection_formats=_collection_formats, - _request_auth=_params.get("_request_auth"), - ) diff --git a/libs/openchallenges/api-client-python/openchallenges_client/api/user_api.py b/libs/openchallenges/api-client-python/openchallenges_client/api/user_api.py deleted file mode 100644 index edb6d01f70..0000000000 --- a/libs/openchallenges/api-client-python/openchallenges_client/api/user_api.py +++ /dev/null @@ -1,704 +0,0 @@ -# coding: utf-8 - -""" - OpenChallenges REST API - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import re # noqa: F401 -import io -import warnings - -from pydantic import validate_arguments, ValidationError -from typing_extensions import Annotated - -from pydantic import Field, StrictInt, conint - -from typing import Any, Dict, Optional - -from openchallenges_client.models.user import User -from openchallenges_client.models.user_create_request import UserCreateRequest -from openchallenges_client.models.user_create_response import UserCreateResponse -from openchallenges_client.models.users_page import UsersPage - -from openchallenges_client.api_client import ApiClient -from openchallenges_client.api_response import ApiResponse -from openchallenges_client.exceptions import ApiTypeError, ApiValueError # noqa: F401 - - -class UserApi(object): - """NOTE: This class is auto generated by OpenAPI Generator - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - def __init__(self, api_client=None): - if api_client is None: - api_client = ApiClient.get_default() - self.api_client = api_client - - @validate_arguments - def create_user( - self, user_create_request: UserCreateRequest, **kwargs - ) -> UserCreateResponse: # noqa: E501 - """Create a user # noqa: E501 - - Create a user with the specified account name # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.create_user(user_create_request, async_req=True) - >>> result = thread.get() - - :param user_create_request: (required) - :type user_create_request: UserCreateRequest - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: UserCreateResponse - """ - kwargs["_return_http_data_only"] = True - if "_preload_content" in kwargs: - raise ValueError( - "Error! Please call the create_user_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" - ) - return self.create_user_with_http_info( - user_create_request, **kwargs - ) # noqa: E501 - - @validate_arguments - def create_user_with_http_info( - self, user_create_request: UserCreateRequest, **kwargs - ) -> ApiResponse: # noqa: E501 - """Create a user # noqa: E501 - - Create a user with the specified account name # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.create_user_with_http_info(user_create_request, async_req=True) - >>> result = thread.get() - - :param user_create_request: (required) - :type user_create_request: UserCreateRequest - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the ApiResponse.data will - be set to none and raw_data will store the - HTTP response body without reading/decoding. - Default is True. - :type _preload_content: bool, optional - :param _return_http_data_only: response data instead of ApiResponse - object with status code, headers, etc - :type _return_http_data_only: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: tuple(UserCreateResponse, status_code(int), headers(HTTPHeaderDict)) - """ - - _params = locals() - - _all_params = ["user_create_request"] - _all_params.extend( - [ - "async_req", - "_return_http_data_only", - "_preload_content", - "_request_timeout", - "_request_auth", - "_content_type", - "_headers", - ] - ) - - # validate the arguments - for _key, _val in _params["kwargs"].items(): - if _key not in _all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method create_user" % _key - ) - _params[_key] = _val - del _params["kwargs"] - - _collection_formats = {} - - # process the path parameters - _path_params = {} - - # process the query parameters - _query_params = [] - # process the header parameters - _header_params = dict(_params.get("_headers", {})) - # process the form parameters - _form_params = [] - _files = {} - # process the body parameter - _body_params = None - if _params["user_create_request"] is not None: - _body_params = _params["user_create_request"] - - # set the HTTP header `Accept` - _header_params["Accept"] = self.api_client.select_header_accept( - ["application/json", "application/problem+json"] - ) # noqa: E501 - - # set the HTTP header `Content-Type` - _content_types_list = _params.get( - "_content_type", - self.api_client.select_header_content_type(["application/json"]), - ) - if _content_types_list: - _header_params["Content-Type"] = _content_types_list - - # authentication setting - _auth_settings = [] # noqa: E501 - - _response_types_map = { - "201": "UserCreateResponse", - "400": "BasicError", - "409": "BasicError", - "500": "BasicError", - } - - return self.api_client.call_api( - "/users/register", - "POST", - _path_params, - _query_params, - _header_params, - body=_body_params, - post_params=_form_params, - files=_files, - response_types_map=_response_types_map, - auth_settings=_auth_settings, - async_req=_params.get("async_req"), - _return_http_data_only=_params.get("_return_http_data_only"), # noqa: E501 - _preload_content=_params.get("_preload_content", True), - _request_timeout=_params.get("_request_timeout"), - collection_formats=_collection_formats, - _request_auth=_params.get("_request_auth"), - ) - - @validate_arguments - def delete_user( - self, - user_id: Annotated[ - StrictInt, - Field( - ..., - description="The unique identifier of the user, either the user account ID or login", - ), - ], - **kwargs - ) -> object: # noqa: E501 - """Delete a user # noqa: E501 - - Deletes the user specified # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.delete_user(user_id, async_req=True) - >>> result = thread.get() - - :param user_id: The unique identifier of the user, either the user account ID or login (required) - :type user_id: int - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: object - """ - kwargs["_return_http_data_only"] = True - if "_preload_content" in kwargs: - raise ValueError( - "Error! Please call the delete_user_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" - ) - return self.delete_user_with_http_info(user_id, **kwargs) # noqa: E501 - - @validate_arguments - def delete_user_with_http_info( - self, - user_id: Annotated[ - StrictInt, - Field( - ..., - description="The unique identifier of the user, either the user account ID or login", - ), - ], - **kwargs - ) -> ApiResponse: # noqa: E501 - """Delete a user # noqa: E501 - - Deletes the user specified # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.delete_user_with_http_info(user_id, async_req=True) - >>> result = thread.get() - - :param user_id: The unique identifier of the user, either the user account ID or login (required) - :type user_id: int - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the ApiResponse.data will - be set to none and raw_data will store the - HTTP response body without reading/decoding. - Default is True. - :type _preload_content: bool, optional - :param _return_http_data_only: response data instead of ApiResponse - object with status code, headers, etc - :type _return_http_data_only: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: tuple(object, status_code(int), headers(HTTPHeaderDict)) - """ - - _params = locals() - - _all_params = ["user_id"] - _all_params.extend( - [ - "async_req", - "_return_http_data_only", - "_preload_content", - "_request_timeout", - "_request_auth", - "_content_type", - "_headers", - ] - ) - - # validate the arguments - for _key, _val in _params["kwargs"].items(): - if _key not in _all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method delete_user" % _key - ) - _params[_key] = _val - del _params["kwargs"] - - _collection_formats = {} - - # process the path parameters - _path_params = {} - if _params["user_id"]: - _path_params["userId"] = _params["user_id"] - - # process the query parameters - _query_params = [] - # process the header parameters - _header_params = dict(_params.get("_headers", {})) - # process the form parameters - _form_params = [] - _files = {} - # process the body parameter - _body_params = None - # set the HTTP header `Accept` - _header_params["Accept"] = self.api_client.select_header_accept( - ["application/json", "application/problem+json"] - ) # noqa: E501 - - # authentication setting - _auth_settings = [] # noqa: E501 - - _response_types_map = { - "200": "object", - "400": "BasicError", - "500": "BasicError", - } - - return self.api_client.call_api( - "/users/{userId}", - "DELETE", - _path_params, - _query_params, - _header_params, - body=_body_params, - post_params=_form_params, - files=_files, - response_types_map=_response_types_map, - auth_settings=_auth_settings, - async_req=_params.get("async_req"), - _return_http_data_only=_params.get("_return_http_data_only"), # noqa: E501 - _preload_content=_params.get("_preload_content", True), - _request_timeout=_params.get("_request_timeout"), - collection_formats=_collection_formats, - _request_auth=_params.get("_request_auth"), - ) - - @validate_arguments - def get_user( - self, - user_id: Annotated[ - StrictInt, - Field( - ..., - description="The unique identifier of the user, either the user account ID or login", - ), - ], - **kwargs - ) -> User: # noqa: E501 - """Get a user # noqa: E501 - - Returns the user specified # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.get_user(user_id, async_req=True) - >>> result = thread.get() - - :param user_id: The unique identifier of the user, either the user account ID or login (required) - :type user_id: int - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: User - """ - kwargs["_return_http_data_only"] = True - if "_preload_content" in kwargs: - raise ValueError( - "Error! Please call the get_user_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" - ) - return self.get_user_with_http_info(user_id, **kwargs) # noqa: E501 - - @validate_arguments - def get_user_with_http_info( - self, - user_id: Annotated[ - StrictInt, - Field( - ..., - description="The unique identifier of the user, either the user account ID or login", - ), - ], - **kwargs - ) -> ApiResponse: # noqa: E501 - """Get a user # noqa: E501 - - Returns the user specified # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.get_user_with_http_info(user_id, async_req=True) - >>> result = thread.get() - - :param user_id: The unique identifier of the user, either the user account ID or login (required) - :type user_id: int - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the ApiResponse.data will - be set to none and raw_data will store the - HTTP response body without reading/decoding. - Default is True. - :type _preload_content: bool, optional - :param _return_http_data_only: response data instead of ApiResponse - object with status code, headers, etc - :type _return_http_data_only: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: tuple(User, status_code(int), headers(HTTPHeaderDict)) - """ - - _params = locals() - - _all_params = ["user_id"] - _all_params.extend( - [ - "async_req", - "_return_http_data_only", - "_preload_content", - "_request_timeout", - "_request_auth", - "_content_type", - "_headers", - ] - ) - - # validate the arguments - for _key, _val in _params["kwargs"].items(): - if _key not in _all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method get_user" % _key - ) - _params[_key] = _val - del _params["kwargs"] - - _collection_formats = {} - - # process the path parameters - _path_params = {} - if _params["user_id"]: - _path_params["userId"] = _params["user_id"] - - # process the query parameters - _query_params = [] - # process the header parameters - _header_params = dict(_params.get("_headers", {})) - # process the form parameters - _form_params = [] - _files = {} - # process the body parameter - _body_params = None - # set the HTTP header `Accept` - _header_params["Accept"] = self.api_client.select_header_accept( - ["application/json", "application/problem+json"] - ) # noqa: E501 - - # authentication setting - _auth_settings = [] # noqa: E501 - - _response_types_map = { - "200": "User", - "404": "BasicError", - "500": "BasicError", - } - - return self.api_client.call_api( - "/users/{userId}", - "GET", - _path_params, - _query_params, - _header_params, - body=_body_params, - post_params=_form_params, - files=_files, - response_types_map=_response_types_map, - auth_settings=_auth_settings, - async_req=_params.get("async_req"), - _return_http_data_only=_params.get("_return_http_data_only"), # noqa: E501 - _preload_content=_params.get("_preload_content", True), - _request_timeout=_params.get("_request_timeout"), - collection_formats=_collection_formats, - _request_auth=_params.get("_request_auth"), - ) - - @validate_arguments - def list_users( - self, - page_number: Annotated[ - Optional[conint(strict=True, ge=0)], Field(description="The page number.") - ] = None, - page_size: Annotated[ - Optional[conint(strict=True, ge=1)], - Field(description="The number of items in a single page."), - ] = None, - **kwargs - ) -> UsersPage: # noqa: E501 - """Get all users # noqa: E501 - - Returns the users # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.list_users(page_number, page_size, async_req=True) - >>> result = thread.get() - - :param page_number: The page number. - :type page_number: int - :param page_size: The number of items in a single page. - :type page_size: int - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: UsersPage - """ - kwargs["_return_http_data_only"] = True - if "_preload_content" in kwargs: - raise ValueError( - "Error! Please call the list_users_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" - ) - return self.list_users_with_http_info( - page_number, page_size, **kwargs - ) # noqa: E501 - - @validate_arguments - def list_users_with_http_info( - self, - page_number: Annotated[ - Optional[conint(strict=True, ge=0)], Field(description="The page number.") - ] = None, - page_size: Annotated[ - Optional[conint(strict=True, ge=1)], - Field(description="The number of items in a single page."), - ] = None, - **kwargs - ) -> ApiResponse: # noqa: E501 - """Get all users # noqa: E501 - - Returns the users # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.list_users_with_http_info(page_number, page_size, async_req=True) - >>> result = thread.get() - - :param page_number: The page number. - :type page_number: int - :param page_size: The number of items in a single page. - :type page_size: int - :param async_req: Whether to execute the request asynchronously. - :type async_req: bool, optional - :param _preload_content: if False, the ApiResponse.data will - be set to none and raw_data will store the - HTTP response body without reading/decoding. - Default is True. - :type _preload_content: bool, optional - :param _return_http_data_only: response data instead of ApiResponse - object with status code, headers, etc - :type _return_http_data_only: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_auth: dict, optional - :type _content_type: string, optional: force content-type for the request - :return: Returns the result object. - If the method is called asynchronously, - returns the request thread. - :rtype: tuple(UsersPage, status_code(int), headers(HTTPHeaderDict)) - """ - - _params = locals() - - _all_params = ["page_number", "page_size"] - _all_params.extend( - [ - "async_req", - "_return_http_data_only", - "_preload_content", - "_request_timeout", - "_request_auth", - "_content_type", - "_headers", - ] - ) - - # validate the arguments - for _key, _val in _params["kwargs"].items(): - if _key not in _all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method list_users" % _key - ) - _params[_key] = _val - del _params["kwargs"] - - _collection_formats = {} - - # process the path parameters - _path_params = {} - - # process the query parameters - _query_params = [] - if _params.get("page_number") is not None: # noqa: E501 - _query_params.append(("pageNumber", _params["page_number"])) - - if _params.get("page_size") is not None: # noqa: E501 - _query_params.append(("pageSize", _params["page_size"])) - - # process the header parameters - _header_params = dict(_params.get("_headers", {})) - # process the form parameters - _form_params = [] - _files = {} - # process the body parameter - _body_params = None - # set the HTTP header `Accept` - _header_params["Accept"] = self.api_client.select_header_accept( - ["application/json", "application/problem+json"] - ) # noqa: E501 - - # authentication setting - _auth_settings = [] # noqa: E501 - - _response_types_map = { - "200": "UsersPage", - "400": "BasicError", - "500": "BasicError", - } - - return self.api_client.call_api( - "/users", - "GET", - _path_params, - _query_params, - _header_params, - body=_body_params, - post_params=_form_params, - files=_files, - response_types_map=_response_types_map, - auth_settings=_auth_settings, - async_req=_params.get("async_req"), - _return_http_data_only=_params.get("_return_http_data_only"), # noqa: E501 - _preload_content=_params.get("_preload_content", True), - _request_timeout=_params.get("_request_timeout"), - collection_formats=_collection_formats, - _request_auth=_params.get("_request_auth"), - ) diff --git a/libs/openchallenges/api-client-python/openchallenges_client/api_client.py b/libs/openchallenges/api-client-python/openchallenges_client/api_client.py deleted file mode 100644 index 9e80658fc0..0000000000 --- a/libs/openchallenges/api-client-python/openchallenges_client/api_client.py +++ /dev/null @@ -1,838 +0,0 @@ -# coding: utf-8 - -""" - OpenChallenges REST API - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import atexit -import datetime -from dateutil.parser import parse -import json -import mimetypes -from multiprocessing.pool import ThreadPool -import os -import re -import tempfile - -from urllib.parse import quote - -from openchallenges_client.configuration import Configuration -from openchallenges_client.api_response import ApiResponse -import openchallenges_client.models -from openchallenges_client import rest -from openchallenges_client.exceptions import ApiValueError, ApiException - - -class ApiClient(object): - """Generic API client for OpenAPI client library builds. - - OpenAPI generic API client. This client handles the client- - server communication, and is invariant across implementations. Specifics of - the methods and models for each application are generated from the OpenAPI - templates. - - :param configuration: .Configuration object for this client - :param header_name: a header to pass when making calls to the API. - :param header_value: a header value to pass when making calls to - the API. - :param cookie: a cookie to include in the header when making calls - to the API - :param pool_threads: The number of threads to use for async requests - to the API. More threads means more concurrent API requests. - """ - - PRIMITIVE_TYPES = (float, bool, bytes, str, int) - NATIVE_TYPES_MAPPING = { - "int": int, - "long": int, # TODO remove as only py3 is supported? - "float": float, - "str": str, - "bool": bool, - "date": datetime.date, - "datetime": datetime.datetime, - "object": object, - } - _pool = None - - def __init__( - self, - configuration=None, - header_name=None, - header_value=None, - cookie=None, - pool_threads=1, - ): - # use default configuration if none is provided - if configuration is None: - configuration = Configuration.get_default() - self.configuration = configuration - self.pool_threads = pool_threads - - self.rest_client = rest.RESTClientObject(configuration) - self.default_headers = {} - if header_name is not None: - self.default_headers[header_name] = header_value - self.cookie = cookie - # Set default User-Agent. - self.user_agent = "OpenAPI-Generator/1.0.0/python" - self.client_side_validation = configuration.client_side_validation - - def __enter__(self): - return self - - def __exit__(self, exc_type, exc_value, traceback): - self.close() - - def close(self): - if self._pool: - self._pool.close() - self._pool.join() - self._pool = None - if hasattr(atexit, "unregister"): - atexit.unregister(self.close) - - @property - def pool(self): - """Create thread pool on first request - avoids instantiating unused threadpool for blocking clients. - """ - if self._pool is None: - atexit.register(self.close) - self._pool = ThreadPool(self.pool_threads) - return self._pool - - @property - def user_agent(self): - """User agent for this API client""" - return self.default_headers["User-Agent"] - - @user_agent.setter - def user_agent(self, value): - self.default_headers["User-Agent"] = value - - def set_default_header(self, header_name, header_value): - self.default_headers[header_name] = header_value - - _default = None - - @classmethod - def get_default(cls): - """Return new instance of ApiClient. - - This method returns newly created, based on default constructor, - object of ApiClient class or returns a copy of default - ApiClient. - - :return: The ApiClient object. - """ - if cls._default is None: - cls._default = ApiClient() - return cls._default - - @classmethod - def set_default(cls, default): - """Set default instance of ApiClient. - - It stores default ApiClient. - - :param default: object of ApiClient. - """ - cls._default = default - - def __call_api( - self, - resource_path, - method, - path_params=None, - query_params=None, - header_params=None, - body=None, - post_params=None, - files=None, - response_types_map=None, - auth_settings=None, - _return_http_data_only=None, - collection_formats=None, - _preload_content=True, - _request_timeout=None, - _host=None, - _request_auth=None, - ): - - config = self.configuration - - # header parameters - header_params = header_params or {} - header_params.update(self.default_headers) - if self.cookie: - header_params["Cookie"] = self.cookie - if header_params: - header_params = self.sanitize_for_serialization(header_params) - header_params = dict( - self.parameters_to_tuples(header_params, collection_formats) - ) - - # path parameters - if path_params: - path_params = self.sanitize_for_serialization(path_params) - path_params = self.parameters_to_tuples(path_params, collection_formats) - for k, v in path_params: - # specified safe chars, encode everything - resource_path = resource_path.replace( - "{%s}" % k, quote(str(v), safe=config.safe_chars_for_path_param) - ) - - # post parameters - if post_params or files: - post_params = post_params if post_params else [] - post_params = self.sanitize_for_serialization(post_params) - post_params = self.parameters_to_tuples(post_params, collection_formats) - post_params.extend(self.files_parameters(files)) - - # auth setting - self.update_params_for_auth( - header_params, - query_params, - auth_settings, - resource_path, - method, - body, - request_auth=_request_auth, - ) - - # body - if body: - body = self.sanitize_for_serialization(body) - - # request url - if _host is None: - url = self.configuration.host + resource_path - else: - # use server/host defined in path or operation instead - url = _host + resource_path - - # query parameters - if query_params: - query_params = self.sanitize_for_serialization(query_params) - url_query = self.parameters_to_url_query(query_params, collection_formats) - url += "?" + url_query - - try: - # perform request and return response - response_data = self.request( - method, - url, - query_params=query_params, - headers=header_params, - post_params=post_params, - body=body, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - ) - except ApiException as e: - if e.body: - e.body = e.body.decode("utf-8") - raise e - - self.last_response = response_data - - return_data = None # assuming derialization is not needed - # data needs deserialization or returns HTTP data (deserialized) only - if _preload_content or _return_http_data_only: - response_type = response_types_map.get(str(response_data.status), None) - - if response_type == "bytearray": - response_data.data = response_data.data - else: - match = None - content_type = response_data.getheader("content-type") - if content_type is not None: - match = re.search(r"charset=([a-zA-Z\-\d]+)[\s;]?", content_type) - encoding = match.group(1) if match else "utf-8" - response_data.data = response_data.data.decode(encoding) - - # deserialize response data - if response_type == "bytearray": - return_data = response_data.data - elif response_type: - return_data = self.deserialize(response_data, response_type) - else: - return_data = None - - if _return_http_data_only: - return return_data - else: - return ApiResponse( - status_code=response_data.status, - data=return_data, - headers=response_data.getheaders(), - raw_data=response_data.data, - ) - - def sanitize_for_serialization(self, obj): - """Builds a JSON POST object. - - If obj is None, return None. - If obj is str, int, long, float, bool, return directly. - If obj is datetime.datetime, datetime.date - convert to string in iso8601 format. - If obj is list, sanitize each element in the list. - If obj is dict, return the dict. - If obj is OpenAPI model, return the properties dict. - - :param obj: The data to serialize. - :return: The serialized form of data. - """ - if obj is None: - return None - elif isinstance(obj, self.PRIMITIVE_TYPES): - return obj - elif isinstance(obj, list): - return [self.sanitize_for_serialization(sub_obj) for sub_obj in obj] - elif isinstance(obj, tuple): - return tuple(self.sanitize_for_serialization(sub_obj) for sub_obj in obj) - elif isinstance(obj, (datetime.datetime, datetime.date)): - return obj.isoformat() - - if isinstance(obj, dict): - obj_dict = obj - else: - # Convert model obj to dict except - # attributes `openapi_types`, `attribute_map` - # and attributes which value is not None. - # Convert attribute name to json key in - # model definition for request. - obj_dict = obj.to_dict() - - return { - key: self.sanitize_for_serialization(val) for key, val in obj_dict.items() - } - - def deserialize(self, response, response_type): - """Deserializes response into an object. - - :param response: RESTResponse object to be deserialized. - :param response_type: class literal for - deserialized object, or string of class name. - - :return: deserialized object. - """ - # handle file downloading - # save response body into a tmp file and return the instance - if response_type == "file": - return self.__deserialize_file(response) - - # fetch data from response object - try: - data = json.loads(response.data) - except ValueError: - data = response.data - - return self.__deserialize(data, response_type) - - def __deserialize(self, data, klass): - """Deserializes dict, list, str into an object. - - :param data: dict, list or str. - :param klass: class literal, or string of class name. - - :return: object. - """ - if data is None: - return None - - if type(klass) == str: - if klass.startswith("List["): - sub_kls = re.match(r"List\[(.*)]", klass).group(1) - return [self.__deserialize(sub_data, sub_kls) for sub_data in data] - - if klass.startswith("Dict["): - sub_kls = re.match(r"Dict\[([^,]*), (.*)]", klass).group(2) - return {k: self.__deserialize(v, sub_kls) for k, v in data.items()} - - # convert str to class - if klass in self.NATIVE_TYPES_MAPPING: - klass = self.NATIVE_TYPES_MAPPING[klass] - else: - klass = getattr(openchallenges_client.models, klass) - - if klass in self.PRIMITIVE_TYPES: - return self.__deserialize_primitive(data, klass) - elif klass == object: - return self.__deserialize_object(data) - elif klass == datetime.date: - return self.__deserialize_date(data) - elif klass == datetime.datetime: - return self.__deserialize_datetime(data) - else: - return self.__deserialize_model(data, klass) - - def call_api( - self, - resource_path, - method, - path_params=None, - query_params=None, - header_params=None, - body=None, - post_params=None, - files=None, - response_types_map=None, - auth_settings=None, - async_req=None, - _return_http_data_only=None, - collection_formats=None, - _preload_content=True, - _request_timeout=None, - _host=None, - _request_auth=None, - ): - """Makes the HTTP request (synchronous) and returns deserialized data. - - To make an async_req request, set the async_req parameter. - - :param resource_path: Path to method endpoint. - :param method: Method to call. - :param path_params: Path parameters in the url. - :param query_params: Query parameters in the url. - :param header_params: Header parameters to be - placed in the request header. - :param body: Request body. - :param post_params dict: Request post form parameters, - for `application/x-www-form-urlencoded`, `multipart/form-data`. - :param auth_settings list: Auth Settings names for the request. - :param response: Response data type. - :param files dict: key -> filename, value -> filepath, - for `multipart/form-data`. - :param async_req bool: execute request asynchronously - :param _return_http_data_only: response data instead of ApiResponse - object with status code, headers, etc - :param _preload_content: if False, the ApiResponse.data will - be set to none and raw_data will store the - HTTP response body without reading/decoding. - Default is True. - :param collection_formats: dict of collection formats for path, query, - header, and post parameters. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :type _request_token: dict, optional - :return: - If async_req parameter is True, - the request will be called asynchronously. - The method will return the request thread. - If parameter async_req is False or missing, - then the method will return the response directly. - """ - if not async_req: - return self.__call_api( - resource_path, - method, - path_params, - query_params, - header_params, - body, - post_params, - files, - response_types_map, - auth_settings, - _return_http_data_only, - collection_formats, - _preload_content, - _request_timeout, - _host, - _request_auth, - ) - - return self.pool.apply_async( - self.__call_api, - ( - resource_path, - method, - path_params, - query_params, - header_params, - body, - post_params, - files, - response_types_map, - auth_settings, - _return_http_data_only, - collection_formats, - _preload_content, - _request_timeout, - _host, - _request_auth, - ), - ) - - def request( - self, - method, - url, - query_params=None, - headers=None, - post_params=None, - body=None, - _preload_content=True, - _request_timeout=None, - ): - """Makes the HTTP request using RESTClient.""" - if method == "GET": - return self.rest_client.get_request( - url, - query_params=query_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - headers=headers, - ) - elif method == "HEAD": - return self.rest_client.head_request( - url, - query_params=query_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - headers=headers, - ) - elif method == "OPTIONS": - return self.rest_client.options_request( - url, - query_params=query_params, - headers=headers, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - ) - elif method == "POST": - return self.rest_client.post_request( - url, - query_params=query_params, - headers=headers, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body, - ) - elif method == "PUT": - return self.rest_client.put_request( - url, - query_params=query_params, - headers=headers, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body, - ) - elif method == "PATCH": - return self.rest_client.patch_request( - url, - query_params=query_params, - headers=headers, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body, - ) - elif method == "DELETE": - return self.rest_client.delete_request( - url, - query_params=query_params, - headers=headers, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body, - ) - else: - raise ApiValueError( - "http method must be `GET`, `HEAD`, `OPTIONS`," - " `POST`, `PATCH`, `PUT` or `DELETE`." - ) - - def parameters_to_tuples(self, params, collection_formats): - """Get parameters as list of tuples, formatting collections. - - :param params: Parameters as dict or list of two-tuples - :param dict collection_formats: Parameter collection formats - :return: Parameters as list of tuples, collections formatted - """ - new_params = [] - if collection_formats is None: - collection_formats = {} - for k, v in ( - params.items() if isinstance(params, dict) else params - ): # noqa: E501 - if k in collection_formats: - collection_format = collection_formats[k] - if collection_format == "multi": - new_params.extend((k, value) for value in v) - else: - if collection_format == "ssv": - delimiter = " " - elif collection_format == "tsv": - delimiter = "\t" - elif collection_format == "pipes": - delimiter = "|" - else: # csv is the default - delimiter = "," - new_params.append((k, delimiter.join(str(value) for value in v))) - else: - new_params.append((k, v)) - return new_params - - def parameters_to_url_query(self, params, collection_formats): - """Get parameters as list of tuples, formatting collections. - - :param params: Parameters as dict or list of two-tuples - :param dict collection_formats: Parameter collection formats - :return: URL query string (e.g. a=Hello%20World&b=123) - """ - new_params = [] - if collection_formats is None: - collection_formats = {} - for k, v in ( - params.items() if isinstance(params, dict) else params - ): # noqa: E501 - if isinstance(v, (int, float)): - v = str(v) - if isinstance(v, bool): - v = str(v).lower() - if isinstance(v, dict): - v = json.dumps(v) - - if k in collection_formats: - collection_format = collection_formats[k] - if collection_format == "multi": - new_params.extend((k, value) for value in v) - else: - if collection_format == "ssv": - delimiter = " " - elif collection_format == "tsv": - delimiter = "\t" - elif collection_format == "pipes": - delimiter = "|" - else: # csv is the default - delimiter = "," - new_params.append( - (k, delimiter.join(quote(str(value)) for value in v)) - ) - else: - new_params.append((k, quote(str(v)))) - - return "&".join(["=".join(item) for item in new_params]) - - def files_parameters(self, files=None): - """Builds form parameters. - - :param files: File parameters. - :return: Form parameters with files. - """ - params = [] - - if files: - for k, v in files.items(): - if not v: - continue - file_names = v if type(v) is list else [v] - for n in file_names: - with open(n, "rb") as f: - filename = os.path.basename(f.name) - filedata = f.read() - mimetype = ( - mimetypes.guess_type(filename)[0] - or "application/octet-stream" - ) - params.append(tuple([k, tuple([filename, filedata, mimetype])])) - - return params - - def select_header_accept(self, accepts): - """Returns `Accept` based on an array of accepts provided. - - :param accepts: List of headers. - :return: Accept (e.g. application/json). - """ - if not accepts: - return - - for accept in accepts: - if re.search("json", accept, re.IGNORECASE): - return accept - - return accepts[0] - - def select_header_content_type(self, content_types): - """Returns `Content-Type` based on an array of content_types provided. - - :param content_types: List of content-types. - :return: Content-Type (e.g. application/json). - """ - if not content_types: - return None - - for content_type in content_types: - if re.search("json", content_type, re.IGNORECASE): - return content_type - - return content_types[0] - - def update_params_for_auth( - self, - headers, - queries, - auth_settings, - resource_path, - method, - body, - request_auth=None, - ): - """Updates header and query params based on authentication setting. - - :param headers: Header parameters dict to be updated. - :param queries: Query parameters tuple list to be updated. - :param auth_settings: Authentication setting identifiers list. - :resource_path: A string representation of the HTTP request resource path. - :method: A string representation of the HTTP request method. - :body: A object representing the body of the HTTP request. - The object type is the return value of sanitize_for_serialization(). - :param request_auth: if set, the provided settings will - override the token in the configuration. - """ - if not auth_settings: - return - - if request_auth: - self._apply_auth_params( - headers, queries, resource_path, method, body, request_auth - ) - return - - for auth in auth_settings: - auth_setting = self.configuration.auth_settings().get(auth) - if auth_setting: - self._apply_auth_params( - headers, queries, resource_path, method, body, auth_setting - ) - - def _apply_auth_params( - self, headers, queries, resource_path, method, body, auth_setting - ): - """Updates the request parameters based on a single auth_setting - - :param headers: Header parameters dict to be updated. - :param queries: Query parameters tuple list to be updated. - :resource_path: A string representation of the HTTP request resource path. - :method: A string representation of the HTTP request method. - :body: A object representing the body of the HTTP request. - The object type is the return value of sanitize_for_serialization(). - :param auth_setting: auth settings for the endpoint - """ - if auth_setting["in"] == "cookie": - headers["Cookie"] = auth_setting["value"] - elif auth_setting["in"] == "header": - if auth_setting["type"] != "http-signature": - headers[auth_setting["key"]] = auth_setting["value"] - elif auth_setting["in"] == "query": - queries.append((auth_setting["key"], auth_setting["value"])) - else: - raise ApiValueError("Authentication token must be in `query` or `header`") - - def __deserialize_file(self, response): - """Deserializes body to file - - Saves response body into a file in a temporary folder, - using the filename from the `Content-Disposition` header if provided. - - :param response: RESTResponse. - :return: file path. - """ - fd, path = tempfile.mkstemp(dir=self.configuration.temp_folder_path) - os.close(fd) - os.remove(path) - - content_disposition = response.getheader("Content-Disposition") - if content_disposition: - filename = re.search( - r'filename=[\'"]?([^\'"\s]+)[\'"]?', content_disposition - ).group(1) - path = os.path.join(os.path.dirname(path), filename) - - with open(path, "wb") as f: - f.write(response.data) - - return path - - def __deserialize_primitive(self, data, klass): - """Deserializes string to primitive type. - - :param data: str. - :param klass: class literal. - - :return: int, long, float, str, bool. - """ - try: - return klass(data) - except UnicodeEncodeError: - return str(data) - except TypeError: - return data - - def __deserialize_object(self, value): - """Return an original value. - - :return: object. - """ - return value - - def __deserialize_date(self, string): - """Deserializes string to date. - - :param string: str. - :return: date. - """ - try: - return parse(string).date() - except ImportError: - return string - except ValueError: - raise rest.ApiException( - status=0, reason="Failed to parse `{0}` as date object".format(string) - ) - - def __deserialize_datetime(self, string): - """Deserializes string to datetime. - - The string should be in iso8601 datetime format. - - :param string: str. - :return: datetime. - """ - try: - return parse(string) - except ImportError: - return string - except ValueError: - raise rest.ApiException( - status=0, - reason=("Failed to parse `{0}` as datetime object".format(string)), - ) - - def __deserialize_model(self, data, klass): - """Deserializes list or dict to model. - - :param data: dict, list. - :param klass: class literal. - :return: model object. - """ - - return klass.from_dict(data) diff --git a/libs/openchallenges/api-client-python/openchallenges_client/api_response.py b/libs/openchallenges/api-client-python/openchallenges_client/api_response.py deleted file mode 100644 index 0af0a2dd5e..0000000000 --- a/libs/openchallenges/api-client-python/openchallenges_client/api_response.py +++ /dev/null @@ -1,26 +0,0 @@ -"""API response object.""" - -from __future__ import annotations -from typing import Any, Dict, Optional -from pydantic import Field, StrictInt, StrictStr - - -class ApiResponse: - """ - API response object - """ - - status_code: Optional[StrictInt] = Field(None, description="HTTP status code") - headers: Optional[Dict[StrictStr, StrictStr]] = Field( - None, description="HTTP headers" - ) - data: Optional[Any] = Field( - None, description="Deserialized data given the data type" - ) - raw_data: Optional[Any] = Field(None, description="Raw data (HTTP response body)") - - def __init__(self, status_code=None, headers=None, data=None, raw_data=None): - self.status_code = status_code - self.headers = headers - self.data = data - self.raw_data = raw_data diff --git a/libs/openchallenges/api-client-python/openchallenges_client/configuration.py b/libs/openchallenges/api-client-python/openchallenges_client/configuration.py deleted file mode 100644 index 5ff0c3173f..0000000000 --- a/libs/openchallenges/api-client-python/openchallenges_client/configuration.py +++ /dev/null @@ -1,452 +0,0 @@ -# coding: utf-8 - -""" - OpenChallenges REST API - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import copy -import logging -import multiprocessing -import sys -import urllib3 - -import http.client as httplib -from openchallenges_client.exceptions import ApiValueError - -JSON_SCHEMA_VALIDATION_KEYWORDS = { - "multipleOf", - "maximum", - "exclusiveMaximum", - "minimum", - "exclusiveMinimum", - "maxLength", - "minLength", - "pattern", - "maxItems", - "minItems", -} - - -class Configuration(object): - """This class contains various settings of the API client. - - :param host: Base url. - :param api_key: Dict to store API key(s). - Each entry in the dict specifies an API key. - The dict key is the name of the security scheme in the OAS specification. - The dict value is the API key secret. - :param api_key_prefix: Dict to store API prefix (e.g. Bearer). - The dict key is the name of the security scheme in the OAS specification. - The dict value is an API key prefix when generating the auth data. - :param username: Username for HTTP basic authentication. - :param password: Password for HTTP basic authentication. - :param access_token: Access token. - :param server_index: Index to servers configuration. - :param server_variables: Mapping with string values to replace variables in - templated server configuration. The validation of enums is performed for - variables with defined enum values before. - :param server_operation_index: Mapping from operation ID to an index to server - configuration. - :param server_operation_variables: Mapping from operation ID to a mapping with - string values to replace variables in templated server configuration. - The validation of enums is performed for variables with defined enum values before. - :param ssl_ca_cert: str - the path to a file of concatenated CA certificates - in PEM format. - - """ - - _default = None - - def __init__( - self, - host=None, - api_key=None, - api_key_prefix=None, - username=None, - password=None, - access_token=None, - server_index=None, - server_variables=None, - server_operation_index=None, - server_operation_variables=None, - ssl_ca_cert=None, - ): - """Constructor""" - self._base_path = "http://localhost/v1" if host is None else host - """Default Base url - """ - self.server_index = 0 if server_index is None and host is None else server_index - self.server_operation_index = server_operation_index or {} - """Default server index - """ - self.server_variables = server_variables or {} - self.server_operation_variables = server_operation_variables or {} - """Default server variables - """ - self.temp_folder_path = None - """Temp file folder for downloading files - """ - # Authentication Settings - self.api_key = {} - if api_key: - self.api_key = api_key - """dict to store API key(s) - """ - self.api_key_prefix = {} - if api_key_prefix: - self.api_key_prefix = api_key_prefix - """dict to store API prefix (e.g. Bearer) - """ - self.refresh_api_key_hook = None - """function hook to refresh API key if expired - """ - self.username = username - """Username for HTTP basic authentication - """ - self.password = password - """Password for HTTP basic authentication - """ - self.access_token = access_token - """Access token - """ - self.logger = {} - """Logging Settings - """ - self.logger["package_logger"] = logging.getLogger("openchallenges_client") - self.logger["urllib3_logger"] = logging.getLogger("urllib3") - self.logger_format = "%(asctime)s %(levelname)s %(message)s" - """Log format - """ - self.logger_stream_handler = None - """Log stream handler - """ - self.logger_file_handler = None - """Log file handler - """ - self.logger_file = None - """Debug file location - """ - self.debug = False - """Debug switch - """ - - self.verify_ssl = True - """SSL/TLS verification - Set this to false to skip verifying SSL certificate when calling API - from https server. - """ - self.ssl_ca_cert = ssl_ca_cert - """Set this to customize the certificate file to verify the peer. - """ - self.cert_file = None - """client certificate file - """ - self.key_file = None - """client key file - """ - self.assert_hostname = None - """Set this to True/False to enable/disable SSL hostname verification. - """ - self.tls_server_name = None - """SSL/TLS Server Name Indication (SNI) - Set this to the SNI value expected by the server. - """ - - self.connection_pool_maxsize = multiprocessing.cpu_count() * 5 - """urllib3 connection pool's maximum number of connections saved - per pool. urllib3 uses 1 connection as default value, but this is - not the best value when you are making a lot of possibly parallel - requests to the same host, which is often the case here. - cpu_count * 5 is used as default value to increase performance. - """ - - self.proxy = None - """Proxy URL - """ - self.proxy_headers = None - """Proxy headers - """ - self.safe_chars_for_path_param = "" - """Safe chars for path_param - """ - self.retries = None - """Adding retries to override urllib3 default value 3 - """ - # Enable client side validation - self.client_side_validation = True - - self.socket_options = None - """Options to pass down to the underlying urllib3 socket - """ - - self.datetime_format = "%Y-%m-%dT%H:%M:%S.%f%z" - """datetime format - """ - - self.date_format = "%Y-%m-%d" - """date format - """ - - def __deepcopy__(self, memo): - cls = self.__class__ - result = cls.__new__(cls) - memo[id(self)] = result - for k, v in self.__dict__.items(): - if k not in ("logger", "logger_file_handler"): - setattr(result, k, copy.deepcopy(v, memo)) - # shallow copy of loggers - result.logger = copy.copy(self.logger) - # use setters to configure loggers - result.logger_file = self.logger_file - result.debug = self.debug - return result - - def __setattr__(self, name, value): - object.__setattr__(self, name, value) - - @classmethod - def set_default(cls, default): - """Set default instance of configuration. - - It stores default configuration, which can be - returned by get_default_copy method. - - :param default: object of Configuration - """ - cls._default = default - - @classmethod - def get_default_copy(cls): - """Deprecated. Please use `get_default` instead. - - Deprecated. Please use `get_default` instead. - - :return: The configuration object. - """ - return cls.get_default() - - @classmethod - def get_default(cls): - """Return the default configuration. - - This method returns newly created, based on default constructor, - object of Configuration class or returns a copy of default - configuration. - - :return: The configuration object. - """ - if cls._default is None: - cls._default = Configuration() - return cls._default - - @property - def logger_file(self): - """The logger file. - - If the logger_file is None, then add stream handler and remove file - handler. Otherwise, add file handler and remove stream handler. - - :param value: The logger_file path. - :type: str - """ - return self.__logger_file - - @logger_file.setter - def logger_file(self, value): - """The logger file. - - If the logger_file is None, then add stream handler and remove file - handler. Otherwise, add file handler and remove stream handler. - - :param value: The logger_file path. - :type: str - """ - self.__logger_file = value - if self.__logger_file: - # If set logging file, - # then add file handler and remove stream handler. - self.logger_file_handler = logging.FileHandler(self.__logger_file) - self.logger_file_handler.setFormatter(self.logger_formatter) - for _, logger in self.logger.items(): - logger.addHandler(self.logger_file_handler) - - @property - def debug(self): - """Debug status - - :param value: The debug status, True or False. - :type: bool - """ - return self.__debug - - @debug.setter - def debug(self, value): - """Debug status - - :param value: The debug status, True or False. - :type: bool - """ - self.__debug = value - if self.__debug: - # if debug status is True, turn on debug logging - for _, logger in self.logger.items(): - logger.setLevel(logging.DEBUG) - # turn on httplib debug - httplib.HTTPConnection.debuglevel = 1 - else: - # if debug status is False, turn off debug logging, - # setting log level to default `logging.WARNING` - for _, logger in self.logger.items(): - logger.setLevel(logging.WARNING) - # turn off httplib debug - httplib.HTTPConnection.debuglevel = 0 - - @property - def logger_format(self): - """The logger format. - - The logger_formatter will be updated when sets logger_format. - - :param value: The format string. - :type: str - """ - return self.__logger_format - - @logger_format.setter - def logger_format(self, value): - """The logger format. - - The logger_formatter will be updated when sets logger_format. - - :param value: The format string. - :type: str - """ - self.__logger_format = value - self.logger_formatter = logging.Formatter(self.__logger_format) - - def get_api_key_with_prefix(self, identifier, alias=None): - """Gets API key (with prefix if set). - - :param identifier: The identifier of apiKey. - :param alias: The alternative identifier of apiKey. - :return: The token for api key authentication. - """ - if self.refresh_api_key_hook is not None: - self.refresh_api_key_hook(self) - key = self.api_key.get( - identifier, self.api_key.get(alias) if alias is not None else None - ) - if key: - prefix = self.api_key_prefix.get(identifier) - if prefix: - return "%s %s" % (prefix, key) - else: - return key - - def get_basic_auth_token(self): - """Gets HTTP basic authentication header (string). - - :return: The token for basic HTTP authentication. - """ - username = "" - if self.username is not None: - username = self.username - password = "" - if self.password is not None: - password = self.password - return urllib3.util.make_headers(basic_auth=username + ":" + password).get( - "authorization" - ) - - def auth_settings(self): - """Gets Auth Settings dict for api client. - - :return: The Auth Settings information dict. - """ - auth = {} - return auth - - def to_debug_report(self): - """Gets the essential information for debugging. - - :return: The report for debugging. - """ - return ( - "Python SDK Debug Report:\n" - "OS: {env}\n" - "Python Version: {pyversion}\n" - "Version of the API: 1.0.0\n" - "SDK Package Version: 1.0.0".format(env=sys.platform, pyversion=sys.version) - ) - - def get_host_settings(self): - """Gets an array of host settings - - :return: An array of host settings - """ - return [ - { - "url": "http://localhost/v1", - "description": "No description provided", - } - ] - - def get_host_from_settings(self, index, variables=None, servers=None): - """Gets host URL based on the index and variables - :param index: array index of the host settings - :param variables: hash of variable and the corresponding value - :param servers: an array of host settings or None - :return: URL based on host settings - """ - if index is None: - return self._base_path - - variables = {} if variables is None else variables - servers = self.get_host_settings() if servers is None else servers - - try: - server = servers[index] - except IndexError: - raise ValueError( - "Invalid index {0} when selecting the host settings. " - "Must be less than {1}".format(index, len(servers)) - ) - - url = server["url"] - - # go through variables and replace placeholders - for variable_name, variable in server.get("variables", {}).items(): - used_value = variables.get(variable_name, variable["default_value"]) - - if "enum_values" in variable and used_value not in variable["enum_values"]: - raise ValueError( - "The variable `{0}` in the host URL has invalid value " - "{1}. Must be {2}.".format( - variable_name, variables[variable_name], variable["enum_values"] - ) - ) - - url = url.replace("{" + variable_name + "}", used_value) - - return url - - @property - def host(self): - """Return generated host.""" - return self.get_host_from_settings( - self.server_index, variables=self.server_variables - ) - - @host.setter - def host(self, value): - """Fix base path.""" - self._base_path = value - self.server_index = None diff --git a/libs/openchallenges/api-client-python/openchallenges_client/exceptions.py b/libs/openchallenges/api-client-python/openchallenges_client/exceptions.py deleted file mode 100644 index 8324d48dde..0000000000 --- a/libs/openchallenges/api-client-python/openchallenges_client/exceptions.py +++ /dev/null @@ -1,165 +0,0 @@ -# coding: utf-8 - -""" - OpenChallenges REST API - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -class OpenApiException(Exception): - """The base exception class for all OpenAPIExceptions""" - - -class ApiTypeError(OpenApiException, TypeError): - def __init__(self, msg, path_to_item=None, valid_classes=None, key_type=None): - """Raises an exception for TypeErrors - - Args: - msg (str): the exception message - - Keyword Args: - path_to_item (list): a list of keys an indices to get to the - current_item - None if unset - valid_classes (tuple): the primitive classes that current item - should be an instance of - None if unset - key_type (bool): False if our value is a value in a dict - True if it is a key in a dict - False if our item is an item in a list - None if unset - """ - self.path_to_item = path_to_item - self.valid_classes = valid_classes - self.key_type = key_type - full_msg = msg - if path_to_item: - full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) - super(ApiTypeError, self).__init__(full_msg) - - -class ApiValueError(OpenApiException, ValueError): - def __init__(self, msg, path_to_item=None): - """ - Args: - msg (str): the exception message - - Keyword Args: - path_to_item (list) the path to the exception in the - received_data dict. None if unset - """ - - self.path_to_item = path_to_item - full_msg = msg - if path_to_item: - full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) - super(ApiValueError, self).__init__(full_msg) - - -class ApiAttributeError(OpenApiException, AttributeError): - def __init__(self, msg, path_to_item=None): - """ - Raised when an attribute reference or assignment fails. - - Args: - msg (str): the exception message - - Keyword Args: - path_to_item (None/list) the path to the exception in the - received_data dict - """ - self.path_to_item = path_to_item - full_msg = msg - if path_to_item: - full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) - super(ApiAttributeError, self).__init__(full_msg) - - -class ApiKeyError(OpenApiException, KeyError): - def __init__(self, msg, path_to_item=None): - """ - Args: - msg (str): the exception message - - Keyword Args: - path_to_item (None/list) the path to the exception in the - received_data dict - """ - self.path_to_item = path_to_item - full_msg = msg - if path_to_item: - full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) - super(ApiKeyError, self).__init__(full_msg) - - -class ApiException(OpenApiException): - - def __init__(self, status=None, reason=None, http_resp=None): - if http_resp: - self.status = http_resp.status - self.reason = http_resp.reason - self.body = http_resp.data - self.headers = http_resp.getheaders() - else: - self.status = status - self.reason = reason - self.body = None - self.headers = None - - def __str__(self): - """Custom error messages for exception""" - error_message = "({0})\n" "Reason: {1}\n".format(self.status, self.reason) - if self.headers: - error_message += "HTTP response headers: {0}\n".format(self.headers) - - if self.body: - error_message += "HTTP response body: {0}\n".format(self.body) - - return error_message - - -class BadRequestException(ApiException): - - def __init__(self, status=None, reason=None, http_resp=None): - super(BadRequestException, self).__init__(status, reason, http_resp) - - -class NotFoundException(ApiException): - - def __init__(self, status=None, reason=None, http_resp=None): - super(NotFoundException, self).__init__(status, reason, http_resp) - - -class UnauthorizedException(ApiException): - - def __init__(self, status=None, reason=None, http_resp=None): - super(UnauthorizedException, self).__init__(status, reason, http_resp) - - -class ForbiddenException(ApiException): - - def __init__(self, status=None, reason=None, http_resp=None): - super(ForbiddenException, self).__init__(status, reason, http_resp) - - -class ServiceException(ApiException): - - def __init__(self, status=None, reason=None, http_resp=None): - super(ServiceException, self).__init__(status, reason, http_resp) - - -def render_path(path_to_item): - """Returns a string representation of a path""" - result = "" - for pth in path_to_item: - if isinstance(pth, int): - result += "[{0}]".format(pth) - else: - result += "['{0}']".format(pth) - return result diff --git a/libs/openchallenges/api-client-python/openchallenges_client/models/__init__.py b/libs/openchallenges/api-client-python/openchallenges_client/models/__init__.py deleted file mode 100644 index 045a6c9266..0000000000 --- a/libs/openchallenges/api-client-python/openchallenges_client/models/__init__.py +++ /dev/null @@ -1,85 +0,0 @@ -# coding: utf-8 - -# flake8: noqa -""" - OpenChallenges REST API - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -# import models into model package -from openchallenges_client.models.basic_error import BasicError -from openchallenges_client.models.challenge import Challenge -from openchallenges_client.models.challenge_category import ChallengeCategory -from openchallenges_client.models.challenge_contribution import ChallengeContribution -from openchallenges_client.models.challenge_contribution_role import ( - ChallengeContributionRole, -) -from openchallenges_client.models.challenge_contributions_page import ( - ChallengeContributionsPage, -) -from openchallenges_client.models.challenge_difficulty import ChallengeDifficulty -from openchallenges_client.models.challenge_direction import ChallengeDirection -from openchallenges_client.models.challenge_incentive import ChallengeIncentive -from openchallenges_client.models.challenge_input_data_type import ( - ChallengeInputDataType, -) -from openchallenges_client.models.challenge_input_data_type_direction import ( - ChallengeInputDataTypeDirection, -) -from openchallenges_client.models.challenge_input_data_type_search_query import ( - ChallengeInputDataTypeSearchQuery, -) -from openchallenges_client.models.challenge_input_data_type_sort import ( - ChallengeInputDataTypeSort, -) -from openchallenges_client.models.challenge_input_data_types_page import ( - ChallengeInputDataTypesPage, -) -from openchallenges_client.models.challenge_platform import ChallengePlatform -from openchallenges_client.models.challenge_platform_direction import ( - ChallengePlatformDirection, -) -from openchallenges_client.models.challenge_platform_search_query import ( - ChallengePlatformSearchQuery, -) -from openchallenges_client.models.challenge_platform_sort import ChallengePlatformSort -from openchallenges_client.models.challenge_platforms_page import ChallengePlatformsPage -from openchallenges_client.models.challenge_search_query import ChallengeSearchQuery -from openchallenges_client.models.challenge_sort import ChallengeSort -from openchallenges_client.models.challenge_status import ChallengeStatus -from openchallenges_client.models.challenge_submission_type import ( - ChallengeSubmissionType, -) -from openchallenges_client.models.challenges_page import ChallengesPage -from openchallenges_client.models.challenges_per_year import ChallengesPerYear -from openchallenges_client.models.image import Image -from openchallenges_client.models.image_aspect_ratio import ImageAspectRatio -from openchallenges_client.models.image_height import ImageHeight -from openchallenges_client.models.image_query import ImageQuery -from openchallenges_client.models.organization import Organization -from openchallenges_client.models.organization_category import OrganizationCategory -from openchallenges_client.models.organization_direction import OrganizationDirection -from openchallenges_client.models.organization_search_query import ( - OrganizationSearchQuery, -) -from openchallenges_client.models.organization_sort import OrganizationSort -from openchallenges_client.models.organizations_page import OrganizationsPage -from openchallenges_client.models.page_metadata import PageMetadata -from openchallenges_client.models.simple_challenge_input_data_type import ( - SimpleChallengeInputDataType, -) -from openchallenges_client.models.simple_challenge_platform import ( - SimpleChallengePlatform, -) -from openchallenges_client.models.user import User -from openchallenges_client.models.user_create_request import UserCreateRequest -from openchallenges_client.models.user_create_response import UserCreateResponse -from openchallenges_client.models.user_status import UserStatus -from openchallenges_client.models.users_page import UsersPage diff --git a/libs/openchallenges/api-client-python/openchallenges_client/models/basic_error.py b/libs/openchallenges/api-client-python/openchallenges_client/models/basic_error.py deleted file mode 100644 index 05c2933cac..0000000000 --- a/libs/openchallenges/api-client-python/openchallenges_client/models/basic_error.py +++ /dev/null @@ -1,84 +0,0 @@ -# coding: utf-8 - -""" - OpenChallenges REST API - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - - -from typing import Optional -from pydantic import BaseModel, Field, StrictInt, StrictStr - - -class BasicError(BaseModel): - """ - Problem details (tools.ietf.org/html/rfc7807) - """ - - title: StrictStr = Field( - ..., description="A human readable documentation for the problem type" - ) - status: StrictInt = Field(..., description="The HTTP status code") - detail: Optional[StrictStr] = Field( - None, - description="A human readable explanation specific to this occurrence of the problem", - ) - type: Optional[StrictStr] = Field( - None, description="An absolute URI that identifies the problem type" - ) - __properties = ["title", "status", "detail", "type"] - - class Config: - """Pydantic configuration""" - - allow_population_by_field_name = True - validate_assignment = True - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> BasicError: - """Create an instance of BasicError from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self): - """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, exclude={}, exclude_none=True) - return _dict - - @classmethod - def from_dict(cls, obj: dict) -> BasicError: - """Create an instance of BasicError from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return BasicError.parse_obj(obj) - - _obj = BasicError.parse_obj( - { - "title": obj.get("title"), - "status": obj.get("status"), - "detail": obj.get("detail"), - "type": obj.get("type"), - } - ) - return _obj diff --git a/libs/openchallenges/api-client-python/openchallenges_client/models/challenge.py b/libs/openchallenges/api-client-python/openchallenges_client/models/challenge.py deleted file mode 100644 index 499ae81498..0000000000 --- a/libs/openchallenges/api-client-python/openchallenges_client/models/challenge.py +++ /dev/null @@ -1,203 +0,0 @@ -# coding: utf-8 - -""" - OpenChallenges REST API - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from datetime import date, datetime -from typing import List, Optional -from pydantic import BaseModel, Field, StrictInt, StrictStr, conlist, constr, validator -from openchallenges_client.models.challenge_difficulty import ChallengeDifficulty -from openchallenges_client.models.challenge_incentive import ChallengeIncentive -from openchallenges_client.models.challenge_status import ChallengeStatus -from openchallenges_client.models.challenge_submission_type import ( - ChallengeSubmissionType, -) -from openchallenges_client.models.simple_challenge_input_data_type import ( - SimpleChallengeInputDataType, -) -from openchallenges_client.models.simple_challenge_platform import ( - SimpleChallengePlatform, -) - - -class Challenge(BaseModel): - """ - A challenge - """ - - id: StrictInt = Field(..., description="The unique identifier of the challenge.") - slug: constr(strict=True, max_length=255, min_length=3) = Field( - ..., description="The slug of the challenge." - ) - name: constr(strict=True, max_length=255, min_length=3) = Field( - ..., description="The name of the challenge." - ) - headline: Optional[constr(strict=True, max_length=80, min_length=0)] = Field( - None, description="The headline of the challenge." - ) - description: constr(strict=True, max_length=1000, min_length=0) = Field( - ..., description="The description of the challenge." - ) - doi: Optional[StrictStr] = None - status: ChallengeStatus = Field(...) - difficulty: ChallengeDifficulty = Field(...) - platform: SimpleChallengePlatform = Field(...) - website_url: Optional[StrictStr] = Field(None, alias="websiteUrl") - avatar_url: Optional[StrictStr] = Field(None, alias="avatarUrl") - incentives: conlist(ChallengeIncentive) = Field(...) - submission_types: conlist(ChallengeSubmissionType) = Field( - ..., alias="submissionTypes" - ) - input_data_types: Optional[conlist(SimpleChallengeInputDataType)] = Field( - None, alias="inputDataTypes" - ) - start_date: Optional[date] = Field( - None, alias="startDate", description="The start date of the challenge." - ) - end_date: Optional[date] = Field( - None, alias="endDate", description="The end date of the challenge." - ) - starred_count: StrictInt = Field( - ..., - alias="starredCount", - description="The number of times the challenge has been starred by users.", - ) - created_at: datetime = Field(..., alias="createdAt") - updated_at: datetime = Field(..., alias="updatedAt") - __properties = [ - "id", - "slug", - "name", - "headline", - "description", - "doi", - "status", - "difficulty", - "platform", - "websiteUrl", - "avatarUrl", - "incentives", - "submissionTypes", - "inputDataTypes", - "startDate", - "endDate", - "starredCount", - "createdAt", - "updatedAt", - ] - - @validator("slug") - def slug_validate_regular_expression(cls, value): - """Validates the regular expression""" - if not re.match(r"^[a-z0-9]+(?:-[a-z0-9]+)*$", value): - raise ValueError( - r"must validate the regular expression /^[a-z0-9]+(?:-[a-z0-9]+)*$/" - ) - return value - - class Config: - """Pydantic configuration""" - - allow_population_by_field_name = True - validate_assignment = True - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Challenge: - """Create an instance of Challenge from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self): - """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, exclude={}, exclude_none=True) - # override the default output from pydantic by calling `to_dict()` of platform - if self.platform: - _dict["platform"] = self.platform.to_dict() - # override the default output from pydantic by calling `to_dict()` of each item in input_data_types (list) - _items = [] - if self.input_data_types: - for _item in self.input_data_types: - if _item: - _items.append(_item.to_dict()) - _dict["inputDataTypes"] = _items - # set to None if start_date (nullable) is None - # and __fields_set__ contains the field - if self.start_date is None and "start_date" in self.__fields_set__: - _dict["startDate"] = None - - # set to None if end_date (nullable) is None - # and __fields_set__ contains the field - if self.end_date is None and "end_date" in self.__fields_set__: - _dict["endDate"] = None - - return _dict - - @classmethod - def from_dict(cls, obj: dict) -> Challenge: - """Create an instance of Challenge from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return Challenge.parse_obj(obj) - - _obj = Challenge.parse_obj( - { - "id": obj.get("id"), - "slug": obj.get("slug"), - "name": obj.get("name"), - "headline": obj.get("headline"), - "description": obj.get("description"), - "doi": obj.get("doi"), - "status": obj.get("status"), - "difficulty": obj.get("difficulty"), - "platform": ( - SimpleChallengePlatform.from_dict(obj.get("platform")) - if obj.get("platform") is not None - else None - ), - "website_url": obj.get("websiteUrl"), - "avatar_url": obj.get("avatarUrl"), - "incentives": obj.get("incentives"), - "submission_types": obj.get("submissionTypes"), - "input_data_types": ( - [ - SimpleChallengeInputDataType.from_dict(_item) - for _item in obj.get("inputDataTypes") - ] - if obj.get("inputDataTypes") is not None - else None - ), - "start_date": obj.get("startDate"), - "end_date": obj.get("endDate"), - "starred_count": ( - obj.get("starredCount") - if obj.get("starredCount") is not None - else 0 - ), - "created_at": obj.get("createdAt"), - "updated_at": obj.get("updatedAt"), - } - ) - return _obj diff --git a/libs/openchallenges/api-client-python/openchallenges_client/models/challenge_category.py b/libs/openchallenges/api-client-python/openchallenges_client/models/challenge_category.py deleted file mode 100644 index d851eb85a8..0000000000 --- a/libs/openchallenges/api-client-python/openchallenges_client/models/challenge_category.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding: utf-8 - -""" - OpenChallenges REST API - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import json -import pprint -import re # noqa: F401 -from aenum import Enum, no_arg - - -class ChallengeCategory(str, Enum): - """ - The category of the challenge. - """ - - """ - allowed enum values - """ - FEATURED = "featured" - STARTING_SOON = "starting_soon" - ENDING_SOON = "ending_soon" - RECENTLY_STARTED = "recently_started" - RECENTLY_ENDED = "recently_ended" - - @classmethod - def from_json(cls, json_str: str) -> ChallengeCategory: - """Create an instance of ChallengeCategory from a JSON string""" - return ChallengeCategory(json.loads(json_str)) diff --git a/libs/openchallenges/api-client-python/openchallenges_client/models/challenge_contribution.py b/libs/openchallenges/api-client-python/openchallenges_client/models/challenge_contribution.py deleted file mode 100644 index dc14eabfcc..0000000000 --- a/libs/openchallenges/api-client-python/openchallenges_client/models/challenge_contribution.py +++ /dev/null @@ -1,83 +0,0 @@ -# coding: utf-8 - -""" - OpenChallenges REST API - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - - -from pydantic import BaseModel, Field, StrictInt -from openchallenges_client.models.challenge_contribution_role import ( - ChallengeContributionRole, -) - - -class ChallengeContribution(BaseModel): - """ - A challenge contribution. - """ - - challenge_id: StrictInt = Field( - ..., alias="challengeId", description="The unique identifier of the challenge." - ) - organization_id: StrictInt = Field( - ..., - alias="organizationId", - description="The unique identifier of an organization", - ) - role: ChallengeContributionRole = Field(...) - __properties = ["challengeId", "organizationId", "role"] - - class Config: - """Pydantic configuration""" - - allow_population_by_field_name = True - validate_assignment = True - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> ChallengeContribution: - """Create an instance of ChallengeContribution from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self): - """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, exclude={}, exclude_none=True) - return _dict - - @classmethod - def from_dict(cls, obj: dict) -> ChallengeContribution: - """Create an instance of ChallengeContribution from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return ChallengeContribution.parse_obj(obj) - - _obj = ChallengeContribution.parse_obj( - { - "challenge_id": obj.get("challengeId"), - "organization_id": obj.get("organizationId"), - "role": obj.get("role"), - } - ) - return _obj diff --git a/libs/openchallenges/api-client-python/openchallenges_client/models/challenge_contribution_role.py b/libs/openchallenges/api-client-python/openchallenges_client/models/challenge_contribution_role.py deleted file mode 100644 index a93fb1c952..0000000000 --- a/libs/openchallenges/api-client-python/openchallenges_client/models/challenge_contribution_role.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding: utf-8 - -""" - OpenChallenges REST API - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import json -import pprint -import re # noqa: F401 -from aenum import Enum, no_arg - - -class ChallengeContributionRole(str, Enum): - """ - The nature of a challenge contribution. - """ - - """ - allowed enum values - """ - CHALLENGE_ORGANIZER = "challenge_organizer" - DATA_CONTRIBUTOR = "data_contributor" - SPONSOR = "sponsor" - - @classmethod - def from_json(cls, json_str: str) -> ChallengeContributionRole: - """Create an instance of ChallengeContributionRole from a JSON string""" - return ChallengeContributionRole(json.loads(json_str)) diff --git a/libs/openchallenges/api-client-python/openchallenges_client/models/challenge_contributions_page.py b/libs/openchallenges/api-client-python/openchallenges_client/models/challenge_contributions_page.py deleted file mode 100644 index 5a819d7ff6..0000000000 --- a/libs/openchallenges/api-client-python/openchallenges_client/models/challenge_contributions_page.py +++ /dev/null @@ -1,120 +0,0 @@ -# coding: utf-8 - -""" - OpenChallenges REST API - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - - -from typing import List -from pydantic import BaseModel, Field, StrictBool, StrictInt, conlist -from openchallenges_client.models.challenge_contribution import ChallengeContribution - - -class ChallengeContributionsPage(BaseModel): - """ - A page of challenge challenge contributions. - """ - - number: StrictInt = Field(..., description="The page number.") - size: StrictInt = Field(..., description="The number of items in a single page.") - total_elements: StrictInt = Field( - ..., - alias="totalElements", - description="Total number of elements in the result set.", - ) - total_pages: StrictInt = Field( - ..., alias="totalPages", description="Total number of pages in the result set." - ) - has_next: StrictBool = Field( - ..., alias="hasNext", description="Returns if there is a next page." - ) - has_previous: StrictBool = Field( - ..., alias="hasPrevious", description="Returns if there is a previous page." - ) - challenge_contributions: conlist(ChallengeContribution) = Field( - ..., - alias="challengeContributions", - description="A list of challenge contributions.", - ) - __properties = [ - "number", - "size", - "totalElements", - "totalPages", - "hasNext", - "hasPrevious", - "challengeContributions", - ] - - class Config: - """Pydantic configuration""" - - allow_population_by_field_name = True - validate_assignment = True - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> ChallengeContributionsPage: - """Create an instance of ChallengeContributionsPage from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self): - """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, exclude={}, exclude_none=True) - # override the default output from pydantic by calling `to_dict()` of each item in challenge_contributions (list) - _items = [] - if self.challenge_contributions: - for _item in self.challenge_contributions: - if _item: - _items.append(_item.to_dict()) - _dict["challengeContributions"] = _items - return _dict - - @classmethod - def from_dict(cls, obj: dict) -> ChallengeContributionsPage: - """Create an instance of ChallengeContributionsPage from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return ChallengeContributionsPage.parse_obj(obj) - - _obj = ChallengeContributionsPage.parse_obj( - { - "number": obj.get("number"), - "size": obj.get("size"), - "total_elements": obj.get("totalElements"), - "total_pages": obj.get("totalPages"), - "has_next": obj.get("hasNext"), - "has_previous": obj.get("hasPrevious"), - "challenge_contributions": ( - [ - ChallengeContribution.from_dict(_item) - for _item in obj.get("challengeContributions") - ] - if obj.get("challengeContributions") is not None - else None - ), - } - ) - return _obj diff --git a/libs/openchallenges/api-client-python/openchallenges_client/models/challenge_difficulty.py b/libs/openchallenges/api-client-python/openchallenges_client/models/challenge_difficulty.py deleted file mode 100644 index 70516db5ef..0000000000 --- a/libs/openchallenges/api-client-python/openchallenges_client/models/challenge_difficulty.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding: utf-8 - -""" - OpenChallenges REST API - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import json -import pprint -import re # noqa: F401 -from aenum import Enum, no_arg - - -class ChallengeDifficulty(str, Enum): - """ - The difficulty level of a challenge. - """ - - """ - allowed enum values - """ - GOOD_FOR_BEGINNERS = "good_for_beginners" - INTERMEDIATE = "intermediate" - ADVANCED = "advanced" - - @classmethod - def from_json(cls, json_str: str) -> ChallengeDifficulty: - """Create an instance of ChallengeDifficulty from a JSON string""" - return ChallengeDifficulty(json.loads(json_str)) diff --git a/libs/openchallenges/api-client-python/openchallenges_client/models/challenge_direction.py b/libs/openchallenges/api-client-python/openchallenges_client/models/challenge_direction.py deleted file mode 100644 index 8bfe8687f7..0000000000 --- a/libs/openchallenges/api-client-python/openchallenges_client/models/challenge_direction.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding: utf-8 - -""" - OpenChallenges REST API - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import json -import pprint -import re # noqa: F401 -from aenum import Enum, no_arg - - -class ChallengeDirection(str, Enum): - """ - The direction to sort the results by. - """ - - """ - allowed enum values - """ - ASC = "asc" - DESC = "desc" - - @classmethod - def from_json(cls, json_str: str) -> ChallengeDirection: - """Create an instance of ChallengeDirection from a JSON string""" - return ChallengeDirection(json.loads(json_str)) diff --git a/libs/openchallenges/api-client-python/openchallenges_client/models/challenge_incentive.py b/libs/openchallenges/api-client-python/openchallenges_client/models/challenge_incentive.py deleted file mode 100644 index a5afff4072..0000000000 --- a/libs/openchallenges/api-client-python/openchallenges_client/models/challenge_incentive.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding: utf-8 - -""" - OpenChallenges REST API - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import json -import pprint -import re # noqa: F401 -from aenum import Enum, no_arg - - -class ChallengeIncentive(str, Enum): - """ - The incentive type of the challenge. - """ - - """ - allowed enum values - """ - MONETARY = "monetary" - PUBLICATION = "publication" - SPEAKING_ENGAGEMENT = "speaking_engagement" - OTHER = "other" - - @classmethod - def from_json(cls, json_str: str) -> ChallengeIncentive: - """Create an instance of ChallengeIncentive from a JSON string""" - return ChallengeIncentive(json.loads(json_str)) diff --git a/libs/openchallenges/api-client-python/openchallenges_client/models/challenge_input_data_type.py b/libs/openchallenges/api-client-python/openchallenges_client/models/challenge_input_data_type.py deleted file mode 100644 index 8118eae771..0000000000 --- a/libs/openchallenges/api-client-python/openchallenges_client/models/challenge_input_data_type.py +++ /dev/null @@ -1,94 +0,0 @@ -# coding: utf-8 - -""" - OpenChallenges REST API - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from datetime import datetime - -from pydantic import BaseModel, Field, StrictInt, constr, validator - - -class ChallengeInputDataType(BaseModel): - """ - A challenge input data type. - """ - - id: StrictInt = Field( - ..., description="The unique identifier of a challenge input data type." - ) - slug: constr(strict=True, max_length=30, min_length=3) = Field( - ..., description="The slug of the challenge input data type." - ) - name: constr(strict=True, max_length=50, min_length=3) = Field( - ..., description="The name of the challenge input data type." - ) - created_at: datetime = Field(..., alias="createdAt") - updated_at: datetime = Field(..., alias="updatedAt") - __properties = ["id", "slug", "name", "createdAt", "updatedAt"] - - @validator("slug") - def slug_validate_regular_expression(cls, value): - """Validates the regular expression""" - if not re.match(r"^[a-z0-9]+(?:-[a-z0-9]+)*$", value): - raise ValueError( - r"must validate the regular expression /^[a-z0-9]+(?:-[a-z0-9]+)*$/" - ) - return value - - class Config: - """Pydantic configuration""" - - allow_population_by_field_name = True - validate_assignment = True - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> ChallengeInputDataType: - """Create an instance of ChallengeInputDataType from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self): - """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, exclude={}, exclude_none=True) - return _dict - - @classmethod - def from_dict(cls, obj: dict) -> ChallengeInputDataType: - """Create an instance of ChallengeInputDataType from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return ChallengeInputDataType.parse_obj(obj) - - _obj = ChallengeInputDataType.parse_obj( - { - "id": obj.get("id"), - "slug": obj.get("slug"), - "name": obj.get("name"), - "created_at": obj.get("createdAt"), - "updated_at": obj.get("updatedAt"), - } - ) - return _obj diff --git a/libs/openchallenges/api-client-python/openchallenges_client/models/challenge_input_data_type_direction.py b/libs/openchallenges/api-client-python/openchallenges_client/models/challenge_input_data_type_direction.py deleted file mode 100644 index adb8f45e42..0000000000 --- a/libs/openchallenges/api-client-python/openchallenges_client/models/challenge_input_data_type_direction.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding: utf-8 - -""" - OpenChallenges REST API - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import json -import pprint -import re # noqa: F401 -from aenum import Enum, no_arg - - -class ChallengeInputDataTypeDirection(str, Enum): - """ - The direction to sort the results by. - """ - - """ - allowed enum values - """ - ASC = "asc" - DESC = "desc" - - @classmethod - def from_json(cls, json_str: str) -> ChallengeInputDataTypeDirection: - """Create an instance of ChallengeInputDataTypeDirection from a JSON string""" - return ChallengeInputDataTypeDirection(json.loads(json_str)) diff --git a/libs/openchallenges/api-client-python/openchallenges_client/models/challenge_input_data_type_search_query.py b/libs/openchallenges/api-client-python/openchallenges_client/models/challenge_input_data_type_search_query.py deleted file mode 100644 index 89f35ecea5..0000000000 --- a/libs/openchallenges/api-client-python/openchallenges_client/models/challenge_input_data_type_search_query.py +++ /dev/null @@ -1,102 +0,0 @@ -# coding: utf-8 - -""" - OpenChallenges REST API - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - - -from typing import Optional -from pydantic import BaseModel, Field, StrictStr, conint -from openchallenges_client.models.challenge_input_data_type_direction import ( - ChallengeInputDataTypeDirection, -) -from openchallenges_client.models.challenge_input_data_type_sort import ( - ChallengeInputDataTypeSort, -) - - -class ChallengeInputDataTypeSearchQuery(BaseModel): - """ - A challenge input data type search query. - """ - - page_number: Optional[conint(strict=True, ge=0)] = Field( - 0, alias="pageNumber", description="The page number." - ) - page_size: Optional[conint(strict=True, ge=1)] = Field( - 100, alias="pageSize", description="The number of items in a single page." - ) - sort: Optional[ChallengeInputDataTypeSort] = None - direction: Optional[ChallengeInputDataTypeDirection] = None - search_terms: Optional[StrictStr] = Field( - None, - alias="searchTerms", - description="A string of search terms used to filter the results.", - ) - __properties = ["pageNumber", "pageSize", "sort", "direction", "searchTerms"] - - class Config: - """Pydantic configuration""" - - allow_population_by_field_name = True - validate_assignment = True - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> ChallengeInputDataTypeSearchQuery: - """Create an instance of ChallengeInputDataTypeSearchQuery from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self): - """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, exclude={}, exclude_none=True) - # set to None if direction (nullable) is None - # and __fields_set__ contains the field - if self.direction is None and "direction" in self.__fields_set__: - _dict["direction"] = None - - return _dict - - @classmethod - def from_dict(cls, obj: dict) -> ChallengeInputDataTypeSearchQuery: - """Create an instance of ChallengeInputDataTypeSearchQuery from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return ChallengeInputDataTypeSearchQuery.parse_obj(obj) - - _obj = ChallengeInputDataTypeSearchQuery.parse_obj( - { - "page_number": ( - obj.get("pageNumber") if obj.get("pageNumber") is not None else 0 - ), - "page_size": ( - obj.get("pageSize") if obj.get("pageSize") is not None else 100 - ), - "sort": obj.get("sort"), - "direction": obj.get("direction"), - "search_terms": obj.get("searchTerms"), - } - ) - return _obj diff --git a/libs/openchallenges/api-client-python/openchallenges_client/models/challenge_input_data_type_sort.py b/libs/openchallenges/api-client-python/openchallenges_client/models/challenge_input_data_type_sort.py deleted file mode 100644 index 81cfd38af3..0000000000 --- a/libs/openchallenges/api-client-python/openchallenges_client/models/challenge_input_data_type_sort.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding: utf-8 - -""" - OpenChallenges REST API - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import json -import pprint -import re # noqa: F401 -from aenum import Enum, no_arg - - -class ChallengeInputDataTypeSort(str, Enum): - """ - What to sort results by. - """ - - """ - allowed enum values - """ - NAME = "name" - RELEVANCE = "relevance" - - @classmethod - def from_json(cls, json_str: str) -> ChallengeInputDataTypeSort: - """Create an instance of ChallengeInputDataTypeSort from a JSON string""" - return ChallengeInputDataTypeSort(json.loads(json_str)) diff --git a/libs/openchallenges/api-client-python/openchallenges_client/models/challenge_input_data_types_page.py b/libs/openchallenges/api-client-python/openchallenges_client/models/challenge_input_data_types_page.py deleted file mode 100644 index d5a0ce51f6..0000000000 --- a/libs/openchallenges/api-client-python/openchallenges_client/models/challenge_input_data_types_page.py +++ /dev/null @@ -1,122 +0,0 @@ -# coding: utf-8 - -""" - OpenChallenges REST API - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - - -from typing import List -from pydantic import BaseModel, Field, StrictBool, StrictInt, conlist -from openchallenges_client.models.challenge_input_data_type import ( - ChallengeInputDataType, -) - - -class ChallengeInputDataTypesPage(BaseModel): - """ - A page of challenge input data types. - """ - - number: StrictInt = Field(..., description="The page number.") - size: StrictInt = Field(..., description="The number of items in a single page.") - total_elements: StrictInt = Field( - ..., - alias="totalElements", - description="Total number of elements in the result set.", - ) - total_pages: StrictInt = Field( - ..., alias="totalPages", description="Total number of pages in the result set." - ) - has_next: StrictBool = Field( - ..., alias="hasNext", description="Returns if there is a next page." - ) - has_previous: StrictBool = Field( - ..., alias="hasPrevious", description="Returns if there is a previous page." - ) - challenge_input_data_types: conlist(ChallengeInputDataType) = Field( - ..., - alias="challengeInputDataTypes", - description="A list of challenge input data types.", - ) - __properties = [ - "number", - "size", - "totalElements", - "totalPages", - "hasNext", - "hasPrevious", - "challengeInputDataTypes", - ] - - class Config: - """Pydantic configuration""" - - allow_population_by_field_name = True - validate_assignment = True - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> ChallengeInputDataTypesPage: - """Create an instance of ChallengeInputDataTypesPage from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self): - """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, exclude={}, exclude_none=True) - # override the default output from pydantic by calling `to_dict()` of each item in challenge_input_data_types (list) - _items = [] - if self.challenge_input_data_types: - for _item in self.challenge_input_data_types: - if _item: - _items.append(_item.to_dict()) - _dict["challengeInputDataTypes"] = _items - return _dict - - @classmethod - def from_dict(cls, obj: dict) -> ChallengeInputDataTypesPage: - """Create an instance of ChallengeInputDataTypesPage from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return ChallengeInputDataTypesPage.parse_obj(obj) - - _obj = ChallengeInputDataTypesPage.parse_obj( - { - "number": obj.get("number"), - "size": obj.get("size"), - "total_elements": obj.get("totalElements"), - "total_pages": obj.get("totalPages"), - "has_next": obj.get("hasNext"), - "has_previous": obj.get("hasPrevious"), - "challenge_input_data_types": ( - [ - ChallengeInputDataType.from_dict(_item) - for _item in obj.get("challengeInputDataTypes") - ] - if obj.get("challengeInputDataTypes") is not None - else None - ), - } - ) - return _obj diff --git a/libs/openchallenges/api-client-python/openchallenges_client/models/challenge_platform.py b/libs/openchallenges/api-client-python/openchallenges_client/models/challenge_platform.py deleted file mode 100644 index 220dcbd9d5..0000000000 --- a/libs/openchallenges/api-client-python/openchallenges_client/models/challenge_platform.py +++ /dev/null @@ -1,106 +0,0 @@ -# coding: utf-8 - -""" - OpenChallenges REST API - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from datetime import datetime - -from pydantic import BaseModel, Field, StrictInt, StrictStr, constr, validator - - -class ChallengePlatform(BaseModel): - """ - A challenge platform - """ - - id: StrictInt = Field( - ..., description="The unique identifier of a challenge platform." - ) - slug: constr(strict=True, max_length=30, min_length=3) = Field( - ..., description="The slug of the challenge platform." - ) - name: constr(strict=True, max_length=30, min_length=3) = Field( - ..., description="The name of the challenge platform." - ) - avatar_url: StrictStr = Field(..., alias="avatarUrl") - website_url: StrictStr = Field(..., alias="websiteUrl") - created_at: datetime = Field(..., alias="createdAt") - updated_at: datetime = Field(..., alias="updatedAt") - __properties = [ - "id", - "slug", - "name", - "avatarUrl", - "websiteUrl", - "createdAt", - "updatedAt", - ] - - @validator("slug") - def slug_validate_regular_expression(cls, value): - """Validates the regular expression""" - if not re.match(r"^[a-z0-9]+(?:-[a-z0-9]+)*$", value): - raise ValueError( - r"must validate the regular expression /^[a-z0-9]+(?:-[a-z0-9]+)*$/" - ) - return value - - class Config: - """Pydantic configuration""" - - allow_population_by_field_name = True - validate_assignment = True - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> ChallengePlatform: - """Create an instance of ChallengePlatform from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self): - """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, exclude={}, exclude_none=True) - return _dict - - @classmethod - def from_dict(cls, obj: dict) -> ChallengePlatform: - """Create an instance of ChallengePlatform from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return ChallengePlatform.parse_obj(obj) - - _obj = ChallengePlatform.parse_obj( - { - "id": obj.get("id"), - "slug": obj.get("slug"), - "name": obj.get("name"), - "avatar_url": obj.get("avatarUrl"), - "website_url": obj.get("websiteUrl"), - "created_at": obj.get("createdAt"), - "updated_at": obj.get("updatedAt"), - } - ) - return _obj diff --git a/libs/openchallenges/api-client-python/openchallenges_client/models/challenge_platform_direction.py b/libs/openchallenges/api-client-python/openchallenges_client/models/challenge_platform_direction.py deleted file mode 100644 index 8f2f6b48af..0000000000 --- a/libs/openchallenges/api-client-python/openchallenges_client/models/challenge_platform_direction.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding: utf-8 - -""" - OpenChallenges REST API - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import json -import pprint -import re # noqa: F401 -from aenum import Enum, no_arg - - -class ChallengePlatformDirection(str, Enum): - """ - The direction to sort the results by. - """ - - """ - allowed enum values - """ - ASC = "asc" - DESC = "desc" - - @classmethod - def from_json(cls, json_str: str) -> ChallengePlatformDirection: - """Create an instance of ChallengePlatformDirection from a JSON string""" - return ChallengePlatformDirection(json.loads(json_str)) diff --git a/libs/openchallenges/api-client-python/openchallenges_client/models/challenge_platform_search_query.py b/libs/openchallenges/api-client-python/openchallenges_client/models/challenge_platform_search_query.py deleted file mode 100644 index 8ee19ff8ce..0000000000 --- a/libs/openchallenges/api-client-python/openchallenges_client/models/challenge_platform_search_query.py +++ /dev/null @@ -1,100 +0,0 @@ -# coding: utf-8 - -""" - OpenChallenges REST API - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - - -from typing import Optional -from pydantic import BaseModel, Field, StrictStr, conint -from openchallenges_client.models.challenge_platform_direction import ( - ChallengePlatformDirection, -) -from openchallenges_client.models.challenge_platform_sort import ChallengePlatformSort - - -class ChallengePlatformSearchQuery(BaseModel): - """ - A challenge platform search query. - """ - - page_number: Optional[conint(strict=True, ge=0)] = Field( - 0, alias="pageNumber", description="The page number." - ) - page_size: Optional[conint(strict=True, ge=1)] = Field( - 100, alias="pageSize", description="The number of items in a single page." - ) - sort: Optional[ChallengePlatformSort] = None - direction: Optional[ChallengePlatformDirection] = None - search_terms: Optional[StrictStr] = Field( - None, - alias="searchTerms", - description="A string of search terms used to filter the results.", - ) - __properties = ["pageNumber", "pageSize", "sort", "direction", "searchTerms"] - - class Config: - """Pydantic configuration""" - - allow_population_by_field_name = True - validate_assignment = True - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> ChallengePlatformSearchQuery: - """Create an instance of ChallengePlatformSearchQuery from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self): - """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, exclude={}, exclude_none=True) - # set to None if direction (nullable) is None - # and __fields_set__ contains the field - if self.direction is None and "direction" in self.__fields_set__: - _dict["direction"] = None - - return _dict - - @classmethod - def from_dict(cls, obj: dict) -> ChallengePlatformSearchQuery: - """Create an instance of ChallengePlatformSearchQuery from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return ChallengePlatformSearchQuery.parse_obj(obj) - - _obj = ChallengePlatformSearchQuery.parse_obj( - { - "page_number": ( - obj.get("pageNumber") if obj.get("pageNumber") is not None else 0 - ), - "page_size": ( - obj.get("pageSize") if obj.get("pageSize") is not None else 100 - ), - "sort": obj.get("sort"), - "direction": obj.get("direction"), - "search_terms": obj.get("searchTerms"), - } - ) - return _obj diff --git a/libs/openchallenges/api-client-python/openchallenges_client/models/challenge_platform_sort.py b/libs/openchallenges/api-client-python/openchallenges_client/models/challenge_platform_sort.py deleted file mode 100644 index 2d8713a0f8..0000000000 --- a/libs/openchallenges/api-client-python/openchallenges_client/models/challenge_platform_sort.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding: utf-8 - -""" - OpenChallenges REST API - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import json -import pprint -import re # noqa: F401 -from aenum import Enum, no_arg - - -class ChallengePlatformSort(str, Enum): - """ - What to sort results by. - """ - - """ - allowed enum values - """ - NAME = "name" - RELEVANCE = "relevance" - - @classmethod - def from_json(cls, json_str: str) -> ChallengePlatformSort: - """Create an instance of ChallengePlatformSort from a JSON string""" - return ChallengePlatformSort(json.loads(json_str)) diff --git a/libs/openchallenges/api-client-python/openchallenges_client/models/challenge_platforms_page.py b/libs/openchallenges/api-client-python/openchallenges_client/models/challenge_platforms_page.py deleted file mode 100644 index 67c0737705..0000000000 --- a/libs/openchallenges/api-client-python/openchallenges_client/models/challenge_platforms_page.py +++ /dev/null @@ -1,118 +0,0 @@ -# coding: utf-8 - -""" - OpenChallenges REST API - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - - -from typing import List -from pydantic import BaseModel, Field, StrictBool, StrictInt, conlist -from openchallenges_client.models.challenge_platform import ChallengePlatform - - -class ChallengePlatformsPage(BaseModel): - """ - A page of challenge platforms. - """ - - number: StrictInt = Field(..., description="The page number.") - size: StrictInt = Field(..., description="The number of items in a single page.") - total_elements: StrictInt = Field( - ..., - alias="totalElements", - description="Total number of elements in the result set.", - ) - total_pages: StrictInt = Field( - ..., alias="totalPages", description="Total number of pages in the result set." - ) - has_next: StrictBool = Field( - ..., alias="hasNext", description="Returns if there is a next page." - ) - has_previous: StrictBool = Field( - ..., alias="hasPrevious", description="Returns if there is a previous page." - ) - challenge_platforms: conlist(ChallengePlatform) = Field( - ..., alias="challengePlatforms", description="A list of challenge platforms." - ) - __properties = [ - "number", - "size", - "totalElements", - "totalPages", - "hasNext", - "hasPrevious", - "challengePlatforms", - ] - - class Config: - """Pydantic configuration""" - - allow_population_by_field_name = True - validate_assignment = True - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> ChallengePlatformsPage: - """Create an instance of ChallengePlatformsPage from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self): - """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, exclude={}, exclude_none=True) - # override the default output from pydantic by calling `to_dict()` of each item in challenge_platforms (list) - _items = [] - if self.challenge_platforms: - for _item in self.challenge_platforms: - if _item: - _items.append(_item.to_dict()) - _dict["challengePlatforms"] = _items - return _dict - - @classmethod - def from_dict(cls, obj: dict) -> ChallengePlatformsPage: - """Create an instance of ChallengePlatformsPage from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return ChallengePlatformsPage.parse_obj(obj) - - _obj = ChallengePlatformsPage.parse_obj( - { - "number": obj.get("number"), - "size": obj.get("size"), - "total_elements": obj.get("totalElements"), - "total_pages": obj.get("totalPages"), - "has_next": obj.get("hasNext"), - "has_previous": obj.get("hasPrevious"), - "challenge_platforms": ( - [ - ChallengePlatform.from_dict(_item) - for _item in obj.get("challengePlatforms") - ] - if obj.get("challengePlatforms") is not None - else None - ), - } - ) - return _obj diff --git a/libs/openchallenges/api-client-python/openchallenges_client/models/challenge_search_query.py b/libs/openchallenges/api-client-python/openchallenges_client/models/challenge_search_query.py deleted file mode 100644 index c56db623e6..0000000000 --- a/libs/openchallenges/api-client-python/openchallenges_client/models/challenge_search_query.py +++ /dev/null @@ -1,208 +0,0 @@ -# coding: utf-8 - -""" - OpenChallenges REST API - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from datetime import date -from typing import List, Optional -from pydantic import ( - BaseModel, - Field, - StrictInt, - StrictStr, - conint, - conlist, - constr, - validator, -) -from openchallenges_client.models.challenge_category import ChallengeCategory -from openchallenges_client.models.challenge_difficulty import ChallengeDifficulty -from openchallenges_client.models.challenge_direction import ChallengeDirection -from openchallenges_client.models.challenge_incentive import ChallengeIncentive -from openchallenges_client.models.challenge_sort import ChallengeSort -from openchallenges_client.models.challenge_status import ChallengeStatus -from openchallenges_client.models.challenge_submission_type import ( - ChallengeSubmissionType, -) - - -class ChallengeSearchQuery(BaseModel): - """ - A challenge search query. - """ - - page_number: Optional[conint(strict=True, ge=0)] = Field( - 0, alias="pageNumber", description="The page number." - ) - page_size: Optional[conint(strict=True, ge=1)] = Field( - 100, alias="pageSize", description="The number of items in a single page." - ) - sort: Optional[ChallengeSort] = None - sort_seed: Optional[conint(strict=True, le=2147483647, ge=0)] = Field( - None, - alias="sortSeed", - description="The seed that initializes the random sorter.", - ) - direction: Optional[ChallengeDirection] = None - difficulties: Optional[conlist(ChallengeDifficulty)] = Field( - None, - description="An array of challenge difficulty levels used to filter the results.", - ) - incentives: Optional[conlist(ChallengeIncentive)] = Field( - None, - description="An array of challenge incentive types used to filter the results.", - ) - min_start_date: Optional[date] = Field( - None, - alias="minStartDate", - description="Keep the challenges that start at this date or later.", - ) - max_start_date: Optional[date] = Field( - None, - alias="maxStartDate", - description="Keep the challenges that start at this date or sooner.", - ) - platforms: Optional[conlist(constr(strict=True, max_length=30, min_length=3))] = ( - Field( - None, - description="An array of challenge platform ids used to filter the results.", - ) - ) - organizations: Optional[conlist(StrictInt)] = Field( - None, description="An array of organization ids used to filter the results." - ) - input_data_types: Optional[ - conlist(constr(strict=True, max_length=30, min_length=3)) - ] = Field( - None, - alias="inputDataTypes", - description="An array of challenge input data type ids used to filter the results.", - ) - status: Optional[conlist(ChallengeStatus)] = Field( - None, description="An array of challenge status used to filter the results." - ) - submission_types: Optional[conlist(ChallengeSubmissionType)] = Field( - None, - alias="submissionTypes", - description="An array of challenge submission types used to filter the results.", - ) - categories: Optional[conlist(ChallengeCategory)] = Field( - None, - description="The array of challenge categories used to filter the results.", - ) - search_terms: Optional[StrictStr] = Field( - None, - alias="searchTerms", - description="A string of search terms used to filter the results.", - ) - __properties = [ - "pageNumber", - "pageSize", - "sort", - "sortSeed", - "direction", - "difficulties", - "incentives", - "minStartDate", - "maxStartDate", - "platforms", - "organizations", - "inputDataTypes", - "status", - "submissionTypes", - "categories", - "searchTerms", - ] - - class Config: - """Pydantic configuration""" - - allow_population_by_field_name = True - validate_assignment = True - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> ChallengeSearchQuery: - """Create an instance of ChallengeSearchQuery from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self): - """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, exclude={}, exclude_none=True) - # set to None if sort_seed (nullable) is None - # and __fields_set__ contains the field - if self.sort_seed is None and "sort_seed" in self.__fields_set__: - _dict["sortSeed"] = None - - # set to None if direction (nullable) is None - # and __fields_set__ contains the field - if self.direction is None and "direction" in self.__fields_set__: - _dict["direction"] = None - - # set to None if min_start_date (nullable) is None - # and __fields_set__ contains the field - if self.min_start_date is None and "min_start_date" in self.__fields_set__: - _dict["minStartDate"] = None - - # set to None if max_start_date (nullable) is None - # and __fields_set__ contains the field - if self.max_start_date is None and "max_start_date" in self.__fields_set__: - _dict["maxStartDate"] = None - - return _dict - - @classmethod - def from_dict(cls, obj: dict) -> ChallengeSearchQuery: - """Create an instance of ChallengeSearchQuery from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return ChallengeSearchQuery.parse_obj(obj) - - _obj = ChallengeSearchQuery.parse_obj( - { - "page_number": ( - obj.get("pageNumber") if obj.get("pageNumber") is not None else 0 - ), - "page_size": ( - obj.get("pageSize") if obj.get("pageSize") is not None else 100 - ), - "sort": obj.get("sort"), - "sort_seed": obj.get("sortSeed"), - "direction": obj.get("direction"), - "difficulties": obj.get("difficulties"), - "incentives": obj.get("incentives"), - "min_start_date": obj.get("minStartDate"), - "max_start_date": obj.get("maxStartDate"), - "platforms": obj.get("platforms"), - "organizations": obj.get("organizations"), - "input_data_types": obj.get("inputDataTypes"), - "status": obj.get("status"), - "submission_types": obj.get("submissionTypes"), - "categories": obj.get("categories"), - "search_terms": obj.get("searchTerms"), - } - ) - return _obj diff --git a/libs/openchallenges/api-client-python/openchallenges_client/models/challenge_sort.py b/libs/openchallenges/api-client-python/openchallenges_client/models/challenge_sort.py deleted file mode 100644 index 776c2f8a57..0000000000 --- a/libs/openchallenges/api-client-python/openchallenges_client/models/challenge_sort.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - OpenChallenges REST API - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import json -import pprint -import re # noqa: F401 -from aenum import Enum, no_arg - - -class ChallengeSort(str, Enum): - """ - What to sort results by. - """ - - """ - allowed enum values - """ - CREATED = "created" - RANDOM = "random" - RELEVANCE = "relevance" - STARRED = "starred" - START_DATE = "start_date" - END_DATE = "end_date" - - @classmethod - def from_json(cls, json_str: str) -> ChallengeSort: - """Create an instance of ChallengeSort from a JSON string""" - return ChallengeSort(json.loads(json_str)) diff --git a/libs/openchallenges/api-client-python/openchallenges_client/models/challenge_status.py b/libs/openchallenges/api-client-python/openchallenges_client/models/challenge_status.py deleted file mode 100644 index 26b18ac8ec..0000000000 --- a/libs/openchallenges/api-client-python/openchallenges_client/models/challenge_status.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding: utf-8 - -""" - OpenChallenges REST API - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import json -import pprint -import re # noqa: F401 -from aenum import Enum, no_arg - - -class ChallengeStatus(str, Enum): - """ - The status of the challenge. - """ - - """ - allowed enum values - """ - UPCOMING = "upcoming" - ACTIVE = "active" - COMPLETED = "completed" - - @classmethod - def from_json(cls, json_str: str) -> ChallengeStatus: - """Create an instance of ChallengeStatus from a JSON string""" - return ChallengeStatus(json.loads(json_str)) diff --git a/libs/openchallenges/api-client-python/openchallenges_client/models/challenge_submission_type.py b/libs/openchallenges/api-client-python/openchallenges_client/models/challenge_submission_type.py deleted file mode 100644 index 310e4ec6f7..0000000000 --- a/libs/openchallenges/api-client-python/openchallenges_client/models/challenge_submission_type.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding: utf-8 - -""" - OpenChallenges REST API - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import json -import pprint -import re # noqa: F401 -from aenum import Enum, no_arg - - -class ChallengeSubmissionType(str, Enum): - """ - The submission type of the challenge. - """ - - """ - allowed enum values - """ - CONTAINER_IMAGE = "container_image" - PREDICTION_FILE = "prediction_file" - NOTEBOOK = "notebook" - OTHER = "other" - - @classmethod - def from_json(cls, json_str: str) -> ChallengeSubmissionType: - """Create an instance of ChallengeSubmissionType from a JSON string""" - return ChallengeSubmissionType(json.loads(json_str)) diff --git a/libs/openchallenges/api-client-python/openchallenges_client/models/challenges_page.py b/libs/openchallenges/api-client-python/openchallenges_client/models/challenges_page.py deleted file mode 100644 index 993c77489a..0000000000 --- a/libs/openchallenges/api-client-python/openchallenges_client/models/challenges_page.py +++ /dev/null @@ -1,113 +0,0 @@ -# coding: utf-8 - -""" - OpenChallenges REST API - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - - -from typing import List -from pydantic import BaseModel, Field, StrictBool, StrictInt, conlist -from openchallenges_client.models.challenge import Challenge - - -class ChallengesPage(BaseModel): - """ - A page of challenges. - """ - - number: StrictInt = Field(..., description="The page number.") - size: StrictInt = Field(..., description="The number of items in a single page.") - total_elements: StrictInt = Field( - ..., - alias="totalElements", - description="Total number of elements in the result set.", - ) - total_pages: StrictInt = Field( - ..., alias="totalPages", description="Total number of pages in the result set." - ) - has_next: StrictBool = Field( - ..., alias="hasNext", description="Returns if there is a next page." - ) - has_previous: StrictBool = Field( - ..., alias="hasPrevious", description="Returns if there is a previous page." - ) - challenges: conlist(Challenge) = Field(..., description="A list of challenges.") - __properties = [ - "number", - "size", - "totalElements", - "totalPages", - "hasNext", - "hasPrevious", - "challenges", - ] - - class Config: - """Pydantic configuration""" - - allow_population_by_field_name = True - validate_assignment = True - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> ChallengesPage: - """Create an instance of ChallengesPage from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self): - """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, exclude={}, exclude_none=True) - # override the default output from pydantic by calling `to_dict()` of each item in challenges (list) - _items = [] - if self.challenges: - for _item in self.challenges: - if _item: - _items.append(_item.to_dict()) - _dict["challenges"] = _items - return _dict - - @classmethod - def from_dict(cls, obj: dict) -> ChallengesPage: - """Create an instance of ChallengesPage from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return ChallengesPage.parse_obj(obj) - - _obj = ChallengesPage.parse_obj( - { - "number": obj.get("number"), - "size": obj.get("size"), - "total_elements": obj.get("totalElements"), - "total_pages": obj.get("totalPages"), - "has_next": obj.get("hasNext"), - "has_previous": obj.get("hasPrevious"), - "challenges": ( - [Challenge.from_dict(_item) for _item in obj.get("challenges")] - if obj.get("challenges") is not None - else None - ), - } - ) - return _obj diff --git a/libs/openchallenges/api-client-python/openchallenges_client/models/challenges_per_year.py b/libs/openchallenges/api-client-python/openchallenges_client/models/challenges_per_year.py deleted file mode 100644 index 8ea9c29071..0000000000 --- a/libs/openchallenges/api-client-python/openchallenges_client/models/challenges_per_year.py +++ /dev/null @@ -1,70 +0,0 @@ -# coding: utf-8 - -""" - OpenChallenges REST API - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - - -from typing import List -from pydantic import BaseModel, Field, StrictInt, StrictStr, conlist - - -class ChallengesPerYear(BaseModel): - """ - An object - """ - - years: conlist(StrictStr) = Field(...) - challenge_counts: conlist(StrictInt) = Field(..., alias="challengeCounts") - __properties = ["years", "challengeCounts"] - - class Config: - """Pydantic configuration""" - - allow_population_by_field_name = True - validate_assignment = True - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> ChallengesPerYear: - """Create an instance of ChallengesPerYear from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self): - """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, exclude={}, exclude_none=True) - return _dict - - @classmethod - def from_dict(cls, obj: dict) -> ChallengesPerYear: - """Create an instance of ChallengesPerYear from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return ChallengesPerYear.parse_obj(obj) - - _obj = ChallengesPerYear.parse_obj( - {"years": obj.get("years"), "challenge_counts": obj.get("challengeCounts")} - ) - return _obj diff --git a/libs/openchallenges/api-client-python/openchallenges_client/models/image.py b/libs/openchallenges/api-client-python/openchallenges_client/models/image.py deleted file mode 100644 index 4102192e56..0000000000 --- a/libs/openchallenges/api-client-python/openchallenges_client/models/image.py +++ /dev/null @@ -1,66 +0,0 @@ -# coding: utf-8 - -""" - OpenChallenges REST API - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - - -from pydantic import BaseModel, Field, StrictStr - - -class Image(BaseModel): - """ - An image - """ - - url: StrictStr = Field(...) - __properties = ["url"] - - class Config: - """Pydantic configuration""" - - allow_population_by_field_name = True - validate_assignment = True - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Image: - """Create an instance of Image from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self): - """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, exclude={}, exclude_none=True) - return _dict - - @classmethod - def from_dict(cls, obj: dict) -> Image: - """Create an instance of Image from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return Image.parse_obj(obj) - - _obj = Image.parse_obj({"url": obj.get("url")}) - return _obj diff --git a/libs/openchallenges/api-client-python/openchallenges_client/models/image_aspect_ratio.py b/libs/openchallenges/api-client-python/openchallenges_client/models/image_aspect_ratio.py deleted file mode 100644 index 06c425ffec..0000000000 --- a/libs/openchallenges/api-client-python/openchallenges_client/models/image_aspect_ratio.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding: utf-8 - -""" - OpenChallenges REST API - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import json -import pprint -import re # noqa: F401 -from aenum import Enum, no_arg - - -class ImageAspectRatio(str, Enum): - """ - The aspect ratio of the image (the height of the image must be specified). - """ - - """ - allowed enum values - """ - ORIGINAL = "original" - ENUM_16_9 = "16_9" - ENUM_1_1 = "1_1" - ENUM_3_2 = "3_2" - ENUM_2_3 = "2_3" - - @classmethod - def from_json(cls, json_str: str) -> ImageAspectRatio: - """Create an instance of ImageAspectRatio from a JSON string""" - return ImageAspectRatio(json.loads(json_str)) diff --git a/libs/openchallenges/api-client-python/openchallenges_client/models/image_height.py b/libs/openchallenges/api-client-python/openchallenges_client/models/image_height.py deleted file mode 100644 index 4eadc17d34..0000000000 --- a/libs/openchallenges/api-client-python/openchallenges_client/models/image_height.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - OpenChallenges REST API - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import json -import pprint -import re # noqa: F401 -from aenum import Enum, no_arg - - -class ImageHeight(str, Enum): - """ - The height of the image. - """ - - """ - allowed enum values - """ - ORIGINAL = "original" - ENUM_32PX = "32px" - ENUM_100PX = "100px" - ENUM_140PX = "140px" - ENUM_250PX = "250px" - ENUM_500PX = "500px" - - @classmethod - def from_json(cls, json_str: str) -> ImageHeight: - """Create an instance of ImageHeight from a JSON string""" - return ImageHeight(json.loads(json_str)) diff --git a/libs/openchallenges/api-client-python/openchallenges_client/models/image_query.py b/libs/openchallenges/api-client-python/openchallenges_client/models/image_query.py deleted file mode 100644 index 3b892ef4ad..0000000000 --- a/libs/openchallenges/api-client-python/openchallenges_client/models/image_query.py +++ /dev/null @@ -1,88 +0,0 @@ -# coding: utf-8 - -""" - OpenChallenges REST API - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - - -from typing import Optional -from pydantic import BaseModel, Field, constr, validator -from openchallenges_client.models.image_aspect_ratio import ImageAspectRatio -from openchallenges_client.models.image_height import ImageHeight - - -class ImageQuery(BaseModel): - """ - An image query. - """ - - object_key: constr(strict=True) = Field( - ..., alias="objectKey", description="The unique identifier of the image." - ) - height: Optional[ImageHeight] = None - aspect_ratio: Optional[ImageAspectRatio] = Field(None, alias="aspectRatio") - __properties = ["objectKey", "height", "aspectRatio"] - - @validator("object_key") - def object_key_validate_regular_expression(cls, value): - """Validates the regular expression""" - if not re.match(r"^[a-zA-Z0-9\/_-]+.[a-zA-Z0-9\/_-]+", value): - raise ValueError( - r"must validate the regular expression /^[a-zA-Z0-9\/_-]+.[a-zA-Z0-9\/_-]+/" - ) - return value - - class Config: - """Pydantic configuration""" - - allow_population_by_field_name = True - validate_assignment = True - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> ImageQuery: - """Create an instance of ImageQuery from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self): - """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, exclude={}, exclude_none=True) - return _dict - - @classmethod - def from_dict(cls, obj: dict) -> ImageQuery: - """Create an instance of ImageQuery from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return ImageQuery.parse_obj(obj) - - _obj = ImageQuery.parse_obj( - { - "object_key": obj.get("objectKey"), - "height": obj.get("height"), - "aspect_ratio": obj.get("aspectRatio"), - } - ) - return _obj diff --git a/libs/openchallenges/api-client-python/openchallenges_client/models/organization.py b/libs/openchallenges/api-client-python/openchallenges_client/models/organization.py deleted file mode 100644 index d65b388f12..0000000000 --- a/libs/openchallenges/api-client-python/openchallenges_client/models/organization.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - OpenChallenges REST API - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from datetime import datetime -from typing import Optional -from pydantic import BaseModel, Field, StrictInt, StrictStr, conint, constr, validator - - -class Organization(BaseModel): - """ - An organization - """ - - id: StrictInt = Field(..., description="The unique identifier of an organization") - name: StrictStr = Field(...) - email: StrictStr = Field(..., description="An email address.") - login: constr(strict=True, max_length=64, min_length=2) = Field( - ..., description="The login of an organization" - ) - description: StrictStr = Field(...) - avatar_key: Optional[StrictStr] = Field(None, alias="avatarKey") - website_url: StrictStr = Field(..., alias="websiteUrl") - challenge_count: Optional[conint(strict=True, ge=0)] = Field( - None, alias="challengeCount" - ) - created_at: datetime = Field(..., alias="createdAt") - updated_at: datetime = Field(..., alias="updatedAt") - acronym: Optional[StrictStr] = None - __properties = [ - "id", - "name", - "email", - "login", - "description", - "avatarKey", - "websiteUrl", - "challengeCount", - "createdAt", - "updatedAt", - "acronym", - ] - - @validator("login") - def login_validate_regular_expression(cls, value): - """Validates the regular expression""" - if not re.match(r"^[a-z0-9]+(?:-[a-z0-9]+)*$", value): - raise ValueError( - r"must validate the regular expression /^[a-z0-9]+(?:-[a-z0-9]+)*$/" - ) - return value - - class Config: - """Pydantic configuration""" - - allow_population_by_field_name = True - validate_assignment = True - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Organization: - """Create an instance of Organization from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self): - """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, exclude={}, exclude_none=True) - return _dict - - @classmethod - def from_dict(cls, obj: dict) -> Organization: - """Create an instance of Organization from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return Organization.parse_obj(obj) - - _obj = Organization.parse_obj( - { - "id": obj.get("id"), - "name": obj.get("name"), - "email": obj.get("email"), - "login": obj.get("login"), - "description": obj.get("description"), - "avatar_key": obj.get("avatarKey"), - "website_url": obj.get("websiteUrl"), - "challenge_count": obj.get("challengeCount"), - "created_at": obj.get("createdAt"), - "updated_at": obj.get("updatedAt"), - "acronym": obj.get("acronym"), - } - ) - return _obj diff --git a/libs/openchallenges/api-client-python/openchallenges_client/models/organization_category.py b/libs/openchallenges/api-client-python/openchallenges_client/models/organization_category.py deleted file mode 100644 index 381e256151..0000000000 --- a/libs/openchallenges/api-client-python/openchallenges_client/models/organization_category.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding: utf-8 - -""" - OpenChallenges REST API - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import json -import pprint -import re # noqa: F401 -from aenum import Enum, no_arg - - -class OrganizationCategory(str, Enum): - """ - The category of the organization. - """ - - """ - allowed enum values - """ - FEATURED = "featured" - - @classmethod - def from_json(cls, json_str: str) -> OrganizationCategory: - """Create an instance of OrganizationCategory from a JSON string""" - return OrganizationCategory(json.loads(json_str)) diff --git a/libs/openchallenges/api-client-python/openchallenges_client/models/organization_direction.py b/libs/openchallenges/api-client-python/openchallenges_client/models/organization_direction.py deleted file mode 100644 index 54e098fc1d..0000000000 --- a/libs/openchallenges/api-client-python/openchallenges_client/models/organization_direction.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding: utf-8 - -""" - OpenChallenges REST API - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import json -import pprint -import re # noqa: F401 -from aenum import Enum, no_arg - - -class OrganizationDirection(str, Enum): - """ - The direction to sort the results by. - """ - - """ - allowed enum values - """ - ASC = "asc" - DESC = "desc" - - @classmethod - def from_json(cls, json_str: str) -> OrganizationDirection: - """Create an instance of OrganizationDirection from a JSON string""" - return OrganizationDirection(json.loads(json_str)) diff --git a/libs/openchallenges/api-client-python/openchallenges_client/models/organization_search_query.py b/libs/openchallenges/api-client-python/openchallenges_client/models/organization_search_query.py deleted file mode 100644 index 5757f0fdce..0000000000 --- a/libs/openchallenges/api-client-python/openchallenges_client/models/organization_search_query.py +++ /dev/null @@ -1,121 +0,0 @@ -# coding: utf-8 - -""" - OpenChallenges REST API - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - - -from typing import List, Optional -from pydantic import BaseModel, Field, StrictStr, conint, conlist -from openchallenges_client.models.challenge_contribution_role import ( - ChallengeContributionRole, -) -from openchallenges_client.models.organization_category import OrganizationCategory -from openchallenges_client.models.organization_direction import OrganizationDirection -from openchallenges_client.models.organization_sort import OrganizationSort - - -class OrganizationSearchQuery(BaseModel): - """ - An organization search query. - """ - - page_number: Optional[conint(strict=True, ge=0)] = Field( - 0, alias="pageNumber", description="The page number." - ) - page_size: Optional[conint(strict=True, ge=1)] = Field( - 100, alias="pageSize", description="The number of items in a single page." - ) - categories: Optional[conlist(OrganizationCategory)] = Field( - None, - description="The array of organization categories used to filter the results.", - ) - challenge_contribution_roles: Optional[conlist(ChallengeContributionRole)] = Field( - None, - alias="challengeContributionRoles", - description="An array of challenge contribution roles used to filter the results.", - ) - sort: Optional[OrganizationSort] = None - direction: Optional[OrganizationDirection] = None - search_terms: Optional[StrictStr] = Field( - None, - alias="searchTerms", - description="A string of search terms used to filter the results.", - ) - __properties = [ - "pageNumber", - "pageSize", - "categories", - "challengeContributionRoles", - "sort", - "direction", - "searchTerms", - ] - - class Config: - """Pydantic configuration""" - - allow_population_by_field_name = True - validate_assignment = True - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> OrganizationSearchQuery: - """Create an instance of OrganizationSearchQuery from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self): - """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, exclude={}, exclude_none=True) - # set to None if direction (nullable) is None - # and __fields_set__ contains the field - if self.direction is None and "direction" in self.__fields_set__: - _dict["direction"] = None - - return _dict - - @classmethod - def from_dict(cls, obj: dict) -> OrganizationSearchQuery: - """Create an instance of OrganizationSearchQuery from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return OrganizationSearchQuery.parse_obj(obj) - - _obj = OrganizationSearchQuery.parse_obj( - { - "page_number": ( - obj.get("pageNumber") if obj.get("pageNumber") is not None else 0 - ), - "page_size": ( - obj.get("pageSize") if obj.get("pageSize") is not None else 100 - ), - "categories": obj.get("categories"), - "challenge_contribution_roles": obj.get("challengeContributionRoles"), - "sort": obj.get("sort"), - "direction": obj.get("direction"), - "search_terms": obj.get("searchTerms"), - } - ) - return _obj diff --git a/libs/openchallenges/api-client-python/openchallenges_client/models/organization_sort.py b/libs/openchallenges/api-client-python/openchallenges_client/models/organization_sort.py deleted file mode 100644 index be4b757eef..0000000000 --- a/libs/openchallenges/api-client-python/openchallenges_client/models/organization_sort.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding: utf-8 - -""" - OpenChallenges REST API - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import json -import pprint -import re # noqa: F401 -from aenum import Enum, no_arg - - -class OrganizationSort(str, Enum): - """ - What to sort results by. - """ - - """ - allowed enum values - """ - CHALLENGE_COUNT = "challenge_count" - CREATED = "created" - NAME = "name" - RELEVANCE = "relevance" - - @classmethod - def from_json(cls, json_str: str) -> OrganizationSort: - """Create an instance of OrganizationSort from a JSON string""" - return OrganizationSort(json.loads(json_str)) diff --git a/libs/openchallenges/api-client-python/openchallenges_client/models/organizations_page.py b/libs/openchallenges/api-client-python/openchallenges_client/models/organizations_page.py deleted file mode 100644 index 4afad62a5e..0000000000 --- a/libs/openchallenges/api-client-python/openchallenges_client/models/organizations_page.py +++ /dev/null @@ -1,118 +0,0 @@ -# coding: utf-8 - -""" - OpenChallenges REST API - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - - -from typing import List -from pydantic import BaseModel, Field, StrictBool, StrictInt, conlist -from openchallenges_client.models.organization import Organization - - -class OrganizationsPage(BaseModel): - """ - A page of organizations - """ - - number: StrictInt = Field(..., description="The page number.") - size: StrictInt = Field(..., description="The number of items in a single page.") - total_elements: StrictInt = Field( - ..., - alias="totalElements", - description="Total number of elements in the result set.", - ) - total_pages: StrictInt = Field( - ..., alias="totalPages", description="Total number of pages in the result set." - ) - has_next: StrictBool = Field( - ..., alias="hasNext", description="Returns if there is a next page." - ) - has_previous: StrictBool = Field( - ..., alias="hasPrevious", description="Returns if there is a previous page." - ) - organizations: conlist(Organization) = Field( - ..., description="A list of organizations" - ) - __properties = [ - "number", - "size", - "totalElements", - "totalPages", - "hasNext", - "hasPrevious", - "organizations", - ] - - class Config: - """Pydantic configuration""" - - allow_population_by_field_name = True - validate_assignment = True - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> OrganizationsPage: - """Create an instance of OrganizationsPage from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self): - """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, exclude={}, exclude_none=True) - # override the default output from pydantic by calling `to_dict()` of each item in organizations (list) - _items = [] - if self.organizations: - for _item in self.organizations: - if _item: - _items.append(_item.to_dict()) - _dict["organizations"] = _items - return _dict - - @classmethod - def from_dict(cls, obj: dict) -> OrganizationsPage: - """Create an instance of OrganizationsPage from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return OrganizationsPage.parse_obj(obj) - - _obj = OrganizationsPage.parse_obj( - { - "number": obj.get("number"), - "size": obj.get("size"), - "total_elements": obj.get("totalElements"), - "total_pages": obj.get("totalPages"), - "has_next": obj.get("hasNext"), - "has_previous": obj.get("hasPrevious"), - "organizations": ( - [ - Organization.from_dict(_item) - for _item in obj.get("organizations") - ] - if obj.get("organizations") is not None - else None - ), - } - ) - return _obj diff --git a/libs/openchallenges/api-client-python/openchallenges_client/models/page_metadata.py b/libs/openchallenges/api-client-python/openchallenges_client/models/page_metadata.py deleted file mode 100644 index d17e202f5d..0000000000 --- a/libs/openchallenges/api-client-python/openchallenges_client/models/page_metadata.py +++ /dev/null @@ -1,97 +0,0 @@ -# coding: utf-8 - -""" - OpenChallenges REST API - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - - -from pydantic import BaseModel, Field, StrictBool, StrictInt - - -class PageMetadata(BaseModel): - """ - The metadata of a page. - """ - - number: StrictInt = Field(..., description="The page number.") - size: StrictInt = Field(..., description="The number of items in a single page.") - total_elements: StrictInt = Field( - ..., - alias="totalElements", - description="Total number of elements in the result set.", - ) - total_pages: StrictInt = Field( - ..., alias="totalPages", description="Total number of pages in the result set." - ) - has_next: StrictBool = Field( - ..., alias="hasNext", description="Returns if there is a next page." - ) - has_previous: StrictBool = Field( - ..., alias="hasPrevious", description="Returns if there is a previous page." - ) - __properties = [ - "number", - "size", - "totalElements", - "totalPages", - "hasNext", - "hasPrevious", - ] - - class Config: - """Pydantic configuration""" - - allow_population_by_field_name = True - validate_assignment = True - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> PageMetadata: - """Create an instance of PageMetadata from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self): - """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, exclude={}, exclude_none=True) - return _dict - - @classmethod - def from_dict(cls, obj: dict) -> PageMetadata: - """Create an instance of PageMetadata from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return PageMetadata.parse_obj(obj) - - _obj = PageMetadata.parse_obj( - { - "number": obj.get("number"), - "size": obj.get("size"), - "total_elements": obj.get("totalElements"), - "total_pages": obj.get("totalPages"), - "has_next": obj.get("hasNext"), - "has_previous": obj.get("hasPrevious"), - } - ) - return _obj diff --git a/libs/openchallenges/api-client-python/openchallenges_client/models/simple_challenge_input_data_type.py b/libs/openchallenges/api-client-python/openchallenges_client/models/simple_challenge_input_data_type.py deleted file mode 100644 index 0c3352ba5f..0000000000 --- a/libs/openchallenges/api-client-python/openchallenges_client/models/simple_challenge_input_data_type.py +++ /dev/null @@ -1,85 +0,0 @@ -# coding: utf-8 - -""" - OpenChallenges REST API - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - - -from pydantic import BaseModel, Field, StrictInt, constr, validator - - -class SimpleChallengeInputDataType(BaseModel): - """ - A simple challenge input data type. - """ - - id: StrictInt = Field( - ..., description="The unique identifier of a challenge input data type." - ) - slug: constr(strict=True, max_length=30, min_length=3) = Field( - ..., description="The slug of the challenge input data type." - ) - name: constr(strict=True, max_length=50, min_length=3) = Field( - ..., description="The name of the challenge input data type." - ) - __properties = ["id", "slug", "name"] - - @validator("slug") - def slug_validate_regular_expression(cls, value): - """Validates the regular expression""" - if not re.match(r"^[a-z0-9]+(?:-[a-z0-9]+)*$", value): - raise ValueError( - r"must validate the regular expression /^[a-z0-9]+(?:-[a-z0-9]+)*$/" - ) - return value - - class Config: - """Pydantic configuration""" - - allow_population_by_field_name = True - validate_assignment = True - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> SimpleChallengeInputDataType: - """Create an instance of SimpleChallengeInputDataType from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self): - """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, exclude={}, exclude_none=True) - return _dict - - @classmethod - def from_dict(cls, obj: dict) -> SimpleChallengeInputDataType: - """Create an instance of SimpleChallengeInputDataType from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return SimpleChallengeInputDataType.parse_obj(obj) - - _obj = SimpleChallengeInputDataType.parse_obj( - {"id": obj.get("id"), "slug": obj.get("slug"), "name": obj.get("name")} - ) - return _obj diff --git a/libs/openchallenges/api-client-python/openchallenges_client/models/simple_challenge_platform.py b/libs/openchallenges/api-client-python/openchallenges_client/models/simple_challenge_platform.py deleted file mode 100644 index d7a15c9156..0000000000 --- a/libs/openchallenges/api-client-python/openchallenges_client/models/simple_challenge_platform.py +++ /dev/null @@ -1,85 +0,0 @@ -# coding: utf-8 - -""" - OpenChallenges REST API - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - - -from pydantic import BaseModel, Field, StrictInt, constr, validator - - -class SimpleChallengePlatform(BaseModel): - """ - A simple challenge platform. - """ - - id: StrictInt = Field( - ..., description="The unique identifier of a challenge platform." - ) - slug: constr(strict=True, max_length=30, min_length=3) = Field( - ..., description="The slug of the challenge platform." - ) - name: constr(strict=True, max_length=30, min_length=3) = Field( - ..., description="The name of the challenge platform." - ) - __properties = ["id", "slug", "name"] - - @validator("slug") - def slug_validate_regular_expression(cls, value): - """Validates the regular expression""" - if not re.match(r"^[a-z0-9]+(?:-[a-z0-9]+)*$", value): - raise ValueError( - r"must validate the regular expression /^[a-z0-9]+(?:-[a-z0-9]+)*$/" - ) - return value - - class Config: - """Pydantic configuration""" - - allow_population_by_field_name = True - validate_assignment = True - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> SimpleChallengePlatform: - """Create an instance of SimpleChallengePlatform from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self): - """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, exclude={}, exclude_none=True) - return _dict - - @classmethod - def from_dict(cls, obj: dict) -> SimpleChallengePlatform: - """Create an instance of SimpleChallengePlatform from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return SimpleChallengePlatform.parse_obj(obj) - - _obj = SimpleChallengePlatform.parse_obj( - {"id": obj.get("id"), "slug": obj.get("slug"), "name": obj.get("name")} - ) - return _obj diff --git a/libs/openchallenges/api-client-python/openchallenges_client/models/user.py b/libs/openchallenges/api-client-python/openchallenges_client/models/user.py deleted file mode 100644 index 281f228ea0..0000000000 --- a/libs/openchallenges/api-client-python/openchallenges_client/models/user.py +++ /dev/null @@ -1,118 +0,0 @@ -# coding: utf-8 - -""" - OpenChallenges REST API - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from datetime import datetime -from typing import Optional -from pydantic import BaseModel, Field, StrictInt, StrictStr -from openchallenges_client.models.user_status import UserStatus - - -class User(BaseModel): - """ - A simple user - """ - - id: Optional[StrictInt] = Field( - None, description="The unique identifier of an account" - ) - login: StrictStr = Field(...) - email: StrictStr = Field(..., description="An email address.") - name: Optional[StrictStr] = None - status: Optional[UserStatus] = None - avatar_url: Optional[StrictStr] = Field(None, alias="avatarUrl") - created_at: datetime = Field(..., alias="createdAt") - updated_at: datetime = Field(..., alias="updatedAt") - type: StrictStr = Field(...) - bio: Optional[StrictStr] = None - __properties = [ - "id", - "login", - "email", - "name", - "status", - "avatarUrl", - "createdAt", - "updatedAt", - "type", - "bio", - ] - - class Config: - """Pydantic configuration""" - - allow_population_by_field_name = True - validate_assignment = True - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> User: - """Create an instance of User from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self): - """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, exclude={}, exclude_none=True) - # set to None if name (nullable) is None - # and __fields_set__ contains the field - if self.name is None and "name" in self.__fields_set__: - _dict["name"] = None - - # set to None if avatar_url (nullable) is None - # and __fields_set__ contains the field - if self.avatar_url is None and "avatar_url" in self.__fields_set__: - _dict["avatarUrl"] = None - - # set to None if bio (nullable) is None - # and __fields_set__ contains the field - if self.bio is None and "bio" in self.__fields_set__: - _dict["bio"] = None - - return _dict - - @classmethod - def from_dict(cls, obj: dict) -> User: - """Create an instance of User from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return User.parse_obj(obj) - - _obj = User.parse_obj( - { - "id": obj.get("id"), - "login": obj.get("login"), - "email": obj.get("email"), - "name": obj.get("name"), - "status": obj.get("status"), - "avatar_url": obj.get("avatarUrl"), - "created_at": obj.get("createdAt"), - "updated_at": obj.get("updatedAt"), - "type": obj.get("type"), - "bio": obj.get("bio"), - } - ) - return _obj diff --git a/libs/openchallenges/api-client-python/openchallenges_client/models/user_create_request.py b/libs/openchallenges/api-client-python/openchallenges_client/models/user_create_request.py deleted file mode 100644 index 02b94789f8..0000000000 --- a/libs/openchallenges/api-client-python/openchallenges_client/models/user_create_request.py +++ /dev/null @@ -1,96 +0,0 @@ -# coding: utf-8 - -""" - OpenChallenges REST API - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - - -from typing import Optional -from pydantic import BaseModel, Field, SecretStr, StrictStr - - -class UserCreateRequest(BaseModel): - """ - The information required to create a user account - """ - - login: StrictStr = Field(...) - email: StrictStr = Field(..., description="An email address.") - password: SecretStr = Field(...) - name: Optional[StrictStr] = None - avatar_url: Optional[StrictStr] = Field(None, alias="avatarUrl") - bio: Optional[StrictStr] = None - __properties = ["login", "email", "password", "name", "avatarUrl", "bio"] - - class Config: - """Pydantic configuration""" - - allow_population_by_field_name = True - validate_assignment = True - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> UserCreateRequest: - """Create an instance of UserCreateRequest from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self): - """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, exclude={}, exclude_none=True) - # set to None if name (nullable) is None - # and __fields_set__ contains the field - if self.name is None and "name" in self.__fields_set__: - _dict["name"] = None - - # set to None if avatar_url (nullable) is None - # and __fields_set__ contains the field - if self.avatar_url is None and "avatar_url" in self.__fields_set__: - _dict["avatarUrl"] = None - - # set to None if bio (nullable) is None - # and __fields_set__ contains the field - if self.bio is None and "bio" in self.__fields_set__: - _dict["bio"] = None - - return _dict - - @classmethod - def from_dict(cls, obj: dict) -> UserCreateRequest: - """Create an instance of UserCreateRequest from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return UserCreateRequest.parse_obj(obj) - - _obj = UserCreateRequest.parse_obj( - { - "login": obj.get("login"), - "email": obj.get("email"), - "password": obj.get("password"), - "name": obj.get("name"), - "avatar_url": obj.get("avatarUrl"), - "bio": obj.get("bio"), - } - ) - return _obj diff --git a/libs/openchallenges/api-client-python/openchallenges_client/models/user_create_response.py b/libs/openchallenges/api-client-python/openchallenges_client/models/user_create_response.py deleted file mode 100644 index 58cca0932e..0000000000 --- a/libs/openchallenges/api-client-python/openchallenges_client/models/user_create_response.py +++ /dev/null @@ -1,66 +0,0 @@ -# coding: utf-8 - -""" - OpenChallenges REST API - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - - -from pydantic import BaseModel, Field, StrictInt - - -class UserCreateResponse(BaseModel): - """ - The response returned after the creation of the user - """ - - id: StrictInt = Field(..., description="The unique identifier of an account") - __properties = ["id"] - - class Config: - """Pydantic configuration""" - - allow_population_by_field_name = True - validate_assignment = True - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> UserCreateResponse: - """Create an instance of UserCreateResponse from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self): - """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, exclude={}, exclude_none=True) - return _dict - - @classmethod - def from_dict(cls, obj: dict) -> UserCreateResponse: - """Create an instance of UserCreateResponse from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return UserCreateResponse.parse_obj(obj) - - _obj = UserCreateResponse.parse_obj({"id": obj.get("id")}) - return _obj diff --git a/libs/openchallenges/api-client-python/openchallenges_client/models/user_status.py b/libs/openchallenges/api-client-python/openchallenges_client/models/user_status.py deleted file mode 100644 index b9f944b9d5..0000000000 --- a/libs/openchallenges/api-client-python/openchallenges_client/models/user_status.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding: utf-8 - -""" - OpenChallenges REST API - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import json -import pprint -import re # noqa: F401 -from aenum import Enum, no_arg - - -class UserStatus(str, Enum): - """ - The account status of a user - """ - - """ - allowed enum values - """ - PENDING = "pending" - APPROVED = "approved" - DISABLED = "disabled" - BLACKLIST = "blacklist" - - @classmethod - def from_json(cls, json_str: str) -> UserStatus: - """Create an instance of UserStatus from a JSON string""" - return UserStatus(json.loads(json_str)) diff --git a/libs/openchallenges/api-client-python/openchallenges_client/models/users_page.py b/libs/openchallenges/api-client-python/openchallenges_client/models/users_page.py deleted file mode 100644 index d01f630154..0000000000 --- a/libs/openchallenges/api-client-python/openchallenges_client/models/users_page.py +++ /dev/null @@ -1,113 +0,0 @@ -# coding: utf-8 - -""" - OpenChallenges REST API - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - - -from typing import List -from pydantic import BaseModel, Field, StrictBool, StrictInt, conlist -from openchallenges_client.models.user import User - - -class UsersPage(BaseModel): - """ - A page of users - """ - - number: StrictInt = Field(..., description="The page number.") - size: StrictInt = Field(..., description="The number of items in a single page.") - total_elements: StrictInt = Field( - ..., - alias="totalElements", - description="Total number of elements in the result set.", - ) - total_pages: StrictInt = Field( - ..., alias="totalPages", description="Total number of pages in the result set." - ) - has_next: StrictBool = Field( - ..., alias="hasNext", description="Returns if there is a next page." - ) - has_previous: StrictBool = Field( - ..., alias="hasPrevious", description="Returns if there is a previous page." - ) - users: conlist(User) = Field(..., description="A list of users") - __properties = [ - "number", - "size", - "totalElements", - "totalPages", - "hasNext", - "hasPrevious", - "users", - ] - - class Config: - """Pydantic configuration""" - - allow_population_by_field_name = True - validate_assignment = True - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> UsersPage: - """Create an instance of UsersPage from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self): - """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, exclude={}, exclude_none=True) - # override the default output from pydantic by calling `to_dict()` of each item in users (list) - _items = [] - if self.users: - for _item in self.users: - if _item: - _items.append(_item.to_dict()) - _dict["users"] = _items - return _dict - - @classmethod - def from_dict(cls, obj: dict) -> UsersPage: - """Create an instance of UsersPage from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return UsersPage.parse_obj(obj) - - _obj = UsersPage.parse_obj( - { - "number": obj.get("number"), - "size": obj.get("size"), - "total_elements": obj.get("totalElements"), - "total_pages": obj.get("totalPages"), - "has_next": obj.get("hasNext"), - "has_previous": obj.get("hasPrevious"), - "users": ( - [User.from_dict(_item) for _item in obj.get("users")] - if obj.get("users") is not None - else None - ), - } - ) - return _obj diff --git a/libs/openchallenges/api-client-python/openchallenges_client/py.typed b/libs/openchallenges/api-client-python/openchallenges_client/py.typed deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/libs/openchallenges/api-client-python/openchallenges_client/rest.py b/libs/openchallenges/api-client-python/openchallenges_client/rest.py deleted file mode 100644 index 53f820b60d..0000000000 --- a/libs/openchallenges/api-client-python/openchallenges_client/rest.py +++ /dev/null @@ -1,406 +0,0 @@ -# coding: utf-8 - -""" - OpenChallenges REST API - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import io -import json -import logging -import re -import ssl - -from urllib.parse import urlencode, quote_plus -import urllib3 - -from openchallenges_client.exceptions import ( - ApiException, - UnauthorizedException, - ForbiddenException, - NotFoundException, - ServiceException, - ApiValueError, - BadRequestException, -) - - -logger = logging.getLogger(__name__) - - -class RESTResponse(io.IOBase): - - def __init__(self, resp): - self.urllib3_response = resp - self.status = resp.status - self.reason = resp.reason - self.data = resp.data - - def getheaders(self): - """Returns a dictionary of the response headers.""" - return self.urllib3_response.headers - - def getheader(self, name, default=None): - """Returns a given response header.""" - return self.urllib3_response.headers.get(name, default) - - -class RESTClientObject(object): - - def __init__(self, configuration, pools_size=4, maxsize=None): - # urllib3.PoolManager will pass all kw parameters to connectionpool - # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/poolmanager.py#L75 # noqa: E501 - # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/connectionpool.py#L680 # noqa: E501 - # maxsize is the number of requests to host that are allowed in parallel # noqa: E501 - # Custom SSL certificates and client certificates: http://urllib3.readthedocs.io/en/latest/advanced-usage.html # noqa: E501 - - # cert_reqs - if configuration.verify_ssl: - cert_reqs = ssl.CERT_REQUIRED - else: - cert_reqs = ssl.CERT_NONE - - addition_pool_args = {} - if configuration.assert_hostname is not None: - addition_pool_args["assert_hostname"] = ( - configuration.assert_hostname - ) # noqa: E501 - - if configuration.retries is not None: - addition_pool_args["retries"] = configuration.retries - - if configuration.tls_server_name: - addition_pool_args["server_hostname"] = configuration.tls_server_name - - if configuration.socket_options is not None: - addition_pool_args["socket_options"] = configuration.socket_options - - if maxsize is None: - if configuration.connection_pool_maxsize is not None: - maxsize = configuration.connection_pool_maxsize - else: - maxsize = 4 - - # https pool manager - if configuration.proxy: - self.pool_manager = urllib3.ProxyManager( - num_pools=pools_size, - maxsize=maxsize, - cert_reqs=cert_reqs, - ca_certs=configuration.ssl_ca_cert, - cert_file=configuration.cert_file, - key_file=configuration.key_file, - proxy_url=configuration.proxy, - proxy_headers=configuration.proxy_headers, - **addition_pool_args - ) - else: - self.pool_manager = urllib3.PoolManager( - num_pools=pools_size, - maxsize=maxsize, - cert_reqs=cert_reqs, - ca_certs=configuration.ssl_ca_cert, - cert_file=configuration.cert_file, - key_file=configuration.key_file, - **addition_pool_args - ) - - def request( - self, - method, - url, - query_params=None, - headers=None, - body=None, - post_params=None, - _preload_content=True, - _request_timeout=None, - ): - """Perform requests. - - :param method: http request method - :param url: http request url - :param query_params: query parameters in the url - :param headers: http request headers - :param body: request json body, for `application/json` - :param post_params: request post parameters, - `application/x-www-form-urlencoded` - and `multipart/form-data` - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - """ - method = method.upper() - assert method in ["GET", "HEAD", "DELETE", "POST", "PUT", "PATCH", "OPTIONS"] - - if post_params and body: - raise ApiValueError( - "body parameter cannot be used with post_params parameter." - ) - - post_params = post_params or {} - headers = headers or {} - # url already contains the URL query string - # so reset query_params to empty dict - query_params = {} - - timeout = None - if _request_timeout: - if isinstance(_request_timeout, (int, float)): # noqa: E501,F821 - timeout = urllib3.Timeout(total=_request_timeout) - elif isinstance(_request_timeout, tuple) and len(_request_timeout) == 2: - timeout = urllib3.Timeout( - connect=_request_timeout[0], read=_request_timeout[1] - ) - - try: - # For `POST`, `PUT`, `PATCH`, `OPTIONS`, `DELETE` - if method in ["POST", "PUT", "PATCH", "OPTIONS", "DELETE"]: - - # no content type provided or payload is json - if not headers.get("Content-Type") or re.search( - "json", headers["Content-Type"], re.IGNORECASE - ): - request_body = None - if body is not None: - request_body = json.dumps(body) - r = self.pool_manager.request( - method, - url, - body=request_body, - preload_content=_preload_content, - timeout=timeout, - headers=headers, - ) - elif ( - headers["Content-Type"] == "application/x-www-form-urlencoded" - ): # noqa: E501 - r = self.pool_manager.request( - method, - url, - fields=post_params, - encode_multipart=False, - preload_content=_preload_content, - timeout=timeout, - headers=headers, - ) - elif headers["Content-Type"] == "multipart/form-data": - # must del headers['Content-Type'], or the correct - # Content-Type which generated by urllib3 will be - # overwritten. - del headers["Content-Type"] - r = self.pool_manager.request( - method, - url, - fields=post_params, - encode_multipart=True, - preload_content=_preload_content, - timeout=timeout, - headers=headers, - ) - # Pass a `string` parameter directly in the body to support - # other content types than Json when `body` argument is - # provided in serialized form - elif isinstance(body, str) or isinstance(body, bytes): - request_body = body - r = self.pool_manager.request( - method, - url, - body=request_body, - preload_content=_preload_content, - timeout=timeout, - headers=headers, - ) - else: - # Cannot generate the request from given parameters - msg = """Cannot prepare a request message for provided - arguments. Please check that your arguments match - declared content type.""" - raise ApiException(status=0, reason=msg) - # For `GET`, `HEAD` - else: - r = self.pool_manager.request( - method, - url, - fields={}, - preload_content=_preload_content, - timeout=timeout, - headers=headers, - ) - except urllib3.exceptions.SSLError as e: - msg = "{0}\n{1}".format(type(e).__name__, str(e)) - raise ApiException(status=0, reason=msg) - - if _preload_content: - r = RESTResponse(r) - - # log response body - logger.debug("response body: %s", r.data) - - if not 200 <= r.status <= 299: - if r.status == 400: - raise BadRequestException(http_resp=r) - - if r.status == 401: - raise UnauthorizedException(http_resp=r) - - if r.status == 403: - raise ForbiddenException(http_resp=r) - - if r.status == 404: - raise NotFoundException(http_resp=r) - - if 500 <= r.status <= 599: - raise ServiceException(http_resp=r) - - raise ApiException(http_resp=r) - - return r - - def get_request( - self, - url, - headers=None, - query_params=None, - _preload_content=True, - _request_timeout=None, - ): - return self.request( - "GET", - url, - headers=headers, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - query_params=query_params, - ) - - def head_request( - self, - url, - headers=None, - query_params=None, - _preload_content=True, - _request_timeout=None, - ): - return self.request( - "HEAD", - url, - headers=headers, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - query_params=query_params, - ) - - def options_request( - self, - url, - headers=None, - query_params=None, - post_params=None, - body=None, - _preload_content=True, - _request_timeout=None, - ): - return self.request( - "OPTIONS", - url, - headers=headers, - query_params=query_params, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body, - ) - - def delete_request( - self, - url, - headers=None, - query_params=None, - body=None, - _preload_content=True, - _request_timeout=None, - ): - return self.request( - "DELETE", - url, - headers=headers, - query_params=query_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body, - ) - - def post_request( - self, - url, - headers=None, - query_params=None, - post_params=None, - body=None, - _preload_content=True, - _request_timeout=None, - ): - return self.request( - "POST", - url, - headers=headers, - query_params=query_params, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body, - ) - - def put_request( - self, - url, - headers=None, - query_params=None, - post_params=None, - body=None, - _preload_content=True, - _request_timeout=None, - ): - return self.request( - "PUT", - url, - headers=headers, - query_params=query_params, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body, - ) - - def patch_request( - self, - url, - headers=None, - query_params=None, - post_params=None, - body=None, - _preload_content=True, - _request_timeout=None, - ): - return self.request( - "PATCH", - url, - headers=headers, - query_params=query_params, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body, - ) diff --git a/libs/openchallenges/api-client-python/poetry.lock b/libs/openchallenges/api-client-python/poetry.lock deleted file mode 100644 index 83705ea644..0000000000 --- a/libs/openchallenges/api-client-python/poetry.lock +++ /dev/null @@ -1,408 +0,0 @@ -# This file is automatically @generated by Poetry 1.6.1 and should not be changed by hand. - -[[package]] -name = "aenum" -version = "3.1.15" -description = "Advanced Enumerations (compatible with Python's stdlib Enum), NamedTuples, and NamedConstants" -optional = false -python-versions = "*" -files = [ - {file = "aenum-3.1.15-py2-none-any.whl", hash = "sha256:27b1710b9d084de6e2e695dab78fe9f269de924b51ae2850170ee7e1ca6288a5"}, - {file = "aenum-3.1.15-py3-none-any.whl", hash = "sha256:e0dfaeea4c2bd362144b87377e2c61d91958c5ed0b4daf89cb6f45ae23af6288"}, - {file = "aenum-3.1.15.tar.gz", hash = "sha256:8cbd76cd18c4f870ff39b24284d3ea028fbe8731a58df3aa581e434c575b9559"}, -] - -[[package]] -name = "colorama" -version = "0.4.6" -description = "Cross-platform colored terminal text." -optional = false -python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*,>=2.7" -files = [ - {file = "colorama-0.4.6-py2.py3-none-any.whl", hash = "sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6"}, - {file = "colorama-0.4.6.tar.gz", hash = "sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44"}, -] - -[[package]] -name = "distlib" -version = "0.3.7" -description = "Distribution utilities" -optional = false -python-versions = "*" -files = [ - {file = "distlib-0.3.7-py2.py3-none-any.whl", hash = "sha256:2e24928bc811348f0feb63014e97aaae3037f2cf48712d51ae61df7fd6075057"}, - {file = "distlib-0.3.7.tar.gz", hash = "sha256:9dafe54b34a028eafd95039d5e5d4851a13734540f1331060d31c9916e7147a8"}, -] - -[[package]] -name = "exceptiongroup" -version = "1.1.3" -description = "Backport of PEP 654 (exception groups)" -optional = false -python-versions = ">=3.7" -files = [ - {file = "exceptiongroup-1.1.3-py3-none-any.whl", hash = "sha256:343280667a4585d195ca1cf9cef84a4e178c4b6cf2274caef9859782b567d5e3"}, - {file = "exceptiongroup-1.1.3.tar.gz", hash = "sha256:097acd85d473d75af5bb98e41b61ff7fe35efe6675e4f9370ec6ec5126d160e9"}, -] - -[package.extras] -test = ["pytest (>=6)"] - -[[package]] -name = "filelock" -version = "3.12.2" -description = "A platform independent file lock." -optional = false -python-versions = ">=3.7" -files = [ - {file = "filelock-3.12.2-py3-none-any.whl", hash = "sha256:cbb791cdea2a72f23da6ac5b5269ab0a0d161e9ef0100e653b69049a7706d1ec"}, - {file = "filelock-3.12.2.tar.gz", hash = "sha256:002740518d8aa59a26b0c76e10fb8c6e15eae825d34b6fdf670333fd7b938d81"}, -] - -[package.extras] -docs = ["furo (>=2023.5.20)", "sphinx (>=7.0.1)", "sphinx-autodoc-typehints (>=1.23,!=1.23.4)"] -testing = ["covdefaults (>=2.3)", "coverage (>=7.2.7)", "diff-cover (>=7.5)", "pytest (>=7.3.1)", "pytest-cov (>=4.1)", "pytest-mock (>=3.10)", "pytest-timeout (>=2.1)"] - -[[package]] -name = "flake8" -version = "5.0.4" -description = "the modular source code checker: pep8 pyflakes and co" -optional = false -python-versions = ">=3.6.1" -files = [ - {file = "flake8-5.0.4-py2.py3-none-any.whl", hash = "sha256:7a1cf6b73744f5806ab95e526f6f0d8c01c66d7bbe349562d22dfca20610b248"}, - {file = "flake8-5.0.4.tar.gz", hash = "sha256:6fbe320aad8d6b95cec8b8e47bc933004678dc63095be98528b7bdd2a9f510db"}, -] - -[package.dependencies] -importlib-metadata = {version = ">=1.1.0,<4.3", markers = "python_version < \"3.8\""} -mccabe = ">=0.7.0,<0.8.0" -pycodestyle = ">=2.9.0,<2.10.0" -pyflakes = ">=2.5.0,<2.6.0" - -[[package]] -name = "importlib-metadata" -version = "4.2.0" -description = "Read metadata from Python packages" -optional = false -python-versions = ">=3.6" -files = [ - {file = "importlib_metadata-4.2.0-py3-none-any.whl", hash = "sha256:057e92c15bc8d9e8109738a48db0ccb31b4d9d5cfbee5a8670879a30be66304b"}, - {file = "importlib_metadata-4.2.0.tar.gz", hash = "sha256:b7e52a1f8dec14a75ea73e0891f3060099ca1d8e6a462a4dff11c3e119ea1b31"}, -] - -[package.dependencies] -typing-extensions = {version = ">=3.6.4", markers = "python_version < \"3.8\""} -zipp = ">=0.5" - -[package.extras] -docs = ["jaraco.packaging (>=8.2)", "rst.linker (>=1.9)", "sphinx"] -testing = ["flufl.flake8", "importlib-resources (>=1.3)", "packaging", "pep517", "pyfakefs", "pytest (>=4.6)", "pytest-black (>=0.3.7)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=1.0.1)", "pytest-flake8", "pytest-mypy"] - -[[package]] -name = "iniconfig" -version = "2.0.0" -description = "brain-dead simple config-ini parsing" -optional = false -python-versions = ">=3.7" -files = [ - {file = "iniconfig-2.0.0-py3-none-any.whl", hash = "sha256:b6a85871a79d2e3b22d2d1b94ac2824226a63c6b741c88f7ae975f18b6778374"}, - {file = "iniconfig-2.0.0.tar.gz", hash = "sha256:2d91e135bf72d31a410b17c16da610a82cb55f6b0477d1a902134b24a455b8b3"}, -] - -[[package]] -name = "mccabe" -version = "0.7.0" -description = "McCabe checker, plugin for flake8" -optional = false -python-versions = ">=3.6" -files = [ - {file = "mccabe-0.7.0-py2.py3-none-any.whl", hash = "sha256:6c2d30ab6be0e4a46919781807b4f0d834ebdd6c6e3dca0bda5a15f863427b6e"}, - {file = "mccabe-0.7.0.tar.gz", hash = "sha256:348e0240c33b60bbdf4e523192ef919f28cb2c3d7d5c7794f74009290f236325"}, -] - -[[package]] -name = "packaging" -version = "23.2" -description = "Core utilities for Python packages" -optional = false -python-versions = ">=3.7" -files = [ - {file = "packaging-23.2-py3-none-any.whl", hash = "sha256:8c491190033a9af7e1d931d0b5dacc2ef47509b34dd0de67ed209b5203fc88c7"}, - {file = "packaging-23.2.tar.gz", hash = "sha256:048fb0e9405036518eaaf48a55953c750c11e1a1b68e0dd1a9d62ed0c092cfc5"}, -] - -[[package]] -name = "platformdirs" -version = "2.6.2" -description = "A small Python package for determining appropriate platform-specific dirs, e.g. a \"user data dir\"." -optional = false -python-versions = ">=3.7" -files = [ - {file = "platformdirs-2.6.2-py3-none-any.whl", hash = "sha256:83c8f6d04389165de7c9b6f0c682439697887bca0aa2f1c87ef1826be3584490"}, - {file = "platformdirs-2.6.2.tar.gz", hash = "sha256:e1fea1fe471b9ff8332e229df3cb7de4f53eeea4998d3b6bfff542115e998bd2"}, -] - -[package.dependencies] -typing-extensions = {version = ">=4.4", markers = "python_version < \"3.8\""} - -[package.extras] -docs = ["furo (>=2022.12.7)", "proselint (>=0.13)", "sphinx (>=5.3)", "sphinx-autodoc-typehints (>=1.19.5)"] -test = ["appdirs (==1.4.4)", "covdefaults (>=2.2.2)", "pytest (>=7.2)", "pytest-cov (>=4)", "pytest-mock (>=3.10)"] - -[[package]] -name = "pluggy" -version = "1.2.0" -description = "plugin and hook calling mechanisms for python" -optional = false -python-versions = ">=3.7" -files = [ - {file = "pluggy-1.2.0-py3-none-any.whl", hash = "sha256:c2fd55a7d7a3863cba1a013e4e2414658b1d07b6bc57b3919e0c63c9abb99849"}, - {file = "pluggy-1.2.0.tar.gz", hash = "sha256:d12f0c4b579b15f5e054301bb226ee85eeeba08ffec228092f8defbaa3a4c4b3"}, -] - -[package.dependencies] -importlib-metadata = {version = ">=0.12", markers = "python_version < \"3.8\""} - -[package.extras] -dev = ["pre-commit", "tox"] -testing = ["pytest", "pytest-benchmark"] - -[[package]] -name = "py" -version = "1.11.0" -description = "library with cross-python path, ini-parsing, io, code, log facilities" -optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" -files = [ - {file = "py-1.11.0-py2.py3-none-any.whl", hash = "sha256:607c53218732647dff4acdfcd50cb62615cedf612e72d1724fb1a0cc6405b378"}, - {file = "py-1.11.0.tar.gz", hash = "sha256:51c75c4126074b472f746a24399ad32f6053d1b34b68d2fa41e558e6f4a98719"}, -] - -[[package]] -name = "pycodestyle" -version = "2.9.1" -description = "Python style guide checker" -optional = false -python-versions = ">=3.6" -files = [ - {file = "pycodestyle-2.9.1-py2.py3-none-any.whl", hash = "sha256:d1735fc58b418fd7c5f658d28d943854f8a849b01a5d0a1e6f3f3fdd0166804b"}, - {file = "pycodestyle-2.9.1.tar.gz", hash = "sha256:2c9607871d58c76354b697b42f5d57e1ada7d261c261efac224b664affdc5785"}, -] - -[[package]] -name = "pydantic" -version = "1.10.13" -description = "Data validation and settings management using python type hints" -optional = false -python-versions = ">=3.7" -files = [ - {file = "pydantic-1.10.13-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:efff03cc7a4f29d9009d1c96ceb1e7a70a65cfe86e89d34e4a5f2ab1e5693737"}, - {file = "pydantic-1.10.13-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:3ecea2b9d80e5333303eeb77e180b90e95eea8f765d08c3d278cd56b00345d01"}, - {file = "pydantic-1.10.13-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1740068fd8e2ef6eb27a20e5651df000978edce6da6803c2bef0bc74540f9548"}, - {file = "pydantic-1.10.13-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:84bafe2e60b5e78bc64a2941b4c071a4b7404c5c907f5f5a99b0139781e69ed8"}, - {file = "pydantic-1.10.13-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:bc0898c12f8e9c97f6cd44c0ed70d55749eaf783716896960b4ecce2edfd2d69"}, - {file = "pydantic-1.10.13-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:654db58ae399fe6434e55325a2c3e959836bd17a6f6a0b6ca8107ea0571d2e17"}, - {file = "pydantic-1.10.13-cp310-cp310-win_amd64.whl", hash = "sha256:75ac15385a3534d887a99c713aa3da88a30fbd6204a5cd0dc4dab3d770b9bd2f"}, - {file = "pydantic-1.10.13-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:c553f6a156deb868ba38a23cf0df886c63492e9257f60a79c0fd8e7173537653"}, - {file = "pydantic-1.10.13-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:5e08865bc6464df8c7d61439ef4439829e3ab62ab1669cddea8dd00cd74b9ffe"}, - {file = "pydantic-1.10.13-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e31647d85a2013d926ce60b84f9dd5300d44535a9941fe825dc349ae1f760df9"}, - {file = "pydantic-1.10.13-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:210ce042e8f6f7c01168b2d84d4c9eb2b009fe7bf572c2266e235edf14bacd80"}, - {file = "pydantic-1.10.13-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:8ae5dd6b721459bfa30805f4c25880e0dd78fc5b5879f9f7a692196ddcb5a580"}, - {file = "pydantic-1.10.13-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:f8e81fc5fb17dae698f52bdd1c4f18b6ca674d7068242b2aff075f588301bbb0"}, - {file = "pydantic-1.10.13-cp311-cp311-win_amd64.whl", hash = "sha256:61d9dce220447fb74f45e73d7ff3b530e25db30192ad8d425166d43c5deb6df0"}, - {file = "pydantic-1.10.13-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:4b03e42ec20286f052490423682016fd80fda830d8e4119f8ab13ec7464c0132"}, - {file = "pydantic-1.10.13-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f59ef915cac80275245824e9d771ee939133be38215555e9dc90c6cb148aaeb5"}, - {file = "pydantic-1.10.13-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:5a1f9f747851338933942db7af7b6ee8268568ef2ed86c4185c6ef4402e80ba8"}, - {file = "pydantic-1.10.13-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:97cce3ae7341f7620a0ba5ef6cf043975cd9d2b81f3aa5f4ea37928269bc1b87"}, - {file = "pydantic-1.10.13-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:854223752ba81e3abf663d685f105c64150873cc6f5d0c01d3e3220bcff7d36f"}, - {file = "pydantic-1.10.13-cp37-cp37m-win_amd64.whl", hash = "sha256:b97c1fac8c49be29486df85968682b0afa77e1b809aff74b83081cc115e52f33"}, - {file = "pydantic-1.10.13-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:c958d053453a1c4b1c2062b05cd42d9d5c8eb67537b8d5a7e3c3032943ecd261"}, - {file = "pydantic-1.10.13-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:4c5370a7edaac06daee3af1c8b1192e305bc102abcbf2a92374b5bc793818599"}, - {file = "pydantic-1.10.13-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7d6f6e7305244bddb4414ba7094ce910560c907bdfa3501e9db1a7fd7eaea127"}, - {file = "pydantic-1.10.13-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d3a3c792a58e1622667a2837512099eac62490cdfd63bd407993aaf200a4cf1f"}, - {file = "pydantic-1.10.13-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:c636925f38b8db208e09d344c7aa4f29a86bb9947495dd6b6d376ad10334fb78"}, - {file = "pydantic-1.10.13-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:678bcf5591b63cc917100dc50ab6caebe597ac67e8c9ccb75e698f66038ea953"}, - {file = "pydantic-1.10.13-cp38-cp38-win_amd64.whl", hash = "sha256:6cf25c1a65c27923a17b3da28a0bdb99f62ee04230c931d83e888012851f4e7f"}, - {file = "pydantic-1.10.13-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:8ef467901d7a41fa0ca6db9ae3ec0021e3f657ce2c208e98cd511f3161c762c6"}, - {file = "pydantic-1.10.13-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:968ac42970f57b8344ee08837b62f6ee6f53c33f603547a55571c954a4225691"}, - {file = "pydantic-1.10.13-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9849f031cf8a2f0a928fe885e5a04b08006d6d41876b8bbd2fc68a18f9f2e3fd"}, - {file = "pydantic-1.10.13-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:56e3ff861c3b9c6857579de282ce8baabf443f42ffba355bf070770ed63e11e1"}, - {file = "pydantic-1.10.13-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:9f00790179497767aae6bcdc36355792c79e7bbb20b145ff449700eb076c5f96"}, - {file = "pydantic-1.10.13-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:75b297827b59bc229cac1a23a2f7a4ac0031068e5be0ce385be1462e7e17a35d"}, - {file = "pydantic-1.10.13-cp39-cp39-win_amd64.whl", hash = "sha256:e70ca129d2053fb8b728ee7d1af8e553a928d7e301a311094b8a0501adc8763d"}, - {file = "pydantic-1.10.13-py3-none-any.whl", hash = "sha256:b87326822e71bd5f313e7d3bfdc77ac3247035ac10b0c0618bd99dcf95b1e687"}, - {file = "pydantic-1.10.13.tar.gz", hash = "sha256:32c8b48dcd3b2ac4e78b0ba4af3a2c2eb6048cb75202f0ea7b34feb740efc340"}, -] - -[package.dependencies] -typing-extensions = ">=4.2.0" - -[package.extras] -dotenv = ["python-dotenv (>=0.10.4)"] -email = ["email-validator (>=1.0.3)"] - -[[package]] -name = "pyflakes" -version = "2.5.0" -description = "passive checker of Python programs" -optional = false -python-versions = ">=3.6" -files = [ - {file = "pyflakes-2.5.0-py2.py3-none-any.whl", hash = "sha256:4579f67d887f804e67edb544428f264b7b24f435b263c4614f384135cea553d2"}, - {file = "pyflakes-2.5.0.tar.gz", hash = "sha256:491feb020dca48ccc562a8c0cbe8df07ee13078df59813b83959cbdada312ea3"}, -] - -[[package]] -name = "pytest" -version = "7.4.2" -description = "pytest: simple powerful testing with Python" -optional = false -python-versions = ">=3.7" -files = [ - {file = "pytest-7.4.2-py3-none-any.whl", hash = "sha256:1d881c6124e08ff0a1bb75ba3ec0bfd8b5354a01c194ddd5a0a870a48d99b002"}, - {file = "pytest-7.4.2.tar.gz", hash = "sha256:a766259cfab564a2ad52cb1aae1b881a75c3eb7e34ca3779697c23ed47c47069"}, -] - -[package.dependencies] -colorama = {version = "*", markers = "sys_platform == \"win32\""} -exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} -importlib-metadata = {version = ">=0.12", markers = "python_version < \"3.8\""} -iniconfig = "*" -packaging = "*" -pluggy = ">=0.12,<2.0" -tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""} - -[package.extras] -testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] - -[[package]] -name = "python-dateutil" -version = "2.8.2" -description = "Extensions to the standard Python datetime module" -optional = false -python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,>=2.7" -files = [ - {file = "python-dateutil-2.8.2.tar.gz", hash = "sha256:0123cacc1627ae19ddf3c27a5de5bd67ee4586fbdd6440d9748f8abb483d3e86"}, - {file = "python_dateutil-2.8.2-py2.py3-none-any.whl", hash = "sha256:961d03dc3453ebbc59dbdea9e4e11c5651520a876d0f4db161e8674aae935da9"}, -] - -[package.dependencies] -six = ">=1.5" - -[[package]] -name = "six" -version = "1.16.0" -description = "Python 2 and 3 compatibility utilities" -optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*" -files = [ - {file = "six-1.16.0-py2.py3-none-any.whl", hash = "sha256:8abb2f1d86890a2dfb989f9a77cfcfd3e47c2a354b01111771326f8aa26e0254"}, - {file = "six-1.16.0.tar.gz", hash = "sha256:1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926"}, -] - -[[package]] -name = "tomli" -version = "2.0.1" -description = "A lil' TOML parser" -optional = false -python-versions = ">=3.7" -files = [ - {file = "tomli-2.0.1-py3-none-any.whl", hash = "sha256:939de3e7a6161af0c887ef91b7d41a53e7c5a1ca976325f429cb46ea9bc30ecc"}, - {file = "tomli-2.0.1.tar.gz", hash = "sha256:de526c12914f0c550d15924c62d72abc48d6fe7364aa87328337a31007fe8a4f"}, -] - -[[package]] -name = "tox" -version = "3.28.0" -description = "tox is a generic virtualenv management and test command line tool" -optional = false -python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,>=2.7" -files = [ - {file = "tox-3.28.0-py2.py3-none-any.whl", hash = "sha256:57b5ab7e8bb3074edc3c0c0b4b192a4f3799d3723b2c5b76f1fa9f2d40316eea"}, - {file = "tox-3.28.0.tar.gz", hash = "sha256:d0d28f3fe6d6d7195c27f8b054c3e99d5451952b54abdae673b71609a581f640"}, -] - -[package.dependencies] -colorama = {version = ">=0.4.1", markers = "platform_system == \"Windows\""} -filelock = ">=3.0.0" -importlib-metadata = {version = ">=0.12", markers = "python_version < \"3.8\""} -packaging = ">=14" -pluggy = ">=0.12.0" -py = ">=1.4.17" -six = ">=1.14.0" -tomli = {version = ">=2.0.1", markers = "python_version >= \"3.7\" and python_version < \"3.11\""} -virtualenv = ">=16.0.0,<20.0.0 || >20.0.0,<20.0.1 || >20.0.1,<20.0.2 || >20.0.2,<20.0.3 || >20.0.3,<20.0.4 || >20.0.4,<20.0.5 || >20.0.5,<20.0.6 || >20.0.6,<20.0.7 || >20.0.7" - -[package.extras] -docs = ["pygments-github-lexers (>=0.0.5)", "sphinx (>=2.0.0)", "sphinxcontrib-autoprogram (>=0.1.5)", "towncrier (>=18.5.0)"] -testing = ["flaky (>=3.4.0)", "freezegun (>=0.3.11)", "pathlib2 (>=2.3.3)", "psutil (>=5.6.1)", "pytest (>=4.0.0)", "pytest-cov (>=2.5.1)", "pytest-mock (>=1.10.0)", "pytest-randomly (>=1.0.0)"] - -[[package]] -name = "typing-extensions" -version = "4.7.1" -description = "Backported and Experimental Type Hints for Python 3.7+" -optional = false -python-versions = ">=3.7" -files = [ - {file = "typing_extensions-4.7.1-py3-none-any.whl", hash = "sha256:440d5dd3af93b060174bf433bccd69b0babc3b15b1a8dca43789fd7f61514b36"}, - {file = "typing_extensions-4.7.1.tar.gz", hash = "sha256:b75ddc264f0ba5615db7ba217daeb99701ad295353c45f9e95963337ceeeffb2"}, -] - -[[package]] -name = "urllib3" -version = "2.0.7" -description = "HTTP library with thread-safe connection pooling, file post, and more." -optional = false -python-versions = ">=3.7" -files = [ - {file = "urllib3-2.0.7-py3-none-any.whl", hash = "sha256:fdb6d215c776278489906c2f8916e6e7d4f5a9b602ccbcfdf7f016fc8da0596e"}, - {file = "urllib3-2.0.7.tar.gz", hash = "sha256:c97dfde1f7bd43a71c8d2a58e369e9b2bf692d1334ea9f9cae55add7d0dd0f84"}, -] - -[package.extras] -brotli = ["brotli (>=1.0.9)", "brotlicffi (>=0.8.0)"] -secure = ["certifi", "cryptography (>=1.9)", "idna (>=2.0.0)", "pyopenssl (>=17.1.0)", "urllib3-secure-extra"] -socks = ["pysocks (>=1.5.6,!=1.5.7,<2.0)"] -zstd = ["zstandard (>=0.18.0)"] - -[[package]] -name = "virtualenv" -version = "20.16.2" -description = "Virtual Python Environment builder" -optional = false -python-versions = ">=3.6" -files = [ - {file = "virtualenv-20.16.2-py2.py3-none-any.whl", hash = "sha256:635b272a8e2f77cb051946f46c60a54ace3cb5e25568228bd6b57fc70eca9ff3"}, - {file = "virtualenv-20.16.2.tar.gz", hash = "sha256:0ef5be6d07181946891f5abc8047fda8bc2f0b4b9bf222c64e6e8963baee76db"}, -] - -[package.dependencies] -distlib = ">=0.3.1,<1" -filelock = ">=3.2,<4" -importlib-metadata = {version = ">=0.12", markers = "python_version < \"3.8\""} -platformdirs = ">=2,<3" - -[package.extras] -docs = ["proselint (>=0.10.2)", "sphinx (>=3)", "sphinx-argparse (>=0.2.5)", "sphinx-rtd-theme (>=0.4.3)", "towncrier (>=21.3)"] -testing = ["coverage (>=4)", "coverage-enable-subprocess (>=1)", "flaky (>=3)", "packaging (>=20.0)", "pytest (>=4)", "pytest-env (>=0.6.2)", "pytest-freezegun (>=0.4.1)", "pytest-mock (>=2)", "pytest-randomly (>=1)", "pytest-timeout (>=1)"] - -[[package]] -name = "zipp" -version = "3.15.0" -description = "Backport of pathlib-compatible object wrapper for zip files" -optional = false -python-versions = ">=3.7" -files = [ - {file = "zipp-3.15.0-py3-none-any.whl", hash = "sha256:48904fc76a60e542af151aded95726c1a5c34ed43ab4134b597665c86d7ad556"}, - {file = "zipp-3.15.0.tar.gz", hash = "sha256:112929ad649da941c23de50f356a2b5570c954b65150642bccdd66bf194d224b"}, -] - -[package.extras] -docs = ["furo", "jaraco.packaging (>=9)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx (>=3.5)", "sphinx-lint"] -testing = ["big-O", "flake8 (<5)", "jaraco.functools", "jaraco.itertools", "more-itertools", "pytest (>=6)", "pytest-black (>=0.3.7)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=1.3)", "pytest-flake8", "pytest-mypy (>=0.9.1)"] - -[metadata] -lock-version = "2.0" -python-versions = "^3.7" -content-hash = "49bfc19f1676bdfd1e1abad71039f6f9b354d3a84fdeed7d273f5bfba014f3e2" diff --git a/libs/openchallenges/api-client-python/prepare-python.sh b/libs/openchallenges/api-client-python/prepare-python.sh deleted file mode 100755 index 81c14b121f..0000000000 --- a/libs/openchallenges/api-client-python/prepare-python.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/usr/bin/env bash - -pyenv install --skip-existing 3.9.2 -pyenv local 3.9.2 -poetry env use 3.9.2 -poetry install \ No newline at end of file diff --git a/libs/openchallenges/api-client-python/project.json b/libs/openchallenges/api-client-python/project.json deleted file mode 100644 index 852abf9106..0000000000 --- a/libs/openchallenges/api-client-python/project.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "name": "openchallenges-api-client-python", - "$schema": "../../../node_modules/nx/schemas/project-schema.json", - "sourceRoot": "libs/openchallenges/api-client-python/src", - "projectType": "library", - "prefix": "openchallenges", - "targets": { - "prepare": { - "executor": "nx:run-commands", - "options": { - "command": "./prepare-python.sh", - "cwd": "{projectRoot}" - } - }, - "generate": { - "executor": "nx:run-commands", - "options": { - "commands": [ - "rm -fr src/*", - "openapi-generator-cli generate", - "echo 'TODO Format generated code'" - ], - "cwd": "{projectRoot}", - "parallel": false - }, - "dependsOn": ["^build"] - } - }, - "tags": ["language:python", "package-manager:poetry"], - "implicitDependencies": ["openchallenges-api-description"] -} diff --git a/libs/openchallenges/api-client-python/pyproject.toml b/libs/openchallenges/api-client-python/pyproject.toml deleted file mode 100644 index 238a9d8a3b..0000000000 --- a/libs/openchallenges/api-client-python/pyproject.toml +++ /dev/null @@ -1,30 +0,0 @@ -[tool.poetry] -name = "openchallenges-client" -version = "1.0.0" -description = "OpenChallenges REST API" -authors = ["Support "] -license = "Apache 2.0" -readme = "README.md" -repository = "https://github.com/GIT_USER_ID/GIT_REPO_ID" -keywords = ["OpenAPI", "OpenAPI-Generator", "OpenChallenges REST API"] -include = ["openchallenges_client/py.typed"] - -[tool.poetry.dependencies] -python = "^3.7" - -urllib3 = ">= 1.25.3" -python-dateutil = ">=2.8.2" -pydantic = "^1.10.5, <2" -aenum = ">=3.1.11" - -[tool.poetry.dev-dependencies] -pytest = ">=7.2.1" -tox = ">=3.9.0" -flake8 = ">=4.0.0" - -[build-system] -requires = ["setuptools"] -build-backend = "setuptools.build_meta" - -[tool.pylint.'MESSAGES CONTROL'] -extension-pkg-whitelist = "pydantic" diff --git a/libs/openchallenges/api-client-python/requirements.txt b/libs/openchallenges/api-client-python/requirements.txt deleted file mode 100644 index 258c179c10..0000000000 --- a/libs/openchallenges/api-client-python/requirements.txt +++ /dev/null @@ -1,5 +0,0 @@ -python_dateutil >= 2.5.3 -setuptools >= 21.0.0 -urllib3 >= 1.25.3, < 2.1.0 -pydantic >= 1.10.5, < 2 -aenum >= 3.1.11 diff --git a/libs/openchallenges/api-client-python/setup.py b/libs/openchallenges/api-client-python/setup.py deleted file mode 100644 index 8ea5c2f957..0000000000 --- a/libs/openchallenges/api-client-python/setup.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding: utf-8 - -""" - OpenChallenges REST API - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from setuptools import setup, find_packages # noqa: H301 - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools -NAME = "openchallenges-client" -VERSION = "1.0.0" -PYTHON_REQUIRES = ">=3.7" -REQUIRES = [ - "urllib3 >= 1.25.3, < 2.1.0", - "python-dateutil", - "pydantic >= 1.10.5, < 2", - "aenum", -] - -setup( - name=NAME, - version=VERSION, - description="OpenChallenges REST API", - author="Support", - author_email="team@openapitools.org", - url="", - keywords=["OpenAPI", "OpenAPI-Generator", "OpenChallenges REST API"], - install_requires=REQUIRES, - packages=find_packages(exclude=["test", "tests"]), - include_package_data=True, - license="Apache 2.0", - long_description_content_type="text/markdown", - long_description="""\ - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - """, # noqa: E501 - package_data={"openchallenges_client": ["py.typed"]}, -) diff --git a/libs/openchallenges/api-client-python/test-requirements.txt b/libs/openchallenges/api-client-python/test-requirements.txt deleted file mode 100644 index 3a0d0b939a..0000000000 --- a/libs/openchallenges/api-client-python/test-requirements.txt +++ /dev/null @@ -1,3 +0,0 @@ -pytest~=7.1.3 -pytest-cov>=2.8.1 -pytest-randomly>=3.12.0 diff --git a/libs/openchallenges/api-client-python/test/__init__.py b/libs/openchallenges/api-client-python/test/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/libs/openchallenges/api-client-python/test/test_basic_error.py b/libs/openchallenges/api-client-python/test/test_basic_error.py deleted file mode 100644 index 2e9f48ff56..0000000000 --- a/libs/openchallenges/api-client-python/test/test_basic_error.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding: utf-8 - -""" - OpenChallenges REST API - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -import openchallenges_client -from openchallenges_client.models.basic_error import BasicError # noqa: E501 -from openchallenges_client.rest import ApiException - - -class TestBasicError(unittest.TestCase): - """BasicError unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional): - """Test BasicError - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included""" - # uncomment below to create an instance of `BasicError` - """ - model = openchallenges_client.models.basic_error.BasicError() # noqa: E501 - if include_optional : - return BasicError( - title = '', - status = 56, - detail = '', - type = '' - ) - else : - return BasicError( - title = '', - status = 56, - ) - """ - - def testBasicError(self): - """Test BasicError""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - - -if __name__ == "__main__": - unittest.main() diff --git a/libs/openchallenges/api-client-python/test/test_challenge.py b/libs/openchallenges/api-client-python/test/test_challenge.py deleted file mode 100644 index 9967463669..0000000000 --- a/libs/openchallenges/api-client-python/test/test_challenge.py +++ /dev/null @@ -1,105 +0,0 @@ -# coding: utf-8 - -""" - OpenChallenges REST API - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -import openchallenges_client -from openchallenges_client.models.challenge import Challenge # noqa: E501 -from openchallenges_client.rest import ApiException - - -class TestChallenge(unittest.TestCase): - """Challenge unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional): - """Test Challenge - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included""" - # uncomment below to create an instance of `Challenge` - """ - model = openchallenges_client.models.challenge.Challenge() # noqa: E501 - if include_optional : - return Challenge( - id = 1, - slug = 'awesome-challenge', - name = '012', - headline = 'Example challenge headline', - description = 'This is an example description of the challenge.', - doi = '', - status = 'active', - difficulty = 'intermediate', - platform = openchallenges_client.models.simple_challenge_platform.SimpleChallengePlatform( - id = 1, - slug = 'example-challenge-platform', - name = '012', ), - website_url = '', - avatar_url = '', - incentives = [ - 'publication' - ], - submission_types = [ - 'container_image' - ], - input_data_types = [ - openchallenges_client.models.simple_challenge_input_data_type.SimpleChallengeInputDataType( - id = 1, - slug = 'gene-expression', - name = 'gene expression', ) - ], - start_date = 'Fri Jul 21 00:00:00 UTC 2017', - end_date = 'Fri Jul 21 00:00:00 UTC 2017', - starred_count = 56, - created_at = '2022-07-04T22:19:11Z', - updated_at = '2022-07-04T22:19:11Z' - ) - else : - return Challenge( - id = 1, - slug = 'awesome-challenge', - name = '012', - description = 'This is an example description of the challenge.', - status = 'active', - difficulty = 'intermediate', - platform = openchallenges_client.models.simple_challenge_platform.SimpleChallengePlatform( - id = 1, - slug = 'example-challenge-platform', - name = '012', ), - incentives = [ - 'publication' - ], - submission_types = [ - 'container_image' - ], - starred_count = 56, - created_at = '2022-07-04T22:19:11Z', - updated_at = '2022-07-04T22:19:11Z', - ) - """ - - def testChallenge(self): - """Test Challenge""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - - -if __name__ == "__main__": - unittest.main() diff --git a/libs/openchallenges/api-client-python/test/test_challenge_analytics_api.py b/libs/openchallenges/api-client-python/test/test_challenge_analytics_api.py deleted file mode 100644 index c976c15186..0000000000 --- a/libs/openchallenges/api-client-python/test/test_challenge_analytics_api.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding: utf-8 - -""" - OpenChallenges REST API - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -import openchallenges_client -from openchallenges_client.api.challenge_analytics_api import ( - ChallengeAnalyticsApi, -) # noqa: E501 -from openchallenges_client.rest import ApiException - - -class TestChallengeAnalyticsApi(unittest.TestCase): - """ChallengeAnalyticsApi unit test stubs""" - - def setUp(self): - self.api = ( - openchallenges_client.api.challenge_analytics_api.ChallengeAnalyticsApi() - ) # noqa: E501 - - def tearDown(self): - pass - - def test_get_challenges_per_year(self): - """Test case for get_challenges_per_year - - Get the number of challenges tracked per year # noqa: E501 - """ - pass - - -if __name__ == "__main__": - unittest.main() diff --git a/libs/openchallenges/api-client-python/test/test_challenge_api.py b/libs/openchallenges/api-client-python/test/test_challenge_api.py deleted file mode 100644 index 4c2042e3d3..0000000000 --- a/libs/openchallenges/api-client-python/test/test_challenge_api.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding: utf-8 - -""" - OpenChallenges REST API - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -import openchallenges_client -from openchallenges_client.api.challenge_api import ChallengeApi # noqa: E501 -from openchallenges_client.rest import ApiException - - -class TestChallengeApi(unittest.TestCase): - """ChallengeApi unit test stubs""" - - def setUp(self): - self.api = openchallenges_client.api.challenge_api.ChallengeApi() # noqa: E501 - - def tearDown(self): - pass - - def test_get_challenge(self): - """Test case for get_challenge - - Get a challenge # noqa: E501 - """ - pass - - def test_list_challenges(self): - """Test case for list_challenges - - List challenges # noqa: E501 - """ - pass - - -if __name__ == "__main__": - unittest.main() diff --git a/libs/openchallenges/api-client-python/test/test_challenge_category.py b/libs/openchallenges/api-client-python/test/test_challenge_category.py deleted file mode 100644 index beafb7da42..0000000000 --- a/libs/openchallenges/api-client-python/test/test_challenge_category.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding: utf-8 - -""" - OpenChallenges REST API - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -import openchallenges_client -from openchallenges_client.models.challenge_category import ( - ChallengeCategory, -) # noqa: E501 -from openchallenges_client.rest import ApiException - - -class TestChallengeCategory(unittest.TestCase): - """ChallengeCategory unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testChallengeCategory(self): - """Test ChallengeCategory""" - # inst = ChallengeCategory() - - -if __name__ == "__main__": - unittest.main() diff --git a/libs/openchallenges/api-client-python/test/test_challenge_contribution.py b/libs/openchallenges/api-client-python/test/test_challenge_contribution.py deleted file mode 100644 index 39b4265c39..0000000000 --- a/libs/openchallenges/api-client-python/test/test_challenge_contribution.py +++ /dev/null @@ -1,63 +0,0 @@ -# coding: utf-8 - -""" - OpenChallenges REST API - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -import openchallenges_client -from openchallenges_client.models.challenge_contribution import ( - ChallengeContribution, -) # noqa: E501 -from openchallenges_client.rest import ApiException - - -class TestChallengeContribution(unittest.TestCase): - """ChallengeContribution unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional): - """Test ChallengeContribution - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included""" - # uncomment below to create an instance of `ChallengeContribution` - """ - model = openchallenges_client.models.challenge_contribution.ChallengeContribution() # noqa: E501 - if include_optional : - return ChallengeContribution( - challenge_id = 1, - organization_id = 1, - role = 'challenge_organizer' - ) - else : - return ChallengeContribution( - challenge_id = 1, - organization_id = 1, - role = 'challenge_organizer', - ) - """ - - def testChallengeContribution(self): - """Test ChallengeContribution""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - - -if __name__ == "__main__": - unittest.main() diff --git a/libs/openchallenges/api-client-python/test/test_challenge_contribution_api.py b/libs/openchallenges/api-client-python/test/test_challenge_contribution_api.py deleted file mode 100644 index f632ec9bea..0000000000 --- a/libs/openchallenges/api-client-python/test/test_challenge_contribution_api.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding: utf-8 - -""" - OpenChallenges REST API - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -import openchallenges_client -from openchallenges_client.api.challenge_contribution_api import ( - ChallengeContributionApi, -) # noqa: E501 -from openchallenges_client.rest import ApiException - - -class TestChallengeContributionApi(unittest.TestCase): - """ChallengeContributionApi unit test stubs""" - - def setUp(self): - self.api = ( - openchallenges_client.api.challenge_contribution_api.ChallengeContributionApi() - ) # noqa: E501 - - def tearDown(self): - pass - - def test_list_challenge_contributions(self): - """Test case for list_challenge_contributions - - List challenge contributions # noqa: E501 - """ - pass - - -if __name__ == "__main__": - unittest.main() diff --git a/libs/openchallenges/api-client-python/test/test_challenge_contribution_role.py b/libs/openchallenges/api-client-python/test/test_challenge_contribution_role.py deleted file mode 100644 index 4c58af003f..0000000000 --- a/libs/openchallenges/api-client-python/test/test_challenge_contribution_role.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding: utf-8 - -""" - OpenChallenges REST API - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -import openchallenges_client -from openchallenges_client.models.challenge_contribution_role import ( - ChallengeContributionRole, -) # noqa: E501 -from openchallenges_client.rest import ApiException - - -class TestChallengeContributionRole(unittest.TestCase): - """ChallengeContributionRole unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testChallengeContributionRole(self): - """Test ChallengeContributionRole""" - # inst = ChallengeContributionRole() - - -if __name__ == "__main__": - unittest.main() diff --git a/libs/openchallenges/api-client-python/test/test_challenge_contributions_page.py b/libs/openchallenges/api-client-python/test/test_challenge_contributions_page.py deleted file mode 100644 index 18dc5da8fd..0000000000 --- a/libs/openchallenges/api-client-python/test/test_challenge_contributions_page.py +++ /dev/null @@ -1,81 +0,0 @@ -# coding: utf-8 - -""" - OpenChallenges REST API - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -import openchallenges_client -from openchallenges_client.models.challenge_contributions_page import ( - ChallengeContributionsPage, -) # noqa: E501 -from openchallenges_client.rest import ApiException - - -class TestChallengeContributionsPage(unittest.TestCase): - """ChallengeContributionsPage unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional): - """Test ChallengeContributionsPage - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included""" - # uncomment below to create an instance of `ChallengeContributionsPage` - """ - model = openchallenges_client.models.challenge_contributions_page.ChallengeContributionsPage() # noqa: E501 - if include_optional : - return ChallengeContributionsPage( - number = 99, - size = 99, - total_elements = 99, - total_pages = 99, - has_next = True, - has_previous = True, - challenge_contributions = [ - openchallenges_client.models.challenge_contribution.ChallengeContribution( - challenge_id = 1, - organization_id = 1, - role = 'challenge_organizer', ) - ] - ) - else : - return ChallengeContributionsPage( - number = 99, - size = 99, - total_elements = 99, - total_pages = 99, - has_next = True, - has_previous = True, - challenge_contributions = [ - openchallenges_client.models.challenge_contribution.ChallengeContribution( - challenge_id = 1, - organization_id = 1, - role = 'challenge_organizer', ) - ], - ) - """ - - def testChallengeContributionsPage(self): - """Test ChallengeContributionsPage""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - - -if __name__ == "__main__": - unittest.main() diff --git a/libs/openchallenges/api-client-python/test/test_challenge_difficulty.py b/libs/openchallenges/api-client-python/test/test_challenge_difficulty.py deleted file mode 100644 index 936e75ed6e..0000000000 --- a/libs/openchallenges/api-client-python/test/test_challenge_difficulty.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding: utf-8 - -""" - OpenChallenges REST API - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -import openchallenges_client -from openchallenges_client.models.challenge_difficulty import ( - ChallengeDifficulty, -) # noqa: E501 -from openchallenges_client.rest import ApiException - - -class TestChallengeDifficulty(unittest.TestCase): - """ChallengeDifficulty unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testChallengeDifficulty(self): - """Test ChallengeDifficulty""" - # inst = ChallengeDifficulty() - - -if __name__ == "__main__": - unittest.main() diff --git a/libs/openchallenges/api-client-python/test/test_challenge_direction.py b/libs/openchallenges/api-client-python/test/test_challenge_direction.py deleted file mode 100644 index 8a0e3e208c..0000000000 --- a/libs/openchallenges/api-client-python/test/test_challenge_direction.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding: utf-8 - -""" - OpenChallenges REST API - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -import openchallenges_client -from openchallenges_client.models.challenge_direction import ( - ChallengeDirection, -) # noqa: E501 -from openchallenges_client.rest import ApiException - - -class TestChallengeDirection(unittest.TestCase): - """ChallengeDirection unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testChallengeDirection(self): - """Test ChallengeDirection""" - # inst = ChallengeDirection() - - -if __name__ == "__main__": - unittest.main() diff --git a/libs/openchallenges/api-client-python/test/test_challenge_incentive.py b/libs/openchallenges/api-client-python/test/test_challenge_incentive.py deleted file mode 100644 index 6d775ea62b..0000000000 --- a/libs/openchallenges/api-client-python/test/test_challenge_incentive.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding: utf-8 - -""" - OpenChallenges REST API - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -import openchallenges_client -from openchallenges_client.models.challenge_incentive import ( - ChallengeIncentive, -) # noqa: E501 -from openchallenges_client.rest import ApiException - - -class TestChallengeIncentive(unittest.TestCase): - """ChallengeIncentive unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testChallengeIncentive(self): - """Test ChallengeIncentive""" - # inst = ChallengeIncentive() - - -if __name__ == "__main__": - unittest.main() diff --git a/libs/openchallenges/api-client-python/test/test_challenge_input_data_type.py b/libs/openchallenges/api-client-python/test/test_challenge_input_data_type.py deleted file mode 100644 index 3fb173d3a9..0000000000 --- a/libs/openchallenges/api-client-python/test/test_challenge_input_data_type.py +++ /dev/null @@ -1,67 +0,0 @@ -# coding: utf-8 - -""" - OpenChallenges REST API - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -import openchallenges_client -from openchallenges_client.models.challenge_input_data_type import ( - ChallengeInputDataType, -) # noqa: E501 -from openchallenges_client.rest import ApiException - - -class TestChallengeInputDataType(unittest.TestCase): - """ChallengeInputDataType unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional): - """Test ChallengeInputDataType - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included""" - # uncomment below to create an instance of `ChallengeInputDataType` - """ - model = openchallenges_client.models.challenge_input_data_type.ChallengeInputDataType() # noqa: E501 - if include_optional : - return ChallengeInputDataType( - id = 1, - slug = 'gene-expression', - name = 'gene expression', - created_at = '2022-07-04T22:19:11Z', - updated_at = '2022-07-04T22:19:11Z' - ) - else : - return ChallengeInputDataType( - id = 1, - slug = 'gene-expression', - name = 'gene expression', - created_at = '2022-07-04T22:19:11Z', - updated_at = '2022-07-04T22:19:11Z', - ) - """ - - def testChallengeInputDataType(self): - """Test ChallengeInputDataType""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - - -if __name__ == "__main__": - unittest.main() diff --git a/libs/openchallenges/api-client-python/test/test_challenge_input_data_type_api.py b/libs/openchallenges/api-client-python/test/test_challenge_input_data_type_api.py deleted file mode 100644 index 0a197521f9..0000000000 --- a/libs/openchallenges/api-client-python/test/test_challenge_input_data_type_api.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding: utf-8 - -""" - OpenChallenges REST API - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -import openchallenges_client -from openchallenges_client.api.challenge_input_data_type_api import ( - ChallengeInputDataTypeApi, -) # noqa: E501 -from openchallenges_client.rest import ApiException - - -class TestChallengeInputDataTypeApi(unittest.TestCase): - """ChallengeInputDataTypeApi unit test stubs""" - - def setUp(self): - self.api = ( - openchallenges_client.api.challenge_input_data_type_api.ChallengeInputDataTypeApi() - ) # noqa: E501 - - def tearDown(self): - pass - - def test_list_challenge_input_data_types(self): - """Test case for list_challenge_input_data_types - - List challenge input data types # noqa: E501 - """ - pass - - -if __name__ == "__main__": - unittest.main() diff --git a/libs/openchallenges/api-client-python/test/test_challenge_input_data_type_direction.py b/libs/openchallenges/api-client-python/test/test_challenge_input_data_type_direction.py deleted file mode 100644 index 2d08012aa2..0000000000 --- a/libs/openchallenges/api-client-python/test/test_challenge_input_data_type_direction.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding: utf-8 - -""" - OpenChallenges REST API - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -import openchallenges_client -from openchallenges_client.models.challenge_input_data_type_direction import ( - ChallengeInputDataTypeDirection, -) # noqa: E501 -from openchallenges_client.rest import ApiException - - -class TestChallengeInputDataTypeDirection(unittest.TestCase): - """ChallengeInputDataTypeDirection unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testChallengeInputDataTypeDirection(self): - """Test ChallengeInputDataTypeDirection""" - # inst = ChallengeInputDataTypeDirection() - - -if __name__ == "__main__": - unittest.main() diff --git a/libs/openchallenges/api-client-python/test/test_challenge_input_data_type_search_query.py b/libs/openchallenges/api-client-python/test/test_challenge_input_data_type_search_query.py deleted file mode 100644 index a26e3d3ce8..0000000000 --- a/libs/openchallenges/api-client-python/test/test_challenge_input_data_type_search_query.py +++ /dev/null @@ -1,62 +0,0 @@ -# coding: utf-8 - -""" - OpenChallenges REST API - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -import openchallenges_client -from openchallenges_client.models.challenge_input_data_type_search_query import ( - ChallengeInputDataTypeSearchQuery, -) # noqa: E501 -from openchallenges_client.rest import ApiException - - -class TestChallengeInputDataTypeSearchQuery(unittest.TestCase): - """ChallengeInputDataTypeSearchQuery unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional): - """Test ChallengeInputDataTypeSearchQuery - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included""" - # uncomment below to create an instance of `ChallengeInputDataTypeSearchQuery` - """ - model = openchallenges_client.models.challenge_input_data_type_search_query.ChallengeInputDataTypeSearchQuery() # noqa: E501 - if include_optional : - return ChallengeInputDataTypeSearchQuery( - page_number = 0, - page_size = 1, - sort = 'relevance', - direction = 'asc', - search_terms = 'genomic' - ) - else : - return ChallengeInputDataTypeSearchQuery( - ) - """ - - def testChallengeInputDataTypeSearchQuery(self): - """Test ChallengeInputDataTypeSearchQuery""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - - -if __name__ == "__main__": - unittest.main() diff --git a/libs/openchallenges/api-client-python/test/test_challenge_input_data_type_sort.py b/libs/openchallenges/api-client-python/test/test_challenge_input_data_type_sort.py deleted file mode 100644 index 236efaaec7..0000000000 --- a/libs/openchallenges/api-client-python/test/test_challenge_input_data_type_sort.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding: utf-8 - -""" - OpenChallenges REST API - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -import openchallenges_client -from openchallenges_client.models.challenge_input_data_type_sort import ( - ChallengeInputDataTypeSort, -) # noqa: E501 -from openchallenges_client.rest import ApiException - - -class TestChallengeInputDataTypeSort(unittest.TestCase): - """ChallengeInputDataTypeSort unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testChallengeInputDataTypeSort(self): - """Test ChallengeInputDataTypeSort""" - # inst = ChallengeInputDataTypeSort() - - -if __name__ == "__main__": - unittest.main() diff --git a/libs/openchallenges/api-client-python/test/test_challenge_input_data_types_page.py b/libs/openchallenges/api-client-python/test/test_challenge_input_data_types_page.py deleted file mode 100644 index c94234a2ad..0000000000 --- a/libs/openchallenges/api-client-python/test/test_challenge_input_data_types_page.py +++ /dev/null @@ -1,85 +0,0 @@ -# coding: utf-8 - -""" - OpenChallenges REST API - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -import openchallenges_client -from openchallenges_client.models.challenge_input_data_types_page import ( - ChallengeInputDataTypesPage, -) # noqa: E501 -from openchallenges_client.rest import ApiException - - -class TestChallengeInputDataTypesPage(unittest.TestCase): - """ChallengeInputDataTypesPage unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional): - """Test ChallengeInputDataTypesPage - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included""" - # uncomment below to create an instance of `ChallengeInputDataTypesPage` - """ - model = openchallenges_client.models.challenge_input_data_types_page.ChallengeInputDataTypesPage() # noqa: E501 - if include_optional : - return ChallengeInputDataTypesPage( - number = 99, - size = 99, - total_elements = 99, - total_pages = 99, - has_next = True, - has_previous = True, - challenge_input_data_types = [ - openchallenges_client.models.challenge_input_data_type.ChallengeInputDataType( - id = 1, - slug = 'gene-expression', - name = 'gene expression', - created_at = '2022-07-04T22:19:11Z', - updated_at = '2022-07-04T22:19:11Z', ) - ] - ) - else : - return ChallengeInputDataTypesPage( - number = 99, - size = 99, - total_elements = 99, - total_pages = 99, - has_next = True, - has_previous = True, - challenge_input_data_types = [ - openchallenges_client.models.challenge_input_data_type.ChallengeInputDataType( - id = 1, - slug = 'gene-expression', - name = 'gene expression', - created_at = '2022-07-04T22:19:11Z', - updated_at = '2022-07-04T22:19:11Z', ) - ], - ) - """ - - def testChallengeInputDataTypesPage(self): - """Test ChallengeInputDataTypesPage""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - - -if __name__ == "__main__": - unittest.main() diff --git a/libs/openchallenges/api-client-python/test/test_challenge_platform.py b/libs/openchallenges/api-client-python/test/test_challenge_platform.py deleted file mode 100644 index 88a4bc33e3..0000000000 --- a/libs/openchallenges/api-client-python/test/test_challenge_platform.py +++ /dev/null @@ -1,71 +0,0 @@ -# coding: utf-8 - -""" - OpenChallenges REST API - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -import openchallenges_client -from openchallenges_client.models.challenge_platform import ( - ChallengePlatform, -) # noqa: E501 -from openchallenges_client.rest import ApiException - - -class TestChallengePlatform(unittest.TestCase): - """ChallengePlatform unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional): - """Test ChallengePlatform - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included""" - # uncomment below to create an instance of `ChallengePlatform` - """ - model = openchallenges_client.models.challenge_platform.ChallengePlatform() # noqa: E501 - if include_optional : - return ChallengePlatform( - id = 1, - slug = 'example-challenge-platform', - name = '012', - avatar_url = 'https://via.placeholder.com/300.png', - website_url = 'https://example.com', - created_at = '2022-07-04T22:19:11Z', - updated_at = '2022-07-04T22:19:11Z' - ) - else : - return ChallengePlatform( - id = 1, - slug = 'example-challenge-platform', - name = '012', - avatar_url = 'https://via.placeholder.com/300.png', - website_url = 'https://example.com', - created_at = '2022-07-04T22:19:11Z', - updated_at = '2022-07-04T22:19:11Z', - ) - """ - - def testChallengePlatform(self): - """Test ChallengePlatform""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - - -if __name__ == "__main__": - unittest.main() diff --git a/libs/openchallenges/api-client-python/test/test_challenge_platform_api.py b/libs/openchallenges/api-client-python/test/test_challenge_platform_api.py deleted file mode 100644 index fb36b691d5..0000000000 --- a/libs/openchallenges/api-client-python/test/test_challenge_platform_api.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding: utf-8 - -""" - OpenChallenges REST API - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -import openchallenges_client -from openchallenges_client.api.challenge_platform_api import ( - ChallengePlatformApi, -) # noqa: E501 -from openchallenges_client.rest import ApiException - - -class TestChallengePlatformApi(unittest.TestCase): - """ChallengePlatformApi unit test stubs""" - - def setUp(self): - self.api = ( - openchallenges_client.api.challenge_platform_api.ChallengePlatformApi() - ) # noqa: E501 - - def tearDown(self): - pass - - def test_get_challenge_platform(self): - """Test case for get_challenge_platform - - Get a challenge platform # noqa: E501 - """ - pass - - def test_list_challenge_platforms(self): - """Test case for list_challenge_platforms - - List challenge platforms # noqa: E501 - """ - pass - - -if __name__ == "__main__": - unittest.main() diff --git a/libs/openchallenges/api-client-python/test/test_challenge_platform_direction.py b/libs/openchallenges/api-client-python/test/test_challenge_platform_direction.py deleted file mode 100644 index 46b4740731..0000000000 --- a/libs/openchallenges/api-client-python/test/test_challenge_platform_direction.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding: utf-8 - -""" - OpenChallenges REST API - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -import openchallenges_client -from openchallenges_client.models.challenge_platform_direction import ( - ChallengePlatformDirection, -) # noqa: E501 -from openchallenges_client.rest import ApiException - - -class TestChallengePlatformDirection(unittest.TestCase): - """ChallengePlatformDirection unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testChallengePlatformDirection(self): - """Test ChallengePlatformDirection""" - # inst = ChallengePlatformDirection() - - -if __name__ == "__main__": - unittest.main() diff --git a/libs/openchallenges/api-client-python/test/test_challenge_platform_search_query.py b/libs/openchallenges/api-client-python/test/test_challenge_platform_search_query.py deleted file mode 100644 index db69fb2109..0000000000 --- a/libs/openchallenges/api-client-python/test/test_challenge_platform_search_query.py +++ /dev/null @@ -1,62 +0,0 @@ -# coding: utf-8 - -""" - OpenChallenges REST API - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -import openchallenges_client -from openchallenges_client.models.challenge_platform_search_query import ( - ChallengePlatformSearchQuery, -) # noqa: E501 -from openchallenges_client.rest import ApiException - - -class TestChallengePlatformSearchQuery(unittest.TestCase): - """ChallengePlatformSearchQuery unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional): - """Test ChallengePlatformSearchQuery - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included""" - # uncomment below to create an instance of `ChallengePlatformSearchQuery` - """ - model = openchallenges_client.models.challenge_platform_search_query.ChallengePlatformSearchQuery() # noqa: E501 - if include_optional : - return ChallengePlatformSearchQuery( - page_number = 0, - page_size = 1, - sort = 'relevance', - direction = 'asc', - search_terms = 'synapse' - ) - else : - return ChallengePlatformSearchQuery( - ) - """ - - def testChallengePlatformSearchQuery(self): - """Test ChallengePlatformSearchQuery""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - - -if __name__ == "__main__": - unittest.main() diff --git a/libs/openchallenges/api-client-python/test/test_challenge_platform_sort.py b/libs/openchallenges/api-client-python/test/test_challenge_platform_sort.py deleted file mode 100644 index ba0315732a..0000000000 --- a/libs/openchallenges/api-client-python/test/test_challenge_platform_sort.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding: utf-8 - -""" - OpenChallenges REST API - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -import openchallenges_client -from openchallenges_client.models.challenge_platform_sort import ( - ChallengePlatformSort, -) # noqa: E501 -from openchallenges_client.rest import ApiException - - -class TestChallengePlatformSort(unittest.TestCase): - """ChallengePlatformSort unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testChallengePlatformSort(self): - """Test ChallengePlatformSort""" - # inst = ChallengePlatformSort() - - -if __name__ == "__main__": - unittest.main() diff --git a/libs/openchallenges/api-client-python/test/test_challenge_platforms_page.py b/libs/openchallenges/api-client-python/test/test_challenge_platforms_page.py deleted file mode 100644 index fa9e427c0b..0000000000 --- a/libs/openchallenges/api-client-python/test/test_challenge_platforms_page.py +++ /dev/null @@ -1,89 +0,0 @@ -# coding: utf-8 - -""" - OpenChallenges REST API - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -import openchallenges_client -from openchallenges_client.models.challenge_platforms_page import ( - ChallengePlatformsPage, -) # noqa: E501 -from openchallenges_client.rest import ApiException - - -class TestChallengePlatformsPage(unittest.TestCase): - """ChallengePlatformsPage unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional): - """Test ChallengePlatformsPage - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included""" - # uncomment below to create an instance of `ChallengePlatformsPage` - """ - model = openchallenges_client.models.challenge_platforms_page.ChallengePlatformsPage() # noqa: E501 - if include_optional : - return ChallengePlatformsPage( - number = 99, - size = 99, - total_elements = 99, - total_pages = 99, - has_next = True, - has_previous = True, - challenge_platforms = [ - openchallenges_client.models.challenge_platform.ChallengePlatform( - id = 1, - slug = 'example-challenge-platform', - name = '012', - avatar_url = 'https://via.placeholder.com/300.png', - website_url = 'https://example.com', - created_at = '2022-07-04T22:19:11Z', - updated_at = '2022-07-04T22:19:11Z', ) - ] - ) - else : - return ChallengePlatformsPage( - number = 99, - size = 99, - total_elements = 99, - total_pages = 99, - has_next = True, - has_previous = True, - challenge_platforms = [ - openchallenges_client.models.challenge_platform.ChallengePlatform( - id = 1, - slug = 'example-challenge-platform', - name = '012', - avatar_url = 'https://via.placeholder.com/300.png', - website_url = 'https://example.com', - created_at = '2022-07-04T22:19:11Z', - updated_at = '2022-07-04T22:19:11Z', ) - ], - ) - """ - - def testChallengePlatformsPage(self): - """Test ChallengePlatformsPage""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - - -if __name__ == "__main__": - unittest.main() diff --git a/libs/openchallenges/api-client-python/test/test_challenge_search_query.py b/libs/openchallenges/api-client-python/test/test_challenge_search_query.py deleted file mode 100644 index 8c73fd30a2..0000000000 --- a/libs/openchallenges/api-client-python/test/test_challenge_search_query.py +++ /dev/null @@ -1,89 +0,0 @@ -# coding: utf-8 - -""" - OpenChallenges REST API - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -import openchallenges_client -from openchallenges_client.models.challenge_search_query import ( - ChallengeSearchQuery, -) # noqa: E501 -from openchallenges_client.rest import ApiException - - -class TestChallengeSearchQuery(unittest.TestCase): - """ChallengeSearchQuery unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional): - """Test ChallengeSearchQuery - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included""" - # uncomment below to create an instance of `ChallengeSearchQuery` - """ - model = openchallenges_client.models.challenge_search_query.ChallengeSearchQuery() # noqa: E501 - if include_optional : - return ChallengeSearchQuery( - page_number = 0, - page_size = 1, - sort = 'relevance', - sort_seed = 0, - direction = 'asc', - difficulties = [ - 'intermediate' - ], - incentives = [ - 'publication' - ], - min_start_date = 'Fri Jul 21 00:00:00 UTC 2017', - max_start_date = 'Fri Jul 21 00:00:00 UTC 2017', - platforms = [ - 'example-challenge-platform' - ], - organizations = [ - 1 - ], - input_data_types = [ - 'gene-expression' - ], - status = [ - 'active' - ], - submission_types = [ - 'container_image' - ], - categories = [ - 'featured' - ], - search_terms = 'dream challenge' - ) - else : - return ChallengeSearchQuery( - ) - """ - - def testChallengeSearchQuery(self): - """Test ChallengeSearchQuery""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - - -if __name__ == "__main__": - unittest.main() diff --git a/libs/openchallenges/api-client-python/test/test_challenge_sort.py b/libs/openchallenges/api-client-python/test/test_challenge_sort.py deleted file mode 100644 index 8e419aeeca..0000000000 --- a/libs/openchallenges/api-client-python/test/test_challenge_sort.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding: utf-8 - -""" - OpenChallenges REST API - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -import openchallenges_client -from openchallenges_client.models.challenge_sort import ChallengeSort # noqa: E501 -from openchallenges_client.rest import ApiException - - -class TestChallengeSort(unittest.TestCase): - """ChallengeSort unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testChallengeSort(self): - """Test ChallengeSort""" - # inst = ChallengeSort() - - -if __name__ == "__main__": - unittest.main() diff --git a/libs/openchallenges/api-client-python/test/test_challenge_status.py b/libs/openchallenges/api-client-python/test/test_challenge_status.py deleted file mode 100644 index 8d245750c6..0000000000 --- a/libs/openchallenges/api-client-python/test/test_challenge_status.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding: utf-8 - -""" - OpenChallenges REST API - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -import openchallenges_client -from openchallenges_client.models.challenge_status import ChallengeStatus # noqa: E501 -from openchallenges_client.rest import ApiException - - -class TestChallengeStatus(unittest.TestCase): - """ChallengeStatus unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testChallengeStatus(self): - """Test ChallengeStatus""" - # inst = ChallengeStatus() - - -if __name__ == "__main__": - unittest.main() diff --git a/libs/openchallenges/api-client-python/test/test_challenge_submission_type.py b/libs/openchallenges/api-client-python/test/test_challenge_submission_type.py deleted file mode 100644 index e35d85b435..0000000000 --- a/libs/openchallenges/api-client-python/test/test_challenge_submission_type.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding: utf-8 - -""" - OpenChallenges REST API - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -import openchallenges_client -from openchallenges_client.models.challenge_submission_type import ( - ChallengeSubmissionType, -) # noqa: E501 -from openchallenges_client.rest import ApiException - - -class TestChallengeSubmissionType(unittest.TestCase): - """ChallengeSubmissionType unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testChallengeSubmissionType(self): - """Test ChallengeSubmissionType""" - # inst = ChallengeSubmissionType() - - -if __name__ == "__main__": - unittest.main() diff --git a/libs/openchallenges/api-client-python/test/test_challenges_page.py b/libs/openchallenges/api-client-python/test/test_challenges_page.py deleted file mode 100644 index 074a561f70..0000000000 --- a/libs/openchallenges/api-client-python/test/test_challenges_page.py +++ /dev/null @@ -1,135 +0,0 @@ -# coding: utf-8 - -""" - OpenChallenges REST API - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -import openchallenges_client -from openchallenges_client.models.challenges_page import ChallengesPage # noqa: E501 -from openchallenges_client.rest import ApiException - - -class TestChallengesPage(unittest.TestCase): - """ChallengesPage unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional): - """Test ChallengesPage - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included""" - # uncomment below to create an instance of `ChallengesPage` - """ - model = openchallenges_client.models.challenges_page.ChallengesPage() # noqa: E501 - if include_optional : - return ChallengesPage( - number = 99, - size = 99, - total_elements = 99, - total_pages = 99, - has_next = True, - has_previous = True, - challenges = [ - openchallenges_client.models.challenge.Challenge( - id = 1, - slug = 'awesome-challenge', - name = '012', - headline = 'Example challenge headline', - description = 'This is an example description of the challenge.', - doi = '', - status = 'active', - difficulty = 'intermediate', - platform = openchallenges_client.models.simple_challenge_platform.SimpleChallengePlatform( - id = 1, - slug = 'example-challenge-platform', - name = '012', ), - website_url = '', - avatar_url = '', - incentives = [ - 'publication' - ], - submission_types = [ - 'container_image' - ], - input_data_types = [ - openchallenges_client.models.simple_challenge_input_data_type.SimpleChallengeInputDataType( - id = 1, - slug = 'gene-expression', - name = 'gene expression', ) - ], - start_date = 'Fri Jul 21 00:00:00 UTC 2017', - end_date = 'Fri Jul 21 00:00:00 UTC 2017', - starred_count = 56, - created_at = '2022-07-04T22:19:11Z', - updated_at = '2022-07-04T22:19:11Z', ) - ] - ) - else : - return ChallengesPage( - number = 99, - size = 99, - total_elements = 99, - total_pages = 99, - has_next = True, - has_previous = True, - challenges = [ - openchallenges_client.models.challenge.Challenge( - id = 1, - slug = 'awesome-challenge', - name = '012', - headline = 'Example challenge headline', - description = 'This is an example description of the challenge.', - doi = '', - status = 'active', - difficulty = 'intermediate', - platform = openchallenges_client.models.simple_challenge_platform.SimpleChallengePlatform( - id = 1, - slug = 'example-challenge-platform', - name = '012', ), - website_url = '', - avatar_url = '', - incentives = [ - 'publication' - ], - submission_types = [ - 'container_image' - ], - input_data_types = [ - openchallenges_client.models.simple_challenge_input_data_type.SimpleChallengeInputDataType( - id = 1, - slug = 'gene-expression', - name = 'gene expression', ) - ], - start_date = 'Fri Jul 21 00:00:00 UTC 2017', - end_date = 'Fri Jul 21 00:00:00 UTC 2017', - starred_count = 56, - created_at = '2022-07-04T22:19:11Z', - updated_at = '2022-07-04T22:19:11Z', ) - ], - ) - """ - - def testChallengesPage(self): - """Test ChallengesPage""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - - -if __name__ == "__main__": - unittest.main() diff --git a/libs/openchallenges/api-client-python/test/test_challenges_per_year.py b/libs/openchallenges/api-client-python/test/test_challenges_per_year.py deleted file mode 100644 index edbc8b35af..0000000000 --- a/libs/openchallenges/api-client-python/test/test_challenges_per_year.py +++ /dev/null @@ -1,69 +0,0 @@ -# coding: utf-8 - -""" - OpenChallenges REST API - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -import openchallenges_client -from openchallenges_client.models.challenges_per_year import ( - ChallengesPerYear, -) # noqa: E501 -from openchallenges_client.rest import ApiException - - -class TestChallengesPerYear(unittest.TestCase): - """ChallengesPerYear unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional): - """Test ChallengesPerYear - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included""" - # uncomment below to create an instance of `ChallengesPerYear` - """ - model = openchallenges_client.models.challenges_per_year.ChallengesPerYear() # noqa: E501 - if include_optional : - return ChallengesPerYear( - years = [ - '' - ], - challenge_counts = [ - 56 - ] - ) - else : - return ChallengesPerYear( - years = [ - '' - ], - challenge_counts = [ - 56 - ], - ) - """ - - def testChallengesPerYear(self): - """Test ChallengesPerYear""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - - -if __name__ == "__main__": - unittest.main() diff --git a/libs/openchallenges/api-client-python/test/test_image.py b/libs/openchallenges/api-client-python/test/test_image.py deleted file mode 100644 index 78aac3ff15..0000000000 --- a/libs/openchallenges/api-client-python/test/test_image.py +++ /dev/null @@ -1,57 +0,0 @@ -# coding: utf-8 - -""" - OpenChallenges REST API - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -import openchallenges_client -from openchallenges_client.models.image import Image # noqa: E501 -from openchallenges_client.rest import ApiException - - -class TestImage(unittest.TestCase): - """Image unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional): - """Test Image - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included""" - # uncomment below to create an instance of `Image` - """ - model = openchallenges_client.models.image.Image() # noqa: E501 - if include_optional : - return Image( - url = 'http://example.com/an-image.png' - ) - else : - return Image( - url = 'http://example.com/an-image.png', - ) - """ - - def testImage(self): - """Test Image""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - - -if __name__ == "__main__": - unittest.main() diff --git a/libs/openchallenges/api-client-python/test/test_image_api.py b/libs/openchallenges/api-client-python/test/test_image_api.py deleted file mode 100644 index 65e039c1c3..0000000000 --- a/libs/openchallenges/api-client-python/test/test_image_api.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding: utf-8 - -""" - OpenChallenges REST API - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -import openchallenges_client -from openchallenges_client.api.image_api import ImageApi # noqa: E501 -from openchallenges_client.rest import ApiException - - -class TestImageApi(unittest.TestCase): - """ImageApi unit test stubs""" - - def setUp(self): - self.api = openchallenges_client.api.image_api.ImageApi() # noqa: E501 - - def tearDown(self): - pass - - def test_get_image(self): - """Test case for get_image - - Get an image # noqa: E501 - """ - pass - - -if __name__ == "__main__": - unittest.main() diff --git a/libs/openchallenges/api-client-python/test/test_image_aspect_ratio.py b/libs/openchallenges/api-client-python/test/test_image_aspect_ratio.py deleted file mode 100644 index 3609efa7ac..0000000000 --- a/libs/openchallenges/api-client-python/test/test_image_aspect_ratio.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding: utf-8 - -""" - OpenChallenges REST API - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -import openchallenges_client -from openchallenges_client.models.image_aspect_ratio import ( - ImageAspectRatio, -) # noqa: E501 -from openchallenges_client.rest import ApiException - - -class TestImageAspectRatio(unittest.TestCase): - """ImageAspectRatio unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testImageAspectRatio(self): - """Test ImageAspectRatio""" - # inst = ImageAspectRatio() - - -if __name__ == "__main__": - unittest.main() diff --git a/libs/openchallenges/api-client-python/test/test_image_height.py b/libs/openchallenges/api-client-python/test/test_image_height.py deleted file mode 100644 index 4917d799e6..0000000000 --- a/libs/openchallenges/api-client-python/test/test_image_height.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding: utf-8 - -""" - OpenChallenges REST API - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -import openchallenges_client -from openchallenges_client.models.image_height import ImageHeight # noqa: E501 -from openchallenges_client.rest import ApiException - - -class TestImageHeight(unittest.TestCase): - """ImageHeight unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testImageHeight(self): - """Test ImageHeight""" - # inst = ImageHeight() - - -if __name__ == "__main__": - unittest.main() diff --git a/libs/openchallenges/api-client-python/test/test_image_query.py b/libs/openchallenges/api-client-python/test/test_image_query.py deleted file mode 100644 index ff6a48e296..0000000000 --- a/libs/openchallenges/api-client-python/test/test_image_query.py +++ /dev/null @@ -1,59 +0,0 @@ -# coding: utf-8 - -""" - OpenChallenges REST API - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -import openchallenges_client -from openchallenges_client.models.image_query import ImageQuery # noqa: E501 -from openchallenges_client.rest import ApiException - - -class TestImageQuery(unittest.TestCase): - """ImageQuery unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional): - """Test ImageQuery - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included""" - # uncomment below to create an instance of `ImageQuery` - """ - model = openchallenges_client.models.image_query.ImageQuery() # noqa: E501 - if include_optional : - return ImageQuery( - object_key = 'logo/dream.png', - height = 'original', - aspect_ratio = 'original' - ) - else : - return ImageQuery( - object_key = 'logo/dream.png', - ) - """ - - def testImageQuery(self): - """Test ImageQuery""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - - -if __name__ == "__main__": - unittest.main() diff --git a/libs/openchallenges/api-client-python/test/test_organization.py b/libs/openchallenges/api-client-python/test/test_organization.py deleted file mode 100644 index 2c9a8d48f6..0000000000 --- a/libs/openchallenges/api-client-python/test/test_organization.py +++ /dev/null @@ -1,74 +0,0 @@ -# coding: utf-8 - -""" - OpenChallenges REST API - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -import openchallenges_client -from openchallenges_client.models.organization import Organization # noqa: E501 -from openchallenges_client.rest import ApiException - - -class TestOrganization(unittest.TestCase): - """Organization unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional): - """Test Organization - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included""" - # uncomment below to create an instance of `Organization` - """ - model = openchallenges_client.models.organization.Organization() # noqa: E501 - if include_optional : - return Organization( - id = 1, - name = 'Example organization', - email = 'john.smith@example.com', - login = 'example-org', - description = 'A description of the organization.', - avatar_key = 'logo/dream.png', - website_url = 'https://example.com', - challenge_count = 10, - created_at = '2022-07-04T22:19:11Z', - updated_at = '2022-07-04T22:19:11Z', - acronym = 'OC' - ) - else : - return Organization( - id = 1, - name = 'Example organization', - email = 'john.smith@example.com', - login = 'example-org', - description = 'A description of the organization.', - website_url = 'https://example.com', - created_at = '2022-07-04T22:19:11Z', - updated_at = '2022-07-04T22:19:11Z', - ) - """ - - def testOrganization(self): - """Test Organization""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - - -if __name__ == "__main__": - unittest.main() diff --git a/libs/openchallenges/api-client-python/test/test_organization_api.py b/libs/openchallenges/api-client-python/test/test_organization_api.py deleted file mode 100644 index 6430a8be27..0000000000 --- a/libs/openchallenges/api-client-python/test/test_organization_api.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding: utf-8 - -""" - OpenChallenges REST API - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -import openchallenges_client -from openchallenges_client.api.organization_api import OrganizationApi # noqa: E501 -from openchallenges_client.rest import ApiException - - -class TestOrganizationApi(unittest.TestCase): - """OrganizationApi unit test stubs""" - - def setUp(self): - self.api = ( - openchallenges_client.api.organization_api.OrganizationApi() - ) # noqa: E501 - - def tearDown(self): - pass - - def test_get_organization(self): - """Test case for get_organization - - Get an organization # noqa: E501 - """ - pass - - def test_list_organizations(self): - """Test case for list_organizations - - List organizations # noqa: E501 - """ - pass - - -if __name__ == "__main__": - unittest.main() diff --git a/libs/openchallenges/api-client-python/test/test_organization_category.py b/libs/openchallenges/api-client-python/test/test_organization_category.py deleted file mode 100644 index c6fc83bd2b..0000000000 --- a/libs/openchallenges/api-client-python/test/test_organization_category.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding: utf-8 - -""" - OpenChallenges REST API - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -import openchallenges_client -from openchallenges_client.models.organization_category import ( - OrganizationCategory, -) # noqa: E501 -from openchallenges_client.rest import ApiException - - -class TestOrganizationCategory(unittest.TestCase): - """OrganizationCategory unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testOrganizationCategory(self): - """Test OrganizationCategory""" - # inst = OrganizationCategory() - - -if __name__ == "__main__": - unittest.main() diff --git a/libs/openchallenges/api-client-python/test/test_organization_direction.py b/libs/openchallenges/api-client-python/test/test_organization_direction.py deleted file mode 100644 index 33e41afe70..0000000000 --- a/libs/openchallenges/api-client-python/test/test_organization_direction.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding: utf-8 - -""" - OpenChallenges REST API - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -import openchallenges_client -from openchallenges_client.models.organization_direction import ( - OrganizationDirection, -) # noqa: E501 -from openchallenges_client.rest import ApiException - - -class TestOrganizationDirection(unittest.TestCase): - """OrganizationDirection unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testOrganizationDirection(self): - """Test OrganizationDirection""" - # inst = OrganizationDirection() - - -if __name__ == "__main__": - unittest.main() diff --git a/libs/openchallenges/api-client-python/test/test_organization_search_query.py b/libs/openchallenges/api-client-python/test/test_organization_search_query.py deleted file mode 100644 index 786ad8bd50..0000000000 --- a/libs/openchallenges/api-client-python/test/test_organization_search_query.py +++ /dev/null @@ -1,68 +0,0 @@ -# coding: utf-8 - -""" - OpenChallenges REST API - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -import openchallenges_client -from openchallenges_client.models.organization_search_query import ( - OrganizationSearchQuery, -) # noqa: E501 -from openchallenges_client.rest import ApiException - - -class TestOrganizationSearchQuery(unittest.TestCase): - """OrganizationSearchQuery unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional): - """Test OrganizationSearchQuery - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included""" - # uncomment below to create an instance of `OrganizationSearchQuery` - """ - model = openchallenges_client.models.organization_search_query.OrganizationSearchQuery() # noqa: E501 - if include_optional : - return OrganizationSearchQuery( - page_number = 0, - page_size = 1, - categories = [ - 'featured' - ], - challenge_contribution_roles = [ - 'challenge_organizer' - ], - sort = 'relevance', - direction = 'asc', - search_terms = 'data provider' - ) - else : - return OrganizationSearchQuery( - ) - """ - - def testOrganizationSearchQuery(self): - """Test OrganizationSearchQuery""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - - -if __name__ == "__main__": - unittest.main() diff --git a/libs/openchallenges/api-client-python/test/test_organization_sort.py b/libs/openchallenges/api-client-python/test/test_organization_sort.py deleted file mode 100644 index 7e505371d8..0000000000 --- a/libs/openchallenges/api-client-python/test/test_organization_sort.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding: utf-8 - -""" - OpenChallenges REST API - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -import openchallenges_client -from openchallenges_client.models.organization_sort import ( - OrganizationSort, -) # noqa: E501 -from openchallenges_client.rest import ApiException - - -class TestOrganizationSort(unittest.TestCase): - """OrganizationSort unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testOrganizationSort(self): - """Test OrganizationSort""" - # inst = OrganizationSort() - - -if __name__ == "__main__": - unittest.main() diff --git a/libs/openchallenges/api-client-python/test/test_organizations_page.py b/libs/openchallenges/api-client-python/test/test_organizations_page.py deleted file mode 100644 index 94d6519ed0..0000000000 --- a/libs/openchallenges/api-client-python/test/test_organizations_page.py +++ /dev/null @@ -1,97 +0,0 @@ -# coding: utf-8 - -""" - OpenChallenges REST API - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -import openchallenges_client -from openchallenges_client.models.organizations_page import ( - OrganizationsPage, -) # noqa: E501 -from openchallenges_client.rest import ApiException - - -class TestOrganizationsPage(unittest.TestCase): - """OrganizationsPage unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional): - """Test OrganizationsPage - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included""" - # uncomment below to create an instance of `OrganizationsPage` - """ - model = openchallenges_client.models.organizations_page.OrganizationsPage() # noqa: E501 - if include_optional : - return OrganizationsPage( - number = 99, - size = 99, - total_elements = 99, - total_pages = 99, - has_next = True, - has_previous = True, - organizations = [ - openchallenges_client.models.organization.Organization( - id = 1, - name = 'Example organization', - email = 'john.smith@example.com', - login = 'example-org', - description = 'A description of the organization.', - avatar_key = 'logo/dream.png', - website_url = 'https://example.com', - challenge_count = 10, - created_at = '2022-07-04T22:19:11Z', - updated_at = '2022-07-04T22:19:11Z', - acronym = 'OC', ) - ] - ) - else : - return OrganizationsPage( - number = 99, - size = 99, - total_elements = 99, - total_pages = 99, - has_next = True, - has_previous = True, - organizations = [ - openchallenges_client.models.organization.Organization( - id = 1, - name = 'Example organization', - email = 'john.smith@example.com', - login = 'example-org', - description = 'A description of the organization.', - avatar_key = 'logo/dream.png', - website_url = 'https://example.com', - challenge_count = 10, - created_at = '2022-07-04T22:19:11Z', - updated_at = '2022-07-04T22:19:11Z', - acronym = 'OC', ) - ], - ) - """ - - def testOrganizationsPage(self): - """Test OrganizationsPage""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - - -if __name__ == "__main__": - unittest.main() diff --git a/libs/openchallenges/api-client-python/test/test_page_metadata.py b/libs/openchallenges/api-client-python/test/test_page_metadata.py deleted file mode 100644 index 8be6c0c291..0000000000 --- a/libs/openchallenges/api-client-python/test/test_page_metadata.py +++ /dev/null @@ -1,67 +0,0 @@ -# coding: utf-8 - -""" - OpenChallenges REST API - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -import openchallenges_client -from openchallenges_client.models.page_metadata import PageMetadata # noqa: E501 -from openchallenges_client.rest import ApiException - - -class TestPageMetadata(unittest.TestCase): - """PageMetadata unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional): - """Test PageMetadata - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included""" - # uncomment below to create an instance of `PageMetadata` - """ - model = openchallenges_client.models.page_metadata.PageMetadata() # noqa: E501 - if include_optional : - return PageMetadata( - number = 99, - size = 99, - total_elements = 99, - total_pages = 99, - has_next = True, - has_previous = True - ) - else : - return PageMetadata( - number = 99, - size = 99, - total_elements = 99, - total_pages = 99, - has_next = True, - has_previous = True, - ) - """ - - def testPageMetadata(self): - """Test PageMetadata""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - - -if __name__ == "__main__": - unittest.main() diff --git a/libs/openchallenges/api-client-python/test/test_simple_challenge_input_data_type.py b/libs/openchallenges/api-client-python/test/test_simple_challenge_input_data_type.py deleted file mode 100644 index 02637ec2d9..0000000000 --- a/libs/openchallenges/api-client-python/test/test_simple_challenge_input_data_type.py +++ /dev/null @@ -1,63 +0,0 @@ -# coding: utf-8 - -""" - OpenChallenges REST API - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -import openchallenges_client -from openchallenges_client.models.simple_challenge_input_data_type import ( - SimpleChallengeInputDataType, -) # noqa: E501 -from openchallenges_client.rest import ApiException - - -class TestSimpleChallengeInputDataType(unittest.TestCase): - """SimpleChallengeInputDataType unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional): - """Test SimpleChallengeInputDataType - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included""" - # uncomment below to create an instance of `SimpleChallengeInputDataType` - """ - model = openchallenges_client.models.simple_challenge_input_data_type.SimpleChallengeInputDataType() # noqa: E501 - if include_optional : - return SimpleChallengeInputDataType( - id = 1, - slug = 'gene-expression', - name = 'gene expression' - ) - else : - return SimpleChallengeInputDataType( - id = 1, - slug = 'gene-expression', - name = 'gene expression', - ) - """ - - def testSimpleChallengeInputDataType(self): - """Test SimpleChallengeInputDataType""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - - -if __name__ == "__main__": - unittest.main() diff --git a/libs/openchallenges/api-client-python/test/test_simple_challenge_platform.py b/libs/openchallenges/api-client-python/test/test_simple_challenge_platform.py deleted file mode 100644 index e23829462e..0000000000 --- a/libs/openchallenges/api-client-python/test/test_simple_challenge_platform.py +++ /dev/null @@ -1,63 +0,0 @@ -# coding: utf-8 - -""" - OpenChallenges REST API - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -import openchallenges_client -from openchallenges_client.models.simple_challenge_platform import ( - SimpleChallengePlatform, -) # noqa: E501 -from openchallenges_client.rest import ApiException - - -class TestSimpleChallengePlatform(unittest.TestCase): - """SimpleChallengePlatform unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional): - """Test SimpleChallengePlatform - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included""" - # uncomment below to create an instance of `SimpleChallengePlatform` - """ - model = openchallenges_client.models.simple_challenge_platform.SimpleChallengePlatform() # noqa: E501 - if include_optional : - return SimpleChallengePlatform( - id = 1, - slug = 'example-challenge-platform', - name = '012' - ) - else : - return SimpleChallengePlatform( - id = 1, - slug = 'example-challenge-platform', - name = '012', - ) - """ - - def testSimpleChallengePlatform(self): - """Test SimpleChallengePlatform""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - - -if __name__ == "__main__": - unittest.main() diff --git a/libs/openchallenges/api-client-python/test/test_user.py b/libs/openchallenges/api-client-python/test/test_user.py deleted file mode 100644 index fc4e744382..0000000000 --- a/libs/openchallenges/api-client-python/test/test_user.py +++ /dev/null @@ -1,70 +0,0 @@ -# coding: utf-8 - -""" - OpenChallenges REST API - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -import openchallenges_client -from openchallenges_client.models.user import User # noqa: E501 -from openchallenges_client.rest import ApiException - - -class TestUser(unittest.TestCase): - """User unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional): - """Test User - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included""" - # uncomment below to create an instance of `User` - """ - model = openchallenges_client.models.user.User() # noqa: E501 - if include_optional : - return User( - id = 1, - login = '', - email = 'john.smith@example.com', - name = '', - status = 'pending', - avatar_url = 'https://example.com/awesome-avatar.png', - created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - updated_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - type = 'User', - bio = '' - ) - else : - return User( - login = '', - email = 'john.smith@example.com', - created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - updated_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - type = 'User', - ) - """ - - def testUser(self): - """Test User""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - - -if __name__ == "__main__": - unittest.main() diff --git a/libs/openchallenges/api-client-python/test/test_user_api.py b/libs/openchallenges/api-client-python/test/test_user_api.py deleted file mode 100644 index 5dcd6f7dca..0000000000 --- a/libs/openchallenges/api-client-python/test/test_user_api.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding: utf-8 - -""" - OpenChallenges REST API - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -import openchallenges_client -from openchallenges_client.api.user_api import UserApi # noqa: E501 -from openchallenges_client.rest import ApiException - - -class TestUserApi(unittest.TestCase): - """UserApi unit test stubs""" - - def setUp(self): - self.api = openchallenges_client.api.user_api.UserApi() # noqa: E501 - - def tearDown(self): - pass - - def test_create_user(self): - """Test case for create_user - - Create a user # noqa: E501 - """ - pass - - def test_delete_user(self): - """Test case for delete_user - - Delete a user # noqa: E501 - """ - pass - - def test_get_user(self): - """Test case for get_user - - Get a user # noqa: E501 - """ - pass - - def test_list_users(self): - """Test case for list_users - - Get all users # noqa: E501 - """ - pass - - -if __name__ == "__main__": - unittest.main() diff --git a/libs/openchallenges/api-client-python/test/test_user_create_request.py b/libs/openchallenges/api-client-python/test/test_user_create_request.py deleted file mode 100644 index dbf497676a..0000000000 --- a/libs/openchallenges/api-client-python/test/test_user_create_request.py +++ /dev/null @@ -1,66 +0,0 @@ -# coding: utf-8 - -""" - OpenChallenges REST API - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -import openchallenges_client -from openchallenges_client.models.user_create_request import ( - UserCreateRequest, -) # noqa: E501 -from openchallenges_client.rest import ApiException - - -class TestUserCreateRequest(unittest.TestCase): - """UserCreateRequest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional): - """Test UserCreateRequest - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included""" - # uncomment below to create an instance of `UserCreateRequest` - """ - model = openchallenges_client.models.user_create_request.UserCreateRequest() # noqa: E501 - if include_optional : - return UserCreateRequest( - login = '', - email = 'john.smith@example.com', - password = '', - name = '', - avatar_url = 'https://example.com/awesome-avatar.png', - bio = '' - ) - else : - return UserCreateRequest( - login = '', - email = 'john.smith@example.com', - password = '', - ) - """ - - def testUserCreateRequest(self): - """Test UserCreateRequest""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - - -if __name__ == "__main__": - unittest.main() diff --git a/libs/openchallenges/api-client-python/test/test_user_create_response.py b/libs/openchallenges/api-client-python/test/test_user_create_response.py deleted file mode 100644 index 5c6dad20a5..0000000000 --- a/libs/openchallenges/api-client-python/test/test_user_create_response.py +++ /dev/null @@ -1,59 +0,0 @@ -# coding: utf-8 - -""" - OpenChallenges REST API - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -import openchallenges_client -from openchallenges_client.models.user_create_response import ( - UserCreateResponse, -) # noqa: E501 -from openchallenges_client.rest import ApiException - - -class TestUserCreateResponse(unittest.TestCase): - """UserCreateResponse unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional): - """Test UserCreateResponse - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included""" - # uncomment below to create an instance of `UserCreateResponse` - """ - model = openchallenges_client.models.user_create_response.UserCreateResponse() # noqa: E501 - if include_optional : - return UserCreateResponse( - id = 1 - ) - else : - return UserCreateResponse( - id = 1, - ) - """ - - def testUserCreateResponse(self): - """Test UserCreateResponse""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - - -if __name__ == "__main__": - unittest.main() diff --git a/libs/openchallenges/api-client-python/test/test_user_status.py b/libs/openchallenges/api-client-python/test/test_user_status.py deleted file mode 100644 index 52ee4335bf..0000000000 --- a/libs/openchallenges/api-client-python/test/test_user_status.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding: utf-8 - -""" - OpenChallenges REST API - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -import openchallenges_client -from openchallenges_client.models.user_status import UserStatus # noqa: E501 -from openchallenges_client.rest import ApiException - - -class TestUserStatus(unittest.TestCase): - """UserStatus unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testUserStatus(self): - """Test UserStatus""" - # inst = UserStatus() - - -if __name__ == "__main__": - unittest.main() diff --git a/libs/openchallenges/api-client-python/test/test_users_page.py b/libs/openchallenges/api-client-python/test/test_users_page.py deleted file mode 100644 index 7187663c9e..0000000000 --- a/libs/openchallenges/api-client-python/test/test_users_page.py +++ /dev/null @@ -1,73 +0,0 @@ -# coding: utf-8 - -""" - OpenChallenges REST API - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -import openchallenges_client -from openchallenges_client.models.users_page import UsersPage # noqa: E501 -from openchallenges_client.rest import ApiException - - -class TestUsersPage(unittest.TestCase): - """UsersPage unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional): - """Test UsersPage - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included""" - # uncomment below to create an instance of `UsersPage` - """ - model = openchallenges_client.models.users_page.UsersPage() # noqa: E501 - if include_optional : - return UsersPage( - number = 99, - size = 99, - total_elements = 99, - total_pages = 99, - has_next = True, - has_previous = True, - users = [ - {"login":"awesome-user","email":"awesome-user@example.org","name":"Awesome User","status":"approved","avatarUrl":"https://example.com/awesome-avatar.png","bio":"A great bio","createdAt":"2017-07-08T16:18:44-04:00","updatedAt":"2017-07-08T16:18:44-04:00","type":"User"} - ] - ) - else : - return UsersPage( - number = 99, - size = 99, - total_elements = 99, - total_pages = 99, - has_next = True, - has_previous = True, - users = [ - {"login":"awesome-user","email":"awesome-user@example.org","name":"Awesome User","status":"approved","avatarUrl":"https://example.com/awesome-avatar.png","bio":"A great bio","createdAt":"2017-07-08T16:18:44-04:00","updatedAt":"2017-07-08T16:18:44-04:00","type":"User"} - ], - ) - """ - - def testUsersPage(self): - """Test UsersPage""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - - -if __name__ == "__main__": - unittest.main() diff --git a/libs/openchallenges/api-client-python/tox.ini b/libs/openchallenges/api-client-python/tox.ini deleted file mode 100644 index b5bd6bde07..0000000000 --- a/libs/openchallenges/api-client-python/tox.ini +++ /dev/null @@ -1,9 +0,0 @@ -[tox] -envlist = py3 - -[testenv] -deps=-r{toxinidir}/requirements.txt - -r{toxinidir}/test-requirements.txt - -commands= - pytest --cov=openchallenges_client