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

build: update django-simple-history package version #324

Merged
merged 2 commits into from
Aug 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ $(COMMON_CONSTRAINTS_TXT):

upgrade: export CUSTOM_COMPILE_COMMAND=make upgrade
upgrade: $(COMMON_CONSTRAINTS_TXT)
sed 's/django-simple-history==3.0.0//g' requirements/common_constraints.txt > requirements/common_constraints.tmp
mv requirements/common_constraints.tmp requirements/common_constraints.txt
## update the requirements text files based on the requirements/*.in files
pip install -qr requirements/pip-tools.txt
pip-compile --upgrade --allow-unsafe --rebuild -o requirements/pip.txt requirements/pip.in
Expand Down
2 changes: 1 addition & 1 deletion organizations/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""
edx-organizations app initialization module
"""
__version__ = '6.12.0' # pragma: no cover
__version__ = '6.12.1' # pragma: no cover
21 changes: 21 additions & 0 deletions organizations/migrations/0004_auto_20230727_2054.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Generated by Django 3.2.20 on 2023-07-27 20:54

from django.db import migrations


class Migration(migrations.Migration):

dependencies = [
('organizations', '0003_historicalorganizationcourse'),
]

operations = [
migrations.AlterModelOptions(
name='historicalorganization',
options={'get_latest_by': ('history_date', 'history_id'), 'ordering': ('-history_date', '-history_id'), 'verbose_name': 'historical organization', 'verbose_name_plural': 'historical organizations'},
),
migrations.AlterModelOptions(
name='historicalorganizationcourse',
options={'get_latest_by': ('history_date', 'history_id'), 'ordering': ('-history_date', '-history_id'), 'verbose_name': 'historical Link Course', 'verbose_name_plural': 'historical Link Courses'},
),
]
21 changes: 21 additions & 0 deletions organizations/tests/test_migrations.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
"""
Tests for migrations, especially potentially risky data migrations.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adding test for checking migrations are in sync.

