Skip to content

Commit 992fdb0

Browse files
luisfelipec95jignaciopm
authored andcommitted
chore: drop support for python 3.5, add python 3.11, upgrade requirements and fix actions
1 parent e3dae07 commit 992fdb0

36 files changed

+983
-299
lines changed

.circleci/config.yml

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

.github/workflows/ci.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Test suite workflow
2+
3+
on:
4+
push:
5+
branches: [master]
6+
pull_request:
7+
branches:
8+
- '**'
9+
10+
11+
jobs:
12+
run_tests:
13+
name: tests
14+
runs-on: ${{ matrix.os }}
15+
strategy:
16+
matrix:
17+
os: [ubuntu-20.04]
18+
python-version: ['3.11']
19+
toxenv: [django42]
20+
21+
steps:
22+
- uses: actions/checkout@v4
23+
- name: setup python
24+
uses: actions/setup-python@v5
25+
with:
26+
python-version: ${{ matrix.python-version }}
27+
28+
- name: Install pip
29+
run: pip install -r requirements/pip.txt
30+
31+
- name: Install Dependencies
32+
run: pip install -r requirements/ci.txt
33+
34+
- name: Run Tests
35+
env:
36+
TOXENV: ${{ matrix.toxenv }}
37+
run: tox

.github/workflows/commitlint.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Run commitlint on the commit messages in a pull request.
2+
3+
name: Lint Commit Messages
4+
5+
on:
6+
- pull_request
7+
8+
jobs:
9+
commitlint:
10+
uses: openedx/.github/.github/workflows/commitlint.yml@master

CHANGELOG.rst

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,36 @@ Unreleased
1414

1515
*
1616

17+
[2.0.0] - 2025-01-23
18+
**********************************************
19+
20+
Added
21+
=====
22+
23+
* Support for Python 3.11 and Django 4.2
24+
* Add github workflow
25+
26+
Removed
27+
_______
28+
29+
* **BREAKING CHANGE**: Dropped support for Python 3.5
30+
* Drop CircleCI support
31+
* Remove support to "redirect to another unit in the same subsection" action
32+
33+
Changed
34+
=======
35+
36+
* Fix UI issues
37+
38+
[1.0.1] - 2020-10-14
39+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
40+
41+
Fixed
42+
_____
43+
44+
* Python3 and Juniper issues
45+
* Fix applyFlowControl in injection to applied correctly the actions of flow-control
46+
1747

1848
[1.0.0] - 2020-06-18
1949
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Makefile

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,33 @@
1+
.DEFAULT_GOAL := help
2+
3+
ifdef TOXENV
4+
TOX := tox -- #to isolate each tox environment if TOXENV is defined
5+
endif
6+
17
.PHONY: help test install upgrade requirements
28

