Skip to content

Changes to make figures compatible with open edX Juniper - #264

Merged
johnbaldwin merged 53 commits into
appsembler:masterfrom
Dicey-Tech:juniper_upgrade
Nov 2, 2020
Merged

johnbaldwin merged 53 commits into
appsembler:masterfrom
Dicey-Tech:juniper_upgrade

Conversation

@BbrSofiane

@BbrSofiane BbrSofiane commented Oct 4, 2020 •

Copy link
Copy Markdown
Contributor

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

johnbaldwin commented Oct 6, 2020 •

Copy link
Copy Markdown
Contributor

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
Copy Markdown
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

@OmarIthawi OmarIthawi left a comment

Copy link
Copy Markdown
Contributor

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.

Comment thread pytest-juniper.ini Outdated
@@ -0,0 +1,10 @@
# This file supports PyTest testing Figures against Ginkgo mocks

Copy link
Copy Markdown
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
Copy Markdown
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.

Comment thread devsite/devsite/seed.py Resolved
Comment thread devsite/devsite/urls.py
url(r'^admin/', admin.site.urls),
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
Copy Markdown
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')

('figures', '0002_course_daily_metrics'),
]

# TODO Review on_delete behavious

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

👍🏼

Comment thread tests/factories.py Resolved

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🤣

Comment thread devsite/devsite/test_settings.py Outdated
sys.path.append(root('mocks', MOCKS_DIR))


print(OPENEDX_RELEASE)

Copy link
Copy Markdown
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 thread devsite/devsite/cans/student_modules.py Outdated
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
Copy Markdown
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
@BbrSofiane

Copy link
Copy Markdown
Contributor Author

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

@BbrSofiane

Copy link
Copy Markdown
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