-
Notifications
You must be signed in to change notification settings - Fork 37
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
Conversation
Bump figures to 0.3.12
A couple of inline comments for code improvement
Merge before PR to push Juniper upgrade changes
Flake8 fixes to the Juniper upgrade work
Admin note: Before we merge this into Figures 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 |
@johnbaldwin sounds good, I'm waiting the PR. |
* 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
There was a problem hiding this 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.
pytest-juniper.ini
Outdated
@@ -0,0 +1,10 @@ | |||
# This file supports PyTest testing Figures against Ginkgo mocks |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# This file supports PyTest testing Figures against Ginkgo mocks | |
# This file supports PyTest testing Figures against Juniper mocks |
|
||
|
||
|
||
class CourseMode(object): |
There was a problem hiding this comment.
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')), |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤣
devsite/devsite/test_settings.py
Outdated
@@ -29,7 +29,7 @@ def root(*args): | |||
|
|||
sys.path.append(root('mocks', MOCKS_DIR)) | |||
|
|||
|
|||
print(OPENEDX_RELEASE) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
print(OPENEDX_RELEASE) |
try: | ||
from lms.djangoapps.courseware.models import StudentModule | ||
except ImportError: | ||
# Backward compatibily for pre-Juniper releases | ||
from courseware.models import StudentModule |
There was a problem hiding this comment.
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.
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>
@OmarIthawi Thanks for the review! |
@johnbaldwin Should I look into the conflicts? |
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
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