39
help: ## display this help message
410
@echo "Please use \`make <target>' where <target> is one of"
511
@perl -nle'print $& if m{^[a-zA-Z_-]+:.*?## .*$$}' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m %-25s\033[0m %s\n", $$1, $$2}'
612

13+
install-dev-dependencies: ## install tox
14+
pip install -r requirements/tox.txt
15+
16+
clean: ## delete most git-ignored files
17+
find . -name '__pycache__' -exec rm -rf {} +
18+
find . -name '*.pyc' -exec rm -f {} +
19+
find . -name '*.pyo' -exec rm -f {} +
20+
find . -name '*~' -exec rm -f {} +
21+
22+
# Define PIP_COMPILE_OPTS=-v to get more information during make upgrade.
23+
PIP_COMPILE = pip-compile --upgrade $(PIP_COMPILE_OPTS)
24+
725
install: ## install the flow-control xblock
826
pip install .
927

1028
requirements: ## fetch development requirements
1129
pip install -r requirements/base.txt
30+
pip install -qr requirements/pip-tools.txt
1231

1332
test: ## test using tox
1433
pip install -r requirements/tox.txt
@@ -17,8 +36,18 @@ test: ## test using tox
1736
upgrade: export CUSTOM_COMPILE_COMMAND=make upgrade
1837
upgrade: ## update the pip requirements files to use the latest releases satisfying our constraints
1938
pip install -r requirements/pip-tools.txt
39+
pip-compile --rebuild --upgrade --allow-unsafe -o requirements/pip.txt requirements/pip.in
2040
pip-compile --rebuild --upgrade -o requirements/pip-tools.txt requirements/pip-tools.in
41+
pip install -qr requirements/pip.txt
2142
pip-compile --rebuild --upgrade -o requirements/base.txt requirements/base.in
2243
pip-compile --rebuild --upgrade -o requirements/test.txt requirements/test.in
2344
pip-compile --rebuild --upgrade -o requirements/tox.txt requirements/tox.in
2445
pip-compile --rebuild --upgrade -o requirements/quality.txt requirements/quality.in
46+
pip-compile --rebuild --upgrade -o requirements/ci.txt requirements/ci.in
47+
pip-compile --rebuild --upgrade -o requirements/dev.txt requirements/dev.in
48+
49+
test-python: clean ## Run test suite.
50+
$(TOX) pip install -r requirements/base.txt --exists-action w
51+
$(TOX) coverage run --source="." -m pytest ./flow_control_xblock
52+
53+
run-tests: test-python quality

README.rst

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,16 @@ XBlock Flow Control
77

88
The Flow Control XBlock provides a way to display the content of a unit or to redirect the user elsewhere based on compliance with a condition that evaluates the submission or the score of a problem or a set of problems.
99

10-
Installing on Open edX Devstack
11-
-------------------------------
12-
13-
Inside both LMS and Studio shells, using `make lms-shell` and `make studio-shell` in your devstack directory do::
14-
15-
pip install flow-control-xblock
16-
17-
However, if you want to further develop this XBlock, you might want to instead clone this repository and do::
18-
19-
pip install -e path/to/flow-control
20-
21-
⚠️ Since the Open edX Olive release, some features could fail because of the integration of [Learning MFE](https://github.com/eduNEXT/frontend-app-learning).
10+
Compatibility Notes
11+
===================
2212

13+
+------------------+--------------+
14+
| Open edX Release | Version |
15+
+==================+==============+
16+
| Redwood | >= 2.0.0 |
17+
+------------------+--------------+
18+
| Sumac | >= 2.0.0 |
19+
+------------------+--------------+
2320

2421
Enabling in Studio
2522
------------------
@@ -83,7 +80,7 @@ Features include
8380
**Actions:** This actions can be applied when a condition is met:
8481

8582
* Display a message
86-
* Redirect to another unit in the same subsection (without reloading the page)
83+
* Redirect to another unit in the same subsection (without reloading the page) :warning:[DEPRECATED: Since version 2.0.0 and not working with the Learning MFE]
8784
* Redirect to another unit using jump_to_id (reloading the page)
8885
* Redirect to a given url
8986

flow_control/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
Init for main Flow-Control XBlock
33
"""
44
from .flow import FlowCheckPointXblock
5-
__version__ = '1.0.1'
5+
__version__ = '2.0.0'

flow_control/apps.py

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
"""
2+
Flow Control Django application initialization.
3+
"""
4+
5+
from django.apps import AppConfig
6+
7+
8+
class FlowControlConfig(AppConfig):
9+
"""
10+
Configuration for the Flow Control Django application.
11+
"""
12+
name = "flow_control"
13+
14+
plugin_app = {
15+
"settings_config": {
16+
"lms.djangoapp": {
17+
"common": {"relative_path": "settings.common"},
18+
"test": {"relative_path": "settings.test"},
19+
"production": {"relative_path": "settings.production"},
20+
},
21+
"cms.djangoapp": {
22+
"common": {"relative_path": "settings.common"},
23+
"test": {"relative_path": "settings.test"},
24+
"production": {"relative_path": "settings.production"},
25+
},
26+
}
27+
}

flow_control/edxapp_wrapper/__init__.py

Whitespace-only changes.

flow_control/edxapp_wrapper/backends/__init__.py

Whitespace-only changes.

0 commit comments

Comments
 (0)