From 4a145f956b584f27d8150bbad54bf0cac1d86e3b Mon Sep 17 00:00:00 2001 From: David Ormsbee Date: Fri, 17 May 2024 10:06:04 -0400 Subject: [PATCH] feat!: remove blockstore support + 0.3.0 version bump (#24) Blockstore was completely removed from edx-platform in: https://github.com/openedx/edx-platform/pull/34739 As a follow-on to that work, this commit removes the entirety of two blockstore-related plugins (tutor-contrib-blockstore-filesystem and tutor-contrib-blockstore-minio), as well most blockstore references present in tutor-contrib-library-authoring-mfe. The BLOCKSTORE_COLLECTION_UUID configuration value was left in place because it's expected by the Library Authoring MFE and currently required by the Django view that creates Libraries (even though the value is never used). We will remove those references in a later PR. --- README.rst | 4 +- .../.gitignore | 7 - .../MANIFEST.in | 2 - .../Makefile | 28 --- .../README.rst | 22 -- .../blockstore_config_filesystem/__about__.py | 1 - .../blockstore_config_filesystem/__init__.py | 0 .../patches/.gitignore | 0 .../patches/openedx-cms-common-settings | 7 - .../blockstore_config_filesystem/plugin.py | 233 ------------------ .../apps/.gitignore | 0 .../build/.gitignore | 0 .../jobs/init/.gitignore | 0 .../jobs/init/cms.sh | 5 - .../setup.py | 60 ----- .../tutor-contrib-blockstore-minio/.gitignore | 7 - .../MANIFEST.in | 2 - .../tutor-contrib-blockstore-minio/Makefile | 28 --- .../tutor-contrib-blockstore-minio/README.rst | 20 -- .../blockstore_config_minio/__about__.py | 1 - .../blockstore_config_minio/__init__.py | 0 .../patches/.gitignore | 0 .../patches/openedx-cms-common-settings | 3 - .../blockstore_config_minio/plugin.py | 233 ------------------ .../blockstore_config_minio/apps/.gitignore | 0 .../blockstore_config_minio/build/.gitignore | 0 .../jobs/init/.gitignore | 0 .../blockstore_config_minio/jobs/init/cms.sh | 5 - .../tutor-contrib-blockstore-minio/setup.py | 60 ----- .../README.rst | 16 +- .../tutor_library_authoring_mfe/__about__.py | 2 +- .../patches/openedx-lms-common-settings | 2 +- .../tutor_library_authoring_mfe/plugin.py | 5 + .../library_authoring_mfe/jobs/init/cms.sh | 4 - 34 files changed, 9 insertions(+), 748 deletions(-) delete mode 100644 plugins/tutor-contrib-blockstore-filesystem/.gitignore delete mode 100644 plugins/tutor-contrib-blockstore-filesystem/MANIFEST.in delete mode 100644 plugins/tutor-contrib-blockstore-filesystem/Makefile delete mode 100644 plugins/tutor-contrib-blockstore-filesystem/README.rst delete mode 100644 plugins/tutor-contrib-blockstore-filesystem/blockstore_config_filesystem/__about__.py delete mode 100644 plugins/tutor-contrib-blockstore-filesystem/blockstore_config_filesystem/__init__.py delete mode 100644 plugins/tutor-contrib-blockstore-filesystem/blockstore_config_filesystem/patches/.gitignore delete mode 100644 plugins/tutor-contrib-blockstore-filesystem/blockstore_config_filesystem/patches/openedx-cms-common-settings delete mode 100644 plugins/tutor-contrib-blockstore-filesystem/blockstore_config_filesystem/plugin.py delete mode 100644 plugins/tutor-contrib-blockstore-filesystem/blockstore_config_filesystem/templates/blockstore_config_filesystem/apps/.gitignore delete mode 100644 plugins/tutor-contrib-blockstore-filesystem/blockstore_config_filesystem/templates/blockstore_config_filesystem/build/.gitignore delete mode 100644 plugins/tutor-contrib-blockstore-filesystem/blockstore_config_filesystem/templates/blockstore_config_filesystem/jobs/init/.gitignore delete mode 100644 plugins/tutor-contrib-blockstore-filesystem/blockstore_config_filesystem/templates/blockstore_config_filesystem/jobs/init/cms.sh delete mode 100644 plugins/tutor-contrib-blockstore-filesystem/setup.py delete mode 100644 plugins/tutor-contrib-blockstore-minio/.gitignore delete mode 100644 plugins/tutor-contrib-blockstore-minio/MANIFEST.in delete mode 100644 plugins/tutor-contrib-blockstore-minio/Makefile delete mode 100644 plugins/tutor-contrib-blockstore-minio/README.rst delete mode 100644 plugins/tutor-contrib-blockstore-minio/blockstore_config_minio/__about__.py delete mode 100644 plugins/tutor-contrib-blockstore-minio/blockstore_config_minio/__init__.py delete mode 100644 plugins/tutor-contrib-blockstore-minio/blockstore_config_minio/patches/.gitignore delete mode 100644 plugins/tutor-contrib-blockstore-minio/blockstore_config_minio/patches/openedx-cms-common-settings delete mode 100644 plugins/tutor-contrib-blockstore-minio/blockstore_config_minio/plugin.py delete mode 100644 plugins/tutor-contrib-blockstore-minio/blockstore_config_minio/templates/blockstore_config_minio/apps/.gitignore delete mode 100644 plugins/tutor-contrib-blockstore-minio/blockstore_config_minio/templates/blockstore_config_minio/build/.gitignore delete mode 100644 plugins/tutor-contrib-blockstore-minio/blockstore_config_minio/templates/blockstore_config_minio/jobs/init/.gitignore delete mode 100644 plugins/tutor-contrib-blockstore-minio/blockstore_config_minio/templates/blockstore_config_minio/jobs/init/cms.sh delete mode 100644 plugins/tutor-contrib-blockstore-minio/setup.py diff --git a/README.rst b/README.rst index 7c15286..2540cd2 100644 --- a/README.rst +++ b/README.rst @@ -20,8 +20,6 @@ Plugin Status (*Experimental*, *Production*, or *D =================================== ====================================================== tutor-contrib-learner-dashboard-mfe Deprecated tutor-contrib-library-authoring-mfe Experimental -tutor-contrib-blockstore-filesystem Experimental -tutor-contrib-blockstore-minio Experimental =================================== ====================================================== Getting Started @@ -31,7 +29,7 @@ Generally, assuming `Tutor is installed`_, to add a plugin in this repository to your deployment environment you would: .. code:: bash - + git clone git@github.com:openedx/openedx-tutor-plugins cd openedx-tutor-plugins/plugins/ pip install -e . diff --git a/plugins/tutor-contrib-blockstore-filesystem/.gitignore b/plugins/tutor-contrib-blockstore-filesystem/.gitignore deleted file mode 100644 index f6a874f..0000000 --- a/plugins/tutor-contrib-blockstore-filesystem/.gitignore +++ /dev/null @@ -1,7 +0,0 @@ -.*.swp -!.gitignore -TODO -__pycache__ -*.egg-info/ -/build/ -/dist/ diff --git a/plugins/tutor-contrib-blockstore-filesystem/MANIFEST.in b/plugins/tutor-contrib-blockstore-filesystem/MANIFEST.in deleted file mode 100644 index eefdcb4..0000000 --- a/plugins/tutor-contrib-blockstore-filesystem/MANIFEST.in +++ /dev/null @@ -1,2 +0,0 @@ -recursive-include blockstore_config_filesystem/patches * -recursive-include blockstore_config_filesystem/templates * diff --git a/plugins/tutor-contrib-blockstore-filesystem/Makefile b/plugins/tutor-contrib-blockstore-filesystem/Makefile deleted file mode 100644 index 05fedbd..0000000 --- a/plugins/tutor-contrib-blockstore-filesystem/Makefile +++ /dev/null @@ -1,28 +0,0 @@ -.DEFAULT_GOAL := help -.PHONY: docs -SRC_DIRS = ./blockstore_config_filesystem -BLACK_OPTS = --exclude templates ${SRC_DIRS} - -# Warning: These checks are not necessarily run on every PR. -test: test-lint test-types test-format # Run some static checks. - -test-format: ## Run code formatting tests - black --check --diff $(BLACK_OPTS) - -test-lint: ## Run code linting tests - pylint --errors-only --enable=unused-import,unused-argument --ignore=templates --ignore=docs/_ext ${SRC_DIRS} - -test-types: ## Run type checks. - mypy --exclude=templates --ignore-missing-imports --implicit-reexport --strict ${SRC_DIRS} - -format: ## Format code automatically - black $(BLACK_OPTS) - -isort: ## Sort imports. This target is not mandatory because the output may be incompatible with black formatting. Provided for convenience purposes. - isort --skip=templates ${SRC_DIRS} - -ESCAPE =  -help: ## Print this help - @grep -E '^([a-zA-Z_-]+:.*?## .*|######* .+)$$' Makefile \ - | sed 's/######* \(.*\)/@ $(ESCAPE)[1;31m\1$(ESCAPE)[0m/g' | tr '@' '\n' \ - | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[33m%-30s\033[0m %s\n", $$1, $$2}' diff --git a/plugins/tutor-contrib-blockstore-filesystem/README.rst b/plugins/tutor-contrib-blockstore-filesystem/README.rst deleted file mode 100644 index decf42d..0000000 --- a/plugins/tutor-contrib-blockstore-filesystem/README.rst +++ /dev/null @@ -1,22 +0,0 @@ -blockstore :code:`FileSystemStorage` configuration plugin for `Tutor `__ -=================================================================================== - -Installation ------------- - -:: - - pip install git+https://github.com/openedx/openedx-tutor-plugins#subdirectory=plugins/tutor-contrib-blockstore-filesystem - -Usage ------ - -:: - - tutor plugins enable blockstore-filesystem - - -License -------- - -This software is licensed under the terms of the AGPLv3. diff --git a/plugins/tutor-contrib-blockstore-filesystem/blockstore_config_filesystem/__about__.py b/plugins/tutor-contrib-blockstore-filesystem/blockstore_config_filesystem/__about__.py deleted file mode 100644 index d3ec452..0000000 --- a/plugins/tutor-contrib-blockstore-filesystem/blockstore_config_filesystem/__about__.py +++ /dev/null @@ -1 +0,0 @@ -__version__ = "0.2.0" diff --git a/plugins/tutor-contrib-blockstore-filesystem/blockstore_config_filesystem/__init__.py b/plugins/tutor-contrib-blockstore-filesystem/blockstore_config_filesystem/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/plugins/tutor-contrib-blockstore-filesystem/blockstore_config_filesystem/patches/.gitignore b/plugins/tutor-contrib-blockstore-filesystem/blockstore_config_filesystem/patches/.gitignore deleted file mode 100644 index e69de29..0000000 diff --git a/plugins/tutor-contrib-blockstore-filesystem/blockstore_config_filesystem/patches/openedx-cms-common-settings b/plugins/tutor-contrib-blockstore-filesystem/blockstore_config_filesystem/patches/openedx-cms-common-settings deleted file mode 100644 index b8a7030..0000000 --- a/plugins/tutor-contrib-blockstore-filesystem/blockstore_config_filesystem/patches/openedx-cms-common-settings +++ /dev/null @@ -1,7 +0,0 @@ -BUNDLE_ASSET_STORAGE_SETTINGS = { - "STORAGE_CLASS": "django.core.files.storage.FileSystemStorage", - "STORAGE_KWARGS": { - "location": f"{MEDIA_ROOT}blockstore/", - "base_url": f"http://cms:8000{MEDIA_URL}blockstore/", - }, -} diff --git a/plugins/tutor-contrib-blockstore-filesystem/blockstore_config_filesystem/plugin.py b/plugins/tutor-contrib-blockstore-filesystem/blockstore_config_filesystem/plugin.py deleted file mode 100644 index 4426942..0000000 --- a/plugins/tutor-contrib-blockstore-filesystem/blockstore_config_filesystem/plugin.py +++ /dev/null @@ -1,233 +0,0 @@ -from __future__ import annotations - -import os -import os.path -from glob import glob - -import click -import pkg_resources -from tutor import hooks - -from .__about__ import __version__ - -######################################## -# CONFIGURATION -######################################## - -hooks.Filters.CONFIG_DEFAULTS.add_items( - [ - # Add your new settings that have default values here. - # Each new setting is a pair: (setting_name, default_value). - # Prefix your setting names with 'BLOCKSTORE_'. - ("BLOCKSTORE_VERSION", __version__), - ] -) - -hooks.Filters.CONFIG_UNIQUE.add_items( - [ - # Add settings that don't have a reasonable default for all users here. - # For instance: passwords, secret keys, etc. - # Each new setting is a pair: (setting_name, unique_generated_value). - # Prefix your setting names with 'BLOCKSTORE_'. - # For example: - ### ("BLOCKSTORE_SECRET_KEY", "{{ 24|random_string }}"), - ] -) - -hooks.Filters.CONFIG_OVERRIDES.add_items( - [ - # Danger zone! - # Add values to override settings from Tutor core or other plugins here. - # Each override is a pair: (setting_name, new_value). For example: - ### ("PLATFORM_NAME", "My platform"), - ] -) - - -######################################## -# INITIALIZATION TASKS -######################################## - -# To add a custom initialization task, create a bash script template under: -# blockstore_config_filesystem/templates/blockstore/jobs/init/ -# and then add it to the MY_INIT_TASKS list. Each task is in the format: -# ("", ("", "", "