Skip to content

Commit

Permalink
feat: adding python3.11 support.
Browse files Browse the repository at this point in the history
  • Loading branch information
awais786 committed Apr 17, 2024
1 parent b3cbdbc commit 8f15fbf
Show file tree
Hide file tree
Showing 20 changed files with 83 additions and 116 deletions.
9 changes: 6 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,14 @@ on:
jobs:
quality_and_translations_tests:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8", "3.11"]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.8"
python-version: ${{ matrix.python-version }}
architecture: x64
- name: Install Dependencies
run: make requirements
Expand All @@ -33,13 +36,13 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["py38"]
python-version: ["3.8", "3.11"]
django-version: ["django42"]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.8"
python-version: ${{ matrix.python-version }}
architecture: x64
- name: Setup Nodejs Env
run: echo "NODE_VER=`cat .nvmrc`" >> $GITHUB_ENV
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,8 @@ tests: ## Run tests and generate coverage report
$(TOX)coverage report

test-karma: ## Run JS tests through Karma & install firefox. This command needs to be ran manually in the devstack container before submitting a pull request. It can not be run in CI as of APER-2136.
sudo apt-get update
sudo apt-get install --no-install-recommends -y firefox xvfb
apt-get update
apt-get install --no-install-recommends -y firefox xvfb
xvfb-run $(NODE_BIN)/karma start

### Frontend commands ###
Expand Down
2 changes: 1 addition & 1 deletion credentials/apps/records/tests/test_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ def test_email_content_complete(self):
# Check output and make sure it seems correct
self.assertEqual(len(mail.outbox), 1)
email = mail.outbox[0]
message = str(email.message())
message = email.Message.as_string()
self.assertIn(self.program.title + " Credit Request for", email.subject)
self.assertIn(
self.user.get_full_name() + " would like to apply for credit in the " + self.pathway.name, message
Expand Down
1 change: 1 addition & 0 deletions credentials/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@
"drf_yasg",
"xss_utils",
"openedx_events",
"fontawesomefree",
]

PROJECT_APPS = [
Expand Down
6 changes: 3 additions & 3 deletions credentials/templates/_actions.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ <h3 class="sr-only">{% trans 'Print or share your certificate' as tmsg %}{{ tmsg
data-track-event-property-category="certificates"
data-track-event-property-credential-uuid="{{ user_credential.uuid }}"
data-track-event-property-program-uuid="{{ user_credential.credential.program_uuid }}">
<span class="fa fa-facebook" aria-hidden="true"></span>
<span class="fa-brands fa-facebook" aria-hidden="true"></span>
<span class="action-label">{% trans 'Share this certificate via Facebook' as tmsg %}{{ tmsg | force_escape }}</span>
</button>
{% endif %}
Expand All @@ -25,7 +25,7 @@ <h3 class="sr-only">{% trans 'Print or share your certificate' as tmsg %}{{ tmsg
data-track-event-property-program-uuid="{{ user_credential.credential.program_uuid }}">
<a class="share-link" target="_blank"
href="https://twitter.com/intent/tweet?text={{ tweet_text|urlencode }}&url={{ share_url|urlencode }}{% if twitter_username %}&via={{ twitter_username }}{% endif %}">
<span class="fa fa-twitter" aria-hidden="true"></span>
<span class="fa-brands fa-twitter" aria-hidden="true"></span>
<span class="action-label">{% trans 'Tweet this certificate' as tmsg %}{{ tmsg | force_escape }}</span>
</a>
</button>
Expand All @@ -39,7 +39,7 @@ <h3 class="sr-only">{% trans 'Print or share your certificate' as tmsg %}{{ tmsg
data-track-event-property-program-uuid="{{ user_credential.credential.program_uuid }}">
<a class="share-link" target="_blank"
href="https://www.linkedin.com/profile/add?startTask=CERTIFICATION_NAME">
<span class="fa fa-linkedin" aria-hidden="true"></span>
<span class="fa-brands fa-linkedin" aria-hidden="true"></span>
<span class="action-label">{% trans 'Add this certificate to your LinkedIn profile' as tmsg %}{{ tmsg | force_escape }}</span>
</a>
</button>
Expand Down
5 changes: 5 additions & 0 deletions credentials/templates/base.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{# Base template for edX-specific pages. #}

{% load i18n %}
{% load static %}
{% load statici18n %}
{% load render_bundle from webpack_loader %}

Expand All @@ -15,6 +16,10 @@
<title>{% block title %}{% endblock title %}</title>

<link rel="icon" type="image/x-icon" href="/favicon.ico" />
<!-- import fontawesome svgs and icons -->
<script src="{% static 'fontawesomefree/js/fontawesome.js' %}"></script>
<script src="{% static 'fontawesomefree/js/solid.js' %}"></script>
<script src="{% static 'fontawesomefree/js/brands.js' %}"></script>

{% if base_style_template %}
{% include base_style_template %}
Expand Down
1 change: 0 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
"css-loader": "6.11.0",
"css-minimizer-webpack-plugin": "6.0.0",
"file-loader": "6.2.0",
"font-awesome": "4.7.0",
"mini-css-extract-plugin": "2.8.1",
"sass": "1.75.0",
"sass-loader": "14.2.0",
Expand Down
31 changes: 15 additions & 16 deletions requirements/all.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,21 +34,17 @@ backports-zoneinfo==0.2.1
# -r requirements/production.txt
# django
# djangorestframework
bcrypt==4.1.2
# via
# -r requirements/dev.txt
# paramiko
black==24.3.0
black==24.4.0
# via -r requirements/dev.txt
bleach==6.1.0
# via
# -r requirements/dev.txt
# -r requirements/production.txt
boto3==1.34.81
boto3==1.34.85
# via
# -r requirements/production.txt
# django-ses
botocore==1.34.81
botocore==1.34.85
# via
# -r requirements/production.txt
# boto3
Expand Down Expand Up @@ -208,7 +204,7 @@ django-rest-swagger==2.2.0
# via
# -r requirements/dev.txt
# -r requirements/production.txt
django-ses==3.5.2
django-ses==3.6.0
# via -r requirements/production.txt
django-simple-history==3.5.0
# via
Expand Down Expand Up @@ -305,7 +301,7 @@ edx-event-bus-kafka==5.7.0
# via
# -r requirements/dev.txt
# -r requirements/production.txt
edx-i18n-tools==1.3.0
edx-i18n-tools==1.5.0
# via
# -r requirements/dev.txt
# -r requirements/production.txt
Expand Down Expand Up @@ -333,7 +329,7 @@ exceptiongroup==1.2.0
# pytest
factory-boy==3.3.0
# via -r requirements/dev.txt
faker==24.8.0
faker==24.9.0
# via
# -r requirements/dev.txt
# factory-boy
Expand All @@ -347,6 +343,10 @@ filelock==3.13.4
# -r requirements/dev.txt
# tox
# virtualenv
fontawesomefree==6.5.1
# via
# -r requirements/dev.txt
# -r requirements/production.txt
gevent==24.2.1
# via -r requirements/production.txt
greenlet==3.0.3
Expand All @@ -357,7 +357,7 @@ gunicorn==21.2.0
# via -r requirements/production.txt
httpretty==1.1.4
# via -r requirements/dev.txt
idna==3.6
idna==3.7
# via
# -r requirements/dev.txt
# -r requirements/production.txt
Expand Down Expand Up @@ -451,7 +451,7 @@ openedx-atlas==0.6.0
# via
# -r requirements/dev.txt
# -r requirements/production.txt
openedx-events==9.7.0
openedx-events==9.9.1
# via
# -r requirements/dev.txt
# -r requirements/production.txt
Expand Down Expand Up @@ -618,9 +618,8 @@ pytz==2024.1
# drf-yasg
pywatchman==2.0.0 ; "linux" in sys_platform
# via -r requirements/dev.txt
pyyaml==5.4.1
pyyaml==6.0.1
# via
# -c requirements/constraints.txt
# -r requirements/dev.txt
# -r requirements/production.txt
# code-annotations
Expand Down Expand Up @@ -708,7 +707,7 @@ social-auth-core==4.5.3
# -r requirements/production.txt
# edx-auth-backends
# social-auth-app-django
sqlparse==0.4.4
sqlparse==0.5.0
# via
# -r requirements/dev.txt
# -r requirements/production.txt
Expand Down Expand Up @@ -799,7 +798,7 @@ zope-event==5.0
# via
# -r requirements/production.txt
# gevent
zope-interface==6.2
zope-interface==6.3
# via
# -r requirements/production.txt
# gevent
Expand Down
1 change: 1 addition & 0 deletions requirements/base.in
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ edx-event-bus-kafka
edx-opaque-keys
edx-rest-api-client
edx-toggles
fontawesomefree
markdown
mysqlclient
newrelic
Expand Down
12 changes: 6 additions & 6 deletions requirements/base.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ backoff==2.2.1
# via segment-analytics-python
backports-zoneinfo==0.2.1
# via
# -c requirements/constraints.txt
# django
# djangorestframework
bleach==6.1.0
Expand Down Expand Up @@ -145,7 +146,7 @@ edx-drf-extensions==10.3.0
# via -r requirements/base.in
edx-event-bus-kafka==5.7.0
# via -r requirements/base.in
edx-i18n-tools==1.3.0
edx-i18n-tools==1.5.0
# via edx-credentials-themes
edx-opaque-keys[django]==2.5.1
# via
Expand All @@ -160,7 +161,7 @@ edx-toggles==5.2.0
# edx-event-bus-kafka
fastavro==1.9.4
# via openedx-events
idna==3.6
idna==3.7
# via requests
importlib-metadata==6.11.0
# via
Expand Down Expand Up @@ -197,7 +198,7 @@ openapi-codec==1.3.2
# via django-rest-swagger
openedx-atlas==0.6.0
# via -r requirements/base.in
openedx-events==9.7.0
openedx-events==9.9.1
# via edx-event-bus-kafka
packaging==24.0
# via drf-yasg
Expand Down Expand Up @@ -245,9 +246,8 @@ pytz==2024.1
# via
# -r requirements/base.in
# drf-yasg
pyyaml==5.4.1
pyyaml==6.0.1
# via
# -c requirements/constraints.txt
# code-annotations
# drf-yasg
# edx-django-release-util
Expand Down Expand Up @@ -294,7 +294,7 @@ social-auth-core==4.5.3
# via
# edx-auth-backends
# social-auth-app-django
sqlparse==0.4.4
sqlparse==0.5.0
# via django
stevedore==5.2.0
# via
Expand Down
4 changes: 0 additions & 4 deletions requirements/constraints.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,6 @@
# Common constraints for edx repos
-c common_constraints.txt

# The update to pyyaml 6.x failed as docker-compose wants <6,>=3.10. Pinning to <6.0. This constraint will be
# re-evaluated as part of APER-1556.
pyyaml<6.0

# Pinning urllib3 to versions < 2.x as this conflicts with boto. This constraint will be re-evaluated as part of
# APER-2422
urllib3<2
Expand Down
2 changes: 0 additions & 2 deletions requirements/dev.in
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@
# i18n
edx-i18n-tools

# for docker devstack
docker-compose

# More efficient checking for runserver reload trigger events
pywatchman; "linux" in sys_platform
Expand Down
Loading

0 comments on commit 8f15fbf

Please sign in to comment.