Skip to content

feat: skill verification pipeline#3

Merged
navinkarkera merged 15 commits intomainfrom
navin/verification-pipeline
Jan 5, 2023
Merged

feat: skill verification pipeline#3
navinkarkera merged 15 commits intomainfrom
navin/verification-pipeline

Conversation

@navinkarkera
Copy link
Contributor

@navinkarkera navinkarkera commented Dec 27, 2022

Description: Injects form to allow users verify skills/tags related to vertical block.

JIRA: Private-ref BB-6999

Dependencies:

Testing instructions:

This assumes you are testing this on a devstack.

  • Checkout the feat: adds VerticalBlockRenderCompleted filter hook openedx-platform#31388 branch
  • Checkout master branch in discovery repo.
  • Clone this repo in <devstack_base_dir>/src/ and checkout this branch.
  • Start required services using: make frontend-app-learning-up lms-up studio-up discovery-up
  • Open lms shell: make lms-shell.
  • Install this repo using pip install -e /src/xblock-skill-tagging
  • Run below to install deps
pip uninstall openedx-events openedx-filters
pip install git+https://github.com/open-craft/openedx-events.git@77ad965c4ac5157b861a19b8cb6b9240883008ba
pip install git+https://github.com/open-craft/openedx-filters.git@d0206cf84f2e5e22b1a99d06566d88839d40b9fe
  • Create a private.py file in lms/envs/ and add the following settings:
from .common import XBLOCK_MIXINS
XBLOCK_MIXINS += ('skill_tagging.skill_tagging_mixin.SkillTaggingMixin',)
TAXONOMY_API_BASE_URL='http://edx.devstack.discovery:18381'
TAXONOMY_API_SKILL_PAGE_SIZE=200
OPEN_EDX_FILTERS_CONFIG = {
    "org.openedx.learning.vertical_block.render.completed.v1": {
        "fail_silently": False,
        "pipeline": [
            "skill_tagging.pipeline.AddVerticalBlockSkillVerificationSection",
        ]
    }
}
SHOW_SKILL_VERIFICATION_PROBABILITY = 1
  • Restart the LMS make lms-restart
  • Clone taxonomy-connector into <devstck_dir>/src/
  • Open discovery shell using make discovery-shell and cd into taxonomy-connector in /edx/src/
  • Run below code to add dummy skills for few vertical blocks:
import factory
import factory.fuzzy
from taxonomy import models
from test_utils.factories import *
usage_keys = [
"block-v1:edX+DemoX+Demo_Course+type@vertical+block@vertical_0270f6de40fc",
"block-v1:edX+DemoX+Demo_Course+type@vertical+block@659a7b29e17e4a52a644433fa24574e7",
"block-v1:edX+DemoX+Demo_Course+type@vertical+block@b31d81ff304c411cb2a87ce173256546",
] # you can add more by copying vertical block usage keys from demo course
XBlockSkillsFactory.create_batch(3, usage_key=factory.Iterator(usage_keys))
SkillFactory.create_batch(20)
XBlockSkillDataFactory.create_batch(20, skill=factory.Iterator(models.Skill.objects.all()), xblock=factory.Iterator(models.XBlockSkills.objects.all()), verified=factory.fuzzy.FuzzyChoice([True, False]))
  • Open demo course in LMS ui : http://localhost:2000/course/course-v1:edX+DemoX+Demo_Course
  • Visit first few verticals and scroll to bottom, a section to verify tags should appear (if usage_key was added to discovery in above step) like below:
    image
  • Try submitting some tags (This will not actually update counts in discovery as we have not setup openedx-events backend)
  • Verify the behavior and design of the form.

Sandbox

More screenshots:
Details

image
image
image

Reviewers:

Merge checklist:

  • All reviewers approved
  • CI build is green
  • Version bumped
  • Changelog record added
  • Documentation updated (not only docstrings)
  • Commits are squashed

Post merge:

  • Create a tag
  • Check new version is pushed to PyPI after tag-triggered build is
    finished.
  • Delete working branch (if not needed anymore)

@navinkarkera navinkarkera force-pushed the navin/verification-pipeline branch from a314052 to f9c2e59 Compare December 30, 2022 10:11
@navinkarkera navinkarkera force-pushed the navin/verification-pipeline branch from f9c2e59 to 5f7781c Compare December 30, 2022 10:12
@navinkarkera navinkarkera changed the title feat: implement pipeline skeleton feat: skill verification pipeline Dec 30, 2022
@navinkarkera navinkarkera marked this pull request as ready for review December 30, 2022 14:10
Copy link
Contributor

@pkulkark pkulkark left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@navinkarkera Just the couple of nits noted, otherwise LGTM 👍

  • I tested this: verified that the skill verification pipeline works and UI is displayed correctly, as described in the testing instructions
  • I read through the code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments