Skip to content

Commit

Permalink
chore: cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
CodeWithEmad authored and Faraz32123 committed Nov 24, 2023
1 parent e18fede commit 0f9ac7f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
1 change: 0 additions & 1 deletion tutordiscovery/__about__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
__version__ = "16.0.1"

17 changes: 10 additions & 7 deletions tutordiscovery/plugin.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
from __future__ import annotations

from glob import glob
import os
import pkg_resources
import typing as t
from glob import glob

import pkg_resources
from tutor import hooks as tutor_hooks
from tutor.__about__ import __version_suffix__

Expand All @@ -15,6 +15,8 @@
__version__ += "-" + __version_suffix__

HERE = os.path.abspath(os.path.dirname(__file__))
REPO_NAME = "course-discovery"
APP_NAME = "discovery"

config: t.Dict[str, t.Dict[str, t.Any]] = {
"defaults": {
Expand All @@ -33,6 +35,12 @@
"REPOSITORY": "https://github.com/openedx/course-discovery.git",
"REPOSITORY_VERSION": "{{ OPENEDX_COMMON_VERSION }}",
},
"unique": {
"MYSQL_PASSWORD": "{{ 8|random_string }}",
"SECRET_KEY": "{{ 20|random_string }}",
"OAUTH2_SECRET": "{{ 8|random_string }}",
"OAUTH2_SECRET_SSO": "{{ 8|random_string }}",
},
}

# Initialization tasks
Expand Down Expand Up @@ -78,10 +86,6 @@
)


REPO_NAME = "course-discovery"
APP_NAME = "discovery"


# Automount /openedx/discovery folder from the container
@tutor_hooks.Filters.COMPOSE_MOUNTS.add()
def _mount_course_discovery(
Expand All @@ -104,7 +108,6 @@ def _mount_course_discovery_on_build(
return mounts


####### Boilerplate code
# Add the "templates" folder as a template root
tutor_hooks.Filters.ENV_TEMPLATE_ROOTS.add_item(
pkg_resources.resource_filename("tutordiscovery", "templates")
Expand Down

0 comments on commit 0f9ac7f

Please sign in to comment.