From 908e45054e9caed0cff5b2db3dd2acae378b6261 Mon Sep 17 00:00:00 2001 From: Tim Schilling Date: Mon, 9 Dec 2024 19:21:50 -0600 Subject: [PATCH] Update references to Django Commons. --- CHANGES.rst | 1 + CONTRIBUTING.rst | 6 +----- README.rst | 18 +++++++----------- docs/common_issues.rst | 2 +- docs/index.rst | 18 +++++++----------- pyproject.toml | 16 ++++------------ simple_history/manager.py | 6 +++--- simple_history/registry_tests/tests.py | 6 +++--- simple_history/tests/tests/test_middleware.py | 2 +- simple_history/tests/tests/test_models.py | 4 ++-- simple_history/utils.py | 2 +- 11 files changed, 31 insertions(+), 50 deletions(-) diff --git a/CHANGES.rst b/CHANGES.rst index a03ffd473..05457bc84 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -15,6 +15,7 @@ Unreleased - Added pagination to ``SimpleHistoryAdmin`` (gh-1277) - Fixed issue with history button not working when viewing historical entries in the admin (gh-527) +- Move repository to the Django Commons organization (gh-1391) 3.7.0 (2024-05-29) ------------------ diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst index bb76b0143..58136c60f 100644 --- a/CONTRIBUTING.rst +++ b/CONTRIBUTING.rst @@ -1,11 +1,7 @@ Contributing to django-simple-history ===================================== -.. image:: https://jazzband.co/static/img/jazzband.svg - :target: https://jazzband.co/ - :alt: Jazzband - -This is a `Jazzband `_ project. By contributing you agree to abide by the `Contributor Code of Conduct `_ and follow the `guidelines `_. +By contributing you agree to abide by the `Contributor Code of Conduct `_. Pull Requests ------------- diff --git a/README.rst b/README.rst index 6b044182c..1cad8724d 100644 --- a/README.rst +++ b/README.rst @@ -3,30 +3,26 @@ django-simple-history |pypi-version| .. Start of PyPI readme -|jazzband| |build-status| |docs| |coverage| |maintainability| |code-style| |downloads| +|build-status| |docs| |coverage| |maintainability| |code-style| |downloads| .. |pypi-version| image:: https://img.shields.io/pypi/v/django-simple-history.svg :target: https://pypi.org/project/django-simple-history/ :alt: PyPI Version -.. |jazzband| image:: https://jazzband.co/static/img/badge.svg - :target: https://jazzband.co/ - :alt: Jazzband - -.. |build-status| image:: https://github.com/jazzband/django-simple-history/actions/workflows/test.yml/badge.svg - :target: https://github.com/jazzband/django-simple-history/actions/workflows/test.yml +.. |build-status| image:: https://github.com/django-commons/django-simple-history/actions/workflows/test.yml/badge.svg + :target: https://github.com/django-commons/django-simple-history/actions/workflows/test.yml :alt: Build Status .. |docs| image:: https://readthedocs.org/projects/django-simple-history/badge/?version=latest :target: https://django-simple-history.readthedocs.io/en/latest/?badge=latest :alt: Documentation Status -.. |coverage| image:: https://img.shields.io/codecov/c/github/jazzband/django-simple-history/master.svg - :target: https://app.codecov.io/github/jazzband/django-simple-history?branch=master +.. |coverage| image:: https://img.shields.io/codecov/c/github/django-commons/django-simple-history/master.svg + :target: https://app.codecov.io/github/django-commons/django-simple-history?branch=master :alt: Test Coverage .. |maintainability| image:: https://api.codeclimate.com/v1/badges/66cfd94e2db991f2d28a/maintainability - :target: https://codeclimate.com/github/jazzband/django-simple-history/maintainability + :target: https://codeclimate.com/github/django-commons/django-simple-history/maintainability :alt: Maintainability .. |code-style| image:: https://img.shields.io/badge/code%20style-black-000000.svg @@ -59,7 +55,7 @@ Documentation is available at https://django-simple-history.readthedocs.io/en/st Pull requests are welcome. Read the `CONTRIBUTING`_ file for tips on submitting a pull request. -.. _CONTRIBUTING: https://github.com/jazzband/django-simple-history/blob/master/CONTRIBUTING.rst +.. _CONTRIBUTING: https://github.com/django-commons/django-simple-history/blob/master/CONTRIBUTING.rst License ------- diff --git a/docs/common_issues.rst b/docs/common_issues.rst index 83e62dc51..0f76ca80d 100644 --- a/docs/common_issues.rst +++ b/docs/common_issues.rst @@ -248,7 +248,7 @@ Usage with django-modeltranslation ---------------------------------- If you have ``django-modeltranslation`` installed, you will need to use the ``register()`` -method to model translation, as described `here `__. +method to model translation, as described `here `__. Pointing to the model diff --git a/docs/index.rst b/docs/index.rst index 56ef8ea69..678d3aea4 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -1,16 +1,16 @@ django-simple-history ===================== -.. image:: https://github.com/jazzband/django-simple-history/actions/workflows/test.yml/badge.svg - :target: https://github.com/jazzband/django-simple-history/actions/workflows/test.yml +.. image:: https://github.com/django-commons/django-simple-history/actions/workflows/test.yml/badge.svg + :target: https://github.com/django-commons/django-simple-history/actions/workflows/test.yml :alt: Build Status .. image:: https://readthedocs.org/projects/django-simple-history/badge/?version=latest :target: https://django-simple-history.readthedocs.io/en/latest/?badge=latest :alt: Documentation Status -.. image:: https://img.shields.io/codecov/c/github/jazzband/django-simple-history/master.svg - :target: https://app.codecov.io/github/jazzband/django-simple-history?branch=master +.. image:: https://img.shields.io/codecov/c/github/django-commons/django-simple-history/master.svg + :target: https://app.codecov.io/github/django-commons/django-simple-history?branch=master :alt: Test Coverage .. image:: https://img.shields.io/pypi/v/django-simple-history.svg @@ -18,7 +18,7 @@ django-simple-history :alt: PyPI Version .. image:: https://api.codeclimate.com/v1/badges/66cfd94e2db991f2d28a/maintainability - :target: https://codeclimate.com/github/jazzband/django-simple-history/maintainability + :target: https://codeclimate.com/github/django-commons/django-simple-history/maintainability :alt: Maintainability .. image:: https://static.pepy.tech/badge/django-simple-history @@ -29,10 +29,6 @@ django-simple-history :target: https://github.com/psf/black :alt: Code Style -.. image:: https://jazzband.co/static/img/badge.svg - :target: https://jazzband.co/ - :alt: Jazzband - django-simple-history stores Django model state on every create/update/delete. @@ -50,8 +46,8 @@ main 3.10, 3.11, 3.12, 3.13 Contribute ---------- -- Issue Tracker: https://github.com/jazzband/django-simple-history/issues -- Source Code: https://github.com/jazzband/django-simple-history +- Issue Tracker: https://github.com/django-commons/django-simple-history/issues +- Source Code: https://github.com/django-commons/django-simple-history Pull requests are welcome. diff --git a/pyproject.toml b/pyproject.toml index f4c6ea811..1d4a952a7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -39,11 +39,11 @@ dynamic = [ dependencies = [ "django>=4.2", ] -urls.Changelog = "https://github.com/jazzband/django-simple-history/blob/master/CHANGES.rst" +urls.Changelog = "https://github.com/django-commons/django-simple-history/blob/master/CHANGES.rst" urls.Documentation = "https://django-simple-history.readthedocs.io/en/stable/" -urls.Homepage = "https://github.com/jazzband/django-simple-history" -urls.Source = "https://github.com/jazzband/django-simple-history" -urls.Tracker = "https://github.com/jazzband/django-simple-history/issues" +urls.Homepage = "https://github.com/django-commons/django-simple-history" +urls.Source = "https://github.com/django-commons/django-simple-history" +urls.Tracker = "https://github.com/django-commons/django-simple-history/issues" [tool.hatch.version] source = "vcs" @@ -54,18 +54,10 @@ version_scheme = "no-guess-dev" local_scheme = "node-and-date" [tool.hatch.build.targets.wheel] -# Jazzband's release process is limited to 2.2 metadata -# - see https://github.com/jazzband/help/issues/360 -core-metadata-version = "2.2" packages = [ "simple_history", ] -[tool.hatch.build.targets.sdist] -# Jazzband's release process is limited to 2.2 metadata -# - see https://github.com/jazzband/help/issues/360 -core-metadata-version = "2.2" - [tool.hatch.metadata.hooks.fancy-pypi-readme] content-type = "text/x-rst" # (Preview the generated readme by installing `hatch` and running diff --git a/simple_history/manager.py b/simple_history/manager.py index 2d9bda656..5fa404d93 100644 --- a/simple_history/manager.py +++ b/simple_history/manager.py @@ -18,9 +18,9 @@ class HistoricalQuerySet(QuerySet): Enables additional functionality when working with historical records. For additional history on this topic, see: - - https://github.com/jazzband/django-simple-history/pull/229 - - https://github.com/jazzband/django-simple-history/issues/354 - - https://github.com/jazzband/django-simple-history/issues/397 + - https://github.com/django-commons/django-simple-history/pull/229 + - https://github.com/django-commons/django-simple-history/issues/354 + - https://github.com/django-commons/django-simple-history/issues/397 """ def __init__(self, *args, **kwargs): diff --git a/simple_history/registry_tests/tests.py b/simple_history/registry_tests/tests.py index 2217d06a8..ceea60388 100644 --- a/simple_history/registry_tests/tests.py +++ b/simple_history/registry_tests/tests.py @@ -199,7 +199,7 @@ def test_registering_with_tracked_abstract_base(self): class TestCustomAttrForeignKey(TestCase): - """https://github.com/jazzband/django-simple-history/issues/431""" + """https://github.com/django-commons/django-simple-history/issues/431""" def test_custom_attr(self): field = ModelWithCustomAttrForeignKey.history.model._meta.get_field("poll") @@ -207,7 +207,7 @@ def test_custom_attr(self): class TestCustomAttrOneToOneField(TestCase): - """https://github.com/jazzband/django-simple-history/issues/870""" + """https://github.com/django-commons/django-simple-history/issues/870""" def test_custom_attr(self): field = ModelWithCustomAttrOneToOneField.history.model._meta.get_field("poll") @@ -228,7 +228,7 @@ def test_migrate_command(self): class TestModelWithHistoryInDifferentApp(TestCase): - """https://github.com/jazzband/django-simple-history/issues/485""" + """https://github.com/django-commons/django-simple-history/issues/485""" def test__different_app(self): appLabel = ModelWithHistoryInDifferentApp.history.model._meta.app_label diff --git a/simple_history/tests/tests/test_middleware.py b/simple_history/tests/tests/test_middleware.py index 53e20fe28..d59a41f91 100644 --- a/simple_history/tests/tests/test_middleware.py +++ b/simple_history/tests/tests/test_middleware.py @@ -154,7 +154,7 @@ def test_bucket_member_is_set_on_create_view_when_logged_in(self): @override_settings(DEBUG_PROPAGATE_EXCEPTIONS=True) @mock.patch("simple_history.tests.view.MockableView.get") def test_request_attr_is_deleted_after_each_response(self, func_mock): - """https://github.com/jazzband/django-simple-history/issues/1189""" + """https://github.com/django-commons/django-simple-history/issues/1189""" def assert_has_request_attr(has_attr: bool): self.assertEqual(hasattr(HistoricalRecords.context, "request"), has_attr) diff --git a/simple_history/tests/tests/test_models.py b/simple_history/tests/tests/test_models.py index 566e2635a..2a1c08ecd 100644 --- a/simple_history/tests/tests/test_models.py +++ b/simple_history/tests/tests/test_models.py @@ -2847,7 +2847,7 @@ def test_historic_to_historic(self): # test querying directly from the history table and converting # to an instance, it should chase the foreign key properly # in this case if _as_of is not present we use the history_date - # https://github.com/jazzband/django-simple-history/issues/983 + # https://github.com/django-commons/django-simple-history/issues/983 pt1h = TestHistoricParticipanToHistoricOrganization.history.all()[0] pt1i = pt1h.instance self.assertEqual(pt1i.organization.name, "modified") @@ -2974,7 +2974,7 @@ def test_historic_to_historic(self): # test querying directly from the history table and converting # to an instance, it should chase the foreign key properly # in this case if _as_of is not present we use the history_date - # https://github.com/jazzband/django-simple-history/issues/983 + # https://github.com/django-commons/django-simple-history/issues/983 pt1h = TestHistoricParticipanToHistoricOrganizationOneToOne.history.all()[0] pt1i = pt1h.instance self.assertEqual(pt1i.organization.name, "modified") diff --git a/simple_history/utils.py b/simple_history/utils.py index c79e93f75..0fdfc6292 100644 --- a/simple_history/utils.py +++ b/simple_history/utils.py @@ -139,7 +139,7 @@ def bulk_create_with_history( if second_transaction_required: with transaction.atomic(savepoint=False): # Generate a common query to avoid n+1 selections - # https://github.com/jazzband/django-simple-history/issues/974 + # https://github.com/django-commons/django-simple-history/issues/974 cumulative_filter = None obj_when_list = [] for i, obj in enumerate(objs_with_id):