From a9ace647264d19c55fdac013549198527648ef0a06f48d605c476253fecfccf5 Mon Sep 17 00:00:00 2001 From: Steve Kowalik Date: Tue, 13 May 2025 03:04:10 +0000 Subject: [PATCH 1/2] - Update to 1.7.1: * New features: + More detailed individual information when reviewing recommendations + Renamed recommendations view labels + Improved session cookie security + More icons for sources + Skip recommendations + Sort organizations by number of enrollments * Bug fixes: + Wrong order of affiliations - Add patch no-testcontainers.patch: * Do not rely on testcontainers to use mysql - Add patch support-click-8.2.patch: * Support click 8.2+ changes. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-sortinghat?expand=0&rev=50 --- .gitattributes | 23 +++ .gitignore | 1 + add-missing-format-calls.patch | 86 ++++++++ allow-database-config-overrides.patch | 59 ++++++ no-testcontainers.patch | 61 ++++++ python-sortinghat.changes | 273 ++++++++++++++++++++++++++ python-sortinghat.spec | 174 ++++++++++++++++ sortinghat-0.19.1.tar.gz | 3 + sortinghat-1.2.1.tar.gz | 3 + sortinghat-1.4.0.tar.gz | 3 + sortinghat-1.5.0.tar.gz | 3 + sortinghat-1.5.1.tar.gz | 3 + sortinghat-1.7.1.tar.gz | 3 + support-click-8.2.patch | 264 +++++++++++++++++++++++++ support-new-django-graphql-jwt.patch | 24 +++ use-correct-assertion-methods.patch | 53 +++++ 16 files changed, 1036 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 add-missing-format-calls.patch create mode 100644 allow-database-config-overrides.patch create mode 100644 no-testcontainers.patch create mode 100644 python-sortinghat.changes create mode 100644 python-sortinghat.spec create mode 100644 sortinghat-0.19.1.tar.gz create mode 100644 sortinghat-1.2.1.tar.gz create mode 100644 sortinghat-1.4.0.tar.gz create mode 100644 sortinghat-1.5.0.tar.gz create mode 100644 sortinghat-1.5.1.tar.gz create mode 100644 sortinghat-1.7.1.tar.gz create mode 100644 support-click-8.2.patch create mode 100644 support-new-django-graphql-jwt.patch create mode 100644 use-correct-assertion-methods.patch diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/add-missing-format-calls.patch b/add-missing-format-calls.patch new file mode 100644 index 0000000..842fe5c --- /dev/null +++ b/add-missing-format-calls.patch @@ -0,0 +1,86 @@ +Index: grimoirelab-sortinghat-1.2.1/tests/test_schema.py +=================================================================== +--- grimoirelab-sortinghat-1.2.1.orig/tests/test_schema.py ++++ grimoirelab-sortinghat-1.2.1/tests/test_schema.py +@@ -22,6 +22,7 @@ + # + + import datetime ++import unittest + import unittest.mock + import json + import httpretty +@@ -1408,6 +1409,7 @@ class TestQueryPagination(django.test.Te + self.assertEqual(pag_data['endIndex'], 6) + self.assertEqual(pag_data['totalResults'], 6) + ++ @unittest.skip("Broken") + def test_page_size_negative(self): + """Check if it fails when `pageSize` is a negative number""" + +@@ -6399,7 +6401,8 @@ class TestAddIdentityMutation(django.tes + variables=params) + + msg = executed['errors'][0]['message'] +- self.assertEqual(msg, INDIVIDUAL_DOES_NOT_EXIST_ERROR) ++ self.assertEqual( ++ msg, INDIVIDUAL_DOES_NOT_EXIST_ERROR.format(uuid=params['uuid'])) + + def test_add_identity_name_none(self): + """Check if the username is set to the profile when no name is provided""" +@@ -8195,7 +8198,8 @@ class TestWithdrawMutation(django.test.T + variables=params) + + msg = executed['errors'][0]['message'] +- self.assertEqual(msg, INDIVIDUAL_DOES_NOT_EXIST_ERROR) ++ self.assertEqual( ++ msg, INDIVIDUAL_DOES_NOT_EXIST_ERROR.format(uuid=params['uuid'])) + + def test_non_existing_organization(self): + """Check if it fails when the organization does not exist""" +@@ -9882,6 +9886,7 @@ class TestUnifyMutation(django.test.Test + source='scm', + uuid=self.jrae.uuid) + ++ @unittest.skip("Broken") + @unittest.mock.patch('sortinghat.core.jobs.rq.job.uuid4') + def test_unify(self, mock_job_id_gen): + """Check if unify is applied for the specified individuals""" +@@ -9954,6 +9959,7 @@ class TestUnifyMutation(django.test.Test + id5 = identities[4] + self.assertEqual(id5, self.jr2) + ++ @unittest.skip("Broken") + @unittest.mock.patch('sortinghat.core.jobs.rq.job.uuid4') + def test_unify_last_modified(self, mock_job_id_gen): + """Check if unify is applied only for the individuals modified after a date""" +Index: grimoirelab-sortinghat-1.2.1/tests/cli/test_cmd_config.py +=================================================================== +--- grimoirelab-sortinghat-1.2.1.orig/tests/cli/test_cmd_config.py ++++ grimoirelab-sortinghat-1.2.1/tests/cli/test_cmd_config.py +@@ -41,10 +41,10 @@ MOCK_CONFIG_FILEPATH = os.path.join(os.p + + + CONFIG_FILE_EXISTS_ERROR = "Error: Configuration file {} already exists. Use '--overwrite' to replace it.\n" +-INVALID_CONFIG_FILE = "Error: Could not open file {}: [Errno 21] Is a directory: '{}'\n" ++INVALID_CONFIG_FILE = "Error: Could not open file '{}': [Errno 21] Is a directory: '{}'\n" + SET_KEY_CONFIG_ERROR = "Error: {} config parameter is not supported\n" + GET_KEY_CONFIG_ERROR = "Error: {} config parameter is not supported\n" +-NOT_FOUND_FILE_ERROR = "Error: Could not open file {}: file does not exist\n" ++NOT_FOUND_FILE_ERROR = "Error: Could not open file '{}': file does not exist\n" + + + class TestInitConfig(unittest.TestCase): +Index: grimoirelab-sortinghat-1.2.1/sortinghat/core/decorators.py +=================================================================== +--- grimoirelab-sortinghat-1.2.1.orig/sortinghat/core/decorators.py ++++ grimoirelab-sortinghat-1.2.1/sortinghat/core/decorators.py +@@ -68,6 +68,8 @@ check_auth = user_passes_test(lambda u: + + + def check_permissions(perms): ++ if isinstance(perms, str): ++ perms = (perms,) + return user_passes_test(lambda u: u.has_perms(perms)) + + diff --git a/allow-database-config-overrides.patch b/allow-database-config-overrides.patch new file mode 100644 index 0000000..c4687a2 --- /dev/null +++ b/allow-database-config-overrides.patch @@ -0,0 +1,59 @@ +Index: grimoirelab-sortinghat-1.2.1/config/settings/config_testing.py +=================================================================== +--- grimoirelab-sortinghat-1.2.1.orig/config/settings/config_testing.py ++++ grimoirelab-sortinghat-1.2.1/config/settings/config_testing.py +@@ -1,3 +1,4 @@ ++import os + import sys + import logging + +@@ -38,8 +39,8 @@ SQL_MODE = [ + DATABASES = { + 'default': { + 'ENGINE': 'django.db.backends.mysql', +- 'USER': 'root', +- 'PASSWORD': 'root', ++ 'USER': os.environ.get('TEST_SORTINGHAT_DB_USER', 'root'), ++ 'PASSWORD': os.environ.get('TEST_SORTINGHAT_DB_PASSWORD', 'root'), + 'NAME': 'sortinghat_db', + 'OPTIONS': { + 'charset': 'utf8mb4', +@@ -49,9 +50,10 @@ DATABASES = { + 'NAME': 'testhat', + 'CHARSET': 'utf8mb4', + 'COLLATION': 'utf8mb4_unicode_520_ci', ++ 'MIRROR': False + }, + 'HOST': '127.0.0.1', +- 'PORT': 3306 ++ 'PORT': os.environ.get('TEST_SORTINGHAT_DB_PORT', 3306) + } + } + +Index: grimoirelab-sortinghat-1.2.1/config/settings/config_testing_tenant.py +=================================================================== +--- grimoirelab-sortinghat-1.2.1.orig/config/settings/config_testing_tenant.py ++++ grimoirelab-sortinghat-1.2.1/config/settings/config_testing_tenant.py +@@ -15,8 +15,8 @@ TENANTS_DEDICATED_QUEUES = [t["name"] fo + DATABASES.update({ + tenant: { + 'ENGINE': 'django.db.backends.mysql', +- 'USER': 'root', +- 'PASSWORD': 'root', ++ 'USER': os.environ.get('TEST_SORTINGHAT_DB_USER', 'root'), ++ 'PASSWORD': os.environ.get('TEST_SORTINGHAT_DB_PASSWORD', 'root'), + 'NAME': tenant, + 'OPTIONS': { + 'charset': 'utf8mb4', +@@ -26,9 +26,10 @@ DATABASES.update({ + 'NAME': tenant, + 'CHARSET': 'utf8mb4', + 'COLLATION': 'utf8mb4_unicode_520_ci', ++ 'MIRROR': False + }, + 'HOST': '127.0.0.1', +- 'PORT': 3306 ++ 'PORT': os.environ.get('TEST_SORTINGHAT_DB_PORT', 3306) + } + for tenant in [t["name"] for t in tenants_cfg] + }) diff --git a/no-testcontainers.patch b/no-testcontainers.patch new file mode 100644 index 0000000..34f07dd --- /dev/null +++ b/no-testcontainers.patch @@ -0,0 +1,61 @@ +Index: grimoirelab-sortinghat-1.7.1/tests/runners.py +=================================================================== +--- grimoirelab-sortinghat-1.7.1.orig/tests/runners.py ++++ grimoirelab-sortinghat-1.7.1/tests/runners.py +@@ -18,54 +18,22 @@ + + from django.conf import settings + from django.test.runner import DiscoverRunner +-from testcontainers.mysql import MySqlContainer + from unittest.suite import TestSuite + + +-class TestContainersRunner(DiscoverRunner): +- _mysql_container: MySqlContainer = None +- +- def __init__(self, *args, **kwargs): +- super().__init__(*args, **kwargs) +- +- db_image = getattr(settings, "TEST_DATABASE_IMAGE", "mariadb:latest") +- +- self._mysql_container = MySqlContainer(image=db_image, +- root_password="root") +- +- def _setup_container(self): +- self._mysql_container.start() +- +- for database in settings.DATABASES: +- settings.DATABASES[database]["HOST"] = "127.0.0.1" +- settings.DATABASES[database]["PORT"] = self._mysql_container.get_exposed_port(3306) +- settings.DATABASES[database]["USER"] = "root" +- settings.DATABASES[database]["PASSWORD"] = self._mysql_container.root_password +- +- def _teardown_container(self): +- self._mysql_container.stop() +- +- def setup_databases(self, **kwargs): +- self._setup_container() +- return super().setup_databases(**kwargs) +- +- def teardown_databases(self, old_config, **kwargs): +- super().teardown_databases(old_config, **kwargs) +- self._teardown_container() +- + + def from_tenant_module(test): + return test.__module__.startswith('tests.tenants') + + +-class SkipMultiTenantTestRunner(TestContainersRunner): ++class SkipMultiTenantTestRunner(DiscoverRunner): + def build_suite(self, test_labels=None, extra_tests=None, **kwargs): + suite = super().build_suite(test_labels=test_labels, extra_tests=extra_tests, **kwargs) + tests = [t for t in suite._tests if not from_tenant_module(t)] + return TestSuite(tests=tests) + + +-class OnlyMultiTenantTestRunner(TestContainersRunner): ++class OnlyMultiTenantTestRunner(DiscoverRunner): + def build_suite(self, test_labels=None, extra_tests=None, **kwargs): + suite = super().build_suite(test_labels=test_labels, extra_tests=extra_tests, **kwargs) + tests = [t for t in suite._tests if from_tenant_module(t)] diff --git a/python-sortinghat.changes b/python-sortinghat.changes new file mode 100644 index 0000000..1db9c38 --- /dev/null +++ b/python-sortinghat.changes @@ -0,0 +1,273 @@ +------------------------------------------------------------------- +Tue May 13 03:02:07 UTC 2025 - Steve Kowalik + +- Update to 1.7.1: + * New features: + + More detailed individual information when reviewing recommendations + + Renamed recommendations view labels + + Improved session cookie security + + More icons for sources + + Skip recommendations + + Sort organizations by number of enrollments + * Bug fixes: + + Wrong order of affiliations +- Add patch no-testcontainers.patch: + * Do not rely on testcontainers to use mysql +- Add patch support-click-8.2.patch: + * Support click 8.2+ changes. + +------------------------------------------------------------------- +Wed Dec 11 04:53:10 UTC 2024 - Steve Kowalik + +- Update to 1.5.1: + * Update Poetry dependencies. +- Add patch support-new-django-graphql-jwt.patch: + * Stop calling a now removed method in new django-graphql-jwt. + +------------------------------------------------------------------- +Sat Nov 9 16:00:55 UTC 2024 - Dirk Müller + +- update to 1.5.0: + * Mark individuals as reviewed + Individuals can now be marked as reviewed to keep track of + which profiles have already been checked and when. A profile can + be marked as reviewed more than once, it will show the date + of the last review. + * Wrong arrong direction when merging recommendations (#934) + +------------------------------------------------------------------- +Mon Oct 7 20:49:57 UTC 2024 - Dirk Müller + +- update to 1.4.0: + * Less distracting main identity indicator + * Redirect to the original URL after log in + * Merge organizations when adding an alias + * Customizable trusted sources for username matching + * Users permissions migrated (#849) + * Update workspace when identities are split (#919) +- update to 1.3.0: + * Remove merge recommendations (#883) + * Merge organizations when adding an alias (#913) + * User permissions per tenant + * The link to an individual's GitHub profile no longer + appears several times when there is more than one GitHub + identity. + * Connection closed when job is executed +- drop add-missing-format-calls.patch (obsolete) + +------------------------------------------------------------------- +Wed Aug 28 03:30:10 UTC 2024 - Steve Kowalik + +- Update to 1.2.1: + * New features: + + Improve loading and error indicators + + Save URL to an individual's LinkedIn profile + + Link to GitHub profile + + Assign users to permission groups + + Configuration for regular expressions in CORS + + Dedicated queues in multi-tenancy + + Organization aliases + * Bug fixes: + + Consistent date format for job executions + + Match source parameter fixed in recommendations + + Organizations aliases in Python client + + Change password form fixed + + Refetch general settings after they are changed + + Profile view displays correct recommendations + + Match recommendations job fixed +- Drop patch use-correct-assertion-methods.patch, included. +- Refresh all other patches. + +------------------------------------------------------------------- +Tue Feb 6 04:49:48 UTC 2024 - Steve Kowalik + +- Update to 0.19.1: + * Fix "Table 'django_session' doesn't exist" error + * Unify identities with same source + * Use correct base URL for login and change password API calls (#851) + * Display individual's most recent organization + * CSRF token is only required on web requests + * Link to profile in individual cards (#837) + * Open calendar to the side of the date input (#838) + * Improved loading time when looking for organizations + * Gitdm identities importer + * Fix individual page not loading + * Recommendations for individuals modified after a given date (#813) + * Add individual to workspace from their profile page (#816) + * Cache individuals table data (#821) + * Strict criteria for merge recommendations (#812) + * Text field to update enrollment dates (#819) + * Improved organization selector (#820) + * API method to create a scheduled task + * Manage app settings from the user interface + * Remove tasks that fail to be scheduled + * Add Python 3.9 and drop 3.7 support + * Sub-domain affiliation error (#805) +- Refresh patches. +- Add patch use-correct-assertion-methods.patch: + * Use non-deprecated and non-removed assertion methods. + +------------------------------------------------------------------- +Thu Jul 27 06:07:58 UTC 2023 - Steve Kowalik + +- Update to 0.12.0: + * Job scheduler +- Refresh patch add-missing-format-calls.patch. + +------------------------------------------------------------------- +Thu Jul 20 05:47:36 UTC 2023 - Steve Kowalik + +- Update to 0.11.1, changes include: + * SortingHat as a service + * GraphQL client headers updated + * Migration command for SortingHat 0.7: sortinghat-admin migrate-old-database + * Groups table removed from the UI + * Fix search syntax link (#735) + * Fix outdated recommendation count (#733) + * Verify SSL option for client + * Multi-tenancy mode + * Drag and drop to enroll in teams + * Create account command + * Import identities automatically (#746) + * Order individuals by indentities (#732) + * Set top domain from UI (#729) + * Static files not included in wheel package + * Tenant selection in job fixed + * SortingHat database performance + * uWSGI threads and workers + * Performance improved for recommendations and merging jobs + * Multi-tenancy using headers + * Job timeouts + * Fix enrollment in individual's profile + * Edit a profile name with the pencil button (#773) + * Unreadable large numbers in pagination (#770) + * Sort jobs from newest to oldest (#769) + * Organization profiles + * Show when tables are loading (#772) + * Enrollment filter on organizations view + * ADD button doesn't affiliate individuals to organizations + * Email affiliation error (#793) + * Show hidden buttons when the mouse is over the table row (#787) + * Recommendations by individual (#779) + * Merge organizations (#571) + * Show an organization's members +- Drop patch no_decl_class_registry.patch: + * No longer required. +- Add patch allow-database-config-overrides.patch: + * Allow testing overrides of the database auth. +- Add patch add-missing-format-calls.patch: + * Fix up formatting of some tests. + +------------------------------------------------------------------- +Sat Dec 3 00:58:41 UTC 2022 - Yogalakshmi Arunachalam + +- Update to version 0.7.23 + * Update Poetry's package dependencies + +- Update to version 0.7.22 + * Update Poetry's package dependencies + +------------------------------------------------------------------- +Sat Oct 29 01:20:39 UTC 2022 - Yogalakshmi Arunachalam + +- Update to version 0.7.21 + * Update package dependencies + * Update jinja2 package and dev-dependencies. + * Update Poetry's package dependencies +- Clean up SPEC file to remove rpmlint warnings. + +------------------------------------------------------------------- +Fri Oct 7 16:13:30 UTC 2022 - Yogalakshmi Arunachalam + +- Update to version 0.7.20 + Bug fixes: + * [gitdm] Skip invalid format lines + * Gitdm parser won't fail reading files with an invalid format. Instead, + * it will ignore invalid content. + +------------------------------------------------------------------- +Wed May 11 11:28:06 UTC 2022 - Matej Cepl + +- Fix a bug in %%postun. + +------------------------------------------------------------------- +Wed Apr 20 11:16:30 UTC 2022 - pgajdos@suse.com + +- version update to 0.7.19 + * no minor version changelog found +- modified patches + % no_decl_class_registry.patch (refreshed) +- python-mock is not required for build + +------------------------------------------------------------------- +Thu Aug 5 15:20:24 UTC 2021 - Matej Cepl + +- Add no_decl_class_registry.patch to make the package compatible + with SQLAlchemy 1.4 (gh#chaoss/grimoirelab-sortinghat#579). + +------------------------------------------------------------------- +Thu May 27 12:39:34 UTC 2021 - Matej Cepl + +- Upgrade 0.7.15 +- Remove upstreamed python-sortinghat-gh-121-workaround.patch + +------------------------------------------------------------------- +Fri Apr 23 21:42:58 UTC 2021 - Matej Cepl + +- Don't build python36-* package (missing pandas) + +------------------------------------------------------------------- +Thu Jun 4 07:19:33 UTC 2020 - pgajdos@suse.com + +- specify database name trough %mysql_testserver_start parameter +- alternatives in loop + +------------------------------------------------------------------- +Tue May 19 09:28:07 UTC 2020 - Petr Gajdos + +- %python3_only -> %python_alternative + +------------------------------------------------------------------- +Tue Mar 17 14:11:53 UTC 2020 - pgajdos@suse.com + +- version update to 0.7.7 + * no minor version changelog found + +------------------------------------------------------------------- +Tue Feb 11 15:58:25 UTC 2020 - pgajdos@suse.com + +- %check: choose better database user name + +------------------------------------------------------------------- +Fri Dec 6 18:01:12 UTC 2019 - pgajdos@suse.com + +- run the testsuite against test mysqld server + +------------------------------------------------------------------- +Mon Sep 23 13:57:05 UTC 2019 - pgajdos@suse.com + +- version update to 0.7.6 + **NOTICE: Database schema generated by SortingHat < 0.7.0 is still + compatible but older versions can have problems inserting UTF-8 + characters of 4 bytes. + **Python 2.7 is no longer supported. + **NOTICE: Database schema generated by SortingHat < 0.6.0 are no longer + compatible. Please check "Compatibility between versions" section from + README.md file** + **NOTICE: Database schema generated by SortingHat < 0.5.0 are no longer + compatible. Please check "Compatibility between versions" section from + README.md file** +- added patches + https://github.com/chaoss/grimoirelab-sortinghat/issues/121 + + python-sortinghat-gh-121-workaround.patch +- python3-only package + +------------------------------------------------------------------- +Tue Dec 4 12:54:29 UTC 2018 - Matej Cepl + +- Remove superfluous devel dependency for noarch package + +------------------------------------------------------------------- +Thu Nov 9 21:01:40 UTC 2017 - sebix+novell.com@sebix.at + +- initial package diff --git a/python-sortinghat.spec b/python-sortinghat.spec new file mode 100644 index 0000000..104ef38 --- /dev/null +++ b/python-sortinghat.spec @@ -0,0 +1,174 @@ +# +# spec file for package python-sortinghat +# +# Copyright (c) 2025 SUSE LLC +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# + + +Name: python-sortinghat +Version: 1.7.1 +Release: 0 +Summary: A tool to manage identities +License: GPL-3.0-only +URL: https://github.com/grimoirelab/sortinghat +Source: https://github.com/chaoss/grimoirelab-sortinghat/archive/refs/tags/%{version}.tar.gz#/sortinghat-%{version}.tar.gz +# PATCH-FIX-OPENSUSE Allow overridding the database config +Patch0: allow-database-config-overrides.patch +# PATCH-FIX-OPENSUSE Support django-graphql-jwt 0.4.0 +Patch1: support-new-django-graphql-jwt.patch +# PATCH-FIX-OPENSUSE Do not use testcontainers module +Patch2: no-testcontainers.patch +# PATCH-FIX-OPENSUSE Support click 8.2+ +Patch3: support-click-8.2.patch +BuildRequires: %{python_module base >= 3.9} +BuildRequires: %{python_module pip} +BuildRequires: %{python_module poetry-core} +BuildRequires: %{python_module wheel} +BuildRequires: fdupes +BuildRequires: python-rpm-macros +Requires: python-Django >= 4.2 +Requires: python-Jinja2 >= 3.1 +Requires: python-PyJWT >= 2.4 +Requires: python-PyMySQL >= 0.7.0 +Requires: python-PyYAML >= 3.12 +Requires: python-SQLAlchemy >= 1.2 +Requires: python-click >= 7.1 +Requires: python-django-cors-headers >= 4.6 +Requires: python-django-graphql-jwt >= 0.3 +Requires: python-django-rq >= 2.3 +Requires: python-django-treebeard >= 4.5 +Requires: python-graphene >= 2.1.5 +Requires: python-graphene-django +Requires: python-grimoirelab-toolkit >= 0.3 +Requires: python-importlib-resources +Requires: python-mysqlclient >= 2.0 +Requires: python-numpy +Requires: python-pandas >= 2.2 +Requires: python-python-dateutil >= 2.8.0 +Requires: python-requests >= 2.7 +Requires: python-rq +Requires: python-setuptools +Requires: python-sgqlc >= 16.1 +Requires(post): update-alternatives +Requires(postun): update-alternatives +BuildArch: noarch +# SECTION test requirements +BuildRequires: %{python_module Jinja2 >= 3.1} +BuildRequires: %{python_module Django >= 4.2} +BuildRequires: %{python_module PyMySQL >= 0.7.0} +BuildRequires: %{python_module PyYAML >= 3.12} +BuildRequires: %{python_module SQLAlchemy >= 1.2} +BuildRequires: %{python_module click >= 7.1} +BuildRequires: %{python_module django-cors-headers >= 4.6} +BuildRequires: %{python_module django-graphql-jwt >= 0.3} +BuildRequires: %{python_module django-rq >= 2.3} +BuildRequires: %{python_module django-treebeard >= 4.5} +BuildRequires: %{python_module fakeredis} +BuildRequires: %{python_module graphene >= 2.1.5} +BuildRequires: %{python_module grimoirelab-toolkit >= 0.3} +BuildRequires: %{python_module httpretty >= 0.9.5} +BuildRequires: %{python_module importlib-resources} +BuildRequires: %{python_module mysqlclient >= 2.0} +BuildRequires: %{python_module numpy} +BuildRequires: %{python_module pandas >= 2.2} +BuildRequires: %{python_module pytest} +BuildRequires: %{python_module python-dateutil >= 2.8.0} +BuildRequires: %{python_module requests >= 2.7} +BuildRequires: %{python_module rq} +BuildRequires: %{python_module sgqlc >= 16.1} +BuildRequires: mariadb-rpm-macros +# /SECTION +%python_subpackages + +%description +A tool to manage identities. + +Sorting Hat maintains an SQL database with identities coming +(potentially) from different sources. Identities corresponding to the +same real person can be merged in the same unique identity, with a +unique uuid. For each unique identity, a profile can be defined, with +the name and other data to show for the corresponding person by default. + +In addition, each unique identity can be related to one or more +affiliations, for different time periods. This will usually correspond +to different organizations in which the person was employed during those +time periods. + +Sorting Hat is a part of the GrimoireLab +toolset , which provides for Python +modules and scripts to analyze data sources with information about +software development, and allows to produce interactive dashboards to +visualize that information. + +In the context of GrimoireLab, Sorting Hat is usually run after data is +retrieved with Perceval , +to store the identities obtained into its database, and later merge them +into unique identities (and maybe affiliate them). + +%prep +%autosetup -p1 -n grimoirelab-sortinghat-%{version} + +%build +%pyproject_wheel + +%install +%pyproject_install +%python_clone -a %{buildroot}%{_bindir}/sortinghat +%python_clone -a %{buildroot}%{_bindir}/sortinghat-admin +%python_clone -a %{buildroot}%{_bindir}/sortinghatw +%python_clone -a %{buildroot}%{_bindir}/sortinghatd +%python_expand %fdupes %{buildroot}%{$python_sitelib} + +%check +exit_code=0 +user='auth_db_user' +pass='auth_db_pass' +port=63306 +run_dir=/tmp/mysql +# +# start the mariadb server +# +%mysql_testserver_start -u $user -p $pass -t $port +# +# running the test +# +export TEST_SORTINGHAT_DB_PORT=$port +export TEST_SORTINGHAT_DB_USER=$user +export TEST_SORTINGHAT_DB_PASSWORD=$pass +# Broken tests +rm tests/test_jobs.py +%python_exec manage.py test --settings=config.settings.config_testing +%python_exec manage.py test --settings=config.settings.config_testing_tenant +# +# stopping mariadb +# +%mysql_testserver_stop +exit $exit_code + +%post +%python_install_alternative sortinghat sortinghat-admin sortinghatw sortinghatd + +%postun +%python_uninstall_alternative sortinghat sortinghat-admin sortinghatw sortinghatd + +%files %{python_files} +%doc NEWS README.md +%python_alternative %{_bindir}/sortinghat +%python_alternative %{_bindir}/sortinghatw +%python_alternative %{_bindir}/sortinghatd +%python_alternative %{_bindir}/sortinghat-admin +%{python_sitelib}/sortinghat +%{python_sitelib}/sortinghat-%{version}.dist-info + +%changelog diff --git a/sortinghat-0.19.1.tar.gz b/sortinghat-0.19.1.tar.gz new file mode 100644 index 0000000..9bc1061 --- /dev/null +++ b/sortinghat-0.19.1.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:20ec93c4c5951bfeb2cbd5f750209eaf1aa3ab57228676c98ebc00e2f92abc05 +size 2441873 diff --git a/sortinghat-1.2.1.tar.gz b/sortinghat-1.2.1.tar.gz new file mode 100644 index 0000000..5b8b538 --- /dev/null +++ b/sortinghat-1.2.1.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e524a0ff1dccca14decfa9231a6e531fa94225ad1ffa7d491f3f9c728b223ffe +size 2255793 diff --git a/sortinghat-1.4.0.tar.gz b/sortinghat-1.4.0.tar.gz new file mode 100644 index 0000000..ec91337 --- /dev/null +++ b/sortinghat-1.4.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3f05891207a8bad8e2c8b5d11b007e29ad3a12fea43cbb9d5b62cd736f481319 +size 2270815 diff --git a/sortinghat-1.5.0.tar.gz b/sortinghat-1.5.0.tar.gz new file mode 100644 index 0000000..02a0266 --- /dev/null +++ b/sortinghat-1.5.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f2277dd3697937f9ac567167a405b757d41a4dfc3750f14f67205ac606c6b392 +size 2275207 diff --git a/sortinghat-1.5.1.tar.gz b/sortinghat-1.5.1.tar.gz new file mode 100644 index 0000000..ad46616 --- /dev/null +++ b/sortinghat-1.5.1.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7a8efcc5ded3717d5962202c089f5472f05562186734cd04fc52f986c14a5229 +size 2275252 diff --git a/sortinghat-1.7.1.tar.gz b/sortinghat-1.7.1.tar.gz new file mode 100644 index 0000000..68f7c3d --- /dev/null +++ b/sortinghat-1.7.1.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:26e091403d3d2699d55b65a79a67494e95654bf78d66d884adff41e30f2af3ca +size 2264700 diff --git a/support-click-8.2.patch b/support-click-8.2.patch new file mode 100644 index 0000000..1cd4ad5 --- /dev/null +++ b/support-click-8.2.patch @@ -0,0 +1,264 @@ +Index: grimoirelab-sortinghat-1.7.1/tests/cli/test_cmd_add.py +=================================================================== +--- grimoirelab-sortinghat-1.7.1.orig/tests/cli/test_cmd_add.py ++++ grimoirelab-sortinghat-1.7.1/tests/cli/test_cmd_add.py +@@ -225,7 +225,7 @@ class TestAddCommand(unittest.TestCase): + client = MockClient(responses) + mock_client.return_value = client + +- runner = click.testing.CliRunner(mix_stderr=False) ++ runner = click.testing.CliRunner() + + params = [ + '--source', 'scm', +Index: grimoirelab-sortinghat-1.7.1/tests/cli/test_cmd_config.py +=================================================================== +--- grimoirelab-sortinghat-1.7.1.orig/tests/cli/test_cmd_config.py ++++ grimoirelab-sortinghat-1.7.1/tests/cli/test_cmd_config.py +@@ -104,7 +104,7 @@ class TestInitConfig(unittest.TestCase): + def test_config_is_not_overwritten(self): + """Check whether an existing config file is not replaced""" + +- runner = click.testing.CliRunner(mix_stderr=False) ++ runner = click.testing.CliRunner() + + with runner.isolated_filesystem() as fs: + shutil.copy(MOCK_CONFIG_FILEPATH, fs) +@@ -132,7 +132,7 @@ class TestInitConfig(unittest.TestCase): + def test_overwrite_config(self): + """Check whether an existing config file is overwritten""" + +- runner = click.testing.CliRunner(mix_stderr=False) ++ runner = click.testing.CliRunner() + + with runner.isolated_filesystem() as fs: + shutil.copy(MOCK_CONFIG_FILEPATH, fs) +@@ -240,7 +240,7 @@ class TestSetConfig(unittest.TestCase): + def test_not_available_keys(self): + """Check if it raises an error when the key is not available""" + +- runner = click.testing.CliRunner(mix_stderr=False) ++ runner = click.testing.CliRunner() + + with runner.isolated_filesystem() as fs: + shutil.copy(MOCK_CONFIG_FILEPATH, fs) +@@ -260,7 +260,7 @@ class TestSetConfig(unittest.TestCase): + def test_invalid_keys(self): + """Check if it raises an error when the key is invalid""" + +- runner = click.testing.CliRunner(mix_stderr=False) ++ runner = click.testing.CliRunner() + + # Test keys that do not follow '
.