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

Changes to make figures compatible with open edX Juniper #264

Merged
merged 53 commits into from
Nov 2, 2020

Conversation

BbrSofiane
Copy link
Contributor

@BbrSofiane BbrSofiane commented Oct 4, 2020

Implemented changes to make figures compatible with open edX Juniper.

The changes mostly revolve around Python 3 and Django 2 compatibility with some minor changes in open edX mocks behaviours. #241

@BbrSofiane BbrSofiane changed the title Changes to make figures compatible with open edXJ/uniper upgrade Changes to make figures compatible with open edX Juniper Oct 4, 2020
@johnbaldwin
Copy link
Contributor

johnbaldwin commented Oct 6, 2020

Admin note: Before we merge this into Figures master, we should create a last 0.3.x release (0.3.17) IFF there are any other commits after this one: 27c20fb

If we don't have any more commits, then we don't need to because we can create a '0.3.x' branch from tag 0.3.16

@BbrSofiane
Copy link
Contributor Author

@johnbaldwin sounds good, I'm waiting the PR.

johnbaldwin and others added 3 commits October 13, 2020 11:20
* Added 'juniper.pytest' target in the Makefile
* Added conditional imports so that it will work for Ginkgo, Hawthorn, and Juniper
* Added conditional url pattern to address what looks like a namespace
setting incompatibility between Django 1.8 and 2.x
* PyLint fixes
* Ginkgo, Hawthorn community, Hawthorn multisite, Juniper community
Test fixes and tox update for Juniper upgrade
Copy link
Contributor

@OmarIthawi OmarIthawi left a comment

Choose a reason for hiding this comment

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

@BbrSofiane Thank you so much for the great work!

I have reviewed the work almost line-by-line and couldn't find anything pops up. So it should be good to merge. We'll need to deploy it to the Hawthorn staging so we check for regression issues.

I posted a some 13 comments. The majority are just minor ones that can be ignored or questions so I learn.

@@ -0,0 +1,10 @@
# This file supports PyTest testing Figures against Ginkgo mocks
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
# This file supports PyTest testing Figures against Ginkgo mocks
# This file supports PyTest testing Figures against Juniper mocks




class CourseMode(object):
Copy link
Contributor

Choose a reason for hiding this comment

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

Out of scope: It would be nice to have an automatic check if those mock actually exists in Juniper and the "signature" matches correctly.

url(r'^accounts/', include('django.contrib.auth.urls')),
url(r'^figures/', include('figures.urls', namespace='figures')),
url(r'^figures/', include(('figures.urls', 'figures'), namespace='figures')),
Copy link
Contributor

Choose a reason for hiding this comment

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

Learning: What's the first argument (the tuple) means? in include(('figures.urls', 'figures')

@@ -14,7 +15,7 @@ class Migration(migrations.Migration):
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('figures', '0002_course_daily_metrics'),
]

# TODO Review on_delete behavious
Copy link
Contributor

Choose a reason for hiding this comment

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

👍🏼

@@ -53,7 +53,7 @@ class Meta(object):
app_label = 'course_overviews'

# IMPORTANT: Bump this whenever you modify this model and/or add a migration.
VERSION = 6
VERSION = 11 # this one goes to eleven
Copy link
Contributor

Choose a reason for hiding this comment

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

🤣

@@ -29,7 +29,7 @@ def root(*args):

sys.path.append(root('mocks', MOCKS_DIR))


print(OPENEDX_RELEASE)
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
print(OPENEDX_RELEASE)

Comment on lines 5 to 9
try:
from lms.djangoapps.courseware.models import StudentModule
except ImportError:
# Backward compatibily for pre-Juniper releases
from courseware.models import StudentModule
Copy link
Contributor

Choose a reason for hiding this comment

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

Minor: Good use for the compat.py module.

BbrSofiane and others added 5 commits October 20, 2020 09:46
Co-authored-by: Omar Al-Ithawi <i@omardo.com>
Co-authored-by: Omar Al-Ithawi <i@omardo.com>
Co-authored-by: Omar Al-Ithawi <i@omardo.com>
Co-authored-by: Omar Al-Ithawi <i@omardo.com>
Co-authored-by: Omar Al-Ithawi <i@omardo.com>
@BbrSofiane
Copy link
Contributor Author

@OmarIthawi Thanks for the review!
I've gone through an committed the suggestions that you made.

@BbrSofiane
Copy link
Contributor Author

@johnbaldwin Should I look into the conflicts?

johnbaldwin and others added 17 commits October 26, 2020 22:33
Addressed conflict issue with figures/filters.py. Removed use of
`packaging` because it is not a given that an Open edX deployment will
have it installed
…pgrade

John/merge master to juniper upgrade
Add Juniper Tox environments to TravisCI file
Fix flake8 issue of duplicate function in figures.filters
Remarked out Pytest cov calls to troubleshoot travis-ci
Reworking TravisCI config to conditionally run Tox environemnts
Yet another try at guessing what travis will do
Update Tox to Fix Juniper 'mock 3.0.5' version support, clean up travis file
…upgrade-2

Merge Appsembler master changes to 0.3.19
@johnbaldwin johnbaldwin merged commit 019e60c into appsembler:master Nov 2, 2020
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.

3 participants