
NOTICE: All information contained herein is, and remains
the property of TechnoCore.
The intellectual and technical concepts contained
herein are proprietary to TechnoCore and dissemination of this
information or reproduction of this material
is strictly forbidden unless prior written permission is obtained
from TechnoCore.
The ObjLearning class provides a comprehensive framework for managing
learning resources within the system. It enables teams to catalog,
organize, and retrieve educational materials, documentation, tutorials,
and reference materials related to various modules and packages.
ObjLearning manages a centralized repository of learning resources,
including:
The system supports automatic import of markdown files and manual
curation through YAML configuration files.
def_learningCREATE TABLE def_learning (
guid CHAR(36) NOT NULL,
package VARCHAR(255) NOT NULL,
module VARCHAR(255) NOT NULL,
title VARCHAR(500) NOT NULL,
description TEXT,
resource_type VARCHAR(50) NOT NULL,
url TEXT NOT NULL,
author VARCHAR(255),
tags VARCHAR(500),
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE
CURRENT_TIMESTAMP,
PRIMARY KEY (guid, package, module)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
factory.core)ObjML, HowTo, Architecture)Resources are defined in factory.core/ObjLearning.yaml:
database:
schema:
def_learning: |
CREATE TABLE def_learning (
guid CHAR(36) NOT NULL,
package VARCHAR(255) NOT NULL,
module VARCHAR(255) NOT NULL,
...
);
learning_resources:
ObjML:
- title: "Weight of Evidence (WOE) and Information Value (IV)"
description: "Comprehensive tutorial with examples"
resource_type: "Website"
url: "https://www.listendata.com/2015/03/woe-iv.html"
author: "Listendata"
tags: "WOE,IV,feature-engineering,credit-scoring"
- title: "Credit Risk Modeling in Python"
description: "Interactive tutorial with hands-on exercises"
resource_type: "Tutorial"
url: "https://www.datacamp.com/courses/credit-risk"
author: "DataCamp"
tags: "python,credit-risk,tutorial,interactive"
When importing markdown files, ObjLearning automatically categorizes
them by module based on file paths and names:
| Pattern | Module |
|---|---|
howto* |
HowTo |
architecture* |
Architecture |
config* |
Configuration |
workflow* |
Workflow |
scorecard*, objml* |
ObjML |
policies/* |
Policies |
package.* |
Package. |
| Other | General |
Creates the def_learning table if it doesn't exist:
python factory.core/ObjLearning.py create-table
Load all resources defined in ObjLearning.yaml:
# Load all modules
python factory.core/ObjLearning.py load-resources
# Load specific module only
python factory.core/ObjLearning.py load-resources --module ObjML
Display learning resources with optional filters:
# List all resources
python factory.core/ObjLearning.py list-resources
# Filter by module
python factory.core/ObjLearning.py list-resources --module ObjML
# Filter by resource type
python factory.core/ObjLearning.py list-resources \
--resource-type YouTube
# Filter by tag
python factory.core/ObjLearning.py list-resources --tag WOE
# Limit results
python factory.core/ObjLearning.py list-resources --limit 10
# Combine filters
python factory.core/ObjLearning.py list-resources \
--module ObjML \
--resource-type Website \
--limit 5
Display detailed information about a specific resource:
python factory.core/ObjLearning.py show-resource <guid>
Scan and import markdown files from a directory:
# Import from resource.notes
python factory.core/ObjLearning.py import-markdown resource.notes
# Import with custom package
python factory.core/ObjLearning.py import-markdown \
/path/to/docs \
--package custom.package
Remove all resources for a specific module:
python factory.core/ObjLearning.py clear-module ObjML
Warning: This action requires confirmation and cannot be undone.
from ObjLearning import ObjLearning
obj = ObjLearning(0)
# Insert a learning resource
guid = obj.insert_learning_resource(
module="ObjML",
title="Scikit-learn Documentation",
description="Official scikit-learn machine learning library docs",
resource_type="Documentation",
url="https://scikit-learn.org/stable/",
author="Scikit-learn Team",
tags="python,machine-learning,scikit-learn,official",
package="factory.core"
)
print(f"Inserted resource with GUID: {guid}")
# Get all ObjML resources
resources = obj.list_learning_resources(module="ObjML")
# Get YouTube videos only
videos = obj.list_learning_resources(resource_type="YouTube")
# Search by tag
woe_resources = obj.list_learning_resources(tag="WOE")
# Combined search
results = obj.list_learning_resources(
module="ObjML",
resource_type="Website",
tag="credit-scoring",
limit=10
)
for resource in results:
print(f"{resource['title']} - {resource['url']}")
# Load all modules from YAML
obj.load_resources_from_yaml()
# Load specific module
obj.load_resources_from_yaml(module="ObjML")
# Scan and import markdown documentation
obj.import_markdown_resources(
directory="resource.notes",
package="factory.core"
)
# Delete a specific resource
obj.delete_learning_resource(
guid="abc-123-def-456",
package="factory.core",
module="ObjML"
)
# Clear all resources for a module
obj.clear_module_resources("ObjML")
The following resource types are supported:
| Type | Description | Example |
|---|---|---|
| Website | Web pages and online articles | Blog posts, tutorials |
| YouTube | YouTube videos and playlists | Video tutorials, lectures |
| Paper | Academic papers and research | ArXiv, journal articles |
| Tutorial | Interactive tutorials | DataCamp, Coursera |
| Documentation | Official documentation | API docs, user guides |
| Book | Books and e-books | Technical books, references |
Recommended tag categories:
WOE, IV, credit-scoring, machine-learningpython, scikit-learn, tensorflowbeginner, intermediate, advancedtutorial, reference, example, theoryfinance, healthcare, retailWhen creating markdown files for import:
# Title for the main headingExample markdown structure:
# How to Configure Machine Learning Models
This guide explains the configuration options for ML models in the
system. It covers data preprocessing, model selection, and hyperparameter
tuning.
## Prerequisites
...
__init__(db=0)Initializes the ObjLearning instance.
Parameters:
db (int): Database instance to use (default: 0)create_table_if_not_exists()Creates the def_learning table if it doesn't exist.
Returns: None
insert_learning_resource(...)Inserts a learning resource into the database.
Parameters:
module (str): Module name (e.g., 'ObjML')title (str): Resource titledescription (str): Resource descriptionresource_type (str): Type of resourceurl (str): URL to the resourceauthor (str, optional): Resource authortags (str, optional): Comma-separated tagspackage (str): Package name (default: 'factory.core')Returns: str (GUID of inserted resource)
list_learning_resources(...)Lists learning resources from the database.
Parameters:
module (str, optional): Module filterresource_type (str, optional): Resource type filtertag (str, optional): Tag filterlimit (int, optional): Result limitReturns: List[Dict] (List of resources)
delete_learning_resource(guid, package, module=None)Deletes a learning resource from the database.
Parameters:
guid (str): Resource GUIDpackage (str): Package namemodule (str, optional): Module nameReturns: None
clear_module_resources(module)Clears all learning resources for a specific module.
Parameters:
module (str): Module nameReturns: None
scan_markdown_files(directory)Scans markdown files in a directory and extracts metadata.
Parameters:
directory (str): Directory path to scanReturns: List[Dict] (List of markdown file metadata)
import_markdown_resources(directory, package='factory.core')Scans markdown files and imports them as learning resources.
Parameters:
directory (str): Directory to scanpackage (str): Package name (default: 'factory.core')Returns: None
Comprehensive tests are available in:
resource.test/pytests/factory.core/test_objlearning.py
Run tests with:
# Run all ObjLearning tests
pytest resource.test/pytests/factory.core/test_objlearning.py -v
# Run specific test category
pytest resource.test/pytests/factory.core/test_objlearning.py::TestSQLSecurity -v
Test coverage includes:
If you see "Table already exists", this is normal. The system checks
and creates the table only if needed.
If markdown import fails:
The system allows duplicate titles but assigns unique GUIDs. To avoid
duplicates:
clear-module <module>If searches return empty:
list-resources --limit 5For issues or questions:
Last Updated: 2025-12-26
Author: TechnoCore Development Team