Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add next and previous record diffs #798

Open
wants to merge 89 commits into
base: master
Choose a base branch
from
Open

Conversation

brylie
Copy link
Member

@brylie brylie commented Feb 19, 2021

Closes #797

Added next and previous record diffs for consistency

Description

These helper properties would make it easier to get revision diffs in Django templlates.

Related Issue

#797

Motivation and Context

Making it easier to show revision diffs directly in templates.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • I have run the make format command to format my code
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • I have added my name and/or github handle to AUTHORS.rst
  • I have added my change to CHANGES.rst
  • All new and existing tests passed.

Closes #797

Added next and previous record diffs for consistency
@codecov
Copy link

codecov bot commented Feb 19, 2021

Codecov Report

Merging #798 (df66df4) into master (e8b9ce0) will increase coverage by 0.39%.
The diff coverage is n/a.

❗ Current head df66df4 differs from pull request most recent head 4db4a2a. Consider uploading reports for the commit 4db4a2a to get more accurate results
Impacted file tree graph

@@            Coverage Diff             @@
##           master     #798      +/-   ##
==========================================
+ Coverage   97.47%   97.87%   +0.39%     
==========================================
  Files          18       18              
  Lines         992      988       -4     
  Branches      151      150       -1     
==========================================
  Hits          967      967              
