Skip to content

Commit

Permalink
Merge pull request #27 from openedx/iahmad/ENT-8117-3
Browse files Browse the repository at this point in the history
fix: Refactored logging and default probability
  • Loading branch information
irfanuddinahmad authored Jan 29, 2024
2 parents 43228d9 + bf68ccf commit 96e6e66
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 10 deletions.
9 changes: 9 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,15 @@ Unreleased

*

[0.1.6] - 2024-01-29
************************************************

Changed
=======

* Refactored logging and default run probability


[0.1.5] - 2024-01-25
************************************************

Expand Down
2 changes: 1 addition & 1 deletion skill_tagging/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Django app plugin for fetching and verifying tags for xblock skills.
"""

__version__ = '0.1.5'
__version__ = '0.1.6'

# pylint: disable=invalid-name
default_app_config = 'skill_tagging.apps.SkillTaggingConfig'
10 changes: 1 addition & 9 deletions skill_tagging/pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from openedx_filters import PipelineStep

logger = logging.getLogger(__name__)
DEFAULT_PROBABILITY = 0.5
DEFAULT_PROBABILITY = 0.03


def resource_string(path):
Expand Down Expand Up @@ -84,10 +84,6 @@ def run_filter(self, block, fragment, context, view): # pylint: disable=argumen

# Check whether we need to run this filter and only call the API.
if not self.should_run_filter():
logger.info(
"[Xblock-Skill-Tagging] Filter aborted for vertical block. Block-ID: %s",
str(block.scope_ids.usage_id.block_id)
)
return {"block": block, "fragment": fragment, "context": context, "view": view}
skills = self.fetch_related_skills(block)
if not skills:
Expand Down Expand Up @@ -128,10 +124,6 @@ def run_filter(self, block, context): # pylint: disable=arguments-differ
"""Pipeline Step implementing the Filter"""
usage_id = block.scope_ids.usage_id
if usage_id.block_type != "video" or not self.should_run_filter():
logger.info(
"[Xblock-Skill-Tagging] Filter aborted for block. Block-ID: %s",
str(block.scope_ids.usage_id.block_id)
)
# avoid fetching skills for other xblocks
return {"block": block, "context": context}
skills = self.fetch_related_skills(block)
Expand Down

0 comments on commit 96e6e66

Please sign in to comment.