Skip to content

Commit 72705b6

Browse files
authored
refactor: ensure Django 3.2 compatibility
* refactor: ensure Django 3.2 compatibility * replace travis by CircleCI * bump Django min/max versions * refactor setup.py * bump xblock-sdk dependency * add tox for test running * bump package version * chore: update translations * chore: extend gitignore * feat: upgrade poll XBlock to use celery 5.0+ features
1 parent 5e849b5 commit 72705b6

File tree

32 files changed

+1419
-624
lines changed

32 files changed

+1419
-624
lines changed

.circleci/config.yml

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
version: 2.1
2+
3+
orbs:
4+
browser-tools: circleci/browser-tools@1.2.3
5+
6+
commands:
7+
install-dependencies:
8+
steps:
9+
- run:
10+
name: Install OS dependencies
11+
command: |
12+
sudo apt update && sudo apt install -y nodejs npm gettext
13+
# Upgrade nodejs after node-gyp installed properly
14+
curl -sL https://deb.nodesource.com/setup_16.x | sudo -E bash -
15+
sudo apt install -y nodejs
16+
- run:
17+
name: Install project dependencies
18+
command: |
19+
pip install tox
20+
make requirements
21+
22+
jobs:
23+
quality:
24+
docker:
25+
# Always run with the minimum supported version
26+
# to avoid new language feature checkes like f-strings
27+
- image: cimg/python:2.7
28+
steps:
29+
- checkout
30+
- install-dependencies
31+
- run:
32+
name: Check code quality
33+
command: |
34+
tox -e quality
35+
test:
36+
parameters:
37+
image:
38+
type: string
39+
tox-env:
40+
type: string
41+
docker:
42+
- image: << parameters.image >>
43+
steps:
44+
- checkout
45+
- browser-tools/install-firefox
46+
- browser-tools/install-geckodriver
47+
- install-dependencies
48+
- run:
49+
name: Test << parameters.tox-env >>
50+
command: |
51+
tox -e << parameters.tox-env >>
52+
53+
workflows:
54+
version: 2
55+
main:
56+
jobs:
57+
- quality
58+
- test:
59+
requires:
60+
- quality
61+
matrix:
62+
parameters:
63+
image: ["cimg/python:2.7-browsers"]
64+
tox-env: ["py27-django111"]
65+
- test:
66+
requires:
67+
- quality
68+
matrix:
69+
parameters:
70+
image: ["cimg/python:3.6-browsers"]
71+
tox-env: ["py36-django22", "py36-django32"]
72+
- test:
73+
requires:
74+
- quality
75+
matrix:
76+
parameters:
77+
image: ["cimg/python:3.8-browsers"]
78+
tox-env: ["py38-django22", "py38-django32"]

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,3 +130,9 @@ Session.vim
130130

131131
# KDE directory preferences
132132
.directory
133+
134+
# Gecko logs
135+
geckodriver.log
136+
137+
# Misc
138+
.DS_Store

.travis.yml

Lines changed: 0 additions & 29 deletions
This file was deleted.

Makefile

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,9 @@
22

33
.DEFAULT_GOAL := help
44

5-
FIREFOX_VERSION := $(shell grep firefox -- .travis.yml | egrep -o [0-9\.]+)
5+
FIREFOX_VERSION := "94.0.1"
66
FIREFOX_LINUX_ARCH := $(shell uname -m)
77

8-
98
help: ## display this help message
109
@echo "Please use \`make <target>' where <target> is one of"
1110
@perl -nle'print $& if m{^[a-zA-Z_-]+:.*?## .*$$}' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m %-25s\033[0m %s\n", $$1, $$2}'
@@ -35,7 +34,7 @@ node_requirements: ## Install requirements for handlebar templates i18n extracti
3534
python_requirements: ## install development environment requirements
3635
pip install -r requirements.txt --exists-action w
3736
pip install -r requirements-dev.txt --exists-action w
38-
cd $(VIRTUAL_ENV)/src/xblock-sdk && \
37+
cd ./src/xblock-sdk && \
3938
pip install -r requirements/base.txt && \
4039
pip install -r requirements/test.txt
4140
pip install -e .

0 commit comments

Comments
 (0)