Skip to content

Commit

Permalink
Update references to Django Commons.
Browse files Browse the repository at this point in the history
  • Loading branch information
tim-schilling committed Dec 10, 2024
1 parent 2d6cc87 commit 908e450
Show file tree
Hide file tree
Showing 11 changed files with 31 additions and 50 deletions.
1 change: 1 addition & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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)
------------------
Expand Down
6 changes: 1 addition & 5 deletions CONTRIBUTING.rst
Original file line number Diff line number Diff line change
@@ -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 <https://jazzband.co>`_ project. By contributing you agree to abide by the `Contributor Code of Conduct <https://jazzband.co/about/conduct>`_ and follow the `guidelines <https://jazzband.co/about/guidelines>`_.
By contributing you agree to abide by the `Contributor Code of Conduct <https://github.com/django-commons/django-simple-history/blob/master/CODE_OF_CONDUCT.md>`_.

Pull Requests
-------------
Expand Down
18 changes: 7 additions & 11 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
-------
Expand Down
2 changes: 1 addition & 1 deletion docs/common_issues.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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 <https://github.com/jazzband/django-simple-history/issues/209#issuecomment-181676111>`__.
method to model translation, as described `here <https://github.com/django-commons/django-simple-history/issues/209#issuecomment-181676111>`__.


Pointing to the model
Expand Down
18 changes: 7 additions & 11 deletions docs/index.rst
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
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
:target: https://pypi.org/project/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
Expand All @@ -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.

Expand All @@ -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.

Expand Down
16 changes: 4 additions & 12 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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
Expand Down
6 changes: 3 additions & 3 deletions simple_history/manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
6 changes: 3 additions & 3 deletions simple_history/registry_tests/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,15 +199,15 @@ 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")
self.assertEqual(field.attr_name, "custom_poll")


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")
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion simple_history/tests/tests/test_middleware.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions simple_history/tests/tests/test_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down Expand Up @@ -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")
Expand Down
2 changes: 1 addition & 1 deletion simple_history/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit 908e450

Please sign in to comment.