Skip to content

Commit ec3862f

Browse files
authored
Merge pull request #41 from openedx/feanil/lti_store_plugin
feat: Add a new plugin for enabling the openedx-ltistore library.
2 parents 0850ccd + 33a0d69 commit ec3862f

File tree

19 files changed

+946
-0
lines changed

19 files changed

+946
-0
lines changed
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Run ltistore tutor plugin tests
2+
3+
on:
4+
pull_request:
5+
paths:
6+
# Trigger this workflow only if files change inside this plugin folder
7+
- 'plugins/tutor-contrib-ltistore/**'
8+
9+
jobs:
10+
test-ltistore:
11+
runs-on: ubuntu-latest
12+
strategy:
13+
matrix:
14+
python-version: ['3.12']
15+
defaults:
16+
run:
17+
# All steps will run from this directory
18+
working-directory: plugins/tutor-contrib-ltistore
19+
steps:
20+
- uses: actions/checkout@v4
21+
- name: Set up Python ${{ matrix.python-version }}
22+
uses: actions/setup-python@v5
23+
with:
24+
python-version: ${{ matrix.python-version }}
25+
- name: Upgrade pip
26+
run: python -m pip install --upgrade pip
27+
- name: Install dependencies
28+
run: |
29+
pip install .[dev]
30+
- name: Test lint, types, and format
31+
run: make test

README.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ Plugin Status (*Experimental*, *Production*, or *D
2121
tutor-contrib-learner-dashboard-mfe Deprecated
2222
tutor-contrib-test-legacy-js "Production" (Supported For Developers)
2323
tutor-contrib-scout-apm Experimental
24+
tutor-contrib-lti-store Experimental
2425
=================================== ======================================================
2526

2627
Getting Started
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
.*.swp
2+
!.gitignore
3+
TODO
4+
__pycache__
5+
*.egg-info/
6+
/build/
7+
/dist/

plugins/tutor-contrib-ltistore/LICENSE.txt

Lines changed: 662 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
recursive-include tutor_ltistore/patches *
2+
recursive-include tutor_ltistore/templates *
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
.DEFAULT_GOAL := help
2+
.PHONY: docs
3+
SRC_DIRS = ./tutor_ltistore
4+
BLACK_OPTS = --exclude templates ${SRC_DIRS}
5+
6+
# Warning: These checks are not necessarily run on every PR.
7+
test: test-lint test-types test-format # Run some static checks.
8+
9+
test-format: ## Run code formatting tests
10+
black --check --diff $(BLACK_OPTS)
11+
12+
test-lint: ## Run code linting tests
13+
pylint --errors-only --enable=unused-import,unused-argument --ignore=templates --ignore=docs/_ext ${SRC_DIRS}
14+
15+
test-types: ## Run type checks.
16+
mypy --exclude=templates --ignore-missing-imports --implicit-reexport --strict ${SRC_DIRS}
17+
18+
format: ## Format code automatically
19+
black $(BLACK_OPTS)
20+
21+
isort: ## Sort imports. This target is not mandatory because the output may be incompatible with black formatting. Provided for convenience purposes.
22+
isort --skip=templates ${SRC_DIRS}
23+
24+
ESCAPE = 
25+
help: ## Print this help
26+
@grep -E '^([a-zA-Z_-]+:.*?## .*|######* .+)$$' Makefile \
27+
| sed 's/######* \(.*\)/@ $(ESCAPE)[1;31m\1$(ESCAPE)[0m/g' | tr '@' '\n' \
28+
| awk 'BEGIN {FS = ":.*?## "}; {printf "\033[33m%-30s\033[0m %s\n", $$1, $$2}'
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
ltistore plugin for `Tutor <https://docs.tutor.edly.io>`__
2+
##########################################################
3+
4+
A plugin to install and enable the openedx-ltistore for reausable lti configurations.
5+
6+
7+
Installation
8+
************
9+
10+
.. code-block:: bash
11+
12+
pip install git+https://github.com/openedx/openedx-tutor-plugins.git#subdirectory=plugins/tutor-contrib-ltistore
13+
14+
For development:
15+
16+
.. code-block:: bash
17+
18+
cd openedx-tutor-plugins/plugins/tutor-contrib-ltistore
19+
pip install -e '.[dev]'
20+
21+
Usage
22+
*****
23+
24+
.. code-block:: bash
25+
26+
tutor plugins enable ltistore
27+
tutor images build openedx
28+
tutor local do init --limit=ltistore
29+
tutor local launch --skip-build --non-interactive
30+
31+
For development:
32+
33+
.. code-block:: bash
34+
35+
tutor plugins enable ltistore
36+
tutor images build openedx-dev
37+
tutor dev do init --limit=ltistore
38+
tutor dev launch --skip-build --non-interactive
39+
40+
License
41+
*******
42+
43+
This software is licensed under the terms of the AGPLv3.
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
# https://packaging.python.org/en/latest/tutorials/packaging-projects/
2+
# https://hatch.pypa.io/latest/config/build/
3+
4+
[project]
5+
name = "tutor-contrib-ltistore"
6+
description = "A plugin to install and enable the openedx-ltistore for reausable lti configurations."
7+
authors = [
8+
{ name = "Feanil Patel"},
9+
{ email = "[email protected]" },
10+
]
11+
license = { text = "AGPL-3.0-only" }
12+
13+
readme = {file = "README.rst", content-type = "text/x-rst"}
14+
requires-python = ">= 3.9"
15+
classifiers = [
16+
"Development Status :: 3 - Alpha",
17+
"Intended Audience :: Developers",
18+
"License :: OSI Approved :: GNU Affero General Public License v3",
19+
"Operating System :: OS Independent",
20+
"Programming Language :: Python",
21+
"Programming Language :: Python :: 3.9",
22+
"Programming Language :: Python :: 3.10",
23+
"Programming Language :: Python :: 3.11",
24+
"Programming Language :: Python :: 3.12",
25+
"Programming Language :: Python :: Implementation :: CPython",
26+
"Programming Language :: Python :: Implementation :: PyPy",
27+
28+
]
29+
dependencies = [
30+
"tutor>=19.0.0,<21.0.0",
31+
]
32+
optional-dependencies = { dev = ["tutor[dev]>=19.0.0,<21.0.0"] }
33+
34+
# These fields will be set by hatch_build.py
35+
dynamic = ["version"]
36+
37+
[tool.hatch.version]
38+
path = "tutor_ltistore/__about__.py"
39+
40+
# https://packaging.python.org/en/latest/specifications/well-known-project-urls/#well-known-labels
41+
[project.urls]
42+
Documentation = "https://github.com/openedx/openedx-tutor-plugins#readme"
43+
Issues = "https://github.com/openedx/openedx-tutor-plugins/issues"
44+
Source = "https://github.com/openedx/openedx-tutor-plugins"
45+
46+
[build-system]
47+
requires = ["hatchling"]
48+
build-backend = "hatchling.build"
49+
50+
[tool.hatch.build.targets.wheel]
51+
packages = ["tutor_ltistore"]
52+
53+
[tool.hatch.build.targets.sdist]
54+
# Disable strict naming, otherwise twine is not able to detect name/version
55+
strict-naming = false
56+
include = [ "/tutor_ltistore"]
57+
exclude = ["tests*"]
58+
59+
[project.entry-points."tutor.plugin.v1"]
60+
ltistore = "tutor_ltistore.plugin"
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
__version__ = "19.0.0"

plugins/tutor-contrib-ltistore/tutor_ltistore/__init__.py

Whitespace-only changes.

0 commit comments

Comments
 (0)