+ Misses         12        9       -3     
+ Partials       13       12       -1     
Impacted Files Coverage Δ
simple_history/__init__.py 100.00% <ø> (ø)
simple_history/utils.py 100.00% <ø> (+6.06%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e8b9ce0...4db4a2a. Read the comment docs.

smithdc1 and others added 26 commits February 20, 2021 11:59
Bumps [tox](https://github.com/tox-dev/tox) from 3.21.4 to 3.22.0.
- [Release notes](https://github.com/tox-dev/tox/releases)
- [Changelog](https://github.com/tox-dev/tox/blob/master/docs/changelog.rst)
- [Commits](tox-dev/tox@3.21.4...3.22.0)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [sphinx](https://github.com/sphinx-doc/sphinx) from 3.4.3 to 3.5.1.
- [Release notes](https://github.com/sphinx-doc/sphinx/releases)
- [Changelog](https://github.com/sphinx-doc/sphinx/blob/3.x/CHANGES)
- [Commits](sphinx-doc/sphinx@v3.4.3...v3.5.1)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [coverage](https://github.com/nedbat/coveragepy) from 5.4 to 5.5.
- [Release notes](https://github.com/nedbat/coveragepy/releases)
- [Changelog](https://github.com/nedbat/coveragepy/blob/master/CHANGES.rst)
- [Commits](nedbat/coveragepy@coverage-5.4...coverage-5.5)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [tox](https://github.com/tox-dev/tox) from 3.22.0 to 3.23.0.
- [Release notes](https://github.com/tox-dev/tox/releases)
- [Changelog](https://github.com/tox-dev/tox/blob/3.23.0/docs/changelog.rst)
- [Commits](tox-dev/tox@3.22.0...3.23.0)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [sphinx](https://github.com/sphinx-doc/sphinx) from 3.5.1 to 3.5.2.
- [Release notes](https://github.com/sphinx-doc/sphinx/releases)
- [Changelog](https://github.com/sphinx-doc/sphinx/blob/3.x/CHANGES)
- [Commits](sphinx-doc/sphinx@v3.5.1...v3.5.2)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Rename Django's dev branch to main.

More information: https://groups.google.com/g/django-developers/c/tctDuKUGosc/
Refs: django/django#14048

* Downgrade to 18.04 to work-around the issue with mysql/mariadb.
Bumps [flake8](https://gitlab.com/pycqa/flake8) from 3.8.4 to 3.9.0.
- [Release notes](https://gitlab.com/pycqa/flake8/tags)
- [Commits](https://gitlab.com/pycqa/flake8/compare/3.8.4...3.9.0)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [tox-gh-actions](https://github.com/ymyzk/tox-gh-actions) from 2.4.0 to 2.5.0.
- [Release notes](https://github.com/ymyzk/tox-gh-actions/releases)
- [Commits](ymyzk/tox-gh-actions@v2.4.0...v2.5.0)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [sphinx](https://github.com/sphinx-doc/sphinx) from 3.5.2 to 3.5.3.
- [Release notes](https://github.com/sphinx-doc/sphinx/releases)
- [Changelog](https://github.com/sphinx-doc/sphinx/blob/3.x/CHANGES)
- [Commits](https://github.com/sphinx-doc/sphinx/commits)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [isort](https://github.com/pycqa/isort) from 5.7.0 to 5.8.0.
- [Release notes](https://github.com/pycqa/isort/releases)
- [Changelog](https://github.com/PyCQA/isort/blob/develop/CHANGELOG.md)
- [Commits](PyCQA/isort@5.7.0...5.8.0)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* update fr messagefile

* improve french translation
Bumps [sphinx](https://github.com/sphinx-doc/sphinx) from 3.5.3 to 3.5.4.
- [Release notes](https://github.com/sphinx-doc/sphinx/releases)
- [Changelog](https://github.com/sphinx-doc/sphinx/blob/4.x/CHANGES)
- [Commits](https://github.com/sphinx-doc/sphinx/commits/v3.5.4)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [flake8](https://gitlab.com/pycqa/flake8) from 3.9.0 to 3.9.1.
- [Release notes](https://gitlab.com/pycqa/flake8/tags)
- [Commits](https://gitlab.com/pycqa/flake8/compare/3.9.0...3.9.1)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Remove changeReason and update CHANGES

* call out breaking changes
Bumps [tox](https://github.com/tox-dev/tox) from 3.23.0 to 3.23.1.
- [Release notes](https://github.com/tox-dev/tox/releases)
- [Changelog](https://github.com/tox-dev/tox/blob/master/docs/changelog.rst)
- [Commits](tox-dev/tox@3.23.0...3.23.1)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [sphinx](https://github.com/sphinx-doc/sphinx) from 3.5.4 to 4.0.2.
- [Release notes](https://github.com/sphinx-doc/sphinx/releases)
- [Changelog](https://github.com/sphinx-doc/sphinx/blob/4.x/CHANGES)
- [Commits](sphinx-doc/sphinx@v3.5.4...v4.0.2)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [black](https://github.com/psf/black) from 20.8.b1 to 21.5b1.
- [Release notes](https://github.com/psf/black/releases)
- [Changelog](https://github.com/psf/black/blob/main/CHANGES.md)
- [Commits](https://github.com/psf/black/commits)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [flake8](https://gitlab.com/pycqa/flake8) from 3.9.1 to 3.9.2.
- [Release notes](https://gitlab.com/pycqa/flake8/tags)
- [Commits](https://gitlab.com/pycqa/flake8/compare/3.9.1...3.9.2)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
The plural seems to confuse the double backticks.
* Return self if called on the class instead of instance to not error out in metaprogramming in internals of djangorestframework.

* Add entry on changelog.
RealOrangeOne and others added 16 commits September 22, 2021 08:11
This not only means comparison is done on primitive values, but as a side effect removes the extra query for base models
Bumps [tox-gh-actions](https://github.com/ymyzk/tox-gh-actions) from 2.7.0 to 2.8.0.
- [Release notes](https://github.com/ymyzk/tox-gh-actions/releases)
- [Commits](ymyzk/tox-gh-actions@v2.7.0...v2.8.0)

---
updated-dependencies:
- dependency-name: tox-gh-actions
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [tox-gh-actions](https://github.com/ymyzk/tox-gh-actions) from 2.8.0 to 2.8.1.
- [Release notes](https://github.com/ymyzk/tox-gh-actions/releases)
- [Commits](ymyzk/tox-gh-actions@v2.8.0...v2.8.1)

---
updated-dependencies:
- dependency-name: tox-gh-actions
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Opt-out of the index with `SETTINGS_HISTORY_DATE_INDEX=False`.

Allow history_date indexing to be disabled or composite with model pk

Co-authored-by: jeking3 <jim.king@cloudtruth.com>
* Add SIMPLE_HISTORY_ENABLED flag

* Update AUTHORS

* Consider SIMPLE_HISTORY_ENABLED in bulk queries

Co-authored-by: Danial Erfanian <danial.erfanian@divar.ir>
Bumps [coverage](https://github.com/nedbat/coveragepy) from 5.5 to 6.0.
- [Release notes](https://github.com/nedbat/coveragepy/releases)
- [Changelog](https://github.com/nedbat/coveragepy/blob/master/CHANGES.rst)
- [Commits](nedbat/coveragepy@coverage-5.5...6.0)

---
updated-dependencies:
- dependency-name: coverage
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Coercing OneToOneFields to be ForeignKeys on historical
models causes issues when the OneToOneField is a custom
subclass that includes additional arguments that do not
exist on the ForeignKey.__init__  method.

These additional arguments can be specified via excluded_field_kwargs
to allow these custom OneToOneFields be coerced into ForeignKeys
on the historical model.

Fixes #870

Co-authored-by: Jim King <jim.king@cloudtruth.com>
Fix broken CI: add pre-commit checks for better CI
Bumps [flake8](https://github.com/pycqa/flake8) from 3.9.2 to 4.0.1.
- [Release notes](https://github.com/pycqa/flake8/releases)
- [Commits](PyCQA/flake8@3.9.2...4.0.1)

---
updated-dependencies:
- dependency-name: flake8
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [coverage](https://github.com/nedbat/coveragepy) from 6.0 to 6.0.2.
- [Release notes](https://github.com/nedbat/coveragepy/releases)
- [Changelog](https://github.com/nedbat/coveragepy/blob/master/CHANGES.rst)
- [Commits](nedbat/coveragepy@6.0...6.0.2)

---
updated-dependencies:
- dependency-name: coverage
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
@jeking3
Copy link
Contributor

jeking3 commented Oct 25, 2021

@brylie My last comment should help with the current issues.

@brylie
Copy link
Member Author

brylie commented Oct 26, 2021

@jeking3, I have rebased master into this branch and fixed some lint issues in code related to this pull request.

@brylie
Copy link
Member Author

brylie commented Oct 26, 2021

simple_history/models.py:379:5: C901 'HistoricalRecords.get_extra_fields' is too complex (13)

I will leave HistoricalRecords.get_extra_fields unmodified.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Get previous revision delta in template?