"""
from io import StringIO

from django.core.management import call_command
from django.test.testcases import TestCase
from django.test.utils import override_settings


class MigrationTests(TestCase):
"""
Runs migration tests using Django Command interface.
"""

@override_settings(MIGRATION_MODULES={})
def test_migrations_are_in_sync(self):
out = StringIO()
call_command("makemigrations", dry_run=True, verbosity=3, stdout=out)
output = out.getvalue()
self.assertIn("No changes detected", output)
52 changes: 23 additions & 29 deletions requirements/base.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,26 +4,27 @@
#
# make upgrade
#
asgiref==3.6.0
asgiref==3.7.2
# via django
certifi==2022.12.7
certifi==2023.7.22
# via requests
cffi==1.15.1
# via
# cryptography
# pynacl
charset-normalizer==3.1.0
charset-normalizer==3.2.0
# via requests
click==8.1.3
click==8.1.6
# via edx-django-utils
cryptography==40.0.2
cryptography==41.0.2
# via pyjwt
django==3.2.18
django==3.2.20
# via
# -c requirements/common_constraints.txt
# -r requirements/base.in
# django-crum
# django-model-utils
# django-waffle
# djangorestframework
# drf-jwt
# edx-django-utils
Expand All @@ -32,11 +33,11 @@ django-crum==0.7.9
# via edx-django-utils
django-model-utils==4.3.1
# via -r requirements/base.in
django-simple-history==3.0.0
django-simple-history==3.1.1
# via
# -c requirements/common_constraints.txt
# -c requirements/constraints.txt
# -r requirements/base.in
django-waffle==3.0.0
django-waffle==4.0.0
# via
# edx-django-utils
# edx-drf-extensions
Expand All @@ -47,33 +48,27 @@ djangorestframework==3.14.0
# edx-drf-extensions
drf-jwt==1.19.2
# via edx-drf-extensions
edx-django-utils==5.4.0
edx-django-utils==5.6.0
# via edx-drf-extensions
edx-drf-extensions==8.6.0
edx-drf-extensions==8.8.0
# via -r requirements/base.in
edx-opaque-keys==2.3.0
# via
# -r requirements/base.in
# edx-drf-extensions
future==0.18.3
# via pyjwkest
idna==3.4
# via requests
newrelic==8.8.0
newrelic==8.9.0
# via edx-django-utils
pbr==5.11.1
# via stevedore
pillow==9.5.0
pillow==10.0.0
# via -r requirements/base.in
psutil==5.9.4
psutil==5.9.5
# via edx-django-utils
pycparser==2.21
# via cffi
pycryptodomex==3.17
# via pyjwkest
pyjwkest==1.4.2
# via edx-drf-extensions
pyjwt[crypto]==2.6.0
pyjwt[crypto]==2.8.0
# via
# drf-jwt
# edx-drf-extensions
Expand All @@ -87,22 +82,21 @@ pytz==2023.3
# via
# django
# djangorestframework
requests==2.28.2
# via
# edx-drf-extensions
# pyjwkest
requests==2.31.0
# via edx-drf-extensions
semantic-version==2.10.0
# via edx-drf-extensions
six==1.16.0
# via
# edx-drf-extensions
# pyjwkest
# python-dateutil
sqlparse==0.4.3
sqlparse==0.4.4
# via django
stevedore==5.0.0
stevedore==5.1.0
# via
# edx-django-utils
# edx-opaque-keys
urllib3==1.26.15
typing-extensions==4.7.1
# via asgiref
urllib3==2.0.4
# via requests
7 changes: 1 addition & 6 deletions requirements/common_constraints.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,8 @@ Django<4.0
elasticsearch<7.14.0

# django-simple-history>3.0.0 adds indexing and causes a lot of migrations to be affected
django-simple-history==3.0.0


# tox>4.0.0 isn't yet compatible with many tox plugins, causing CI failures in almost all repos.
# Details can be found in this discussion: https://github.com/tox-dev/tox/discussions/1810
tox<4.0.0

# edx-sphinx-theme is not compatible with latest Sphinx==6.0.0 version
# Pinning Sphinx version unless the compatibility issue gets resolved
# For details, see issue https://github.com/openedx/edx-sphinx-theme/issues/197
sphinx<6.0.0
2 changes: 2 additions & 0 deletions requirements/constraints.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,5 @@
# Common constraints for edx repos
-c common_constraints.txt

# incremental upgrade plan.
django-simple-history<=3.1.1
15 changes: 9 additions & 6 deletions requirements/pip-tools.txt
Original file line number Diff line number Diff line change
@@ -1,22 +1,25 @@
#
# This file is autogenerated by pip-compile with python 3.8
# To update, run:
# This file is autogenerated by pip-compile with Python 3.8
# by the following command:
#
# make upgrade
#
build==0.10.0
# via pip-tools
click==8.1.3
click==8.1.6
# via pip-tools
packaging==23.1
# via build
pip-tools==6.13.0
pip-tools==7.1.0
# via -r requirements/pip-tools.in
pyproject-hooks==1.0.0
# via build
tomli==2.0.1
# via build
wheel==0.40.0
# via
# build
# pip-tools
# pyproject-hooks
wheel==0.41.0
# via pip-tools

# The following packages are considered to be unsafe in a requirements file:
Expand Down
10 changes: 5 additions & 5 deletions requirements/pip.txt
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
#
# This file is autogenerated by pip-compile with python 3.8
# To update, run:
# This file is autogenerated by pip-compile with Python 3.8
# by the following command:
#
# make upgrade
#
wheel==0.40.0
wheel==0.41.0
# via -r requirements/pip.in

# The following packages are considered to be unsafe in a requirements file:
pip==23.1
pip==23.2.1
# via -r requirements/pip.in
setuptools==67.6.1
setuptools==68.0.0
# via -r requirements/pip.in
Loading
Loading