Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Refactored logging and default probability #27

Merged
merged 1 commit into from
Jan 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading