From 0f85b3302ff4a3dc4571ce6fd8dc3677e2a20902 Mon Sep 17 00:00:00 2001 From: Alexander Saprykin Date: Fri, 25 Oct 2024 15:17:06 +0200 Subject: [PATCH] Enable flake8-todos plugin for ruff (#2342) --- galaxy_ng/app/access_control/access_policy.py | 2 +- galaxy_ng/app/access_control/fields.py | 2 +- galaxy_ng/app/access_control/statements/standalone.py | 2 +- galaxy_ng/app/api/base.py | 3 ++- galaxy_ng/app/api/ui/v1/serializers/collection.py | 4 ++-- galaxy_ng/app/api/ui/v1/serializers/synclist.py | 2 +- galaxy_ng/app/api/ui/v1/urls.py | 2 +- galaxy_ng/app/api/ui/v1/views/auth.py | 2 +- galaxy_ng/app/api/ui/v1/viewsets/distribution.py | 2 +- galaxy_ng/app/api/ui/v1/viewsets/my_synclist.py | 2 +- galaxy_ng/app/api/ui/v2/views.py | 3 +-- galaxy_ng/app/api/v1/filtersets.py | 2 +- galaxy_ng/app/api/v1/serializers.py | 6 +++--- galaxy_ng/app/api/v1/viewsets/roles.py | 2 +- .../app/api/v3/serializers/execution_environment.py | 2 +- galaxy_ng/app/api/v3/urls.py | 2 +- galaxy_ng/app/api/v3/viewsets/collection.py | 4 ++-- .../automation_analytics/collector.py | 8 ++++---- galaxy_ng/app/migrations/_dab_rbac.py | 2 +- galaxy_ng/app/models/namespace.py | 4 ++-- galaxy_ng/app/settings.py | 2 +- galaxy_ng/app/signals/handlers.py | 10 +++++----- galaxy_ng/app/tasks/publishing.py | 2 +- galaxy_ng/social/__init__.py | 2 +- .../tests/integration/api/rbac_actions/collections.py | 2 +- galaxy_ng/tests/integration/api/test_api_base.py | 4 ++-- .../tests/integration/api/test_artifact_download.py | 6 +++--- .../tests/integration/api/test_artifact_upload.py | 4 ++-- .../tests/integration/api/test_collection_delete.py | 4 ++-- .../tests/integration/api/test_collection_signing.py | 9 +++++---- .../tests/integration/api/test_container_delete.py | 4 ++-- .../integration/api/test_container_push_update.py | 2 +- .../integration/api/test_cross_repository_search.py | 2 +- galaxy_ng/tests/integration/api/test_load_data.py | 2 +- galaxy_ng/tests/integration/api/test_move.py | 4 ++-- galaxy_ng/tests/integration/api/test_rbac_roles.py | 2 +- galaxy_ng/tests/integration/api/test_repositories.py | 4 ++-- .../tests/integration/api/test_ui_namespace_owners.py | 2 +- galaxy_ng/tests/integration/api/test_ui_paths.py | 8 ++++---- .../tests/integration/api/test_ui_paths_gateway.py | 10 +++++----- galaxy_ng/tests/integration/api/test_verify_data.py | 5 +++-- galaxy_ng/tests/integration/api/test_x_repo_search.py | 2 +- galaxy_ng/tests/integration/cli/test_cli_flow.py | 2 +- galaxy_ng/tests/integration/cli/test_community_sync.py | 2 +- .../tests/integration/community/test_community_cli.py | 5 +++-- .../community/test_community_namespace_rbac.py | 4 ++-- galaxy_ng/tests/integration/dab/test_dab_rbac.py | 2 +- .../tests/integration/dab/test_dab_rbac_contract.py | 8 ++++---- galaxy_ng/tests/integration/schemas.py | 6 ++++-- galaxy_ng/tests/integration/utils/collections.py | 4 ++-- galaxy_ng/tests/integration/utils/iqe_utils.py | 5 +++-- galaxy_ng/tests/unit/api/test_api_v3_collections.py | 4 ++-- galaxy_ng/tests/unit/test_settings.py | 2 +- profiles/community/github_mock/flaskapp.py | 2 +- profiles/dab/make_test_data.py | 2 +- pyproject.toml | 8 ++++++++ 56 files changed, 110 insertions(+), 96 deletions(-) diff --git a/galaxy_ng/app/access_control/access_policy.py b/galaxy_ng/app/access_control/access_policy.py index 1d1813f2af..362deaa73e 100644 --- a/galaxy_ng/app/access_control/access_policy.py +++ b/galaxy_ng/app/access_control/access_policy.py @@ -31,7 +31,7 @@ log = logging.getLogger(__name__) -# TODO this is a function in pulpcore that needs to get moved ot the plugin api. +# TODO(newswangerd): This is a function in pulpcore that needs to get moved ot the plugin api. # from pulpcore.plugin.util import get_view_urlpattern def get_view_urlpattern(view): """ diff --git a/galaxy_ng/app/access_control/fields.py b/galaxy_ng/app/access_control/fields.py index 1404deb850..f96e514174 100644 --- a/galaxy_ng/app/access_control/fields.py +++ b/galaxy_ng/app/access_control/fields.py @@ -81,7 +81,7 @@ def to_internal_value(self, data): class UserPermissionField(serializers.Field): def _validate_user(self, user_data): - # FIXME - fill this in ... + # FIXME(jctanner): fill this in ... pass def to_representation(self, value): diff --git a/galaxy_ng/app/access_control/statements/standalone.py b/galaxy_ng/app/access_control/statements/standalone.py index 8043e926ca..6b02671074 100644 --- a/galaxy_ng/app/access_control/statements/standalone.py +++ b/galaxy_ng/app/access_control/statements/standalone.py @@ -331,7 +331,7 @@ "effect": "allow", }, ], - # TODO: More specific permissions will be required here when pulp_container + # TODO(newswangerd): More specific permissions will be required here when pulp_container # RBAC is added 'ContainerRepositoryViewSet': [ { diff --git a/galaxy_ng/app/api/base.py b/galaxy_ng/app/api/base.py index 40226f76c0..f576f04d54 100644 --- a/galaxy_ng/app/api/base.py +++ b/galaxy_ng/app/api/base.py @@ -99,7 +99,8 @@ def to_representation(self, instance): request = self.context.get('request', None) if request: - # TODO: Figure out how to make `include_related` show up in the open API spec + # TODO(newswangerd): Figure out how to make `include_related` show up + # in the open API spec include_fields = request.GET.getlist('include_related') if len(include_fields) > 0: diff --git a/galaxy_ng/app/api/ui/v1/serializers/collection.py b/galaxy_ng/app/api/ui/v1/serializers/collection.py index 6be8adc4bb..f0ba298b1e 100644 --- a/galaxy_ng/app/api/ui/v1/serializers/collection.py +++ b/galaxy_ng/app/api/ui/v1/serializers/collection.py @@ -205,8 +205,8 @@ class CollectionDetailSerializer(_CollectionSerializer): all_versions = serializers.SerializerMethodField() sign_state = serializers.CharField() - # TODO: rename field to "version_details" since with - # "version" query param this won't always be the latest version + # TODO(awcrosby): rename field to "version_details" since with + # "version" query param this won't always be the latest version @extend_schema_field(CollectionVersionDetailSerializer) def get_latest_version(self, obj): return CollectionVersionDetailSerializer(obj, context=self.context).data diff --git a/galaxy_ng/app/api/ui/v1/serializers/synclist.py b/galaxy_ng/app/api/ui/v1/serializers/synclist.py index fa16cb713d..cccaa51082 100644 --- a/galaxy_ng/app/api/ui/v1/serializers/synclist.py +++ b/galaxy_ng/app/api/ui/v1/serializers/synclist.py @@ -53,7 +53,7 @@ def create(self, validated_data): namespaces_data = validated_data.pop("namespaces") # Match repository to upstream_repository - # TODO: remove after SyncList no longer has FK to repositories + # TODO(awcrosby): remove after SyncList no longer has FK to repositories repository = validated_data.pop("upstream_repository") try: diff --git a/galaxy_ng/app/api/ui/v1/urls.py b/galaxy_ng/app/api/ui/v1/urls.py index 7bab7674bd..2e4a9fcc30 100644 --- a/galaxy_ng/app/api/ui/v1/urls.py +++ b/galaxy_ng/app/api/ui/v1/urls.py @@ -7,7 +7,7 @@ from . import views, viewsets router = routers.SimpleRouter() -# TODO: Replace with a RedirectView +# TODO(alikins): Replace with a RedirectView router.register('namespaces', viewsets.NamespaceViewSet, basename='namespaces') router.register('my-namespaces', viewsets.MyNamespaceViewSet, basename='my-namespaces') router.register('my-synclists', viewsets.MySyncListViewSet, basename='my-synclists') diff --git a/galaxy_ng/app/api/ui/v1/views/auth.py b/galaxy_ng/app/api/ui/v1/views/auth.py index f358f550e4..62e3bd10e7 100644 --- a/galaxy_ng/app/api/ui/v1/views/auth.py +++ b/galaxy_ng/app/api/ui/v1/views/auth.py @@ -88,7 +88,7 @@ def _oidc_logout(self, request): log.warning(msg) return - # FIXME - workaround for custom json type from dynaconf + # FIXME(newswangerd): workaround for custom json type from dynaconf if isinstance(social.extra_data, dict): extra_data = social.extra_data else: diff --git a/galaxy_ng/app/api/ui/v1/viewsets/distribution.py b/galaxy_ng/app/api/ui/v1/viewsets/distribution.py index e98eb835a9..efb65e099a 100644 --- a/galaxy_ng/app/api/ui/v1/viewsets/distribution.py +++ b/galaxy_ng/app/api/ui/v1/viewsets/distribution.py @@ -33,6 +33,6 @@ def get_queryset(self): qs=models.SyncList.objects.all() ) - # TODO: find a better way query this data + # TODO(newswangerd): find a better way query this data return pulp_models.AnsibleDistribution.objects.filter( name__in=synclists.values_list('name', flat=True)).order_by('name') diff --git a/galaxy_ng/app/api/ui/v1/viewsets/my_synclist.py b/galaxy_ng/app/api/ui/v1/viewsets/my_synclist.py index 239f1c8092..62a9117ff5 100644 --- a/galaxy_ng/app/api/ui/v1/viewsets/my_synclist.py +++ b/galaxy_ng/app/api/ui/v1/viewsets/my_synclist.py @@ -29,7 +29,7 @@ def get_queryset(self): qs=models.SyncList.objects.all(), ) - # TODO: on UI click of synclist toggle the UI makes 2 calls + # TODO(awcrosby): on UI click of synclist toggle the UI makes 2 calls # PUT /api/automation-hub/_ui/v1/my-synclists/1/ # POST /api/automation-hub/_ui/v1/my-synclists/1/curate/ # remove this method after UI stops calling curate action diff --git a/galaxy_ng/app/api/ui/v2/views.py b/galaxy_ng/app/api/ui/v2/views.py index 37cee25524..0b64eccf8c 100644 --- a/galaxy_ng/app/api/ui/v2/views.py +++ b/galaxy_ng/app/api/ui/v2/views.py @@ -64,8 +64,7 @@ class UserViewSet(BaseViewSet): permission_classes = [ComplexUserPermissions] def get_serializer_class(self): - # FIXME - a single serializer for this viewset - # seems painful to implement. + # FIXME(jctanner): a single serializer for this viewset seems painful to implement. if self.action in ['list', 'retrieve']: return UserDetailSerializer elif self.action in ['create', 'update', 'partial_update', 'destroy']: diff --git a/galaxy_ng/app/api/v1/filtersets.py b/galaxy_ng/app/api/v1/filtersets.py index 73e77475ec..e85ef3a0d9 100644 --- a/galaxy_ng/app/api/v1/filtersets.py +++ b/galaxy_ng/app/api/v1/filtersets.py @@ -39,7 +39,7 @@ def keywords_filter(self, queryset, name, value): def owner_filter(self, queryset, name, value): # find the owner on the linked v3 namespace - # FIXME - this is terribly slow + # FIXME(jctanner): this is terribly slow pks = [] for ns1 in LegacyNamespace.objects.all(): if not ns1.namespace: diff --git a/galaxy_ng/app/api/v1/serializers.py b/galaxy_ng/app/api/v1/serializers.py index 7eb299b240..cf2d879b1e 100644 --- a/galaxy_ng/app/api/v1/serializers.py +++ b/galaxy_ng/app/api/v1/serializers.py @@ -165,7 +165,7 @@ def get_date_joined(self, obj): def get_summary_fields(self, obj): return {} - # TODO: What does this actually mean? + # TODO(jctanner): What does this actually mean? # def get_active(self, obj): # return True @@ -324,7 +324,7 @@ def get_summary_fields(self, obj): versions = obj.full_metadata.get('versions', []) if versions: - # FIXME - we can't assume they're all sorted yet + # FIXME(jctanner): we can't assume they're all sorted yet versions = sort_versions(versions) versions = versions[::-1] if len(versions) > 10: @@ -340,7 +340,7 @@ def get_summary_fields(self, obj): 'pulp_href': pulp_href } - # FIXME - repository is a bit hacky atm + # FIXME(jctanner): repository is a bit hacky atm repository = {} if obj.full_metadata.get('repository'): repository = obj.full_metadata.get('repository') diff --git a/galaxy_ng/app/api/v1/viewsets/roles.py b/galaxy_ng/app/api/v1/viewsets/roles.py index d59c8a2d0b..ba66c2307a 100644 --- a/galaxy_ng/app/api/v1/viewsets/roles.py +++ b/galaxy_ng/app/api/v1/viewsets/roles.py @@ -135,7 +135,7 @@ def update(self, request, pk=None): role.full_metadata[key] = newval changed[key] = newval - # TODO - get rid of github_reference? + # TODO(jctanner): get rid of github_reference? if key == 'github_branch': key = 'github_reference' if role.full_metadata.get(key) != newval: diff --git a/galaxy_ng/app/api/v3/serializers/execution_environment.py b/galaxy_ng/app/api/v3/serializers/execution_environment.py index fcbd456f98..0df204b650 100644 --- a/galaxy_ng/app/api/v3/serializers/execution_environment.py +++ b/galaxy_ng/app/api/v3/serializers/execution_environment.py @@ -273,7 +273,7 @@ def _content_info(self, content): "tag_name": None, } - # TODO: Figure out if there is a way to prefetch Manifest and Tag objects + # TODO(jerabekjiri): Figure out if there is a way to prefetch Manifest and Tag objects if content.pulp_type == "container.manifest": manifest = container_models.Manifest.objects.get(pk=content.pk) return_data["manifest_digest"] = manifest.digest diff --git a/galaxy_ng/app/api/v3/urls.py b/galaxy_ng/app/api/v3/urls.py index dc5636dda3..5d89c04a82 100644 --- a/galaxy_ng/app/api/v3/urls.py +++ b/galaxy_ng/app/api/v3/urls.py @@ -153,7 +153,7 @@ # >>>> END OVERRIDDEN PULP ANSIBLE ENDPOINTS <<<<< - # TODO: Endpoints that have not been moved to pulp ansible yet + # TODO(newswangerd): Endpoints that have not been moved to pulp ansible yet path( "collections///versions//move/" "//", diff --git a/galaxy_ng/app/api/v3/viewsets/collection.py b/galaxy_ng/app/api/v3/viewsets/collection.py index 38faf9d8c1..6cfe539ed6 100644 --- a/galaxy_ng/app/api/v3/viewsets/collection.py +++ b/galaxy_ng/app/api/v3/viewsets/collection.py @@ -143,8 +143,8 @@ def create(self, request, *args, **kwargs): version=data['filename'].version, ) - # TODO: CollectionImport.get_absolute_url() should be able to generate this, but - # it needs the repo/distro base_path for the part of url + # TODO(alikins): CollectionImport.get_absolute_url() should be able to generate this, but + # it needs the repo/distro base_path for the part of url import_obj_url = reverse("galaxy:api:v3:collection-imports-detail", kwargs={'pk': str(task_detail.pk), 'path': path}) diff --git a/galaxy_ng/app/metrics_collection/automation_analytics/collector.py b/galaxy_ng/app/metrics_collection/automation_analytics/collector.py index bd9b488eaa..2b784c0d84 100644 --- a/galaxy_ng/app/metrics_collection/automation_analytics/collector.py +++ b/galaxy_ng/app/metrics_collection/automation_analytics/collector.py @@ -41,13 +41,13 @@ def _is_shipping_configured(self): return auth_valid def _last_gathering(self): - # TODO: Waiting for persistent DB storage in Hub + # TODO(slemrmartin): Waiting for persistent DB storage in Hub # https://issues.redhat.com/browse/AAH-2009 # return settings.AUTOMATION_ANALYTICS_LAST_GATHER return None def _load_last_gathered_entries(self): - # TODO: Waiting for persistent DB storage in Hub + # TODO(slemrmartin): Waiting for persistent DB storage in Hub # https://issues.redhat.com/browse/AAH-2009 # from awx.conf.models import Setting # @@ -59,11 +59,11 @@ def _load_last_gathered_entries(self): return last_gathered_entries def _save_last_gathered_entries(self, last_gathered_entries): - # TODO: Waiting for persistent DB storage in Hub + # TODO(slemrmartin): Waiting for persistent DB storage in Hub # https://issues.redhat.com/browse/AAH-2009 pass def _save_last_gather(self): - # TODO: Waiting for persistent DB storage in Hub + # TODO(slemrmartin): Waiting for persistent DB storage in Hub # https://issues.redhat.com/browse/AAH-2009 pass diff --git a/galaxy_ng/app/migrations/_dab_rbac.py b/galaxy_ng/app/migrations/_dab_rbac.py index cbc217635d..a67876c593 100644 --- a/galaxy_ng/app/migrations/_dab_rbac.py +++ b/galaxy_ng/app/migrations/_dab_rbac.py @@ -29,7 +29,7 @@ def pulp_role_to_single_content_type_or_none(pulprole): def create_permissions_as_operation(apps, schema_editor): - # TODO: possibly create permissions for more apps here + # TODO(jctanner): possibly create permissions for more apps here for app_label in {'ansible', 'container', 'core', 'galaxy'}: create_dab_permissions(global_apps.get_app_config(app_label), apps=apps) diff --git a/galaxy_ng/app/models/namespace.py b/galaxy_ng/app/models/namespace.py index 6e9c982231..5e8389ba41 100644 --- a/galaxy_ng/app/models/namespace.py +++ b/galaxy_ng/app/models/namespace.py @@ -63,8 +63,8 @@ class Namespace( @property def avatar_url(self): - # TODO: remove this once we can fix the content app on CRC - # the content app in crc doesn't work + # TODO(newswangerd): remove this once we can fix the content app on CRC + # the content app in crc doesn't work if settings.GALAXY_DEPLOYMENT_MODE == DeploymentMode.STANDALONE.value: # noqa: SIM300 data = self.last_created_pulp_metadata if data and data.avatar_sha256: diff --git a/galaxy_ng/app/settings.py b/galaxy_ng/app/settings.py index 07f4b0f702..2cfcb9d605 100644 --- a/galaxy_ng/app/settings.py +++ b/galaxy_ng/app/settings.py @@ -434,7 +434,7 @@ 'galaxy_only_team_member': {'name': 'Galaxy Team Member', 'shortname': 'team_member'}, 'team_member': {}, 'team_admin': {}, - # TODO: add organization to the registry later + # TODO(jctanner): add organization to the registry later # 'org_admin': {}, # 'org_member': {}, } diff --git a/galaxy_ng/app/signals/handlers.py b/galaxy_ng/app/signals/handlers.py index 9126127faf..49e16064ce 100644 --- a/galaxy_ng/app/signals/handlers.py +++ b/galaxy_ng/app/signals/handlers.py @@ -234,7 +234,7 @@ def copy_role_to_role_definition(sender, instance, created, **kwargs): content_type=content_type, description=instance.description or instance.name, ) - # TODO: other fields? like description + # TODO(jctanner): other fields? like description @receiver(post_delete, sender=Role) @@ -285,7 +285,7 @@ def copy_role_definition_to_role(sender, instance, created, **kwargs): role = Role.objects.filter(name=role_name).first() if not role: Role.objects.create(name=role_name) - # TODO: other fields? like description + # TODO(jctanner): other fields? like description @receiver(post_delete, sender=RoleDefinition) @@ -365,7 +365,7 @@ def lazy_content_type_correction(rd, obj): def copy_pulp_user_role(sender, instance, created, **kwargs): """When a pulp role is granted to a user, grant the equivalent dab role.""" - # FIXME - this is a temporary workaround to allow on-demand + # FIXME(jctanner): this is a temporary workaround to allow on-demand # assigment of task roles to users from pulpcore's AFTER_CREATE # hook on the Task model which calls ... # self.add_roles_for_object_creator("core.task_user_dispatcher") @@ -416,7 +416,7 @@ def copy_pulp_group_role(sender, instance, created, **kwargs): team = Team.objects.filter(group=instance.group) if rd and team.exists(): team = team.first() - # FIXME - multi-type roledefs + # FIXME(jctanner): multi-type roledefs try: if instance.content_object: rd.give_permission(team, instance.content_object) @@ -436,7 +436,7 @@ def delete_pulp_group_role(sender, instance, **kwargs): team = Team.objects.filter(group=instance.group) if rd and team.exists(): team = team.first() - # FIXME - multi-type roledefs + # FIXME(jctanner): multi-type roledefs try: if instance.content_object: rd.remove_permission(team, instance.content_object) diff --git a/galaxy_ng/app/tasks/publishing.py b/galaxy_ng/app/tasks/publishing.py index e9e12dd06c..869db5f78a 100644 --- a/galaxy_ng/app/tasks/publishing.py +++ b/galaxy_ng/app/tasks/publishing.py @@ -24,7 +24,7 @@ def get_created_collection_versions(): created_resources = current_task.created_resources.filter( content_type_id=ContentType.objects.get_for_model(CollectionVersion)) - # TODO: replace with values_list + # TODO(alikins): replace with values_list created_collection_versions = [] for created_resource in created_resources: collection_version = created_resource.content_object diff --git a/galaxy_ng/social/__init__.py b/galaxy_ng/social/__init__.py index 4ddc0cc4d7..476e6669f8 100644 --- a/galaxy_ng/social/__init__.py +++ b/galaxy_ng/social/__init__.py @@ -124,7 +124,7 @@ def handle_v3_namespace(self, session_user, session_email, session_login, github + f' is NOT owner of {found_namespace}' ) - # FIXME - make one from the transformed name? + # FIXME(jctanner): make one from the transformed name? if not found_namespace: namespace, namespace_created = self._ensure_namespace(namespace_name, session_user) logger.info( diff --git a/galaxy_ng/tests/integration/api/rbac_actions/collections.py b/galaxy_ng/tests/integration/api/rbac_actions/collections.py index 2896003ec2..ea580f83d3 100644 --- a/galaxy_ng/tests/integration/api/rbac_actions/collections.py +++ b/galaxy_ng/tests/integration/api/rbac_actions/collections.py @@ -605,7 +605,7 @@ def private_repo_v3(user, password, expect_pass, extra): assert_pass(expect_pass, response.status_code, 200, 403) -# TODO move logic to ReusableCollection._reset_collection() +# TODO(bmclaughlin): move logic to ReusableCollection._reset_collection() def _reset_collection_repo(cv_pulp_href, repo, staging_repo): requests.post( f"{SERVER}{repo['pulp_href']}move_collection_version/", diff --git a/galaxy_ng/tests/integration/api/test_api_base.py b/galaxy_ng/tests/integration/api/test_api_base.py index 7d1857fd9f..485d5b522d 100644 --- a/galaxy_ng/tests/integration/api/test_api_base.py +++ b/galaxy_ng/tests/integration/api/test_api_base.py @@ -23,7 +23,7 @@ def test_galaxy_api_root_standalone_no_auth_access(galaxy_client): def test_galaxy_api_root(galaxy_client, artifact): """Test galaxy API root.""" - # TODO: change to `basic_user` profile when can access pulp-v3 api root + # TODO(chr-stian): change to `basic_user` profile when can access pulp-v3 api root gc = galaxy_client("admin") # verify api root works response = gc.get(gc.galaxy_root) @@ -43,7 +43,7 @@ def test_galaxy_api_root(galaxy_client, artifact): def test_galaxy_api_root_v_4_5(galaxy_client, artifact): """Test galaxy API root.""" - # TODO: change to `basic_user` profile when can access pulp-v3 api root + # TODO(chr-stian): change to `basic_user` profile when can access pulp-v3 api root gc = galaxy_client("admin") # verify api root works diff --git a/galaxy_ng/tests/integration/api/test_artifact_download.py b/galaxy_ng/tests/integration/api/test_artifact_download.py index 85d41f5e34..b70cef5188 100644 --- a/galaxy_ng/tests/integration/api/test_artifact_download.py +++ b/galaxy_ng/tests/integration/api/test_artifact_download.py @@ -17,8 +17,8 @@ logger = logging.getLogger(__name__) -# TODO Refactor get_client to provide access to bearer token -# FIXME: unskip when https://issues.redhat.com/browse/AAP-32675 is merged +# TODO(bmclaughlin): Refactor get_client to provide access to bearer token +# FIXME(jerabekjiri): unskip when https://issues.redhat.com/browse/AAP-32675 is merged @pytest.mark.skip_in_gw @pytest.mark.deployment_standalone @pytest.mark.installer_smoke_test @@ -72,7 +72,7 @@ def test_download_artifact(ansible_config, galaxy_client): assert ci.version == version -# TODO: make download logic more DRY in these tests +# TODO(awcrosby): make download logic more DRY in these tests @pytest.mark.min_hub_version("4.6dev") @pytest.mark.all def test_download_artifact_validated(ansible_config, galaxy_client): diff --git a/galaxy_ng/tests/integration/api/test_artifact_upload.py b/galaxy_ng/tests/integration/api/test_artifact_upload.py index 0e0c0def2d..e5c8200552 100644 --- a/galaxy_ng/tests/integration/api/test_artifact_upload.py +++ b/galaxy_ng/tests/integration/api/test_artifact_upload.py @@ -275,12 +275,12 @@ def test_long_field_values(galaxy_client, field): assert fieldname in resp["error"]["description"] -# FIXME: unskip when https://issues.redhat.com/browse/AAP-32675 is merged +# FIXME(jerabekjiri): unskip when https://issues.redhat.com/browse/AAP-32675 is merged @pytest.mark.skip_in_gw @pytest.mark.parametrize( "spec", [ - # TODO: move most these to galaxy-importer unit tests + # TODO(awcrosby): move most these to galaxy-importer unit tests ("2eq", "==2.10", "completed"), # ("gt", ">2.10.0", "completed"), # ("gteq", ">=2.10", "completed"), diff --git a/galaxy_ng/tests/integration/api/test_collection_delete.py b/galaxy_ng/tests/integration/api/test_collection_delete.py index 2ddf082c3b..b211f9f582 100644 --- a/galaxy_ng/tests/integration/api/test_collection_delete.py +++ b/galaxy_ng/tests/integration/api/test_collection_delete.py @@ -43,7 +43,7 @@ def test_delete_collection(galaxy_client, uncertifiedv2): get_collection(gc, cnamespace, cname, ckey[2]) -# FIXME: unskip when https://issues.redhat.com/browse/AAP-32675 is merged +# FIXME(jerabekjiri): unskip when https://issues.redhat.com/browse/AAP-32675 is merged @pytest.mark.skip_in_gw @pytest.mark.galaxyapi_smoke @pytest.mark.delete @@ -90,7 +90,7 @@ def test_delete_collection_version(galaxy_client, uncertifiedv2): get_collection(gc, cnamespace, cname, ckey[2]) -# FIXME: unskip when https://issues.redhat.com/browse/AAP-32675 is merged +# FIXME(jerabekjiri): unskip when https://issues.redhat.com/browse/AAP-32675 is merged @pytest.mark.skip_in_gw @pytest.mark.delete @pytest.mark.min_hub_version("4.7dev") diff --git a/galaxy_ng/tests/integration/api/test_collection_signing.py b/galaxy_ng/tests/integration/api/test_collection_signing.py index e3b925385f..0e3fe2fc3a 100644 --- a/galaxy_ng/tests/integration/api/test_collection_signing.py +++ b/galaxy_ng/tests/integration/api/test_collection_signing.py @@ -64,12 +64,13 @@ def sign_on_demand(gc, signing_service, sign_url=None, **payload): ''' resp = gc.post(sign_url, body=sign_payload) log.info("Sign Task: %s", resp) - # FIXME - pulp tasks do not seem to accept token auth, so no way to check task progress + # FIXME(rochacbruno): pulp tasks do not seem to accept token auth, so no way + # to check task progress time.sleep(SLEEP_SECONDS_ONETIME) return resp -# FIXME: unskip when https://issues.redhat.com/browse/AAP-32675 is merged +# FIXME(jerabekjiri): unskip when https://issues.redhat.com/browse/AAP-32675 is merged @pytest.mark.skip_in_gw @pytest.mark.collection_signing @pytest.mark.collection_move @@ -143,7 +144,7 @@ def test_collection_auto_sign_on_approval(ansible_config, flags, galaxy_client, assert metadata["signatures"][0]["pubkey_fingerprint"] is not None -# FIXME: unskip when https://issues.redhat.com/browse/AAP-32675 is merged +# FIXME(jerabekjiri): unskip when https://issues.redhat.com/browse/AAP-32675 is merged @pytest.mark.skip_in_gw @pytest.mark.collection_signing @pytest.mark.deployment_standalone @@ -332,7 +333,7 @@ def test_collection_move_with_signatures(ansible_config, flags, galaxy_client, s assert metadata["signatures"][0]["pubkey_fingerprint"] is not None -# FIXME: unskip when https://issues.redhat.com/browse/AAP-32675 is merged +# FIXME(jerabekjiri): unskip when https://issues.redhat.com/browse/AAP-32675 is merged @pytest.mark.skip_in_gw @pytest.mark.collection_signing @pytest.mark.collection_move diff --git a/galaxy_ng/tests/integration/api/test_container_delete.py b/galaxy_ng/tests/integration/api/test_container_delete.py index fb96ee56d8..000d856899 100644 --- a/galaxy_ng/tests/integration/api/test_container_delete.py +++ b/galaxy_ng/tests/integration/api/test_container_delete.py @@ -64,7 +64,7 @@ def test_delete_ee_and_content(ansible_config, galaxy_client): # Ensure content list is empty by checking each content href content_hrefs = [item["pulp_href"] for item in content_list["results"]] - # FIXME: all items are found. Check it. + # FIXME(chr-stian): all items are found. Check it. for item in content_hrefs: failed = None try: @@ -89,7 +89,7 @@ def test_shared_content_is_not_deleted(ansible_config, galaxy_client): username = config['username'] password = config['password'] - # FIXME - these settings are wrong for dab_jwt ... + # FIXME(jctanner): These settings are wrong for dab_jwt ... if 'jwtproxy' in gc.galaxy_root: container_registry = gc.galaxy_root.split('/')[2] password = 'redhat' diff --git a/galaxy_ng/tests/integration/api/test_container_push_update.py b/galaxy_ng/tests/integration/api/test_container_push_update.py index 14cd4f5db9..7c857711e8 100644 --- a/galaxy_ng/tests/integration/api/test_container_push_update.py +++ b/galaxy_ng/tests/integration/api/test_container_push_update.py @@ -14,7 +14,7 @@ from galaxykit.utils import wait_for_task -# FIXME: unskip when https://issues.redhat.com/browse/AAP-32675 is merged +# FIXME(jerabekjiri): unskip when https://issues.redhat.com/browse/AAP-32675 is merged @pytest.mark.skip_in_gw @pytest.mark.deployment_standalone @pytest.mark.min_hub_version("4.7.1") diff --git a/galaxy_ng/tests/integration/api/test_cross_repository_search.py b/galaxy_ng/tests/integration/api/test_cross_repository_search.py index 24085fda2e..b747c719e0 100644 --- a/galaxy_ng/tests/integration/api/test_cross_repository_search.py +++ b/galaxy_ng/tests/integration/api/test_cross_repository_search.py @@ -4,7 +4,7 @@ from ..utils import get_client, SocialGithubClient -# FIXME: unskip when https://issues.redhat.com/browse/AAP-32675 is merged +# FIXME(jerabekjiri): unskip when https://issues.redhat.com/browse/AAP-32675 is merged @pytest.mark.skip_in_gw @pytest.mark.min_hub_version("4.7dev") @pytest.mark.all diff --git a/galaxy_ng/tests/integration/api/test_load_data.py b/galaxy_ng/tests/integration/api/test_load_data.py index 9cc5104088..bf7687a768 100644 --- a/galaxy_ng/tests/integration/api/test_load_data.py +++ b/galaxy_ng/tests/integration/api/test_load_data.py @@ -104,7 +104,7 @@ def test_load_data(self, galaxy_client, data, ansible_config): gc, "ansible-default", collection["repository"], artifact.namespace, artifact.name, artifact.version) if collection["signed"] and is_ocp_env(): - # FIXME + # FIXME(chr-stian): No description provided. logger.debug("Not Signing collection, collection signing not enabled" "on ocp environment") if collection["deprecated"]: diff --git a/galaxy_ng/tests/integration/api/test_move.py b/galaxy_ng/tests/integration/api/test_move.py index 00fd99f67d..0c6767746d 100644 --- a/galaxy_ng/tests/integration/api/test_move.py +++ b/galaxy_ng/tests/integration/api/test_move.py @@ -18,7 +18,7 @@ pytestmark = pytest.mark.qa # noqa: F821 -# FIXME: unskip when https://issues.redhat.com/browse/AAP-32675 is merged +# FIXME(jerabekjiri): unskip when https://issues.redhat.com/browse/AAP-32675 is merged @pytest.mark.skip_in_gw @pytest.mark.galaxyapi_smoke @pytest.mark.certification @@ -187,7 +187,7 @@ def test_copy_associated_content( ): """Tests whether a collection and associated content is copied from repo to repo""" - # TODO: add check for ansible namespace metadata + # TODO(jerabekjiri): add check for ansible namespace metadata artifact = build_collection( "skeleton", diff --git a/galaxy_ng/tests/integration/api/test_rbac_roles.py b/galaxy_ng/tests/integration/api/test_rbac_roles.py index e1c85e708a..71c22d5abe 100644 --- a/galaxy_ng/tests/integration/api/test_rbac_roles.py +++ b/galaxy_ng/tests/integration/api/test_rbac_roles.py @@ -235,7 +235,7 @@ collection_remote_remove_role, } -# TODO: Update object tests to include delete actions +# TODO(newswangerd): Update object tests to include delete actions OBJECT_ACTIONS = { # ansible change_collection_namespace, diff --git a/galaxy_ng/tests/integration/api/test_repositories.py b/galaxy_ng/tests/integration/api/test_repositories.py index a7903358fd..f085a09b74 100644 --- a/galaxy_ng/tests/integration/api/test_repositories.py +++ b/galaxy_ng/tests/integration/api/test_repositories.py @@ -114,7 +114,7 @@ def test_move_cv_endpoint(self, galaxy_client): test_repo_name_2 = f"repo-test-{generate_random_string()}" - # FIXME - the POST call will often result in an error with the oci+insights profile ... + # FIXME(jctanner): the POST call will often result in an error with the oci+insights profile # root:client.py:216 Cannot parse expected JSON response # (http://localhost:38080/api/automation-hub/pulp/api/v3/repositories/ansible/ansible/): # Post "http://pulp:55001/api/automation-hub/pulp/api/v3/repositories/ansible/ansible/": @@ -132,7 +132,7 @@ def test_move_cv_endpoint(self, galaxy_client): if repo_pulp_href_2 is None: raise Exception("failed to create repo and dist") - # FIXME - the POST call will often result in an error with the oci+insights profile ... + # FIXME(jctanner): The POST call will often result in an error with the oci+insights profile # root:client.py:216 Cannot parse expected JSON response # (http://localhost:38080/api//pulp/api/v3/repositories/ansible/ansible/ # /move_collection_version/): diff --git a/galaxy_ng/tests/integration/api/test_ui_namespace_owners.py b/galaxy_ng/tests/integration/api/test_ui_namespace_owners.py index 672a8a8488..7d504920e2 100644 --- a/galaxy_ng/tests/integration/api/test_ui_namespace_owners.py +++ b/galaxy_ng/tests/integration/api/test_ui_namespace_owners.py @@ -21,7 +21,7 @@ def test_api_ui_v1_namespace_owners_users_and_group_separation(ansible_config): # Namespace owners should have a list of users that are directly added as owners. # That list of users should -not- include users of groups that have been # added as owners. - # TODO: make this test compatible with GW + # TODO(chr-stian): make this test compatible with GW cfg = ansible_config('partner_engineer') with UIClient(config=cfg) as uclient: diff --git a/galaxy_ng/tests/integration/api/test_ui_paths.py b/galaxy_ng/tests/integration/api/test_ui_paths.py index 5e532239bc..fd65ea8f23 100644 --- a/galaxy_ng/tests/integration/api/test_ui_paths.py +++ b/galaxy_ng/tests/integration/api/test_ui_paths.py @@ -601,7 +601,7 @@ def test_api_ui_v1_my_namespaces(ansible_config, galaxy_client): ds = resp.json() # create ns with group - # TODO: Add user's roles to the me endpoint + # TODO(bmclaughlin): Add user's roles to the me endpoint payload = { 'name': new_namespace, 'groups': [{ @@ -713,7 +713,7 @@ def test_api_ui_v1_remotes_by_id(ansible_config): for remote in ds['data']: validate_json(instance=remote, schema=schema_remote) - # FIXME - there is no suitable pulp_id for a remote? + # FIXME(jctanner): there is no suitable pulp_id for a remote? pulp_ids = [x['pk'] for x in ds['data']] for pulp_id in pulp_ids: response = uclient.get(f'_ui/v1/remotes/{pulp_id}/') @@ -779,7 +779,7 @@ def test_api_ui_v1_settings(ansible_config): ds = resp.json() validate_json(instance=ds, schema=schema_settings) - # FIXME - password length and token expiration are None? + # FIXME(jctanner): password length and token expiration are None? assert ds['GALAXY_ENABLE_UNAUTHENTICATED_COLLECTION_ACCESS'] is False assert ds['GALAXY_ENABLE_UNAUTHENTICATED_COLLECTION_DOWNLOAD'] is False assert ds['GALAXY_REQUIRE_CONTENT_APPROVAL'] is True @@ -814,7 +814,7 @@ def test_api_ui_v1_tags(ansible_config): ds = resp.json() validate_json(instance=ds, schema=schema_objectlist) - # FIXME - ui tags api does not support POST? + # FIXME(jctanner): ui tags api does not support POST? # /api/automation-hub/_ui/v1/tags/collections/ diff --git a/galaxy_ng/tests/integration/api/test_ui_paths_gateway.py b/galaxy_ng/tests/integration/api/test_ui_paths_gateway.py index 721e6b4e78..5e4d28f3ce 100644 --- a/galaxy_ng/tests/integration/api/test_ui_paths_gateway.py +++ b/galaxy_ng/tests/integration/api/test_ui_paths_gateway.py @@ -78,7 +78,7 @@ def test_gw_api_ui_v1_collection_versions(galaxy_client, uncertifiedv2): validate_json(instance=cv_resp['metadata'], schema=schema_collectionversion_metadata) -# FIXME: unskip when https://issues.redhat.com/browse/AAP-32675 is merged +# FIXME(jerabekjiri): unskip when https://issues.redhat.com/browse/AAP-32675 is merged @pytest.mark.skip_in_gw @pytest.mark.deployment_standalone @pytest.mark.api_ui @@ -341,7 +341,7 @@ def test_gw_api_ui_v1_my_namespaces(galaxy_client): ds = gc.get('_ui/v1/me/') # create ns with group - # TODO: Add user's roles to the me endpoint + # TODO(chr-stian): Add user's roles to the me endpoint payload = { 'name': new_namespace, 'groups': [{ @@ -417,7 +417,7 @@ def test_gw_api_ui_v1_remotes_by_id(galaxy_client): for remote in ds['data']: validate_json(instance=remote, schema=schema_remote) - # FIXME - there is no suitable pulp_id for a remote? + # FIXME(chr-stian): there is no suitable pulp_id for a remote? pulp_ids = [x['pk'] for x in ds['data']] for pulp_id in pulp_ids: gc.get(f'_ui/v1/remotes/{pulp_id}/') @@ -467,7 +467,7 @@ def test_gw_api_ui_v1_settings(galaxy_client): ds = gc.get('_ui/v1/settings/') validate_json(instance=ds, schema=schema_settings) - # FIXME - password length and token expiration are None? + # FIXME(chr-stian): password length and token expiration are None? assert ds['GALAXY_ENABLE_UNAUTHENTICATED_COLLECTION_ACCESS'] is False assert ds['GALAXY_ENABLE_UNAUTHENTICATED_COLLECTION_DOWNLOAD'] is False assert ds['GALAXY_REQUIRE_CONTENT_APPROVAL'] is True @@ -484,7 +484,7 @@ def test_gw_api_ui_v1_tags(galaxy_client): ds = gc.get('_ui/v1/tags/') validate_json(instance=ds, schema=schema_objectlist) - # FIXME - ui tags api does not support POST? + # FIXME(chr-stian): ui tags api does not support POST? @pytest.mark.deployment_standalone diff --git a/galaxy_ng/tests/integration/api/test_verify_data.py b/galaxy_ng/tests/integration/api/test_verify_data.py index 0722e712e1..74f191ce4d 100644 --- a/galaxy_ng/tests/integration/api/test_verify_data.py +++ b/galaxy_ng/tests/integration/api/test_verify_data.py @@ -70,7 +70,7 @@ def test_verify_data_collections(self, galaxy_client, data, ansible_config): assert actual_col["name"] == expected_name assert actual_col["namespace"]["name"] == expected_col["namespace"] if not is_ocp_env(): - # FIXME: remove the above conditional when content signing is enabled + # FIXME(chr-stian): remove the above conditional when content signing is enabled if not galaxy_auto_sign_collections(): if expected_col["signed"]: assert len(actual_col["signatures"]) > 0 @@ -82,7 +82,8 @@ def test_verify_data_collections(self, galaxy_client, data, ansible_config): _, actual_col = search_collection_endpoint(gc, name=expected_name) assert actual_col[0]["is_deprecated"] == expected_col["deprecated"] if not is_ocp_env(): - # FIXME: remove the above conditional when content signing is enabled + # FIXME(chr-stian): remove the above conditional when content signing + # is enabled if galaxy_auto_sign_collections(): assert actual_col[0]["is_signed"] is True else: diff --git a/galaxy_ng/tests/integration/api/test_x_repo_search.py b/galaxy_ng/tests/integration/api/test_x_repo_search.py index 038b2a30b1..5f7e2d0293 100644 --- a/galaxy_ng/tests/integration/api/test_x_repo_search.py +++ b/galaxy_ng/tests/integration/api/test_x_repo_search.py @@ -400,7 +400,7 @@ def test_search_by_version(self, galaxy_client): expected = [{"repo_name": test_repo_name, "cv_name": artifact.name, "cv_version": version}] assert verify_repo_data(expected, results) - # FIXME: unskip when https://issues.redhat.com/browse/AAP-32675 is merged + # FIXME(jerabekjiri): unskip when https://issues.redhat.com/browse/AAP-32675 is merged @pytest.mark.skip_in_gw @pytest.mark.parametrize(("is_highest", "cv_version"), [(True, "4.0.2"), (False, "4.0.1")]) @pytest.mark.x_repo_search diff --git a/galaxy_ng/tests/integration/cli/test_cli_flow.py b/galaxy_ng/tests/integration/cli/test_cli_flow.py index fda23efd95..6e05b9227e 100644 --- a/galaxy_ng/tests/integration/cli/test_cli_flow.py +++ b/galaxy_ng/tests/integration/cli/test_cli_flow.py @@ -22,7 +22,7 @@ def test_publish_newer_version_collection(galaxy_client, uncertifiedv2): If the collection version was not certified the version to be installed has to be specified during installation. """ - # FIXME - ^^^ is that really possible? + # FIXME(jctanner): ^^^ is that really possible? v1 = uncertifiedv2[0] v2 = uncertifiedv2[1] gc = galaxy_client("basic_user") diff --git a/galaxy_ng/tests/integration/cli/test_community_sync.py b/galaxy_ng/tests/integration/cli/test_community_sync.py index ec3c52c3d9..a2d00f9365 100644 --- a/galaxy_ng/tests/integration/cli/test_community_sync.py +++ b/galaxy_ng/tests/integration/cli/test_community_sync.py @@ -18,7 +18,7 @@ def test_community_collection_download_count_sync(ansible_config): """ Test collection download count sync command """ - # FIXME - once beta switches over, this test is no longer needed. + # FIXME(jctanner): once beta switches over, this test is no longer needed. config = ansible_config("admin") api_client = get_client(config, require_auth=True) diff --git a/galaxy_ng/tests/integration/community/test_community_cli.py b/galaxy_ng/tests/integration/community/test_community_cli.py index 99b1170c8d..4e7b5167d9 100644 --- a/galaxy_ng/tests/integration/community/test_community_cli.py +++ b/galaxy_ng/tests/integration/community/test_community_cli.py @@ -387,7 +387,8 @@ def test_delete_role_with_cli(ansible_config): ) delete_pid = subprocess.run(cmd, shell=True, capture_output=True) - # FIXME: for some reason, returncode is 1 even if it runs correctly and role is deleted + # FIXME(jerabekjiri): for some reason, returncode is 1 even if it runs correctly + # and role is deleted # assert delete_pid.returncode == 0 #, delete_pid.stderr.decode('utf-8') assert "Role jctannerTEST.role1 deleted" in delete_pid.stdout.decode('utf-8') @@ -420,7 +421,7 @@ def test_delete_missing_role_with_cli(ansible_config): + f' {github_repo}' ) delete_pid = subprocess.run(cmd, shell=True, capture_output=True) - # FIXME: should return 1? + # FIXME(jerabekjiri): should return 1? # assert delete_pid.returncode == 0 # , delete_pid.stderr.decode('utf-8') stdout = delete_pid.stdout.decode('utf-8') diff --git a/galaxy_ng/tests/integration/community/test_community_namespace_rbac.py b/galaxy_ng/tests/integration/community/test_community_namespace_rbac.py index 51db725638..70a7fe87c7 100644 --- a/galaxy_ng/tests/integration/community/test_community_namespace_rbac.py +++ b/galaxy_ng/tests/integration/community/test_community_namespace_rbac.py @@ -213,9 +213,9 @@ def test_social_auth_v3_rbac_workflow(ansible_config): # the new login should be able to upload to BOTH v3 namespaces - # TODO ... what happens with the other owners of a v1 namespace when + # TODO(jctanner): ... what happens with the other owners of a v1 namespace when # the original owner changes their login? - # TODO ... what happens with the other owners of a v3 namespace when + # TODO(jctanner): ... what happens with the other owners of a v3 namespace when # the original owner changes their login? diff --git a/galaxy_ng/tests/integration/dab/test_dab_rbac.py b/galaxy_ng/tests/integration/dab/test_dab_rbac.py index 4bb93d9e0c..8abb9b9a74 100644 --- a/galaxy_ng/tests/integration/dab/test_dab_rbac.py +++ b/galaxy_ng/tests/integration/dab/test_dab_rbac.py @@ -141,7 +141,7 @@ def test_dab_rbac_repository_owner_by_user_or_team( assert result['state'] == 'completed' -# FIXME: unskip when https://issues.redhat.com/browse/AAP-32675 is merged +# FIXME(jerabekjiri): unskip when https://issues.redhat.com/browse/AAP-32675 is merged @pytest.mark.skip_in_gw @pytest.mark.deployment_standalone @pytest.mark.min_hub_version("4.10dev") diff --git a/galaxy_ng/tests/integration/dab/test_dab_rbac_contract.py b/galaxy_ng/tests/integration/dab/test_dab_rbac_contract.py index 61696a4373..d708df0c75 100644 --- a/galaxy_ng/tests/integration/dab/test_dab_rbac_contract.py +++ b/galaxy_ng/tests/integration/dab/test_dab_rbac_contract.py @@ -36,7 +36,7 @@ def test_list_namespace_permissions(galaxy_client): @pytest.mark.min_hub_version("4.10dev") def test_role_definition_options(galaxy_client): gc = galaxy_client("admin") - # TODO: add support for options in GalaxyClient in galaxykit + # TODO(jctanner): add support for options in GalaxyClient in galaxykit galaxy_root = gc.galaxy_root api_prefix = galaxy_root[gc.galaxy_root.index('/api/'):] options_r = gc._http("options", api_prefix + "_ui/v2/role_definitions/") @@ -232,7 +232,7 @@ def test_give_user_custom_role_system(settings, galaxy_client, custom_role_facto if settings.get('ALLOW_LOCAL_RESOURCE_MANAGEMENT', True) is not True: pytest.skip("this test relies on local resource creation") - # TODO: verify that assignment is seen in pulp API (HOW?) + # TODO(cutwater): verify that assignment is seen in pulp API (HOW?) # Step 0: Setup test. system_ns_role = custom_role_factory(NS_FIXTURE_DATA) @@ -365,7 +365,7 @@ def test_give_team_custom_role_system( assert ctx.value.response.status_code == HTTPStatus.FORBIDDEN -# TODO: We need another version of it for a team +# TODO(cutwater): We need another version of it for a team @pytest.mark.deployment_standalone @pytest.mark.min_hub_version("4.10dev") @pytest.mark.parametrize("by_role_api", ["dab", "pulp"]) @@ -433,7 +433,7 @@ def test_give_user_custom_role_object( } admin_client.put(f"_ui/v1/my-namespaces/{namespace['name']}/", body=payload) - # TODO: make a request as the user and see that it works + # TODO(cutwater): make a request as the user and see that it works # NOTE: Check if user can have a minimal permission to modify namespace attributes # (e.g. description, company, etc.) # NOTE: Check after permission is revoked, user cannot perform same operations diff --git a/galaxy_ng/tests/integration/schemas.py b/galaxy_ng/tests/integration/schemas.py index 5a94fb1792..73d602b0d2 100644 --- a/galaxy_ng/tests/integration/schemas.py +++ b/galaxy_ng/tests/integration/schemas.py @@ -125,11 +125,13 @@ 'GALAXY_ENABLE_UNAUTHENTICATED_COLLECTION_ACCESS': {'type': 'boolean'}, 'GALAXY_ENABLE_UNAUTHENTICATED_COLLECTION_DOWNLOAD': {'type': 'boolean'}, 'GALAXY_FEATURE_FLAGS': {'type': 'object'}, - 'GALAXY_MINIMUM_PASSWORD_LENGTH': {'type': ['number', 'null']}, # FIXME + # FIXME(jctanner): No description provided. + 'GALAXY_MINIMUM_PASSWORD_LENGTH': {'type': ['number', 'null']}, 'GALAXY_REQUIRE_CONTENT_APPROVAL': {'type': 'boolean'}, 'GALAXY_REQUIRE_SIGNATURE_FOR_APPROVAL': {'type': 'boolean'}, 'GALAXY_SIGNATURE_UPLOAD_ENABLED': {'type': 'boolean'}, - 'GALAXY_TOKEN_EXPIRATION': {'type': ['number', 'null']}, # FIXME + # FIXME(jctanner): No description provided. + 'GALAXY_TOKEN_EXPIRATION': {'type': ['number', 'null']}, 'GALAXY_CONTAINER_SIGNING_SERVICE': {'type': ['string', 'null']}, } } diff --git a/galaxy_ng/tests/integration/utils/collections.py b/galaxy_ng/tests/integration/utils/collections.py index 9626333d55..bbe59ae62e 100644 --- a/galaxy_ng/tests/integration/utils/collections.py +++ b/galaxy_ng/tests/integration/utils/collections.py @@ -688,7 +688,7 @@ def recursive_delete(api_client, namespace_name, cname, crepo): try: gng_wait_for_task(api_client, resp, timeout=10000) except GalaxyError as ge: - # FIXME - pulp tasks do not seem to accept token auth + # FIXME(jctanner): pulp tasks do not seem to accept token auth if ge.http_code in [403, 404]: time.sleep(SLEEP_SECONDS_ONETIME) else: @@ -788,7 +788,7 @@ def recursive_delete_gk(gc_admin, namespace_name, cname, crepo="published"): try: wait_for_task(gc_admin, resp, timeout=10000) except GalaxyError as ge: - # FIXME - pulp tasks do not seem to accept token auth + # FIXME(chr-stian): pulp tasks do not seem to accept token auth if ge.http_code in [403, 404]: time.sleep(SLEEP_SECONDS_ONETIME) else: diff --git a/galaxy_ng/tests/integration/utils/iqe_utils.py b/galaxy_ng/tests/integration/utils/iqe_utils.py index 7dfcbefc41..5553646816 100755 --- a/galaxy_ng/tests/integration/utils/iqe_utils.py +++ b/galaxy_ng/tests/integration/utils/iqe_utils.py @@ -655,7 +655,7 @@ def set_profile(self, profile): def has_old_credentials(): - # FIXME: Old versions have admin/admin. This needs to be fixed + # FIXME(chr-stian): Old versions have admin/admin. This needs to be fixed. ansible_config = get_ansible_config() hub_version = get_hub_version(ansible_config) return parse_version(hub_version) < parse_version('4.7') @@ -690,7 +690,8 @@ def get_hub_version(ansible_config): try: gc = GalaxyKitClient(ansible_config).gen_authorized_client(role) except GalaxyError: - # FIXME: versions prior to 4.7 have different credentials. This needs to be fixed. + # FIXME(chr-stian): Versions prior to 4.7 have different credentials. + # This needs to be fixed. if is_sync_testing(): api_root = "http://localhost:5001/api/automation-hub/" else: diff --git a/galaxy_ng/tests/unit/api/test_api_v3_collections.py b/galaxy_ng/tests/unit/api/test_api_v3_collections.py index 4f5e80b03a..a1637d61df 100644 --- a/galaxy_ng/tests/unit/api/test_api_v3_collections.py +++ b/galaxy_ng/tests/unit/api/test_api_v3_collections.py @@ -76,7 +76,7 @@ def setUp(self): version="1.1.2", ) - # TODO: Upload pulp_ansible/tests/assets collection + # TODO(rochacbruno): Upload pulp_ansible/tests/assets collection # or create dummy ContentArtifacts directly self.collections_url = reverse( @@ -289,7 +289,7 @@ def test_collection_versions_list(self): # Ensure hrefs are overwritten self.assertNotIn(self.pulp_href_fragment, response.data["data"][0]["href"]) - # TODO: implement subtests for each version after the + # TODO(rochacbruno): Implement subtests for each version after the # upload of artifacts has been implemented in `self.setUp` # for version in response.data['data']: # with self.subTest(version=version['version): diff --git a/galaxy_ng/tests/unit/test_settings.py b/galaxy_ng/tests/unit/test_settings.py index 5e41fcf6d3..fd639966d8 100644 --- a/galaxy_ng/tests/unit/test_settings.py +++ b/galaxy_ng/tests/unit/test_settings.py @@ -5,7 +5,7 @@ DAB_REQUIRED_SETTINGS = [key for key in dir(dynamic_settings) if key.isupper()] -# FIXME ... +# FIXME(jctanner): No description provided SKIP = [ 'ANSIBLE_BASE_OVERRIDABLE_SETTINGS', 'ANSIBLE_BASE_OVERRIDDEN_SETTINGS', diff --git a/profiles/community/github_mock/flaskapp.py b/profiles/community/github_mock/flaskapp.py index fd87f86755..b98f0bbb3e 100644 --- a/profiles/community/github_mock/flaskapp.py +++ b/profiles/community/github_mock/flaskapp.py @@ -294,7 +294,7 @@ def do_authorization(): set_access_token(token, this_session['uid']) url += f'?code={token}' - # FIXME + # FIXME(jerabekjiri): No description provided # print(f'REDIRECT_URL: {url}') resp = redirect(url, code=302) return resp diff --git a/profiles/dab/make_test_data.py b/profiles/dab/make_test_data.py index 4977e6f64b..0e8571d56c 100755 --- a/profiles/dab/make_test_data.py +++ b/profiles/dab/make_test_data.py @@ -21,7 +21,7 @@ NAMESPACES = ("autohubtest2", "autohubtest3", "signing") USERS = ("notifications_admin", "iqe_normal_user", "jdoe", "org-admin", "iqe_admin", "ee_admin") -# FIXME - this seems to be dependant on not having a gateway +# FIXME(jctanner): This seems to be dependant on not having a gateway GROUP = "ns_group_for_tests" NS_OWNER_DEF = "galaxy.collection_namespace_owner" diff --git a/pyproject.toml b/pyproject.toml index c30b857c57..5ba8d8973d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -125,6 +125,8 @@ select = [ "SIM", # flake8-debugger "T10", + # flake8-todos + "TD" ] extend-ignore = [ # B904 requires using `raise ... from ...` to explicitly tell what to do with "parent" @@ -152,6 +154,12 @@ extend-ignore = [ # SIM108 Use ternary operator instead of `if`-`else`-block # Opinionated, ternary operators may reduce readability. "SIM108", + # TD001 Invalid TODO tag + # We use TODO, FIXME and REVIEW tags + "TD001", + # TD003 Missing issue link on the line following this TODO + # We don't create issues for TODOs + "TD003", ] [tool.ruff.lint.per-file-ignores]